PHP Class PHPUnit_Extensions_Database_DataSet_DataSetFilter, qcodo

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

Protected Properties

Property Type Description
$excludeColumns Array The columns to exclude from the data set.
$excludeTables Array The tables to exclude from the data set.
$includeColumns Array The columns to exclude from the data set.
$includeTables Array The tables to exclude from the data set.
$originalDataSet PHPUnit_Extensions_Database_DataSet_IDataSet The dataset being decorated.

Public Methods

Method Description
__construct ( PHPUnit_Extensions_Database_DataSet_IDataSet $originalDataSet, array $excludeTables = [] ) Creates a new filtered data set.
addExcludeTables ( array $tables ) Adds tables to be included in the data set.
addIncludeTables ( array $tables ) Adds tables to be included in the data set.
setExcludeColumnsForTable ( string $table, array $columns ) Adds columns to include in the data set for the given table.
setIncludeColumnsForTable ( string $table, array $columns ) Adds columns to include in the data set for the given table.

Protected Methods

Method Description
createIterator ( boolean $reverse = FALSE ) : PHPUnit_Extensions_Database_DataSet_ITableIterator 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

The $exclude tables should be an associative array using table names as the key and an array of column names to exclude for the value. If you would like to exclude a full table set the value of the table's entry to the special string '*'.
public __construct ( PHPUnit_Extensions_Database_DataSet_IDataSet $originalDataSet, array $excludeTables = [] )
$originalDataSet PHPUnit_Extensions_Database_DataSet_IDataSet
$excludeTables array @deprecated use set* methods instead.

addExcludeTables() public method

Adds tables to be included in the data set.
public addExcludeTables ( array $tables )
$tables array

addIncludeTables() public method

Adds tables to be included in the data set.
public addIncludeTables ( array $tables )
$tables array

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_DataSet_ITableIterator
$reverse boolean
return PHPUnit_Extensions_Database_DataSet_ITableIterator

setExcludeColumnsForTable() public method

Adds columns to include in the data set for the given table.
public setExcludeColumnsForTable ( string $table, array $columns )
$table string
$columns array

setIncludeColumnsForTable() public method

Adds columns to include in the data set for the given table.
public setIncludeColumnsForTable ( string $table, array $columns )
$table string
$columns array

Property Details

$excludeColumns protected property

The columns to exclude from the data set.
protected Array $excludeColumns
return Array

$excludeTables protected property

The tables to exclude from the data set.
protected Array $excludeTables
return Array

$includeColumns protected property

The columns to exclude from the data set.
protected Array $includeColumns
return Array

$includeTables protected property

The tables to exclude from the data set.
protected Array $includeTables
return Array

$originalDataSet protected property

The dataset being decorated.
protected PHPUnit_Extensions_Database_DataSet_IDataSet $originalDataSet
return PHPUnit_Extensions_Database_DataSet_IDataSet