src/Koldy/Db/Model.php
public static function all(string $orderField = null, string $orderDirection = null): array
    {
        $select = static::select();

        if ($orderField !== null) {
            $select->orderBy($orderField, $orderDirection);
        }

        $data = [];
        foreach ($select->fetchAll() as $r) {
            $data[] = new static($r);
        }

        return $data;
    }
public static function all(string $orderField = null, string $orderDirection = null): array
    {
        $select = static::select();

        if ($orderField !== null) {
            $select->orderBy($orderField, $orderDirection);
        }

        $data = [];
        foreach ($select->fetchAll() as $r) {
            $data[] = new static($r);
        }

        return $data;
    }
public static function all ( string $ orderField = null , string $ orderDirection = null ) : array { $ select = static :: select ( ) ; if ( $ orderField !== null ) { $ select -> orderBy ( $ orderField , $ orderDirection ) ; } $ data = [ ] ; foreach ( $ select -> fetchAll ( ) as $ r ) { $ data [ ] = new static ( $ r ) ; } return $ data ; }
Fetch all records from database

@param string $orderField
@param string $orderDirection

@return Model[]
@throws Query\Exception
@throws \Koldy\Exception
@link http://www.php.net/manual/en/pdo.constants.php
Fetch all records from database