mirror of
https://github.com/yiisoft/yii2.git
synced 2025-11-16 06:17:56 +08:00
code style fix of YiiRequirementChecker.php
Renamed yiirequirements.php to requirements.php
This commit is contained in:
@@ -10,12 +10,10 @@
|
|||||||
* ln requirements.php ../requirements.php
|
* ln requirements.php ../requirements.php
|
||||||
*/
|
*/
|
||||||
|
|
||||||
$appRootPath = dirname(__FILE__);
|
// you may need to adjust this path to the correct Yii framework path
|
||||||
if (basename($appRootPath) == 'protected') {
|
$frameworkPath = dirname(__FILE__) . '/../../../yii';
|
||||||
$appRootPath = dirname($appRootPath);
|
|
||||||
}
|
require_once($frameworkPath . '/requirements/YiiRequirementChecker.php');
|
||||||
// you may need to adjust this path:
|
|
||||||
require_once(realpath($appRootPath.'/../../yii/requirements/YiiRequirementChecker.php'));
|
|
||||||
$requirementsChecker = new YiiRequirementChecker();
|
$requirementsChecker = new YiiRequirementChecker();
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@@ -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');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user