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