ScriptHandler.php
37 lines
| 1 | <?php |
| 2 | /** |
| 3 | * Matomo - free/libre analytics platform |
| 4 | * |
| 5 | * @link https://matomo.org |
| 6 | * @license http://www.gnu.org/licenses/gpl-3.0.html GPL v3 or later |
| 7 | */ |
| 8 | |
| 9 | namespace Piwik\Composer; |
| 10 | |
| 11 | /** |
| 12 | * Scripts executed before/after Composer install and update. |
| 13 | * |
| 14 | * We use this PHP class because setting the bash scripts directly in composer.json breaks |
| 15 | * Composer on Windows systems. |
| 16 | */ |
| 17 | class ScriptHandler |
| 18 | { |
| 19 | public static function cleanXhprof() |
| 20 | { |
| 21 | if (! is_dir('vendor/facebook/xhprof/extension')) { |
| 22 | return; |
| 23 | } |
| 24 | |
| 25 | passthru('misc/composer/clean-xhprof.sh'); |
| 26 | } |
| 27 | |
| 28 | public static function buildXhprof() |
| 29 | { |
| 30 | if (! is_dir('vendor/facebook/xhprof/extension')) { |
| 31 | return; |
| 32 | } |
| 33 | |
| 34 | passthru('misc/composer/clean-xhprof.sh'); |
| 35 | } |
| 36 | } |
| 37 |