original_string: 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;
      }
code: 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;
      }
code_tokens: 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 ; }
docstring: Fetch all the results as array of items.
  
  @param bool $pSingle Return a single Item or an array of Items.
  @return array|Item
docstring_tokens: Fetch all the results as array of items .