RecursiveRegexFinder
extends Finder
in package
The RecursiveRegexFinder class recursively searches the given directory for migrations.
Table of Contents
- $pattern : string
- __construct() : mixed
- findMigrations() : array<string|int, string>
- 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
- createIterator() : RegexIterator
- getMatches() : array<string|int, string>
- getPattern() : string
- isReflectionClassInNamespace() : bool
Properties
$pattern
private
string
$pattern
Methods
__construct()
public
__construct([string|null $pattern = null ]) : mixed
Parameters
- $pattern : string|null = null
Return values
mixed —findMigrations()
public
findMigrations(string $directory[, string|null $namespace = null ]) : array<string|int, string>
Parameters
- $directory : string
- $namespace : string|null = null
Return values
array<string|int, string> —getRealPath()
protected
getRealPath(string $directory) : string
Parameters
- $directory : string
Tags
Return values
string —loadMigrationClasses()
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
Return values
void —createIterator()
private
createIterator(string $dir) : RegexIterator
Parameters
- $dir : string
Return values
RegexIterator —getMatches()
private
getMatches(RegexIterator $iteratorFilesMatch) : array<string|int, string>
Parameters
- $iteratorFilesMatch : RegexIterator
Return values
array<string|int, string> —getPattern()
private
getPattern() : string
Return values
string —isReflectionClassInNamespace()
private
isReflectionClassInNamespace(ReflectionClass<string|int, object> $reflectionClass, string $namespace) : bool
Parameters
- $reflectionClass : ReflectionClass<string|int, object>
- $namespace : string