Documentation

SpecFixture extends Spec
in package
uses MapProperties

Table of Contents

Constants

DEFAULT_PRIMARY_KEY  = 'id'

Properties

$DEFAULT_MAPPING  : mixed
$primaryKey  : string
$propertyToFieldMap  : array<string|int, mixed>
$reflection  : ReflectionClass
$tableName  : string

Methods

__construct()  : mixed
constructorHook()  : mixed
getPrimaryKey()  : string
getPropertyToFieldMap()  : mixed
getSetter()  : string|null
getTableName()  : string
mapFieldsToProperties()  : array<string|int, mixed>
mapFieldToProperty()  : string
mapPropertiesToFields()  : array<string|int, mixed>
mapPropertyToField()  : string
computePrimaryKey()  : string
computeTableName()  : string
computeMapping()  : array<string|int, mixed>

Constants

DEFAULT_PRIMARY_KEY

public mixed DEFAULT_PRIMARY_KEY = 'id'

Properties

$primaryKey

private string $primaryKey

$propertyToFieldMap

private array<string|int, mixed> $propertyToFieldMap

$reflection

private ReflectionClass $reflection

$tableName

private string $tableName

Methods

__construct()

public __construct(string $recordType[, string $tableName = null ][, string $primaryKey = null ][, array<string|int, mixed> $options = [] ]) : mixed
Parameters
$recordType : string
$tableName : string = null
$primaryKey : string = null
$options : array<string|int, mixed> = []

constructorHook()

public constructorHook([array<string|int, mixed> $options = [] ]) : mixed
Parameters
$options : array<string|int, mixed> = []

getPrimaryKey()

public getPrimaryKey() : string
Return values
string

getPropertyToFieldMap()

public getPropertyToFieldMap() : mixed

getSetter()

public getSetter(string $property[, bool $isPublic = true ]) : string|null
Parameters
$property : string
$isPublic : bool = true
Return values
string|null

getTableName()

public getTableName() : string
Return values
string

mapFieldsToProperties()

public mapFieldsToProperties(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>
Return values
array<string|int, mixed>

mapFieldToProperty()

public mapFieldToProperty(string $field) : string
Parameters
$field : string
Return values
string

mapPropertiesToFields()

public mapPropertiesToFields(array<string|int, mixed> $data) : array<string|int, mixed>
Parameters
$data : array<string|int, mixed>
Return values
array<string|int, mixed>

mapPropertyToField()

public mapPropertyToField(string $property) : string
Parameters
$property : string
Return values
string

computePrimaryKey()

protected computePrimaryKey([string $primaryKey = null ]) : string
Parameters
$primaryKey : string = null
Return values
string

computeTableName()

protected computeTableName([string $tableName = null ]) : string
Parameters
$tableName : string = null
Return values
string

computeMapping()

private computeMapping([array<string|int, mixed> $propertyToFieldMap = null ]) : array<string|int, mixed>
Parameters
$propertyToFieldMap : array<string|int, mixed> = null
Return values
array<string|int, mixed>

        
On this page

Search results