PHP Класс Horde_Test, horde

$Horde: horde/lib/Test.php,v 1.21 2004/02/14 02:40:35 chuck Exp $ Copyright 1999-2004 Charles J. Hagenbuch Copyright 1999-2004 Jon Parise Copyright 2002-2004 Brent J. Nordquist Copyright 2003-2004 Michael Slusarz See the enclosed file COPYING for license information (LGPL). If you did not receive this file, see http://www.fsf.org/copyleft/lgpl.html.
Автор: Chuck Hagenbuch ([email protected])
Автор: Jon Parise ([email protected])
Автор: Brent J. Nordquist ([email protected])
Автор: Michael Slusarz ([email protected])
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
$_appList array
KEY:   app name
VALUE: An array with the following entries:
       error: (string) Error message.
       version: (string) Minimum version required of the app.
$_fileList array
KEY:   file path
VALUE: The error message to use (null to use default message)
$_moduleList array If function returns a string, this error message will be used. phpver: (string) The PHP version above which to do the test
$_pearList array
KEY:   PEAR class name
VALUE: An array with the following entries:
       depends: (?) This module depends on another module.
       error: (string) Error message.
       function: (string) Reference to function to run if module is
                 found.
       path: (string) The path to the PEAR module. Only needed if
                KEY is not autoloadable.
       required: (boolean) Is this PEAR module required?
$_phpver array The PHP version of the system.
$_settingsList array
KEY:   setting name
VALUE: An array with the following entries:
       error: (string) Error message.
       function: (string) Reference to function to run. If function
                 returns non-empty value, error message will be output.
       setting: (mixed) Either a boolean (whether setting should be
                on or off) or 'value', which will simply output the
                value of the setting.
$_supported array Supported versions of PHP.

Открытые методы

Метод Описание
__construct ( ) Constructor.
appTests ( ) : string Any application specific tests that need to be done.
getPhpVersionInformation ( ) : object Obtain information on the PHP version.
pearModuleCheck ( ) : string Check the list of PEAR modules.
phpModuleCheck ( ) : string Check the list of PHP modules.
phpSettingCheck ( $settings = null ) : string Checks the list of PHP settings.
requiredAppCheck ( ) : string Check the list of required Horde applications.
requiredFileCheck ( ) : string Check the list of required files

Защищенные методы

Метод Описание
_checkFileinfo ( ) : boolean Additional check for fileinfo module.
_checkGcDivisor ( ) : boolean Additional check for 'session.gc_divisor'.
_checkGcProbability ( ) : boolean Additional check for 'session.gc_probability'.
_checkIconvImplementation ( ) : boolean Additional check for iconv module implementation.
_checkLibxmlVersion ( ) : boolean Additional check for libxml version.
_checkMemoryLimit ( ) : boolean Additional check for 'session.gc_divisor'.
_checkMongo ( )
_checkPam ( )
_outputLine ( array $entry ) : string Internal output function.
_requiredFileCheck ( array $filelist, string $php, boolean $is_local = false ) : string Check the list of required files
_splitPhpVersion ( string $version ) Parse PHP version.
_status ( boolean $bool, boolean $required = true ) : string Output the results of a status check.

Описание методов

__construct() публичный Метод

Constructor.
public __construct ( )

_checkFileinfo() защищенный Метод

Additional check for fileinfo module.
protected _checkFileinfo ( ) : boolean
Результат boolean False on error.

_checkGcDivisor() защищенный Метод

Additional check for 'session.gc_divisor'.
protected _checkGcDivisor ( ) : boolean
Результат boolean Returns true if error string should be displayed.

_checkGcProbability() защищенный Метод

Additional check for 'session.gc_probability'.
protected _checkGcProbability ( ) : boolean
Результат boolean Returns true if error string should be displayed.

_checkIconvImplementation() защищенный Метод

Additional check for iconv module implementation.
protected _checkIconvImplementation ( ) : boolean
Результат boolean False on error.

_checkLibxmlVersion() защищенный Метод

Additional check for libxml version.
protected _checkLibxmlVersion ( ) : boolean
Результат boolean False on error.

_checkMemoryLimit() защищенный Метод

Additional check for 'session.gc_divisor'.
protected _checkMemoryLimit ( ) : boolean
Результат boolean Returns true if error string should be displayed.

_checkMongo() защищенный Метод

protected _checkMongo ( )

_checkPam() защищенный Метод

protected _checkPam ( )

_outputLine() защищенный Метод

Internal output function.
protected _outputLine ( array $entry ) : string
$entry array Array with the following values:
1st value: Header
2nd value: Test Result
3rd value: Error message (if present)
4th value: Error level (if present): 0 = error, 1 = warning
Результат string HTML output.

_requiredFileCheck() защищенный Метод

Check the list of required files
protected _requiredFileCheck ( array $filelist, string $php, boolean $is_local = false ) : string
$filelist array List of files to check.
$php string PHP CLI location.
$is_local boolean Is filelist a "local" file?
Результат string The HTML output.

_splitPhpVersion() защищенный Метод

Parse PHP version.
protected _splitPhpVersion ( string $version )
$version string A PHP-style version string (X.X.X).

_status() защищенный Метод

Output the results of a status check.
protected _status ( boolean $bool, boolean $required = true ) : string
$bool boolean The result of the status check.
$required boolean Whether the checked item is required.
Результат string The HTML of the result of the status check.

appTests() публичный Метод

Any application specific tests that need to be done.
public appTests ( ) : string
Результат string HTML output.

getPhpVersionInformation() публичный Метод

Obtain information on the PHP version.
public getPhpVersionInformation ( ) : object
Результат object stdClass TODO

pearModuleCheck() публичный Метод

Check the list of PEAR modules.
public pearModuleCheck ( ) : string
Результат string The HTML output.

phpModuleCheck() публичный Метод

Check the list of PHP modules.
public phpModuleCheck ( ) : string
Результат string The HTML output.

phpSettingCheck() публичный Метод

Checks the list of PHP settings.
public phpSettingCheck ( $settings = null ) : string
Результат string The HTML output.

requiredAppCheck() публичный Метод

Check the list of required Horde applications.
public requiredAppCheck ( ) : string
Результат string The HTML output.

requiredFileCheck() публичный Метод

Check the list of required files
public requiredFileCheck ( ) : string
Результат string The HTML output.

Описание свойств

$_appList защищенное свойство

KEY:   app name
VALUE: An array with the following entries:
       error: (string) Error message.
       version: (string) Minimum version required of the app.
protected array $_appList
Результат array

$_fileList защищенное свойство

KEY:   file path
VALUE: The error message to use (null to use default message)
protected array $_fileList
Результат array

$_moduleList защищенное свойство

If function returns a string, this error message will be used. phpver: (string) The PHP version above which to do the test
protected array $_moduleList
Результат array

$_pearList защищенное свойство

KEY:   PEAR class name
VALUE: An array with the following entries:
       depends: (?) This module depends on another module.
       error: (string) Error message.
       function: (string) Reference to function to run if module is
                 found.
       path: (string) The path to the PEAR module. Only needed if
                KEY is not autoloadable.
       required: (boolean) Is this PEAR module required?
protected array $_pearList
Результат array

$_phpver защищенное свойство

The PHP version of the system.
protected array $_phpver
Результат array

$_settingsList защищенное свойство

KEY:   setting name
VALUE: An array with the following entries:
       error: (string) Error message.
       function: (string) Reference to function to run. If function
                 returns non-empty value, error message will be output.
       setting: (mixed) Either a boolean (whether setting should be
                on or off) or 'value', which will simply output the
                value of the setting.
protected array $_settingsList
Результат array

$_supported защищенное свойство

Supported versions of PHP.
protected array $_supported
Результат array