class ExecutableFinder

Generic executable finder.

Methods

setSuffixes(array $suffixes)

Replaces default suffixes of executable.

addSuffix(string $suffix)

Adds new possible suffix to check for executable.

string
find(string $name, string $default = null, array $extraDirs = array())

Finds an executable by name.

Details

at line 27
setSuffixes(array $suffixes)

Replaces default suffixes of executable.

Parameters

array $suffixes

at line 37
addSuffix(string $suffix)

Adds new possible suffix to check for executable.

Parameters

string $suffix

at line 51
string find(string $name, string $default = null, array $extraDirs = array())

Finds an executable by name.

Parameters

string $name The executable name (without the extension)
string $default The default to return if no executable is found
array $extraDirs Additional dirs to check into

Return Value

string The executable path or default value