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);
                }
            }
        }
    }