|
|
|
@ -15,7 +15,8 @@ if (version_compare(PHP_VERSION, '4.3', '<')) {
|
|
|
|
|
* This class allows rendering of the check report for the web and console application interface. |
|
|
|
|
* |
|
|
|
|
* Example: |
|
|
|
|
* <code> |
|
|
|
|
* |
|
|
|
|
* ~~~ |
|
|
|
|
* require_once('path/to/YiiRequirementChecker.php'); |
|
|
|
|
* $requirementsChecker = new YiiRequirementChecker(); |
|
|
|
|
* $requirements = array( |
|
|
|
@ -28,21 +29,22 @@ if (version_compare(PHP_VERSION, '4.3', '<')) {
|
|
|
|
|
* ), |
|
|
|
|
* ); |
|
|
|
|
* $requirementsChecker->checkYii()->check($requirements)->render(); |
|
|
|
|
* <code> |
|
|
|
|
* ~~~ |
|
|
|
|
* |
|
|
|
|
* If you wish to render the report with your own representation, use [[getResult()]] instead of [[render()]] |
|
|
|
|
* |
|
|
|
|
* Requirement condition could be in format "eval:PHP expression". |
|
|
|
|
* In this case specified PHP expression will be evaluated in the context of this class instance. |
|
|
|
|
* For example: |
|
|
|
|
* <code> |
|
|
|
|
* |
|
|
|
|
* ~~~ |
|
|
|
|
* $requirements = array( |
|
|
|
|
* array( |
|
|
|
|
* 'name' => 'Upload max file size', |
|
|
|
|
* 'condition' => 'eval:$this->checkUploadMaxFileSize("5M")', |
|
|
|
|
* ), |
|
|
|
|
* ); |
|
|
|
|
* </code> |
|
|
|
|
* ~~~ |
|
|
|
|
* |
|
|
|
|
* @property array|null $result the check results, this property is for internal usage only. |
|
|
|
|
* |
|
|
|
@ -106,7 +108,7 @@ class YiiRequirementChecker
|
|
|
|
|
*/ |
|
|
|
|
public function checkYii() |
|
|
|
|
{ |
|
|
|
|
return $this->check(dirname(__FILE__).DIRECTORY_SEPARATOR.'yiirequirements.php'); |
|
|
|
|
return $this->check(dirname(__FILE__) . DIRECTORY_SEPARATOR . 'requirements.php'); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|