protected function bin($program = '')
    {
        // Get list of allowed search paths
        if ($location = $this->config()->get('binary_location')) {
            $locations = [$location];
        } else {
            $locations = $this->config()->get('search_binary_locations');
        }

        // Find program in each path
        foreach ($locations as $location) {
            $path = "{$location}/{$program}";
            if (file_exists($path)) {
                return $path;
            }
            if (file_exists($path . '.exe')) {
                return $path . '.exe';
            }
        }

        // Not found
        return null;
    }
protected function bin($program = '')
    {
        // Get list of allowed search paths
        if ($location = $this->config()->get('binary_location')) {
            $locations = [$location];
        } else {
            $locations = $this->config()->get('search_binary_locations');
        }

        // Find program in each path
        foreach ($locations as $location) {
            $path = "{$location}/{$program}";
            if (file_exists($path)) {
                return $path;
            }
            if (file_exists($path . '.exe')) {
                return $path . '.exe';
            }
        }

        // Not found
        return null;
    }
protected function bin ( $ program = '' ) { // Get list of allowed search paths if ( $ location = $ this -> config ( ) -> get ( 'binary_location' ) ) { $ locations = [ $ location ] ; } else { $ locations = $ this -> config ( ) -> get ( 'search_binary_locations' ) ; } // Find program in each path foreach ( $ locations as $ location ) { $ path = "{$location}/{$program}" ; if ( file_exists ( $ path ) ) { return $ path ; } if ( file_exists ( $ path . '.exe' ) ) { return $ path . '.exe' ; } } // Not found return null ; }
Accessor to get the location of the binary

@param string $program Name of binary
@return string
Accessor to get the location of the binary