| 1 | <?php |
||
| 19 | * Base source transformer class definition |
||
| 20 | */ |
||
| 21 | abstract class BaseSourceTransformer implements SourceTransformer |
||
| 22 | { |
||
| 23 | /** |
||
| 24 | * Transformer options |
||
| 25 | */ |
||
| 26 | protected array $options = []; |
||
|
|
|||
| 27 | |||
| 28 | /** |
||
| 29 | * Aspect kernel instance |
||
| 30 | */ |
||
| 31 | protected AspectKernel $kernel; |
||
| 32 | |||
| 33 | /** |
||
| 34 | * Aspect container instance |
||
| 35 | */ |
||
| 36 | protected AspectContainer $container; |
||
| 37 | |||
| 38 | /** |
||
| 39 | 15 | * Default constructor for transformer |
|
| 40 | */ |
||
| 41 | 15 | public function __construct(AspectKernel $kernel, array $options = []) |
|
| 42 | 15 | { |
|
| 43 | 15 | $this->kernel = $kernel; |
|
| 44 | 15 | $this->container = $kernel->getContainer(); |
|
| 45 | $this->options = $options ?: $kernel->getOptions(); |
||
| 46 | } |
||
| 48 |