Returns the array of data fixtures to execute.

@param array $fixtures

@return array $fixtures
354272
public function sort(array $fixtures)
    {
        $this->fixtures        = $fixtures;
        $this->orderedFixtures = [];

        $usePrioritySorting     = $this->usePrioritySorting($fixtures);
        $useDependenciesSorting = $this->useDependenciesSorting($fixtures);


        if ($usePrioritySorting) {
            $this->orderFixturesByNumber();
        }

        if ($useDependenciesSorting) {
            $this->orderFixturesByDependencies($usePrioritySorting);
        }

        if (!($usePrioritySorting || $useDependenciesSorting)) {
            $this->orderedFixtures = $fixtures;
        }

        return $this->orderedFixtures;
    }
559425
public function getFixtures()
    {
        if ($this->_fixtures === null) {
            $this->_fixtures = $this->createFixtures($this->fixtures());
        }

        return $this->_fixtures;
    }
1152999
public function index(): array
    {
        /** @var Client[] $clients */
        $clients = parent::index();
        foreach ($clients as $client) {
            $this->addScopeAndRedirectUris($client);
        }

        return $clients;
    }
763445
public function get_many($keys) {
        $return = array();
        foreach ($keys as $key) {
            if ($this->persist && array_key_exists($key, $this->store)) {
                $return[$key] = $this->store[$key];
            } else {
                $return[$key] = false;
            }
        }
        return $return;
    }
618212
function(data) {
		var fixtures = [];
		
		_.each(this.fixtureNames, function(fixtureName) {
			var Model = sails.models[fixtureName];
			
			if (Model) {
				_.each(data[fixtureName], function(fixtureData) {
					fixtures.push(new Fixture(fixtureName, fixtureData));
				});
			} else {
				throw new Error('Model ' + fixtureName + ' could not be found in sails.models.');
			}
		});
		
		return fixtures;
	}
782086
public function many(array $keys)
    {
        $results = [];

        $values = $this->connection()->mget(array_map(function ($key) {
            return $this->prefix.$key;
        }, $keys));

        foreach ($values as $index => $value) {
            $results[$keys[$index]] = ! is_null($value) ? $this->unserialize($value) : null;
        }

        return $results;
    }
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));
    }
963231
protected function _getScopes($scopes = [])
    {
        if ($scopes) {
            $returnScopes = [];
            foreach ($scopes as $scope) {
                $returnScopes[$scope] = $this->_scopes[$scope];
            }
            return $returnScopes;
        } else {
            return $this->_scopes;
        }
    }
291225
public function load(array $fixturesFiles, array $parameters = [], array $objects = [], PurgeMode $purgeMode = null): array
    {
        $this->logger->info('Loading fixtures.');

        return $this->filesLoader->loadFiles($fixturesFiles, $parameters, $objects)->getObjects();
    }
1143515
public function load($names)
    {
        foreach ((array) $names as $name) {
            // 1. Load relation config
            $parts = explode('.', $name, 2);
            $name = $parts[0];
            $next = isset($parts[1]) ? $parts[1] : null;
            if (isset($this->loadedRelations[$name])) {
                continue;
            }

            /** @var BaseModel $related */
            $related = $this->$name();
            $isColl = $related->isColl();
            $serviceName = $this->getClassServiceName($related);
            $relation = $this->relations[$serviceName];

            // 2. Fetch relation record data
            $ids = $this->getAll($relation['localKey']);
            $ids = array_unique(array_filter($ids));
            if ($ids) {
                $this->relatedValue = $ids;
                $related = $this->$name();
                $this->relatedValue = null;
            } else {
                $related = null;
            }

            // 3. Load relation data
            if (isset($relation['junctionTable'])) {
                $records = $this->loadBelongsToMany($related, $relation, $name);
            } elseif ($isColl) {
                $records = $this->loadHasMany($related, $relation, $name);
            } else {
                $records = $this->loadHasOne($related, $relation, $name);
            }

            // 4. Load nested relations
            if ($next && $records) {
                $records->load($next);
            }

            $this->loadedRelations[$name] = true;
        }

        return $this;
    }
545969
public function buildRecords($tableName, array $records)
    {
        $insertedRecords = array();
        $this->tables[$tableName] = $tableName;

        foreach ($records as $recordName => $recordValues) {
            // Generate a hash for this record's primary key.  We'll simply hash the name of the
            // fixture into an integer value so that related fixtures don't have to rely on
            // an auto-incremented primary key when creating foreign keys.
            $recordValues = $this->setForeignKeys($recordValues);
            $recordValues = array_merge($recordValues, array('id' => $this->generateKey($recordName)));

            $fields = implode(', ', array_keys($recordValues));
            $values = array_values($recordValues);
            $placeholders = rtrim(str_repeat('?, ', count($recordValues)), ', ');
            $sql = "INSERT INTO $tableName ($fields) VALUES ($placeholders)";

            $sth = $this->db->prepare($sql);
            $sth->execute($values);

            $insertedRecords[$recordName] = (object) $recordValues;
        }

        return $insertedRecords;
    }
441397
public function getMany(array $keys)
    {
        return array_merge(array_fill_keys($keys, null), Arr::only($this->storage, $this->prefixKeys($keys)));
    }
576613
public function getMulti(array $keys)
    {
        $results = array();
        foreach ($keys as $key) {
            $results[$key] = $this->get($key);
        }
        return $results;
    }
1287361
protected function collectSources(array $tasks)
    {
        $sources = [];
        $directories = [];
        $tasks = $this->buildTasks($tasks);

        foreach ($tasks as $task) {
            $sources = array_merge($sources, $task->getSources());
        }
        foreach ($sources as $source) {

            if (is_dir($source)) {
                $directory = $source;
            } else {
                $directory = dirname($source);
            }
            $this
                ->io
                ->text('Found new directory : '.$directory);
            $directories[] = $directory;
        }

        return $directories;
    }
1354651
protected function getGenericDatabases(array $databases)
    {
        $genericDatabases = array();

        foreach ($databases as $database) {
            $genericDatabases[] = $this->getGenericDatabase($database);
        }

        return $genericDatabases;
    }
403593
public function populateObject(DataObject $object, $data, $fixtures)
    {
        if (is_array($data)) {
            
            // Prepare Data:
            
            $this->prepareData($data);
            
            // Populate Fields:
            
            $this->populateFields($object, $data, $fixtures);
            
            // Populate Children:
            
            $this->populateChildren($object, $data, $fixtures);
            
            // Populate Relations:
            
            $this->populateRelations($object, $data, $fixtures);
            
            // Populate Objects:
            
            $this->populateObjects($object, $data, $fixtures);
            
        }
        
        // Answer Object:
        
        return $object;
    }
1025581
public function execute(array $fixtures, $purge = true, $initialize = true, OutputInterface $output = null)
    {
        $output = $output ?: new NullOutput();

        if (true === $initialize) {
            $output->writeln('<comment>Initializing repository</comment>');
            $this->initializer->initialize($output, $purge);
        }

        $output->writeln('<comment>Loading fixtures</comment>');
        foreach ($fixtures as $fixture) {
            $output->writeln(sprintf(
                ' - %s<info>loading "</info>%s<info>"</info>',
                $fixture instanceof OrderedFixtureInterface ? '[' . $fixture->getOrder() . ']' : '',
                get_class($fixture)
            ));

            $fixture->load($this->documentManager);
            $this->documentManager->clear();
        }
    }