Lazy loads the data based on the filter criteria from the config.

@return StructureInterface[]
189086
public function getData()
    {
        if (null === $this->data) {
            $this->data = $this->loadData();
        }

        return $this->data;
    }
832762
public function makeSchema(): array
    {
        return [
            Filter::SH_MAP       => $this->buildMap($this->entity),
            Filter::SH_VALIDATES => $this->entity->getProperty('validates', true) ?? [],
            Filter::SH_SECURED   => $this->entity->getSecured(),
            Filter::SH_FILLABLE  => $this->entity->getFillable(),
            Filter::SH_MUTATORS  => $this->entity->getMutators(),
        ];
    }
595953
public function asArray()
    {
        return [
            $this->type->getName() => Arrays::arrayMergeRecursiveOverrule([
                'dynamic_templates' => $this->getDynamicTemplates(),
                'properties' => $this->getProperties(),
            ], $this->fullMapping),
        ];
    }
960061
public function getConfig()
    {
        if (!$this->config) {
            $this->config = new Structure();

            $this->loadConfig($this->config);
        }

        return $this->config;
    }
1268021
public function jsonSerialize()
    {
        if ($this->getHasDynamicTemplate() == true) {
            $dynamic_substitutions = $this->getSubstitutions();
            $substitutions = null;
        } else {
            $substitutions = $this->getSubstitutions();
            $dynamic_substitutions = null;
        }

        return array_filter(
            [
                'to' => $this->getTos(),
                'cc' => $this->getCcs(),
                'bcc' => $this->getBccs(),
                'subject' => $this->getSubject(),
                'headers' => $this->getHeaders(),
                'substitutions' => $substitutions,
                'dynamic_template_data' => $dynamic_substitutions,
                'custom_args' => $this->getCustomArgs(),
                'send_at' => $this->getSendAt()
            ],
            function ($value) {
                return $value !== null;
            }
        ) ?: null;
    }
726860
protected function loadRows(IRowCriteria $criteria = null) : array
    {
        $criteria = $criteria ?: $this->defaultLoadCriteria();

        $collection = Traversable::from($this->rows);

        /** @var ColumnConditionGroup[] $columnConditionGroups */
        $columnConditionGroups = $criteria->getConditionGroups();

        foreach ($columnConditionGroups as $columnConditionGroup) {
            if ($columnConditionGroup->getConditionMode() === IRowCriteria::CONDITION_MODE_AND) {
                foreach ($columnConditionGroup->getConditions() as $condition) {
                    $collection = $collection->where($condition->makeRowFilterCallable());
                }
            } else {
                $columnConditions = $columnConditionGroup->getConditions();
                $filterCallback   = array_shift($columnConditions)->makeRowFilterCallable();

                foreach ($columnConditionGroup->getConditions() as $condition) {
                    $conditionFilter = $condition->makeRowFilterCallable();
                    $filterCallback  = function ($row) use ($conditionFilter, $filterCallback) {
                        return $conditionFilter($row) || $filterCallback($row);
                    };
                }

                $collection = $collection->where($filterCallback);
            }
        }


        $orderings = $criteria->getOrderings();
        if (!empty($orderings)) {
            /** @var ColumnOrdering $firstOrdering */
            $firstOrdering = array_shift($orderings);
            $collection    = $collection->orderBy(
                $firstOrdering->makeComponentGetterCallable(),
                $firstOrdering->isAsc() ? Direction::ASCENDING : Direction::DESCENDING
            );

            foreach ($orderings as $ordering) {
                $collection = $collection->thenBy(
                    $ordering->makeComponentGetterCallable(),
                    $ordering->isAsc() ? Direction::ASCENDING : Direction::DESCENDING
                );
            }
        }

        $collection = $collection->slice($criteria->getRowsToSkip(), $criteria->getAmountOfRows());

        if (!$criteria->getWhetherLoadsAllColumns()) {
            $columnsToLoadMap = $criteria->getColumnsToLoad();

            $collection = $collection->select(function (TableRow $row) use ($columnsToLoadMap) {
                return new TableRow(array_intersect_key($row->getData(), $columnsToLoadMap));
            });
        }

        return $collection->asArray();
    }
620668
public function getMethods($filter = null)
    {
        if ($this->methods === null) {
            // lazy load class methods list
            $this->methods = array();
            foreach ($this->node->stmts as $stmt) {
                if ($stmt instanceof Node\Stmt\ClassMethod) {
                    $stmt->setAttribute('fileName', $this->getFileName());
                    $this->methods[$stmt->name] = new MethodModel($this, $stmt);
                }
            }
        }

        if (isset($filter)) {
            // @TODO must implement the filter feature
            $methods =& $this->methods;
        } else {
            $methods =& $this->methods;
        }

        return array_values($methods);
    }
787542
private function loadFiles(): array
    {
        $items = [];
        if (!is_dir($this->path)) {
            return $items;
        }

        $entries = Finder::create()->files()->name('*.php')->in($this->path);

        // Load files.
        foreach ($entries as $entry) {
            $basename = call_user_func([$entry, 'getBasename']);

            if ($this->isEnvironmentFilename($basename)) {
                // Do not process this file. It will be handled later.
                continue;
            }

            $pathRelative = call_user_func([$entry, 'getRelativePath']);
            $configKey = rtrim($basename, '.php');

            // Load main config-file.
            $this->loadFile($items, $this->path, $pathRelative, $configKey);

            // Load environment config-file.
            $this->loadFile($items, $this->path, $pathRelative, $configKey, $this->environment);
        }

        return $items;
    }
1299887
private static function _loadNullValues()
    {
        $values = array();
        $cls    = get_called_class();

        if (!array_key_exists($cls, self::$_columns)) {
            return null;
        }

        foreach (self::$_columns[$cls] as $column) {
            $name = self::isIgnoringCase() ? strtolower($column) : $column;
            $values[$column] = null;
        }
        return $values;
    }
534382
public function getParameters()
    {
        if ($this->parameters === null) {
            // lazy load function parameters list
            $this->parameters = array();
            foreach ($this->node->params as $pos => $param) {
                if ($param instanceof Node\Param) {
                    $this->parameters[] = new ParameterModel($param, $pos);
                }
            }
        }
        return $this->parameters;
    }
198198
protected function loadRelated(): array
    {
        $innerKey = $this->parent->getField($this->key(Record::INNER_KEY));
        if (!empty($innerKey)) {
            return $this->createSelector($innerKey)->fetchData();
        }

        return [];
    }
1231439
protected function lazyLoad()
    {
        if(!empty($this->data)){
            return true;
        }

        if(isset($this->id)){
            $this->get($this);
            return true;
        }

        return false;
    }
249756
public function loadFaqs() : array
    {
        return $this->repository->matching(
            $this->repository->criteria()
                ->orderByAsc(Faq::ORDER_TO_DISPLAY)
        );
    }
739509
public function load()
    {
        $data = [];
        $routes = $this->getRoutes();
        foreach($routes as $route) {
            $parsedRoute = $this->parseRoute($route);
            $routeData = $this->requestService($route, $parsedRoute);

            if ($routeData !== null) {
                // When the routeData contains more entry. (if it's a numeric array)
                if (array_values($routeData) === $routeData) {
                    $data = array_merge($data, $routeData);
                }
                else {
                    $data[] = $routeData;
                }
            }
        }
        $this->returnData($data);
    }
524370
public function toArray()
        {
            $array = array();
            $data = $this->_data;
            foreach ($data as $key => $value) {
                if ($value instanceof Loadini) {
                    $array[$key] = $value->toArray();
                } else {
                    $array[$key] = $value;
                }
            }
            return $array;
        }
1132872
public function structProperties()
    {
        $property = $this->storageProperty();

        if ($property) {
            $struct = $property->structureMetadata();

            if (isset($struct['properties'])) {
                return $struct['properties'];
            }
        }

        return [];
    }
778373
public function getDependentStructures()
    {
        $dependents = parent::getDependentStructures();

        if ( ! empty( $this->id ) && isset( $this->_seoUri ) )
        {
            $subdomainId = $this->getServiceLocator()
                                ->get( 'SiteInfo' )
                                ->getSubdomainId();

            $postfix  = 2;
            $baseUri  = $this->_seoUri;
            $uriModel = $this->getUriModel();
            $params   = array(
                'id' => empty( $this->_seoUriStructure ) ? null : $this->_seoUriStructure->id
            );

            while ( $uriModel->isSubdomainUriExists( $subdomainId,
                    $this->_seoUri, $params ) )
            {
                $this->_seoUri = $baseUri . '/' . ( $postfix++ );
            }

            if ( empty( $this->_seoUriStructure ) )
            {
                if ( ! empty( $this->_seoUri ) )
                {
                    $dependents[] = $this->getUriModel()
                                         ->create( array(
                                             'default'      => true,
                                             'contentId'    => $this->id,
                                             'subdomainId'  => $subdomainId,
                                             'uri'          => $this->_seoUri,
                                             'locale'       => $this->getMapper()
                                                                    ->getLocale(),
                                         ) );
                }
            }
            else if ( $this->_seoUriStructure->uri != $this->_seoUri )
            {
                $uri = $this->getUriModel()
                            ->findBySubdomainUri( $subdomainId, $this->_seoUri );

                if ( $uri && $uri->contentId == $this->id )
                {
                    $dependents[] = $uri->setDefault();
                }
                else
                {
                    $dependents[] = $this->_seoUriStructure
                                         ->setUri( $this->_seoUri );
                }
            }
        }

        return $dependents;
    }