YAML Fixtures Data loader utility.
The YAML file format supports a variety of ways to create objects for maximal flexibility.
You can create objects of any kind (as long as they are KVC-Compliant) and set values of those objects. You can even create related objects, either inline, or by referencing "tagged" objects that were created previously. You can also use actual PHP code to execute arbitrary instructions in the fixture process. This is useful for using const's, looking up data in databases, or randomizing data.
Usage:
$rootObjects = WFFixture::WFFixture()->loadFile('myData.yaml'); $rootObjects = WFFixture::WFFixture()->loadFile('myData.yaml', 'save'); // call "save()" method on all created objects (at root level)
Located in /framework/generator/WFFixture.php (line 50)
WFObject | --WFFixture
Function to load data structures via fixtures. Fixtures are YAML files that specify name-value pairs for objects.
Function to load data structures via fixtures. Fixtures are YAML files that specify name-value pairs for objects.
Create an object of Class with the passed name/value pairs.
Creates objects from the passed list. The list should be a hash where the keys are class names and the values are arrays of sets of property values.
Inherited From WFObject
WFObject::__construct()
WFObject::exposedProperties()
WFObject::getClass()
WFObject::keyPathToTargetAndKey()
WFObject::setValueForKey()
WFObject::setValueForKeyPath()
WFObject::setValuesForKeys()
WFObject::validatedSetValueForKey()
WFObject::validatedSetValueForKeyPath()
WFObject::validateObject()
WFObject::validateValueForKey()
WFObject::validateValueForKeyPath()
WFObject::valueForKey()
WFObject::valueForKeyPath()
WFObject::valueForStaticKey()
WFObject::valueForStaticKeyPath()
WFObject::valueForTargetAndKeyPath()
WFObject::valueForUndefinedKey()
WFObject::valueForUndefinedStaticKey()
WFObject::valuesForKeyPaths()
WFObject::valuesForKeys()
WFObject::_valueForStaticKey()
WFObject::__toString()
Documentation generated on Thu, 14 May 2009 16:19:59 -0400 by phpDocumentor 1.4.2