Method | Description | |
---|---|---|
check ( array | string $requirements ) | Check the given requirements, collecting results into internal field. | |
checkPhpExtensionVersion ( string $extensionName, string $version, string $compare = '>=' ) : boolean | Checks if the given PHP extension is available and its version matches the given one. | |
checkPhpIniOff ( string $name ) : boolean | Checks if PHP configuration option (from php.ini) is off. | |
checkPhpIniOn ( string $name ) : boolean | Checks if PHP configuration option (from php.ini) is on. | |
checkUploadMaxFileSize ( string | null $min = null, string | null $max = null ) : boolean | Checks if upload max file size matches the given range. | |
checkYii ( ) : YiiRequirementChecker | Performs the check for the Yii core requirements. | |
compareByteSize ( string $a, string $b, string $compare = '>=' ) : boolean | Compare byte sizes of values given in the verbose representation, like '5M', '15K' etc. | |
evaluateExpression ( string $expression ) : mixed | Evaluates a PHP expression under the context of this class. | |
getByteSize ( string $verboseSize ) : integer | Gets the size in bytes from verbose size representation. | |
getNowDate ( ) : string | Returns the now date if possible in string representation. | |
getResult ( ) : array | null | Return the check results. | |
getServerInfo ( ) : string | Returns the server information. | |
normalizeRequirement ( array $requirement, integer $requirementKey ) : array | Normalizes requirement ensuring it has correct format. | |
render ( ) | Renders the requirements check result. | |
renderViewFile ( string $_viewFile_, array $_data_ = null, boolean $_return_ = false ) : string | Renders a view file. | |
usageError ( string $message ) | Displays a usage error. |
public checkPhpExtensionVersion ( string $extensionName, string $version, string $compare = '>=' ) : boolean | ||
$extensionName | string | PHP extension name. |
$version | string | required PHP extension version. |
$compare | string | comparison operator, by default '>=' |
return | boolean | if PHP extension version matches. |
public checkPhpIniOff ( string $name ) : boolean | ||
$name | string | configuration option name. |
return | boolean | option is off. |
public checkPhpIniOn ( string $name ) : boolean | ||
$name | string | configuration option name. |
return | boolean | option is on. |
public checkUploadMaxFileSize ( string | null $min = null, string | null $max = null ) : boolean | ||
$min | string | null | verbose file size minimum required value, pass null to skip minimum check. |
$max | string | null | verbose file size maximum required value, pass null to skip maximum check. |
return | boolean | success. |
public checkYii ( ) : YiiRequirementChecker | ||
return | YiiRequirementChecker | self instance. |
public evaluateExpression ( string $expression ) : mixed | ||
$expression | string | a PHP expression to be evaluated. |
return | mixed | the expression result. |
public getByteSize ( string $verboseSize ) : integer | ||
$verboseSize | string | verbose size representation. |
return | integer | actual size in bytes. |
public getNowDate ( ) : string | ||
return | string | now date. |
public getResult ( ) : array | null | ||
return | array | null | check results in format: ```php array( 'summary' => array( 'total' => total number of checks, 'errors' => number of errors, 'warnings' => number of warnings, ), 'requirements' => array( array( ... 'error' => is there an error, 'warning' => is there a warning, ), ... ), ) ``` |
public getServerInfo ( ) : string | ||
return | string | server information. |
public render ( ) |
public renderViewFile ( string $_viewFile_, array $_data_ = null, boolean $_return_ = false ) : string | ||
$_viewFile_ | string | view file |
$_data_ | array | data to be extracted and made available to the view file |
$_return_ | boolean | whether the rendering result should be returned as a string |
return | string | the rendering result. Null if the rendering result is not required. |
public usageError ( string $message ) | ||
$message | string | the error message |