Table
extends Schema
in package
Tags
Table of Contents
Constants
Properties
Methods
- createIn() : void
- equals() : bool
- fromArray() : Base<TypeStored, TypeAccessed>
- fromYamlFile() : Base<TypeStored, TypeAccessed>
- getColumnNames() : array<string|int, string>
- getName() : string
- getRows() : array<string|int, Row>
- getSchema() : Query|null
- inFixture() : Table
- insertAll() : void
- setUp() : void
- tearDown() : void
- withSchema() : Schema<TypeStored, TypeAccessed>
- __construct() : mixed
- addRow() : void
Constants
NAME
public
mixed
NAME
= 'name'
ROWS
public
mixed
ROWS
= 'rows'
Properties
$name
private
string
$name
$parent
private
Fixture|null
$parent
= null
$rows
private
array<string|int, Row>
$rows
= []
$schema
private
Query|null
$schema
= null
Methods
createIn()
public
createIn(PDO $pdo) : void
Parameters
- $pdo : PDO
Tags
equals()
public
equals(Base $other) : bool
Parameters
- $other : Base
Return values
boolfromArray()
public
static fromArray(array{name: string, rows: array>} $array) : Base<TypeStored, TypeAccessed>
Parameters
-
$array
: array{name: string, rows: array
>}
Return values
Base<TypeStored, TypeAccessed>fromYamlFile()
public
static fromYamlFile(string $pathToFile) : Base<TypeStored, TypeAccessed>
Parameters
- $pathToFile : string
Tags
Return values
Base<TypeStored, TypeAccessed>getColumnNames()
public
getColumnNames() : array<string|int, string>
Return values
array<string|int, string>getName()
public
getName() : string
Return values
stringgetRows()
public
getRows() : array<string|int, Row>
Return values
array<string|int, Row>getSchema()
public
getSchema() : Query|null
Return values
Query|nullinFixture()
public
inFixture(Fixture $parent) : Table
Parameters
- $parent : Fixture
Return values
TableinsertAll()
public
insertAll(PDO $pdo) : void
Parameters
- $pdo : PDO
setUp()
public
setUp(PDO $pdo) : void
Parameters
- $pdo : PDO
tearDown()
public
tearDown(PDO $pdo) : void
Parameters
- $pdo : PDO
withSchema()
public
withSchema(Query $schema) : Schema<TypeStored, TypeAccessed>
Parameters
- $schema : Query
Return values
Schema<TypeStored, TypeAccessed>__construct()
protected
__construct(array{name: string, rows: array>} $config) : mixed
Parameters
-
$config
: array{name: string, rows: array
>}
addRow()
private
addRow(Row $row) : void
Parameters
- $row : Row