private function _findBinary($name)
    {
        $binary = '';

        if ($this->_isDarwin) {
            $locations = array(
                '/opt/local/bin/', // MacPorts
                '/usr/local/bin/', // Mac GPG
                '/sw/bin/',        // Fink
                '/usr/bin/'
            );
        } else {
            $locations = array(
                '/usr/bin/',
                '/usr/local/bin/'
            );
        }

        foreach ($locations as $location) {
            if (is_executable($location . $name)) {
                $binary = $location . $name;
                break;
            }
        }

        return $binary;
    }
private function _findBinary($name)
    {
        $binary = '';

        if ($this->_isDarwin) {
            $locations = array(
                '/opt/local/bin/', // MacPorts
                '/usr/local/bin/', // Mac GPG
                '/sw/bin/',        // Fink
                '/usr/bin/'
            );
        } else {
            $locations = array(
                '/usr/bin/',
                '/usr/local/bin/'
            );
        }

        foreach ($locations as $location) {
            if (is_executable($location . $name)) {
                $binary = $location . $name;
                break;
            }
        }

        return $binary;
    }
private function _findBinary ( $ name ) { $ binary = '' ; if ( $ this -> _isDarwin ) { $ locations = array ( '/opt/local/bin/' , // MacPorts '/usr/local/bin/' , // Mac GPG '/sw/bin/' , // Fink '/usr/bin/' ) ; } else { $ locations = array ( '/usr/bin/' , '/usr/local/bin/' ) ; } foreach ( $ locations as $ location ) { if ( is_executable ( $ location . $ name ) ) { $ binary = $ location . $ name ; break ; } } return $ binary ; }
Gets the location of a binary for the current operating system

@param string $name Name of a binary program

@return string The location of the binary for the current operating
system. If no suitable binary could be found, an empty
string is returned.
Gets the location of a binary for the current operating system