PHP 클래스 Go\Instrument\FileSystem\Enumerator

파일 보기 프로젝트 열기: goaop/framework 1 사용 예제들

공개 메소드들

메소드 설명
__construct ( string $rootDirectory, array $includePaths = [], array $excludePaths = [] ) Initializes an enumerator
enumerate ( ) : CallbackFilterIterator | RecursiveIteratorIterator | SplFileInfo[] Returns an enumerator for files
getFilter ( ) : Closure Returns a filter callback for enumerating files

보호된 메소드들

메소드 설명
getFileFullPath ( SplFileInfo $file ) : string Return the real path of the given file

메소드 상세

__construct() 공개 메소드

Initializes an enumerator
public __construct ( string $rootDirectory, array $includePaths = [], array $excludePaths = [] )
$rootDirectory string Path to the root directory
$includePaths array List of additional include paths
$excludePaths array List of additional exclude paths

enumerate() 공개 메소드

Returns an enumerator for files

getFileFullPath() 보호된 메소드

This is used for testing purpose with virtual file system. In a vfs the 'realPath' methode will always return false. So we have a chance to mock this single function to return different path.
protected getFileFullPath ( SplFileInfo $file ) : string
$file SplFileInfo
리턴 string

getFilter() 공개 메소드

Returns a filter callback for enumerating files
public getFilter ( ) : Closure
리턴 Closure