PHP 클래스 MiniAsset\AssetScanner

파일 보기 프로젝트 열기: markstory/mini-asset 1 사용 예제들

보호된 프로퍼티들

프로퍼티 타입 설명
$_paths array Paths this scanner should scan.

공개 메소드들

메소드 설명
__construct ( array $paths ) Constructor.
find ( string $file ) : mixed Find a file in the connected paths, and check for its existance.
paths ( ) : array Accessor for paths.

보호된 메소드들

메소드 설명
_expandPaths ( ) : void Expands constants and glob() patterns in the searchPaths.
_expandPrefix ( string $path ) : string Path resolution hook. Used by framework integrations to add in framework module paths.
_generateTree ( string $path ) : array Discover all the sub directories for a given path.
_normalizePath ( string $name, type $ds ) : string Normalize a file path to the specified Directory Separator ($ds)
_normalizePaths ( ) : void Ensure all paths end in a directory separator and expand any APP/WEBROOT constants.

메소드 상세

__construct() 공개 메소드

Constructor.
public __construct ( array $paths )
$paths array The paths to scan.

_expandPaths() 보호된 메소드

Expands constants and glob() patterns in the searchPaths.
protected _expandPaths ( ) : void
리턴 void

_expandPrefix() 보호된 메소드

Path resolution hook. Used by framework integrations to add in framework module paths.
protected _expandPrefix ( string $path ) : string
$path string Path to resolve
리턴 string resolved path

_generateTree() 보호된 메소드

Discover all the sub directories for a given path.
protected _generateTree ( string $path ) : array
$path string The path to search
리턴 array Array of subdirectories.

_normalizePath() 보호된 메소드

Normalize a file path to the specified Directory Separator ($ds)
protected _normalizePath ( string $name, type $ds ) : string
$name string Path to normalize
$ds type Directory Separator to be used
리턴 string Normalized path

_normalizePaths() 보호된 메소드

Normalizes the Directory Separator as well.
protected _normalizePaths ( ) : void
리턴 void

find() 공개 메소드

Find a file in the connected paths, and check for its existance.
public find ( string $file ) : mixed
$file string The file you want to find.
리턴 mixed Either false on a miss, or the full path of the file.

paths() 공개 메소드

Accessor for paths.
public paths ( ) : array
리턴 array an array of paths.

프로퍼티 상세

$_paths 보호되어 있는 프로퍼티

Paths this scanner should scan.
protected array $_paths
리턴 array