1 | <?php |
||
12 | class CheckRootUser implements EventSubscriberInterface |
||
13 | { |
||
14 | /** |
||
15 | * @var string |
||
16 | */ |
||
17 | const WARNING_ROOT_USER = '<error>It\'s not recommended to run n98-magerun as root user</error>'; |
||
18 | |||
19 | /** |
||
20 | * Returns an array of event names this subscriber wants to listen to. |
||
21 | * |
||
22 | * @return array The event names to listen to |
||
23 | * |
||
24 | * @api |
||
25 | */ |
||
26 | public static function getSubscribedEvents() |
||
32 | |||
33 | /** |
||
34 | * Display a warning if a running n98-magerun as root user |
||
35 | * |
||
36 | * @param Event $event |
||
37 | * @return void |
||
38 | */ |
||
39 | public function checkRunningAsRootUser(Event $event) |
||
62 | |||
63 | /** |
||
64 | * @return bool |
||
65 | */ |
||
66 | protected function _isSkipRootCheck(InputInterface $input) |
||
70 | |||
71 | /** |
||
72 | * @param Event $event |
||
73 | * @param string $message |
||
74 | */ |
||
75 | private function debugWriteln(Event $event, $message) |
||
82 | } |
||
83 |