php-censor/src/PHPCensor/Helper/UnixCommandExecutor.php

20 lines
404 B
PHP
Raw Normal View History

<?php
2016-07-19 20:28:11 +02:00
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));
}
}