original_string: public function getResultsAsArray()
      {
          $new = array();
          foreach ((array) $this->results as $result) {
              if ($result instanceof Object)
                  $new[] = $result->toArray();
              else if (is_array($result))
                  return $this->results;
              else
                  throw new Exception('Cannot convert to array: '.ClassUtils::getQualifiedType($result));
          }
          return $new;
      }
code: public function getResultsAsArray()
      {
          $new = array();
          foreach ((array) $this->results as $result) {
              if ($result instanceof Object)
                  $new[] = $result->toArray();
              else if (is_array($result))
                  return $this->results;
              else
                  throw new Exception('Cannot convert to array: '.ClassUtils::getQualifiedType($result));
          }
          return $new;
      }
code_tokens: public function getResultsAsArray ( ) { $ new = array ( ) ; foreach ( ( array ) $ this -> results as $ result ) { if ( $ result instanceof Object ) $ new [ ] = $ result -> toArray ( ) ; else if ( is_array ( $ result ) ) return $ this -> results ; else throw new Exception ( 'Cannot convert to array: ' . ClassUtils :: getQualifiedType ( $ result ) ) ; } return $ new ; }
docstring: Returns all results as an array
  
  @return array an Array of all results, each one being an array
docstring_tokens: Returns all results as an array