Documentation

Table extends Schema
in package

Tags
extends

Schema<int, Row, Row>

Table of Contents

Constants

NAME  = 'name'
ROWS  = 'rows'

Properties

$name  : string
$parent  : Fixture|null
$rows  : array<string|int, Row>
$schema  : Query|null

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

$rows

private array<string|int, Row> $rows = []

Methods

createIn()

public createIn(PDO $pdo) : void
Parameters
$pdo : PDO
Tags
throws
SchemaException

if schema not defined

equals()

public equals(Base $other) : bool
Parameters
$other : Base
Return values
bool

fromArray()

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
throws
BaseException

if YAML does not parse to an array

Return values
Base<TypeStored, TypeAccessed>

getColumnNames()

public getColumnNames() : array<string|int, string>
Return values
array<string|int, string>

getName()

public getName() : string
Return values
string

getRows()

public getRows() : array<string|int, Row>
Return values
array<string|int, Row>

insertAll()

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

        
On this page

Search results