php-censor/src/PHPCensor/Helper/UnixCommandExecutor.php
2017-03-12 11:40:40 +07:00

20 lines
404 B
PHP

<?php
namespace PHPCensor\Helper;
/**
* Unix/Linux specific extension of the CommandExecutor class.
*/
class UnixCommandExecutor extends BaseCommandExecutor
{
/**
* Uses 'which' to find a system binary by name.
* @param string $binary
* @return null|string
*/
protected function findGlobalBinary($binary)
{
return trim(shell_exec('which ' . $binary));
}
}