public function fetchAllAsItems($pSingle = false)
    {
        $data = array();

        if ($this->_stm === false) {
            return $data;
        }

        while ($row = $this->_stm->fetch(PDO::FETCH_ASSOC)) {
            if ($pSingle) {
                return Agl::getModel($this->_dbContainer, $row);
            }

            $data[] = Agl::getModel($this->_dbContainer, $row);
        }

        return $data;
    }
public function fetchAllAsItems($pSingle = false)
    {
        $data = array();

        if ($this->_stm === false) {
            return $data;
        }

        while ($row = $this->_stm->fetch(PDO::FETCH_ASSOC)) {
            if ($pSingle) {
                return Agl::getModel($this->_dbContainer, $row);
            }

            $data[] = Agl::getModel($this->_dbContainer, $row);
        }

        return $data;
    }
public function fetchAllAsItems ( $ pSingle = false ) { $ data = array ( ) ; if ( $ this -> _stm === false ) { return $ data ; } while ( $ row = $ this -> _stm -> fetch ( PDO :: FETCH_ASSOC ) ) { if ( $ pSingle ) { return Agl :: getModel ( $ this -> _dbContainer , $ row ) ; } $ data [ ] = Agl :: getModel ( $ this -> _dbContainer , $ row ) ; } return $ data ; }
Fetch all the results as array of items.

@param bool $pSingle Return a single Item or an array of Items.
@return array|Item
Fetch all the results as array of items .