| 1 | <?php |
||
| 8 | class ComposerScripts |
||
| 9 | { |
||
| 10 | /** |
||
| 11 | * The Magister application instance. |
||
| 12 | * |
||
| 13 | * @var \Magister\Magister |
||
| 14 | */ |
||
| 15 | protected static $magister; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * Handle the post-install Composer event. |
||
| 19 | * |
||
| 20 | * @param \Composer\Script\Event $event |
||
| 21 | * |
||
| 22 | * @return void |
||
| 23 | */ |
||
| 24 | public static function postInstall(Event $event) |
||
| 30 | |||
| 31 | /** |
||
| 32 | * Handle the post-update Composer event. |
||
| 33 | * |
||
| 34 | * @param \Composer\Script\Event $event |
||
| 35 | * |
||
| 36 | * @return void |
||
| 37 | */ |
||
| 38 | public static function postUpdate(Event $event) |
||
| 44 | |||
| 45 | /** |
||
| 46 | * Generate a safe key for session encryption. |
||
| 47 | * |
||
| 48 | * @return void |
||
| 49 | */ |
||
| 50 | protected static function generateKey() |
||
| 58 | |||
| 59 | /** |
||
| 60 | * Set the application key in the config file. |
||
| 61 | * |
||
| 62 | * @param string $key |
||
| 63 | * |
||
| 64 | * @return void |
||
| 65 | */ |
||
| 66 | protected static function setKeyInConfigFile($key) |
||
| 72 | |||
| 73 | /** |
||
| 74 | * Generate a random key for the application. |
||
| 75 | * |
||
| 76 | * @return string |
||
| 77 | */ |
||
| 78 | protected static function generateRandomKey() |
||
| 82 | } |
||
| 83 |