PHP Class PHPUnit_Extensions_Database_DB_DataSet, qcodo

Author: Mike Lively ([email protected])
Inheritance: extends PHPUnit_Extensions_Database_DataSet_AbstractDataSet
Datei anzeigen Open project: qcodo/qcodo Class Usage Examples

Protected Properties

Property Type Description
$databaseConnection PHPUnit_Extensions_Database_DB_IDatabaseConnection The database connection this dataset is using.
$tables array An array of ITable objects.

Public Methods

Method Description
__construct ( PHPUnit_Extensions_Database_DB_IDatabaseConnection $databaseConnection ) Creates a new dataset using the given database connection.
buildTableSelect ( PHPUnit_Extensions_Database_DataSet_ITableMetaData $tableMetaData, PHPUnit_Extensions_Database_DB_IDatabaseConnection $databaseConnection = NULL ) : unknown Creates the query necessary to pull all of the data from a table.
getTable ( string $tableName ) : PHPUnit_Extensions_Database_DB_Table Returns a table object for the given table.
getTableMetaData ( string $tableName ) : PHPUnit_Extensions_Database_DataSet_DefaultTableMetaData Returns a table meta data object for the given table.
getTableNames ( ) : Array Returns a list of table names for the database

Protected Methods

Method Description
createIterator ( boolean $reverse = FALSE ) : PHPUnit_Extensions_Database_DB_TableIterator Creates an iterator over the tables in the data set. If $reverse is true a reverse iterator will be returned.

Method Details

__construct() public method

Creates a new dataset using the given database connection.
public __construct ( PHPUnit_Extensions_Database_DB_IDatabaseConnection $databaseConnection )
$databaseConnection PHPUnit_Extensions_Database_DB_IDatabaseConnection

buildTableSelect() public static method

Creates the query necessary to pull all of the data from a table.
public static buildTableSelect ( PHPUnit_Extensions_Database_DataSet_ITableMetaData $tableMetaData, PHPUnit_Extensions_Database_DB_IDatabaseConnection $databaseConnection = NULL ) : unknown
$tableMetaData PHPUnit_Extensions_Database_DataSet_ITableMetaData
$databaseConnection PHPUnit_Extensions_Database_DB_IDatabaseConnection
return unknown

createIterator() protected method

Creates an iterator over the tables in the data set. If $reverse is true a reverse iterator will be returned.
protected createIterator ( boolean $reverse = FALSE ) : PHPUnit_Extensions_Database_DB_TableIterator
$reverse boolean
return PHPUnit_Extensions_Database_DB_TableIterator

getTable() public method

Returns a table object for the given table.
public getTable ( string $tableName ) : PHPUnit_Extensions_Database_DB_Table
$tableName string
return PHPUnit_Extensions_Database_DB_Table

getTableMetaData() public method

Returns a table meta data object for the given table.
public getTableMetaData ( string $tableName ) : PHPUnit_Extensions_Database_DataSet_DefaultTableMetaData
$tableName string
return PHPUnit_Extensions_Database_DataSet_DefaultTableMetaData

getTableNames() public method

Returns a list of table names for the database
public getTableNames ( ) : Array
return Array

Property Details

$databaseConnection protected_oe property

The database connection this dataset is using.
protected PHPUnit_Extensions_Database_DB_IDatabaseConnection $databaseConnection
return PHPUnit_Extensions_Database_DB_IDatabaseConnection

$tables protected_oe property

An array of ITable objects.
protected array $tables
return array