Add a fixture to be loaded into the database.

@param FixtureInterface $fixture
487523
public function addFixture(FixtureInterface $fixture)
    {
        $this->dropTables = array_merge($this->dropTables, (array) $fixture->getTables());
        $this->fixtures[] = $fixture;
    }
1004799
public function addFixture($object, $identifier)
    {
        if (!isset($this->fixtures[get_class($object)])) {
            $this->fixtures[get_class($object)] = [];
        }
        
        $this->fixtures[get_class($object)][$identifier] = $object->ID;
    }
337156
private function addInterfaceProvider($interface, Reference $reference)
    {
        if (empty($this->interfaceProviders[$interface])) {
            $this->interfaceProviders[$interface]= [];
        }

        $this->interfaceProviders[$interface][] = $reference;
    }
1026163
public function parse(Fixture $fixture, array $fixtures, $spec)
    {
        preg_match(self::REGEX, $spec, $ranges);
        if (empty($ranges)) {
            return;
        }

        $range = $ranges[0];
        $name = substr($spec, 0, strpos($spec, $range));

        preg_match_all('/\d+/', $range, $keys);
        if (empty($keys)) {
            return;
        }

        $start = $keys[0][0];
        $end = $keys[0][1];

        if ($start > $end) {
            throw new \Exception('Range start can not be biggen than range end for fixture ' . $spec);
        }

        for ($i = $start; $i <= $end; ++$i) {
            $newFixture = clone $fixture;
            $newFixture->setName($name . $i);
            $newFixture->setSpec($i);
            $fixtures[$name . $i] = $newFixture;
        }

        return $fixtures;
    }
383700
public function initialize(ContextInterface $context)
    {
        $context->setDatabase($this->databaseName);
        $context->setAjaxSteps($this->ajaxSteps);
        $context->setAjaxTimeout($this->ajaxTimeout);
        $context->setScreenshotPath($this->screenshotPath);
        $context->setRegionMap($this->regionMap);
        $context->setAdminUrl($this->adminUrl);
        $context->setLoginUrl($this->loginUrl);
    }
633329
public function populateDefaults(DataObject $object, $identifier, $data, $fixtures)
    {
        // Iterate Defaults:
        
        foreach ($this->getDefaults() as $name => $value) {
            
            // Is Value Callable?
            
            if (is_callable($value)) {
                $object->$name = $value($object, $data, $fixtures);
            } else {
                $object->$name = $value;
            }
            
        }
        
        // Answer Object:
        
        return $object;
    }
497732
public function resolve(
        ValueInterface $value,
        FixtureInterface $fixture,
        ResolvedFixtureSet $fixtureSet,
        array $scope,
        GenerationContext $context
    ): ResolvedValueWithFixtureSet {
        if (null === $this->argumentResolver) {
            throw ResolverNotFoundExceptionFactory::createUnexpectedCall(__METHOD__);
        }

        $functionCall = $value->getFunctionCall();
        $arguments = $functionCall->getArguments();
        foreach ($arguments as $index => $argument) {
            if ($argument instanceof ValueInterface) {
                $resolvedSet = $this->argumentResolver->resolve($argument, $fixture, $fixtureSet, $scope, $context);

                $arguments[$index] = $resolvedSet->getValue();
                $fixtureSet = $resolvedSet->getSet();
            }
        }

        $context->markAsNeedsCompleteGeneration();
        $fixtureReferenceResult = $this->argumentResolver->resolve($value->getReference(), $fixture, $fixtureSet, $scope, $context);
        $context->unmarkAsNeedsCompleteGeneration();

        /** @var ResolvedFixtureSet $fixtureSet */
        list($instance, $fixtureSet) = [$fixtureReferenceResult->getValue(), $fixtureReferenceResult->getSet()];

        try {
            $resolvedValue = $instance->{$functionCall->getName()}(...$arguments);
        } catch (\Throwable $exception) {
            if (false === method_exists($instance, $functionCall->getName())) {
                throw NoSuchMethodExceptionFactory::createForFixture($fixture, $value);
            }

            throw UnresolvableValueExceptionFactory::create($value, 0, $exception);
        }

        return new ResolvedValueWithFixtureSet(
            $resolvedValue,
            $fixtureSet
        );
    }
1170661
public function add(ComponentInterface $object)
	{
	    $id = get_class($object);

	    if ($this->has($id))
	        throw new ContainerException('A class with ID ' . $id . ' already exists in this container.');

		$this->storedComponents[$id] = $object;
	}
677686
private function loadFixtures(OutputInterface $output)
    {
        $command = $this->getApplication()->find('doctrine:fixtures:load');

        $arguments = [
            'command' => 'doctrine:fixtures:load',
            '--fixtures' => __DIR__.'/../Fixtures',
            '--append' => true,
        ];

        $input = new ArrayInput($arguments);

        return $command->run($input, $output);
    }
137222
public function addResource(ResourceInterface $resource)
    {
        $key = (string) $resource;

        if (!isset($this->resources[$key])) {
            $this->resources[$key] = $resource;
        }
    }
750002
public function populateFields(DataObject $object, $data, $fixtures)
    {
        // Iterate Data:
        
        foreach ($data as $name => $value) {
            
            if ($this->isField($object, $name)) {
                $this->populateField($object, $name, $value);
            }
            
        }
        
        // Answer Object:
        
        return $object;
    }
424246
public function addFixture(Neo4jFixtureInterface $fixture)
    {
        $fixtureClass = get_class($fixture);

        if (isset($this->fixtures[$fixtureClass])) {
            return;
        }

        $this->fixtures[$fixtureClass] = $fixture;

        if ($fixture instanceof Neo4jDependentFixtureInterface) {
            $this->orderFixturesByDependencies = true;

            foreach ($fixture->getDependencies() as $class) {
                if (class_exists($class)) {
                    $this->addFixture(new $class());
                }
            }
        }
    }
828741
public function onLoaded(ResourceInterface $resource)
    {
        if (!$this->isDebugging() || $this->current === $resource) {
            return;
        }

        $this->ensureCollector($this->current);
        $this->meta[$this->current]->addResource($resource);
    }
205189
@Override
	public Fixture addObjects(Object... objectsToAdd) {
		if (0 < objectsToAdd.length) {
			Collections.addAll(objects, objectsToAdd);
		}

		return this;
	}
596243
public function add(MetaSetInterface $metaSet)
    {
        $this->metaSets[$metaSet->getId()] = $metaSet;
        $this->nameMap[$metaSet->getName()] = $metaSet->getId();

        return $this;
    }
198735
protected function processFixtures(InputInterface $input, OutputInterface $output, $fixtures)
    {
        $output->writeln(
            sprintf(
                'Loading "%s" data fixtures ...',
                $this->getTypeOfFixtures($input)
            )
        );

        $executor = $this->getContainer()->get('okvpn_fixture.data.executor');
        $executor->setLogger(
            function ($message) use ($output) {
                $output->writeln(sprintf('  <comment>></comment> <info>%s</info>', $message));
            }
        );
        $executor->execute($fixtures, $this->getTypeOfFixtures($input));
    }
473297
public function add(AbstractTask $task)
    {
        $task->setRuntime($this->runtime);
        $this->registeredTasks[$task->getName()] = $task;
    }