1 | <?php |
||
23 | class ScriptHandler |
||
24 | { |
||
25 | /** |
||
26 | * Install the component assets under the symfony bundle for better integration |
||
27 | * with Symfony. |
||
28 | * |
||
29 | * @param Event $event |
||
30 | */ |
||
31 | public static function installAssets(Event $event) |
||
38 | |||
39 | /** |
||
40 | * Execute command. |
||
41 | * |
||
42 | * @param Event $event |
||
43 | * @param string $consoleDir |
||
44 | * @param string $cmd |
||
45 | * @param integer $timeout |
||
46 | * |
||
47 | * @throws \RuntimeException |
||
48 | */ |
||
49 | protected static function executeCommand(Event $event, $consoleDir, $cmd, $timeout = 300) |
||
63 | |||
64 | /** |
||
65 | * Get the default options. |
||
66 | * |
||
67 | * @param Event $event |
||
68 | * |
||
69 | * @return array |
||
70 | */ |
||
71 | protected static function getOptions(Event $event) |
||
82 | |||
83 | /** |
||
84 | * Get path to the PHP executable. |
||
85 | * |
||
86 | * @return string |
||
87 | * |
||
88 | * @throws \RuntimeException |
||
89 | */ |
||
90 | protected static function getPhp() |
||
99 | |||
100 | /** |
||
101 | * Returns a relative path to the directory that contains the `console` command. |
||
102 | * |
||
103 | * @param Event $event The command event. |
||
104 | * @param string $actionName The name of the action |
||
105 | * |
||
106 | * @return string|null The path to the console directory, null if not found. |
||
107 | */ |
||
108 | protected static function getConsoleDir(Event $event, $actionName) |
||
126 | |||
127 | /** |
||
128 | * Returns true if the new directory structure is used. |
||
129 | * |
||
130 | * @param array $options Composer options |
||
131 | * |
||
132 | * @return bool |
||
133 | */ |
||
134 | protected static function useNewDirectoryStructure(array $options) |
||
138 | |||
139 | protected static function hasDirectory(Event $event, $configName, $path, $actionName) |
||
149 | } |
||
150 |