| 1 | <?php declare(strict_types=1); |
||
| 23 | class RuntimeFunction implements RuntimeFunctionInterface |
||
| 24 | { |
||
| 25 | /** |
||
| 26 | * @var string |
||
| 27 | */ |
||
| 28 | private $name; |
||
| 29 | /** |
||
| 30 | * @var callable |
||
| 31 | */ |
||
| 32 | private $callback; |
||
| 33 | /** |
||
| 34 | * @var FunctionSpecInterface |
||
| 35 | */ |
||
| 36 | private $spec; |
||
| 37 | /** |
||
| 38 | * @var null|object |
||
| 39 | */ |
||
| 40 | private $object; |
||
| 41 | /** |
||
| 42 | * @var null|ObjectSpecInterface |
||
| 43 | */ |
||
| 44 | private $object_spec; |
||
| 45 | |||
| 46 | public function __construct(string $name, callable $callback, FunctionSpecInterface $spec, $object = null, ?ObjectSpecInterface $object_spec = null) |
||
| 54 | |||
| 55 | /** |
||
| 56 | * @return string |
||
| 57 | */ |
||
| 58 | public function getName(): string |
||
| 62 | |||
| 63 | /** |
||
| 64 | * @return callable |
||
| 65 | */ |
||
| 66 | public function getCallback(): callable |
||
| 70 | |||
| 71 | /** |
||
| 72 | * @return FunctionSpecInterface |
||
| 73 | */ |
||
| 74 | public function getSpec(): FunctionSpecInterface |
||
| 78 | |||
| 79 | /** |
||
| 80 | * @return null|object |
||
| 81 | */ |
||
| 82 | public function getObject() |
||
| 86 | |||
| 87 | /** |
||
| 88 | * @return null|ObjectSpecInterface |
||
| 89 | */ |
||
| 90 | public function getObjectSpec(): ?ObjectSpecInterface |
||
| 94 | } |
||
| 95 |