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
|
||||
*/
|
||||
|
||||
$appRootPath = dirname(__FILE__);
|
||||
if (basename($appRootPath) == 'protected') {
|
||||
$appRootPath = dirname($appRootPath);
|
||||
}
|
||||
// you may need to adjust this path:
|
||||
require_once(realpath($appRootPath.'/../../yii/requirements/YiiRequirementChecker.php'));
|
||||
// you may need to adjust this path to the correct Yii framework path
|
||||
$frameworkPath = dirname(__FILE__) . '/../../../yii';
|
||||
|
||||
require_once($frameworkPath . '/requirements/YiiRequirementChecker.php');
|
||||
$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.
|
||||
*
|
||||
* 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');
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user