PHP Class PhpSpec\Locator\PSR0\PSR0Locator

Inheritance: implements PhpSpec\Locator\ResourceLocatorInterface
Datei anzeigen Open project: phpspec/phpspec Class Usage Examples

Public Methods

Method Description
__construct ( Filesystem $filesystem, string $srcNamespace = '', string $specNamespacePrefix = 'spec', string $srcPath = 'src', string $specPath = '.', string $psr4Prefix = null )
createResource ( string $classname ) : null | PSR0Resource
findResources ( string $query ) : Resource[]
getAllResources ( ) : Resource[]
getFullSpecPath ( ) : string
getFullSrcPath ( ) : string
getPriority ( ) : integer
getSpecNamespace ( ) : string
getSrcNamespace ( ) : string
isPSR4 ( ) : boolean
supportsClass ( string $classname ) : boolean
supportsQuery ( string $query ) : boolean

Protected Methods

Method Description
findSpecResources ( string $path ) : PSR0Resource[]

Private Methods

Method Description
createResourceFromSpecFile ( string $path ) : PSR0Resource
findSpecClassname ( $path ) : null | string
getQueryPath ( string $query ) : string
isWindowsPath ( string $query ) : boolean
queryContainsBlackslashes ( string $query ) : boolean
queryContainsQualifiedClassName ( string $query ) : boolean
validatePsr0Classname ( string $classname )

Method Details

__construct() public method

public __construct ( Filesystem $filesystem, string $srcNamespace = '', string $specNamespacePrefix = 'spec', string $srcPath = 'src', string $specPath = '.', string $psr4Prefix = null )
$filesystem PhpSpec\Util\Filesystem
$srcNamespace string
$specNamespacePrefix string
$srcPath string
$specPath string
$psr4Prefix string

createResource() public method

public createResource ( string $classname ) : null | PSR0Resource
$classname string
return null | PSR0Resource

findResources() public method

public findResources ( string $query ) : Resource[]
$query string
return Resource[]

findSpecResources() protected method

protected findSpecResources ( string $path ) : PSR0Resource[]
$path string
return PSR0Resource[]

getAllResources() public method

public getAllResources ( ) : Resource[]
return Resource[]

getFullSpecPath() public method

public getFullSpecPath ( ) : string
return string

getFullSrcPath() public method

public getFullSrcPath ( ) : string
return string

getPriority() public method

public getPriority ( ) : integer
return integer

getSpecNamespace() public method

public getSpecNamespace ( ) : string
return string

getSrcNamespace() public method

public getSrcNamespace ( ) : string
return string

isPSR4() public method

public isPSR4 ( ) : boolean
return boolean

supportsClass() public method

public supportsClass ( string $classname ) : boolean
$classname string
return boolean

supportsQuery() public method

public supportsQuery ( string $query ) : boolean
$query string
return boolean