ElggSite::load PHP Méthode

load() protected méthode

Loads the full \ElggSite when given a guid.
protected load ( mixed $guid ) : boolean
$guid mixed GUID of \ElggSite entity or database row object
Résultat boolean
    protected function load($guid)
    {
        $attr_loader = new \Elgg\AttributeLoader(get_class(), 'site', $this->attributes);
        $attr_loader->requires_access_control = !$this instanceof \ElggPlugin;
        $attr_loader->secondary_loader = 'get_site_entity_as_row';
        $attrs = $attr_loader->getRequiredAttributes($guid);
        if (!$attrs) {
            return false;
        }
        $this->attributes = $attrs;
        $this->loadAdditionalSelectValues($attr_loader->getAdditionalSelectValues());
        _elgg_services()->entityCache->set($this);
        return true;
    }