Browse Source

code style fix of YiiRequirementChecker.php

Renamed yiirequirements.php to requirements.php
tags/2.0.0-beta
Qiang Xue 12 years ago
parent
commit
e951939372
  1. 10
      apps/bootstrap/protected/requirements.php
  2. 12
      yii/requirements/YiiRequirementChecker.php
  3. 0
      yii/requirements/requirements.php

10
apps/bootstrap/protected/requirements.php

@ -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();
/**

12
yii/requirements/YiiRequirementChecker.php

@ -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');
}
/**

0
yii/requirements/yiirequirements.php → yii/requirements/requirements.php

Loading…
Cancel
Save