메소드 | 설명 | |
---|---|---|
__construct ( string $interface ) | Stashes the class/interface. | |
classExists ( ) : boolean | Checks that a class has been declared. | |
classExistsSansAutoload ( ) : boolean | Needed to kill the autoload feature in PHP5 for classes created dynamically. | |
classOrInterfaceExists ( ) : boolean | Checks that a class or interface has been declared. | |
classOrInterfaceExistsSansAutoload ( ) : boolean | Needed to kill the autoload feature in PHP5 for classes created dynamically. | |
getInterfaceMethods ( ) | Gets the list of methods for the implemented interfaces only. | |
getInterfaces ( ) | Gets the list of interfaces from a class. | |
getMethods ( ) | Gets the list of methods on a class or interface. | |
getParent ( ) | Finds the parent class name. | |
getSignature ( string $name ) : string | Writes the source code matching the declaration of a method. | |
hasFinal ( ) | Scans for final methods, as they screw up inherited mocks by not allowing you to override them. | |
isAbstract ( ) | Trivially determines if the class is abstract. | |
isInterface ( ) | Trivially determines if the class is an interface. |
메소드 | 설명 | |
---|---|---|
classOrInterfaceExistsWithAutoload ( string $interface, boolean $autoload ) : boolean | Needed to select the autoload feature in PHP5 for classes created dynamically. | |
getFullSignature ( string $name ) : string | For a signature specified in an interface, full details must be replicated to be a valid implementation. | |
getParameterSignatures ( ReflectionMethod $method ) : array | Gets the source code for each parameter. | |
isAbstractMethod ( string $name ) : boolean | Checks whether a method is abstract or not. | |
isAbstractMethodInParents ( string $name ) : boolean | Checks whether a method is abstract in all parents or not. | |
isConstructor ( string $name ) : boolean | Checks whether a method is the constructor. | |
isInterfaceMethod ( string $method ) | Checks to see if the method signature has to be tightly specified. | |
isStaticMethod ( string $name ) : boolean | Checks whether a method is static or not. | |
onlyParents ( array $interfaces ) : array | Whittles a list of interfaces down to only the necessary top level parents. | |
suppressSpurious ( string $name ) : string | The SPL library has problems with the Reflection library. |
public __construct ( string $interface ) | ||
$interface | string | Class or interface to inspect. |
public classExists ( ) : boolean | ||
리턴 | boolean | True if defined. |
public classExistsSansAutoload ( ) : boolean | ||
리턴 | boolean | True if defined. |
public classOrInterfaceExists ( ) : boolean | ||
리턴 | boolean | True if defined. |
public classOrInterfaceExistsSansAutoload ( ) : boolean | ||
리턴 | boolean | True if defined. |
protected getFullSignature ( string $name ) : string | ||
$name | string | Method name. |
리턴 | string | Method signature up to last bracket. |
public getInterfaceMethods ( ) |
public getInterfaces ( ) |
protected getParameterSignatures ( ReflectionMethod $method ) : array | ||
$method | ReflectionMethod | Method object from reflection API |
리턴 | array | List of strings, each a snippet of code. |
public getSignature ( string $name ) : string | ||
$name | string | Method name. |
리턴 | string | Method signature up to last bracket. |
public hasFinal ( ) |
protected isAbstractMethod ( string $name ) : boolean | ||
$name | string | Method name. |
리턴 | boolean | true if method is abstract, else false |
protected isAbstractMethodInParents ( string $name ) : boolean | ||
$name | string | Method name. |
리턴 | boolean | true if method is abstract in parent, else false |
protected isConstructor ( string $name ) : boolean | ||
$name | string | Method name. |
리턴 | boolean | true if method is the constructor |
protected isInterfaceMethod ( string $method ) | ||
$method | string | Method name. |
protected isStaticMethod ( string $name ) : boolean | ||
$name | string | Method name |
리턴 | boolean | true if method is static, else false |
protected onlyParents ( array $interfaces ) : array | ||
$interfaces | array | Reflection API interfaces to reduce. |
리턴 | array | List of parent interface names. |
protected suppressSpurious ( string $name ) : string | ||
$name | string | Parameter name. |
리턴 | string | Cleaner name. |