Provides methods needed to check for features.
Example:
Source for this file: /Base/src/features.php
Version: | //autogentag// |
public static bool |
classExists(
$className
, [ $autoload
= true] )
Returns if a given class exists. |
public static string |
findExecutableInPath(
$fileName
)
Returns the path of the specified executable, if it can be found in the system's path. |
public static string |
getImageConvertExecutable(
)
Returns the path to the ImageMagick convert utility. |
public static string |
getImageIdentifyExecutable(
)
Returns the path to the ImageMagick identify utility. |
public static bool |
hasExtensionSupport(
$extension
, [ $version
= null] )
Determines if the specified extension is loaded. |
public static bool |
hasFunction(
$functionName
)
Determines if the specified function is available. |
public static bool |
hasImageConvert(
)
Determines if the ImageMagick convert utility is installed. |
public static bool |
hasImageIdentify(
)
Determines if the ImageMagick identify utility is installed. |
public static string |
os(
)
Returns the operating system on which PHP is running. |
public static bool |
supportsLink(
)
Determines if hardlinks are supported. |
public static bool |
supportsSymLink(
)
Determines if symlinks are supported. |
public static bool |
supportsUserId(
)
Determines if posix uids are supported. |
Returns if a given class exists.
Checks for a given class name and returns if this class exists or not. Catches the ezcBaseAutoloadException and returns false, if it was thrown.
Name | Type | Description |
---|---|---|
$className |
string | The class to check for. |
$autoload |
bool | True to use __autoload(), otherwise false. |
Returns the path of the specified executable, if it can be found in the system's path.
It scans the PATH enviroment variable based on the OS to find the $fileName. For Windows, the path is with \, not /. If $fileName is not found, it returns null.
Name | Type | Description |
---|---|---|
$fileName |
string |
Returns the path to the ImageMagick convert utility.
On Linux, Unix,... it will return something like: /usr/bin/convert On Windows it will return something like: C:\Windows\System32\convert.exe
Returns the path to the ImageMagick identify utility.
On Linux, Unix,... it will return something like: /usr/bin/identify On Windows it will return something like: C:\Windows\System32\identify.exe
Determines if the specified extension is loaded.
If $version is specified, the specified extension will be tested also against the version of the loaded extension.
Examples:
Name | Type | Description |
---|---|---|
$extension |
string | |
$version |
string |
Determines if the specified function is available.
Examples:
Name | Type | Description |
---|---|---|
$functionName |
string |
Determines if the ImageMagick convert utility is installed.
Determines if the ImageMagick identify utility is installed.
Returns the operating system on which PHP is running.
This method returns a sanitized form of the OS name, example return values are "Windows", "Mac", "Linux" and "FreeBSD". In all other cases it returns the value of the internal PHP constant PHP_OS.
Determines if hardlinks are supported.
Determines if symlinks are supported.
Determines if posix uids are supported.