| Total Complexity | 2 |
| Total Lines | 54 |
| Duplicated Lines | 0 % |
| Coverage | 0% |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 15 | abstract class BaseSubscriber implements EventSubscriber |
||
| 16 | { |
||
| 17 | /** |
||
| 18 | * @var Container |
||
| 19 | */ |
||
| 20 | protected $container; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * @var string |
||
| 24 | */ |
||
| 25 | protected $aliaserServiceId; |
||
| 26 | |||
| 27 | /** |
||
| 28 | * @var string |
||
| 29 | */ |
||
| 30 | protected $className; |
||
| 31 | |||
| 32 | /** |
||
| 33 | * @var bool |
||
| 34 | */ |
||
| 35 | protected $enabled; |
||
| 36 | |||
| 37 | /** |
||
| 38 | * Constructor. |
||
| 39 | * |
||
| 40 | * @param Container $container |
||
| 41 | * @param string $aliaserServiceId |
||
| 42 | * @param string $className |
||
| 43 | * @param boolean $enabled |
||
| 44 | */ |
||
| 45 | public function __construct(Container $container, $aliaserServiceId, $className, $enabled = true) |
||
| 46 | { |
||
| 47 | // we inject the container because otherwise a circular reference would occur. |
||
| 48 | $this->container = $container; |
||
| 49 | $this->aliaserServiceId = $aliaserServiceId; |
||
| 50 | $this->className = $className; |
||
| 51 | $this->enabled = $enabled; |
||
| 52 | } |
||
| 53 | |||
| 54 | /** |
||
| 55 | * Explicitly set the the subscriber to be enabled or disabled |
||
| 56 | * |
||
| 57 | * @param string $enabled |
||
| 58 | * @return void |
||
| 59 | */ |
||
| 60 | /** |
||
| 61 | * Enable or disable the subscriber |
||
| 62 | * |
||
| 63 | * @param boolean $enabled |
||
| 64 | * @return void |
||
| 65 | */ |
||
| 66 | final public function setEnabled($enabled) |
||
| 69 | } |
||
| 70 | } |
||
| 71 |