src/Dev/FixtureFactory.php
public function createObject($name, $identifier, $data = null)
    {
        if (!isset($this->blueprints[$name])) {
            $this->blueprints[$name] = new FixtureBlueprint($name);
        }
        $blueprint = $this->blueprints[$name];
        $obj = $blueprint->createObject($identifier, $data, $this->fixtures);
        $class = $blueprint->getClass();

        if (!isset($this->fixtures[$class])) {
            $this->fixtures[$class] = array();
        }
        $this->fixtures[$class][$identifier] = $obj->ID;

        return $obj;
    }
public function createObject($name, $identifier, $data = null)
    {
        if (!isset($this->blueprints[$name])) {
            $this->blueprints[$name] = new FixtureBlueprint($name);
        }
        $blueprint = $this->blueprints[$name];
        $obj = $blueprint->createObject($identifier, $data, $this->fixtures);
        $class = $blueprint->getClass();

        if (!isset($this->fixtures[$class])) {
            $this->fixtures[$class] = array();
        }
        $this->fixtures[$class][$identifier] = $obj->ID;

        return $obj;
    }
public function createObject ( $ name , $ identifier , $ data = null ) { if ( ! isset ( $ this -> blueprints [ $ name ] ) ) { $ this -> blueprints [ $ name ] = new FixtureBlueprint ( $ name ) ; } $ blueprint = $ this -> blueprints [ $ name ] ; $ obj = $ blueprint -> createObject ( $ identifier , $ data , $ this -> fixtures ) ; $ class = $ blueprint -> getClass ( ) ; if ( ! isset ( $ this -> fixtures [ $ class ] ) ) { $ this -> fixtures [ $ class ] = array ( ) ; } $ this -> fixtures [ $ class ] [ $ identifier ] = $ obj -> ID ; return $ obj ; }
Writes the fixture into the database using DataObjects

@param string $name Name of the {@link FixtureBlueprint} to use,
usually a DataObject subclass.
@param string $identifier Unique identifier for this fixture type
@param array $data Map of properties. Overrides default data.
@return DataObject
Writes the fixture into the database using DataObjects