Gc\Datatype\Collection::setDatatypes PHP Method

setDatatypes() protected method

Set datatype collection
protected setDatatypes ( ) : Collection
return Collection
    protected function setDatatypes()
    {
        $rows = $this->fetchAll($this->select(function (Select $select) {
            $select->order('name');
        }));
        $datatypes = array();
        foreach ($rows as $row) {
            $datatypes[] = Model::fromArray((array) $row);
        }
        $this->datatypes = $datatypes;
        return $this;
    }