original_string: public function listCollections(array $pWithFields = array())
      {
          $tables = array();
  
          $prepared = $this->getConnection()->prepare('SHOW TABLES FROM `' . $this->_dbName . '`');
          if ($prepared->execute()) {
              while ($row = $prepared->fetchObject()) {
                  $table = str_replace($this->getDbPrefix(), '', current($row));
  
                  foreach ($pWithFields as $field) {
                      $preparedJoin = $this->getConnection()->prepare('SHOW COLUMNS FROM `' . current($row) . '` LIKE "' . $field . '"');
                      $preparedJoin->execute();
                      if ($preparedJoin->execute() and ! $preparedJoin->rowCount()) {
                          continue 2;
                      }
                  }
  
                  $tables[] = $table;
              }
  
          }
  
          return $tables;
      }
code: public function listCollections(array $pWithFields = array())
      {
          $tables = array();
  
          $prepared = $this->getConnection()->prepare('SHOW TABLES FROM `' . $this->_dbName . '`');
          if ($prepared->execute()) {
              while ($row = $prepared->fetchObject()) {
                  $table = str_replace($this->getDbPrefix(), '', current($row));
  
                  foreach ($pWithFields as $field) {
                      $preparedJoin = $this->getConnection()->prepare('SHOW COLUMNS FROM `' . current($row) . '` LIKE "' . $field . '"');
                      $preparedJoin->execute();
                      if ($preparedJoin->execute() and ! $preparedJoin->rowCount()) {
                          continue 2;
                      }
                  }
  
                  $tables[] = $table;
              }
  
          }
  
          return $tables;
      }
code_tokens: public function listCollections ( array $ pWithFields = array ( ) ) { $ tables = array ( ) ; $ prepared = $ this -> getConnection ( ) -> prepare ( 'SHOW TABLES FROM `' . $ this -> _dbName . '`' ) ; if ( $ prepared -> execute ( ) ) { while ( $ row = $ prepared -> fetchObject ( ) ) { $ table = str_replace ( $ this -> getDbPrefix ( ) , '' , current ( $ row ) ) ; foreach ( $ pWithFields as $ field ) { $ preparedJoin = $ this -> getConnection ( ) -> prepare ( 'SHOW COLUMNS FROM `' . current ( $ row ) . '` LIKE "' . $ field . '"' ) ; $ preparedJoin -> execute ( ) ; if ( $ preparedJoin -> execute ( ) and ! $ preparedJoin -> rowCount ( ) ) { continue 2 ; } } $ tables [ ] = $ table ; } } return $ tables ; }
docstring: List all the database's collections.
  
  @param array $pWithFields Fields that must exist in collections
  @return array
  @todo Test this method with $pWithFields
docstring_tokens: List all the database s collections .