Zeta Components Manual :: Docs For Class ezcBaseFeatures
Base::ezcBaseFeatures
Class ezcBaseFeatures
Provides methods needed to check for features.
Example:
- <?php
- ?>
Source for this file: /Base/src/features.php
Version: | //autogentag// |
Method Summary
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. |
Methods
classExists
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.
Parameters:
Name | Type | Description |
---|---|---|
$className |
string | The class to check for. |
$autoload |
bool | True to use __autoload(), otherwise false. |
findExecutableInPath
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.
Parameters:
Name | Type | Description |
---|---|---|
$fileName |
string |
getImageConvertExecutable
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
getImageIdentifyExecutable
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
hasExtensionSupport
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:
Parameters:
Name | Type | Description |
---|---|---|
$extension |
string | |
$version |
string |
hasFunction
Determines if the specified function is available.
Examples:
Parameters:
Name | Type | Description |
---|---|---|
$functionName |
string |
hasImageConvert
Determines if the ImageMagick convert utility is installed.
hasImageIdentify
Determines if the ImageMagick identify utility is installed.
os
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.
supportsLink
Determines if hardlinks are supported.
supportsSymLink
Determines if symlinks are supported.
supportsUserId
Determines if posix uids are supported.