PHP 클래스 Eloquent\Phony\Reflection\FeatureDetector

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

공개 메소드들

메소드 설명
__construct ( array $features = null, array $supported = [] ) Construct a new feature detector.
addFeature ( string $feature, callable $callback ) Add a custom feature.
checkInternalClass ( string $className ) : boolean Check that the specified class is defined by the PHP core, or an extension.
checkInternalMethod ( string $className, string $methodName ) : boolean Check that the specified method is defined by the PHP core, or an extension.
checkStatement ( string $source, boolean $useClosure = true ) : boolean Check that the supplied syntax is valid.
checkToken ( string $keyword, string $constantName ) : boolean Check that a keyword is interpreted as a particular token type.
features ( ) : callable>\array Get the features.
instance ( ) : FeatureDetector Get the static instance of this detector.
isSupported ( string $feature ) : boolean Returns true if the specified feature is supported by the current runtime environment.
runtime ( ) : string Determine the current PHP runtime.
standardFeatures ( ) : callable>\array Get the standard feature detection callbacks.
supported ( ) : bool>\array Get the known feature support.
uniqueSymbolName ( ) : string Returns a symbol name that is unique for this process execution.

메소드 상세

__construct() 공개 메소드

Construct a new feature detector.
public __construct ( array $features = null, array $supported = [] )
$features array
$supported array

addFeature() 공개 메소드

The callback will be passed this detector as the first argument. The return value will be interpreted as a boolean.
public addFeature ( string $feature, callable $callback )
$feature string The feature.
$callback callable The feature detection callback.

checkInternalClass() 공개 메소드

Check that the specified class is defined by the PHP core, or an extension.
public checkInternalClass ( string $className ) : boolean
$className string The class name.
리턴 boolean True if the class exists, and is internal.

checkInternalMethod() 공개 메소드

Check that the specified method is defined by the PHP core, or an extension.
public checkInternalMethod ( string $className, string $methodName ) : boolean
$className string The class name.
$methodName string The class name.
리턴 boolean True if the method exists, and is internal.

checkStatement() 공개 메소드

Check that the supplied syntax is valid.
public checkStatement ( string $source, boolean $useClosure = true ) : boolean
$source string The source to check.
$useClosure boolean True to wrap the supplied source code in a closure.
리턴 boolean True if the syntax is valid.

checkToken() 공개 메소드

Check that a keyword is interpreted as a particular token type.
public checkToken ( string $keyword, string $constantName ) : boolean
$keyword string The keyword.
$constantName string The name of the token type constant.
리턴 boolean True if the keyword is interpreted as expected.

features() 공개 메소드

Get the features.
public features ( ) : callable>\array
리턴 callable>\array

instance() 공개 정적인 메소드

Get the static instance of this detector.
public static instance ( ) : FeatureDetector
리턴 FeatureDetector The static detector.

isSupported() 공개 메소드

Returns true if the specified feature is supported by the current runtime environment.
public isSupported ( string $feature ) : boolean
$feature string The feature.
리턴 boolean True if supported.

runtime() 공개 메소드

Determine the current PHP runtime.
public runtime ( ) : string
리턴 string The runtime.

standardFeatures() 공개 메소드

Get the standard feature detection callbacks.
public standardFeatures ( ) : callable>\array
리턴 callable>\array

supported() 공개 메소드

Get the known feature support.
public supported ( ) : bool>\array
리턴 bool>\array

uniqueSymbolName() 공개 메소드

Returns a symbol name that is unique for this process execution.
public uniqueSymbolName ( ) : string
리턴 string The symbol name.