ElggSite::__construct PHP Method

__construct() public method

Plugin developers should only use the constructor to create a new entity. To retrieve entities, use get_entity() and the elgg_get_entities* functions.
public __construct ( stdClass $row = null )
$row stdClass Database row result. Default is null to create a new site.
    public function __construct(\stdClass $row = null)
    {
        $this->initializeAttributes();
        if ($row) {
            // Load the rest
            if (!$this->load($row)) {
                $msg = "Failed to load new " . get_class() . " for GUID:" . $row->guid;
                throw new \IOException($msg);
            }
        }
    }