FixtureBlueprint
class FixtureBlueprint (View source)
A blueprint on how to create instances of a certain DataObject subclass.
Relies on a FixtureFactory to manage database relationships between instances, and manage the mappings between fixture identifiers and their database IDs.
Properties
protected | array | $defaults | ||
protected | string | $name | ||
protected | string | $class | ||
protected | array | $callbacks |
Methods
public
createObject(string $identifier, array $data = null, array $fixtures = null)
No description
protected
string
parseValue(string $value, array $fixtures = null, string $class = null)
Parse a value from a fixture file. If it starts with => it will get an ID from the fixture dictionary
Details
__construct(string $name, string $class = null, array $defaults = [])
No description
FixtureFactory
getFactory()
No description
FixtureBlueprint
setFactory(FixtureFactory $factory)
No description
DataObject
createObject(string $identifier, array $data = null, array $fixtures = null)
No description
$this
setDefaults(array $defaults)
No description
array
getDefaults()
No description
string
getClass()
No description
$this
addCallback(string $type, callable $callback)
See class documentation.
$this
removeCallback(string $type, callable $callback)
No description
protected
invokeCallbacks($type, $args = [])
No description
protected string
parseValue(string $value, array $fixtures = null, string $class = null)
Parse a value from a fixture file. If it starts with => it will get an ID from the fixture dictionary
protected
setValue($obj, $name, $value, $fixtures = null)
No description
protected
overrideField($obj, $fieldName, $value, $fixtures = null)
No description