| 1 | <?php |
||
| 15 | class ScopePointer |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var ClassMethod|FunctionDefinition |
||
| 19 | */ |
||
| 20 | protected $object; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Initializes the scopePointer with an object |
||
| 24 | * |
||
| 25 | * @param $object |
||
| 26 | 50 | */ |
|
| 27 | public function __construct($object) |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Is the object a class method? |
||
| 34 | * |
||
| 35 | * @return bool |
||
| 36 | 41 | */ |
|
| 37 | public function isClassMethod() |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Is the object a closure? |
||
| 44 | * |
||
| 45 | * @return bool |
||
| 46 | 6 | */ |
|
| 47 | public function isClosure() |
||
| 51 | |||
| 52 | /** |
||
| 53 | * Is the object a function? |
||
| 54 | * |
||
| 55 | * @return bool |
||
| 56 | 38 | */ |
|
| 57 | public function isFunction() |
||
| 61 | |||
| 62 | /** |
||
| 63 | * Returns the object. |
||
| 64 | * |
||
| 65 | * @return ClassMethod|FunctionDefinition |
||
| 66 | */ |
||
| 67 | public function getObject() |
||
| 71 | } |
||
| 72 |