| 1 | <?php |
||
| 11 | class CheckRootUser implements EventSubscriberInterface |
||
| 12 | { |
||
| 13 | /** |
||
| 14 | * @var string |
||
| 15 | */ |
||
| 16 | const WARNING_ROOT_USER = '<error>It\'s not recommended to run n98-magerun as root user</error>'; |
||
| 17 | |||
| 18 | /** |
||
| 19 | * Returns an array of event names this subscriber wants to listen to. |
||
| 20 | * |
||
| 21 | * @return array The event names to listen to |
||
| 22 | * |
||
| 23 | * @api |
||
| 24 | */ |
||
| 25 | public static function getSubscribedEvents() |
||
| 31 | |||
| 32 | /** |
||
| 33 | * Display a warning if a running n98-magerun as root user |
||
| 34 | * |
||
| 35 | * @param Event $event |
||
| 36 | * @return void |
||
| 37 | */ |
||
| 38 | public function checkRunningAsRootUser(Event $event) |
||
| 58 | |||
| 59 | /** |
||
| 60 | * @return bool |
||
| 61 | */ |
||
| 62 | protected function _isSkipRootCheck(InputInterface $input) |
||
| 66 | } |
||
| 67 |