class GlobFinder extends Finder (View source)

The GlobFinder class finds migrations in a directory using the PHP glob() function.

Methods

static 
requireOnce(string $path)

No description

from Finder
getRealPath(string $directory)

No description

from Finder
string[]
loadMigrations(array $files, string|null $namespace)

No description

from Finder
loadMigrationClasses(array $files, string|null $namespace)

Look up all declared classes and find those classes contained in the given $files array.

from Finder
string[]
findMigrations(string $directory, string|null $namespace = null)

No description

Details

static protected requireOnce(string $path)

Parameters

string $path

protected getRealPath(string $directory)

Parameters

string $directory

Exceptions

InvalidDirectory

protected string[] loadMigrations(array $files, string|null $namespace)

Parameters

array $files
string|null $namespace

Return Value

string[]

Exceptions

NameIsReserved

protected ReflectionClass[] loadMigrationClasses(array $files, string|null $namespace)

Look up all declared classes and find those classes contained in the given $files array.

Parameters

array $files The set of files that were required
string|null $namespace If not null only classes in this namespace will be returned

Return Value

ReflectionClass[] the classes in $files

string[] findMigrations(string $directory, string|null $namespace = null)

Parameters

string $directory The directory which the finder should search
string|null $namespace If not null only classes in this namespace will be returned

Return Value

string[]