| 1 | <?php |
||
| 11 | class CheckRootUser implements EventSubscriberInterface |
||
| 12 | { |
||
| 13 | const WARNING_ROOT_USER = "<error>It's not recommended to run n98-magerun as root user</error>"; |
||
| 14 | |||
| 15 | /** |
||
| 16 | * Returns an array of event names this subscriber wants to listen to. |
||
| 17 | * |
||
| 18 | * @return array The event names to listen to |
||
| 19 | * |
||
| 20 | * @api |
||
| 21 | */ |
||
| 22 | public static function getSubscribedEvents() |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Display a warning if a running n98-magerun as root user |
||
| 31 | * |
||
| 32 | * @param Event $event |
||
| 33 | * @return void |
||
| 34 | */ |
||
| 35 | public function checkRunningAsRootUser(Event $event) |
||
| 54 | |||
| 55 | protected function _isSkipRootCheck() |
||
| 59 | } |
||
| 60 |