original_string: public function fetchAll($query, $parameters = array())
      {
          try {
              if (self::$profiling) {
                  $timer = $this->initProfiler();
              }
  
              $rows = array();
              $query = $this->prepare($query, $parameters);
              $rs = mysqli_query($this->connection, $query);
              if (is_bool($rs)) {
                  throw new DbException('fetchAll() failed: ' . mysqli_error($this->connection) . ' : ' . $query);
              }
  
              while ($row = mysqli_fetch_array($rs, MYSQLI_ASSOC)) {
                  $rows[] = $row;
              }
              mysqli_free_result($rs);
  
              if (self::$profiling && isset($timer)) {
                  $this->recordQueryProfile($query, $timer);
              }
              return $rows;
          } catch (Exception $e) {
              throw new DbException("Error query: " . $e->getMessage());
          }
      }
code: public function fetchAll($query, $parameters = array())
      {
          try {
              if (self::$profiling) {
                  $timer = $this->initProfiler();
              }
  
              $rows = array();
              $query = $this->prepare($query, $parameters);
              $rs = mysqli_query($this->connection, $query);
              if (is_bool($rs)) {
                  throw new DbException('fetchAll() failed: ' . mysqli_error($this->connection) . ' : ' . $query);
              }
  
              while ($row = mysqli_fetch_array($rs, MYSQLI_ASSOC)) {
                  $rows[] = $row;
              }
              mysqli_free_result($rs);
  
              if (self::$profiling && isset($timer)) {
                  $this->recordQueryProfile($query, $timer);
              }
              return $rows;
          } catch (Exception $e) {
              throw new DbException("Error query: " . $e->getMessage());
          }
      }
code_tokens: public function fetchAll ( $ query , $ parameters = array ( ) ) { try { if ( self :: $ profiling ) { $ timer = $ this -> initProfiler ( ) ; } $ rows = array ( ) ; $ query = $ this -> prepare ( $ query , $ parameters ) ; $ rs = mysqli_query ( $ this -> connection , $ query ) ; if ( is_bool ( $ rs ) ) { throw new DbException ( 'fetchAll() failed: ' . mysqli_error ( $ this -> connection ) . ' : ' . $ query ) ; } while ( $ row = mysqli_fetch_array ( $ rs , MYSQLI_ASSOC ) ) { $ rows [ ] = $ row ; } mysqli_free_result ( $ rs ) ; if ( self :: $ profiling && isset ( $ timer ) ) { $ this -> recordQueryProfile ( $ query , $ timer ) ; } return $ rows ; } catch ( Exception $ e ) { throw new DbException ( "Error query: " . $ e -> getMessage ( ) ) ; } }
docstring: Returns an array containing all the rows of a query result, using optional bound parameters.
  
  @see query()
  
  @param string $query Query
  @param array $parameters Parameters to bind
  @return array
  @throws Exception|DbException if an exception occurred
docstring_tokens: Returns an array containing all the rows of a query result using optional bound parameters .