Load the compiled eloquent entity models.

@return void
5434
protected function registerEloquentModels()
    {
        $files = $this->app['files']->files(storage_path('framework/entities'));
        
        foreach ($files as $file) {
            if ($this->app['files']->extension($file) == '') {
                require_once $file;
            }
        }
    }
1181396
public static function load()
    {
        if (!extension_loaded('opencensus')) {
            trigger_error('opencensus extension required to load Laravel integrations.', E_USER_WARNING);
            return;
        }

        Eloquent::load();

        // Create a trace span for every template rendered
        // public function get($path, array $data = array())
        opencensus_trace_method(CompilerEngine::class, 'get', function ($scope, $path, $data) {
            return [
                'name' => 'laravel/view',
                'attributes' => [
                    'path' => $path
                ]
            ];
        });
    }
198198
protected function loadRelated(): array
    {
        $innerKey = $this->parent->getField($this->key(Record::INNER_KEY));
        if (!empty($innerKey)) {
            return $this->createSelector($innerKey)->fetchData();
        }

        return [];
    }
996518
protected function registerCustomBindings(): void
    {
        $entityServiceFactory = $this->app->make(IEntityServiceFactory::class);

        foreach (config('laravel_entity_services.bindings') as $className => $entityService) {
            $entityServiceFactory->register($className, $entityService);
        }
    }
414670
protected function loadDataModels()
    {
        $ads = array();
        $totalNbTables = 0;
        $this->log('Loading XML schema files...');
        // Get all matched files from schemaFilesets
        foreach ($this->schemaFilesets as $fs) {
            $ds = $fs->getDirectoryScanner($this->project);
            $srcDir = $fs->getDir($this->project);

            $dataModelFiles = $ds->getIncludedFiles();
            sort($dataModelFiles);

            $defaultPlatform = $this->getGeneratorConfig()->getConfiguredPlatform();

            // Make a transaction for each file
            foreach ($dataModelFiles as $dmFilename) {

                $this->log("Processing: " . $dmFilename, Project::MSG_VERBOSE);
                $xmlFile = new PhingFile($srcDir, $dmFilename);

                $dom = new DomDocument('1.0', 'UTF-8');
                $dom->load($xmlFile->getAbsolutePath());

                // modify schema to include any external schemas (and remove the external-schema nodes)
                $this->includeExternalSchemas($dom, $srcDir);

                // normalize (or transform) the XML document using XSLT
                if ($this->getGeneratorConfig()->getBuildProperty('schemaTransform') && $this->xslFile) {
                    $this->log("Transforming " . $dmFilename . " using stylesheet " . $this->xslFile->getPath(), Project::MSG_VERBOSE);
                    if (!class_exists('XSLTProcessor')) {
                        $this->log("Could not perform XLST transformation. Make sure PHP has been compiled/configured to support XSLT.", Project::MSG_ERR);
                    } else {
                        // normalize the document using normalizer stylesheet
                        $xslDom = new DomDocument('1.0', 'UTF-8');
                        $xslDom->load($this->xslFile->getAbsolutePath());
                        $xsl = new XsltProcessor();
                        $xsl->importStyleSheet($xslDom);
                        $dom = $xsl->transformToDoc($dom);
                    }
                }

                // validate the XML document using XSD schema
                if ($this->validate && $this->xsdFile) {
                    $this->log("  Validating XML using schema " . $this->xsdFile->getPath(), Project::MSG_VERBOSE);
                    if (!$dom->schemaValidate($this->xsdFile->getAbsolutePath())) {
                        throw new EngineException("XML schema file (" . $xmlFile->getPath() . ") does not validate. See warnings above for reasons validation failed (make sure error_reporting is set to show E_WARNING if you don't see any).", $this->getLocation());
                    }
                }

                $xmlParser = new XmlToAppData($defaultPlatform, $this->getTargetPackage(), $this->dbEncoding);
                $xmlParser->setGeneratorConfig($this->getGeneratorConfig());
                $ad = $xmlParser->parseString($dom->saveXML(), $xmlFile->getAbsolutePath());
                $nbTables = $ad->getDatabase(null, false)->countTables();
                $totalNbTables += $nbTables;
                $this->log(sprintf('  %d tables processed successfully', $nbTables), Project::MSG_VERBOSE);

                $ad->setName($dmFilename);
                $ads[] = $ad;
            }
            $this->log(sprintf('%d tables found in %d schema files.', $totalNbTables, count($dataModelFiles)));
        }

        if (empty($ads)) {
            throw new BuildException("No schema files were found (matching your schema fileset definition).");
        }

        foreach ($ads as $ad) {
            // map schema filename with database name
            $this->dataModelDbMap[$ad->getName()] = $ad->getDatabase(null, false)->getName();
        }

        if (count($ads) > 1 && $this->packageObjectModel) {
            $ad = $this->joinDataModels($ads);
            $this->dataModels = array($ad);
        } else {
            $this->dataModels = $ads;
        }

        foreach ($this->dataModels as &$ad) {
            $ad->doFinalInitialization();
        }

        if ($this->validate) {
            foreach ($this->dataModels as $dataModel) {
                $validator = new PropelSchemaValidator($dataModel);
                if (!$validator->validate()) {
                    throw new EngineException(sprintf("The database schema contains errors:\n - %s", join("\n - ", $validator->getErrors())));
                }
            }
        }

        $this->dataModelsLoaded = true;
    }
669588
protected function loadConverters()
    {
        foreach ($this->projection as $name => $type) {
            if ($this->projection->isArray($name)) {
                $this->converters[$name] = $this
                    ->session
                    ->getClientUsingPooler('converter', 'array')
                    ->getConverter()
                    ;
            } else {
                $this->converters[$name] = $this
                    ->session
                    ->getClientUsingPooler('converter', $type)
                    ->getConverter()
                    ;
            }

            $this->field_types[$name] = $type;
        }

        return $this;
    }
436105
public function load()
    {
        // Even though we can't confirm the entity has
        // been loaded, we should still inform the user.
        $this->logAutoloadedEntities();

        $configuration = $this->getConfiguration();
        if (count($configuration)) {
            foreach ($configuration as $cpt => $config) {
                $obj = CustomPostType::factory($cpt);

                $this->addWordpressRegisteringAction($obj);

                if ($this->shouldAddAdminMenus($obj)) {
                    $this->addWordpressMenusRegisteringAction($obj);
                }

                if ($this->shouldAddRoutes($obj)) {
                    $this->addResourceRoute($obj);
                }
            }

            // The second we register an internal CPT it becomes worth
            // looking for additional model routes.
            add_action('wp_loaded', array(new ModelRewriteRegistrar(), "onModelsActivated"), 5);
        }
    }
83028
final protected function _loadData()
    {
        if (!$this->isLoaded()) {
            $this->_object_set = new ArrayObject();
            foreach ($this->_getData() as $object) {
                $this->insert($object);
            }
        }
    }
1021360
public function load()
    {
        if ($this->_isCollectionLoaded == false) {


            $collection = Mage::getResourceModel('catalog/category_collection')->addNameToResult();
            /* @var $collection Mage_Catalog_Model_Resource_Eav_Mysql4_Category_Collection */

            foreach ($collection as $category) {
                /** @var $category Mage_Catalog_Model_Category */
                $structure = explode('/', $category->getPath());
                $pathSize = count($structure);
                if ($pathSize > 1) {
                    $path = array();
                    for ($i = 1; $i < $pathSize; $i++) {
                        $path[] = $collection->getItemById($structure[$i])->getName();
                    }
                    $rootCategoryName = array_shift($path);
                    if (!isset($this->_categoriesWithRoots[$rootCategoryName])) {
                        $this->_categoriesWithRoots[$rootCategoryName] = array();
                    }
                    $index = $this->_implodeEscaped('/', $path);

                    $this->_categoriesWithRoots[$rootCategoryName][$index] = array(
                        'entity_id' => $category->getId(),
                        'path' => $category->getPath(),
                        'level' => $category->getLevel(),
                        'position' => $category->getPosition()
                    );

//allow importing by ids.
                    if (!isset($this->_categoriesWithRoots[$structure[1]])) {
                        $this->_categoriesWithRoots[$structure[1]] = array();
                    }
                    $this->_categoriesWithRoots[$structure[1]][$category->getId()] =
                        $this->_categoriesWithRoots[$rootCategoryName][$index];
                }
            }


            $collection = clone $this->_categoryCollection;
            $collection->removeAttributeToSelect();
            $tableName = $collection->getResource()->getEntityTable();
            $collection->getSelect()->from($tableName, ['entity_id', 'website_id', 'email']);

            $this->_byPagesIterator->iterate(
                $this->_categoryCollection,
                $this->_pageSize,
                [[$this, 'addCustomer']]
            );

            $this->_isCollectionLoaded = true;
        }
    }
586563
protected function _loadAssociations()
    {
        foreach ($this->Model->associations()->getIterator() as $association => $assocData) {
            $this->set(Inflector::variable($assocData->alias()), $this->Model->{$association}->find('list')->toArray());
        }
    }
433110
public final function loadModel(): void
    {
        if ($this->model != null) {
            return;
        }

        $file = sprintf('%s/app/service/%s/model/model.php', APP_DIR, $this->name);
        if (!file_exists($file)) {
            throw new ServiceException("Cannot load {$this->name} model, model file app/service/{$this->name}".
                "/model/model.php not found");
        }

        // FooService => FooModel
        $class = sprintf('froq\\app\\database\\%sModel', substr($this->name, 0, -strlen(self::SERVICE_NAME_SUFFIX)));
        if (!class_exists($class)) {
            throw new ServiceException("Cannot load {$this->name} model, model class {$class} not found");
        }

        $this->model = new $class($this);
    }
30926
protected function load()
    {
        $tables = $this->fetchTables($this->schema);
        foreach ($tables as $table) {
            $this->loadTable($table);
        }
        $views = $this->fetchViews($this->schema);
        foreach ($views as $table) {
            $this->loadTable($table, true);
        }
    }
348493
def load(self, model):
        """"""
        self._dawg.load(find_data(model))
        self._loaded_model = True
1336542
private function load()
    {
        $this->locales->loadFromArray($this->getConfig('locales'));
        $this->setSupportedLocales($this->getConfig('supported-locales'));
        $this->setDefaultLocale();
    }
1174114
private function load()
    {
        if (null === $this->collection) {
            $this->collection = $this->transformer->getChildren($this->page);
        }
    }
381699
protected function load()
    {
        if ($this->loaded)
        {
            return;
        }
        $plugin = Eresus_Plugin_Registry::getInstance()->load('gallery');
        /* @var Gallery_Entity_Table_Image $table */
        $table = ORM::getTable($plugin, 'Image');
        $this->items = $table->findInSection($this->sectionId, null, null, true);
        $this->loaded = true;
    }
114731
public function reloadModelsWithRelationCount(): self
    {
        /** @var \Illuminate\Database\Eloquent\Builder $query */
        $query = $this->models()
            ->first()
            ->newQuery()
            ->withCount($this->relations);

        $ids = $this->getModelIds();

        $reloadedModels = $query
            ->whereKey($ids)
            ->get()
            ->filter(function (Model $model) use ($ids) {
                return in_array(
                    $model->getKey(),
                    $ids,
                    true
                );
            });

        return $this->setModels($reloadedModels);
    }