yii\console\controllers\FixtureController::findFixtures PHP Method

findFixtures() private method

Finds fixtures to be loaded, for example "User", if no fixtures were specified then all of them will be searching by suffix "Fixture.php".
private findFixtures ( array $fixtures = [] ) : array
$fixtures array fixtures to be loaded
return array Array of found fixtures. These may differ from input parameter as not all fixtures may exists.
    private function findFixtures(array $fixtures = [])
    {
        $fixturesPath = $this->getFixturePath();
        $filesToSearch = ['*Fixture.php'];
        $findAll = $fixtures === [];
        if (!$findAll) {
            $filesToSearch = [];
            foreach ($fixtures as $fileName) {
                $filesToSearch[] = $fileName . 'Fixture.php';
            }
        }
        $files = FileHelper::findFiles($fixturesPath, ['only' => $filesToSearch]);
        $foundFixtures = [];
        foreach ($files as $fixture) {
            $foundFixtures[] = basename($fixture, 'Fixture.php');
        }
        return $foundFixtures;
    }