src/Dev/YamlFixture.php
public function writeInto(FixtureFactory $factory)
    {
        $parser = new Parser();
        if (isset($this->fixtureString)) {
            $fixtureContent = $parser->parse($this->fixtureString);
        } else {
            if (!file_exists($this->fixtureFile)) {
                return;
            }

            $contents = file_get_contents($this->fixtureFile);
            $fixtureContent = $parser->parse($contents);

            if (!$fixtureContent) {
                return;
            }
        }

        foreach ($fixtureContent as $class => $items) {
            foreach ($items as $identifier => $data) {
                if (ClassInfo::exists($class)) {
                    $factory->createObject($class, $identifier, $data);
                } else {
                    $factory->createRaw($class, $identifier, $data);
                }
            }
        }
    }
public function writeInto(FixtureFactory $factory)
    {
        $parser = new Parser();
        if (isset($this->fixtureString)) {
            $fixtureContent = $parser->parse($this->fixtureString);
        } else {
            if (!file_exists($this->fixtureFile)) {
                return;
            }

            $contents = file_get_contents($this->fixtureFile);
            $fixtureContent = $parser->parse($contents);

            if (!$fixtureContent) {
                return;
            }
        }

        foreach ($fixtureContent as $class => $items) {
            foreach ($items as $identifier => $data) {
                if (ClassInfo::exists($class)) {
                    $factory->createObject($class, $identifier, $data);
                } else {
                    $factory->createRaw($class, $identifier, $data);
                }
            }
        }
    }
public function writeInto ( FixtureFactory $ factory ) { $ parser = new Parser ( ) ; if ( isset ( $ this -> fixtureString ) ) { $ fixtureContent = $ parser -> parse ( $ this -> fixtureString ) ; } else { if ( ! file_exists ( $ this -> fixtureFile ) ) { return ; } $ contents = file_get_contents ( $ this -> fixtureFile ) ; $ fixtureContent = $ parser -> parse ( $ contents ) ; if ( ! $ fixtureContent ) { return ; } } foreach ( $ fixtureContent as $ class => $ items ) { foreach ( $ items as $ identifier => $ data ) { if ( ClassInfo :: exists ( $ class ) ) { $ factory -> createObject ( $ class , $ identifier , $ data ) ; } else { $ factory -> createRaw ( $ class , $ identifier , $ data ) ; } } } }
Persists the YAML data in a FixtureFactory,
which in turn saves them into the database.
Please use the passed in factory to access the fixtures afterwards.

@param  FixtureFactory $factory
Persists the YAML data in a FixtureFactory which in turn saves them into the database . Please use the passed in factory to access the fixtures afterwards .