프로퍼티 | 타입 | 설명 | |
---|---|---|---|
$_chain | Method chain. | ||
$_methods | Stubbed methods. | ||
$_needToBePatched | integer | Stub index counter. | |
$_registered | array | Registered stubbed instance/class methods. | |
$_stubs | Generic stubs. |
메소드 | 설명 | |
---|---|---|
__construct ( mixed $reference ) | The Constructor. | |
find ( mixed $references, string $method = null, array $args = null ) : object | null | Finds a stub. | |
method ( string $path, string $closure = null ) : |
Stubs a method. | |
methods ( array $name = [] ) : |
Getd/Setd stubs for methods or get stubbed methods array. | |
on ( object | string $reference ) : self | Stubs class methods. | |
registered ( mixed $hash = null ) : boolean | array | Checks if a stub has been registered for a hash | |
reset ( string $reference = null ) | Clears the registered references. | |
where ( $requirements = [] ) : self | Set arguments requirement indexed by method name. |
메소드 | 설명 | |
---|---|---|
_reference ( mixed $reference ) | Return the actual reference which must be used. |
public __construct ( mixed $reference ) | ||
$reference | mixed | An instance or a fully-namespaced class name. |
protected _reference ( mixed $reference ) | ||
$reference | mixed | An instance or a fully-namespaced class name. |
public static find ( mixed $references, string $method = null, array $args = null ) : object | null | ||
$references | mixed | An instance or a fully namespaced class name. or an array of that. |
$method | string | The method name. |
$args | array | The required arguments. |
리턴 | object | null | Return the subbed method or `null` if not founded. |
public where ( $requirements = [] ) : self | ||
리턴 | self |
protected Method[],Kahlan\Plugin\Stub $_chain | ||
리턴 |
protected Method[],Kahlan\Plugin\Stub $_methods | ||
리턴 |
protected static array $_registered | ||
리턴 | array |