1 | <?php |
||
15 | abstract class BaseCommand extends ContainerAwareCommand |
||
16 | { |
||
17 | const ROLE_LOCAL = 'local'; |
||
18 | const ROLE_REMOTE = 'remote'; |
||
19 | |||
20 | /** |
||
21 | * @var array |
||
22 | */ |
||
23 | private $roles = array(); |
||
24 | |||
25 | /** |
||
26 | * Sets roles that are allowed to execute command. |
||
27 | * |
||
28 | * @param array $roles |
||
29 | * |
||
30 | * @return $this |
||
31 | */ |
||
32 | 10 | public function setRoles(array $roles) |
|
38 | |||
39 | 10 | public function run(InputInterface $input, OutputInterface $output) |
|
45 | |||
46 | /** |
||
47 | * TODO: check if this can be moved to event |
||
48 | * |
||
49 | * @throws \Exception |
||
50 | * |
||
51 | * @return bool |
||
52 | */ |
||
53 | 10 | private function checkRoles() |
|
69 | } |
||
70 |