Finder
in package
implements
MigrationFinder
AbstractYes
The Finder class is responsible for for finding migrations on disk at a given path.
Table of Contents
Interfaces
- MigrationFinder
- The MigrationFinder interface defines the interface used for finding migrations in a given directory and namespace.
Methods
- getRealPath() : string
- loadMigrationClasses() : array<string|int, ReflectionClass<string|int, object>>
- Look up all declared classes and find those classes contained in the given `$files` array.
- loadMigrations() : array<string|int, string>
- requireOnce() : void
- isReflectionClassInNamespace() : bool
Methods
getRealPath()
protected
getRealPath(string $directory) : string
Parameters
- $directory : string
Tags
Return values
stringloadMigrationClasses()
Look up all declared classes and find those classes contained in the given `$files` array.
protected
loadMigrationClasses(array<string|int, string> $files[, string|null $namespace = null ]) : array<string|int, ReflectionClass<string|int, object>>
Parameters
- $files : array<string|int, string>
-
The set of files that were
required
- $namespace : string|null = null
-
If not null only classes in this namespace will be returned
Return values
array<string|int, ReflectionClass<string|int, object>> —the classes in $files
loadMigrations()
protected
loadMigrations(array<string|int, string> $files, string|null $namespace) : array<string|int, string>
Parameters
- $files : array<string|int, string>
- $namespace : string|null
Tags
Return values
array<string|int, string>requireOnce()
protected
static requireOnce(string $path) : void
Parameters
- $path : string
isReflectionClassInNamespace()
private
isReflectionClassInNamespace(ReflectionClass<string|int, object> $reflectionClass, string $namespace) : bool
Parameters
- $reflectionClass : ReflectionClass<string|int, object>
- $namespace : string