Documentation

RecursiveRegexFinder extends Finder
in package

FinalYes

The RecursiveRegexFinder class recursively searches the given directory for migrations.

Table of Contents

Properties

$pattern  : string

Methods

__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

Methods

__construct()

public __construct([string|null $pattern = null ]) : mixed
Parameters
$pattern : string|null = null

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
throws
InvalidDirectory
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
throws
NameIsReserved
Return values
array<string|int, string>

requireOnce()

protected static requireOnce(string $path) : void
Parameters
$path : string

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>

isReflectionClassInNamespace()

private isReflectionClassInNamespace(ReflectionClass<string|int, object> $reflectionClass, string $namespace) : bool
Parameters
$reflectionClass : ReflectionClass<string|int, object>
$namespace : string
Return values
bool

        
On this page

Search results