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|null
find(string $name, string|null $default = null, array $extraDirs = array())

Finds an executable by name.

Details

setSuffixes(array $suffixes)

Replaces default suffixes of executable.

Parameters

array $suffixes

addSuffix(string $suffix)

Adds new possible suffix to check for executable.

Parameters

string $suffix

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

Finds an executable by name.

Parameters

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

Return Value

string|null The executable path or default value