PHP Method Yii::getRootPath Code Examples

This page contains top rated real world PHP examples of method Yii::getRootPath extracted from open source projects. You can rate examples to help us improve the quality of examples
Example #1
Show file File: X2ClientScript.php Project: dsyman2/X2CRM
0
 private function getCSSPathname($path)
 {
     if (preg_match('/\\.min\\.css$/', $path)) {
         return $path;
     }
     $altPath = Yii::getRootPath() . preg_replace('/\\.css$/', '.min.css', $path);
     if (!YII_DEBUG && file_exists($altPath)) {
         return preg_replace('/\\.css$/', '.min.css', $path);
     } else {
         return $path;
     }
 }
Example #2
Show file File: X2ClientScript.php Project: tymiles003/X2CRM
0
 private function getCSSPathname($path)
 {
     if (preg_match('/\\.min\\.css$/', $path)) {
         return $path;
     }
     $fileName = str_replace('/', DIRECTORY_SEPARATOR, str_replace(Yii::app()->baseUrl, '', $path));
     $altPath = Yii::getRootPath() . preg_replace('/\\.css(\\?\\d+)?$/', '.min.css', $fileName);
     if (!YII_DEBUG && file_exists($altPath)) {
         return preg_replace('/\\.css(\\?\\d+)?$/', '.min.css\\1', $path);
     } else {
         return $path;
     }
 }
Example #3
Show file File: MobileController.php Project: dsyman2/X2CRM
0
 public function actionLicense()
 {
     $this->headerTitle = Yii::t('mobile', 'License');
     $basePath = Yii::getRootPath();
     $filename = implode(DIRECTORY_SEPARATOR, array($basePath, 'LICENSE.txt'));
     $fh = fopen($filename, 'r');
     $license = fread($fh, filesize($filename));
     $license = preg_replace('/\\n/', '<br>', $license);
     fclose($fh);
     $this->render('license', array('license' => $license));
 }