| 1 |
<?php |
| 2 |
/* |
| 3 |
* This file is part of the ManageWP Worker plugin. |
| 4 |
* |
| 5 |
* (c) ManageWP LLC <contact@managewp.com> |
| 6 |
* |
| 7 |
* For the full copyright and license information, please view the LICENSE |
| 8 |
* file that was distributed with this source code. |
| 9 |
*/ |
| 10 |
|
| 11 |
class MWP_Process_ExecutableFinder extends Symfony_Process_ExecutableFinder |
| 12 |
{ |
| 13 |
private $extraDirs = array(); |
| 14 |
|
| 15 |
public function addExtraDir($dir) |
| 16 |
{ |
| 17 |
$this->extraDirs[] = $dir; |
| 18 |
} |
| 19 |
|
| 20 |
public function find($name, $default = null, array $extraDirs = array()) |
| 21 |
{ |
| 22 |
return parent::find($name, $default, array_merge($extraDirs, $this->extraDirs)); |
| 23 |
} |
| 24 |
} |
| 25 |
|