public function findPage($page = null, $size = self::PAGE_SIZE, $filter = null)
    {
        try {
            $offset = ($page - 1) * $size;
            return $this->select(null, $filter, $size, $offset)->fetchAll(\PDO::FETCH_ASSOC);
        } catch (\PDOException $e) {
            throw new StorageException($e->getMessage());
        }
    }
public function findPage($page = null, $size = self::PAGE_SIZE, $filter = null)
    {
        try {
            $offset = ($page - 1) * $size;
            return $this->select(null, $filter, $size, $offset)->fetchAll(\PDO::FETCH_ASSOC);
        } catch (\PDOException $e) {
            throw new StorageException($e->getMessage());
        }
    }
public function findPage ( $ page = null , $ size = self :: PAGE_SIZE , $ filter = null ) { try { $ offset = ( $ page - 1 ) * $ size ; return $ this -> select ( null , $ filter , $ size , $ offset ) -> fetchAll ( \ PDO :: FETCH_ASSOC ) ; } catch ( \ PDOException $ e ) { throw new StorageException ( $ e -> getMessage ( ) ) ; } }
Gets a page from the storage model based on entity
@param int $page The page number
@param int $size The size of a page (number of rows)
@param array $filter A list of filters (pairs columns => value)
@return mixed
@throws StorageException
Gets a page from the storage model based on entity