Zeta Components Manual :: Docs For Class ezcSystemInfo
SystemInformation::ezcSystemInfo
Class ezcSystemInfo
Provides access to common system variables.
Variables not available from PHP directly are fetched using readers specific for each supported system. Corresponding reader is automatically detected, attached and forced to scan system info during initialization. An exception is thrown if the reader can't scan the system info.
Available readers are:
- ezcSystemInfoLinuxReader reader
- ezcSystemInfoMacReader reader
- ezcSystemInfoFreeBsdReader reader
- ezcSystemInfoWindowsReader reader
The ezcSystemInfo class has the following properties:
Reader independent, these properties are available even if system reader was not initialized.
Source for this file: /SystemInformation/src/info.php
Version: | //autogentag// |
Properties
string | read/write |
$backupFileName
Backup filename for this platform, '.bak' for win32 and '~' for unix and mac. |
integer | read/write |
$cpuCount
Number of CPUs in system or null. |
float | read/write |
$cpuSpeed
CPU speed as float (e.g 1808.743) in Mhz or null. |
string | read/write |
$cpuType
CPU type string (e.g 'AMD Sempron(tm) Processor 3000+') or null. |
string | read/write |
$fileSystemType
Filesystem type (e.g 'linux') or null. |
bool | read/write |
$isShellExecution
The flag which indicates if the script was executed over the web or the shell/command line. Reader dependent, these properties are not available if reader was not initialized and didn't scan OS: |
string | read/write |
$lineSeparator
Symbols which is used for line separators on the current OS. |
integer | read/write |
$memorySize
Memory Size in bytes int (e.g. 528424960) or null. Example:
|
string | read/write |
$osName
OS name (e.g 'Linux') or null. |
string | read/write |
$osType
OS type (e.g 'unix') or null. |
ezcSystemInfoAccelerator | read/write |
$phpAccelerator
Structure with PHP accelerator info or null. ezcSystemInfoAccelerator. |
array | read/write |
$phpVersion
Array with PHP version (e.g. array(5,1,1) ). |
Method Summary
public static ezcSystemInfo |
getInstance(
)
Returns the single instance of the ezcSystemInfo class. |
public static bool |
isShellExecution(
)
Determines if the script was executed over the web or the shell/command line. |
public static ezcSystemInfoAccelerator |
phpAccelerator(
)
Detects if a PHP accelerator is running and what type it is. |
public static array(string) |
phpVersion(
)
Returns the PHP version as an array with the version elements. |
Methods
getInstance
Returns the single instance of the ezcSystemInfo class.
Exceptions:
Type | Description |
---|---|
ezcSystemInfoReaderCantScanOSException |
If system variables can't be received from OS. |
isShellExecution
Determines if the script was executed over the web or the shell/command line.
phpAccelerator
Detects if a PHP accelerator is running and what type it is.
phpVersion
Returns the PHP version as an array with the version elements.