converted path constants to $GLOBALS.

This commit is contained in:
Taylor Otwell
2012-01-27 16:17:43 -06:00
parent 09d4b74cf1
commit f44c565ee4
28 changed files with 80 additions and 83 deletions

View File

@@ -1,4 +1,4 @@
<?php namespace Laravel; defined('APP_PATH') or die('No direct script access.');
<?php namespace Laravel; isset($GLOBALS['APP_PATH']) or die('No direct script access.');
class Bundle {
@@ -51,7 +51,7 @@ class Bundle {
// We will trim the trailing slash from the location and add it back so
// we don't have to worry about the developer adding or not adding it
// to the location path for the bundle.
$config['location'] = BUNDLE_PATH.rtrim($config['location'], DS).DS;
$config['location'] = $GLOBALS['BUNDLE_PATH'].rtrim($config['location'], DS).DS;
static::$bundles[$bundle] = array_merge($defaults, $config);
}
@@ -173,7 +173,7 @@ class Bundle {
* // Returns the bundle path for the "admin" bundle
* $path = Bundle::path('admin');
*
* // Returns the APP_PATH constant as the default bundle
* // Returns the $GLOBALS['APP_PATH'] constant as the default bundle
* $path = Bundle::path('application');
* </code>
*
@@ -182,7 +182,7 @@ class Bundle {
*/
public static function path($bundle)
{
return ($bundle == DEFAULT_BUNDLE) ? APP_PATH : static::$bundles[$bundle]['location'];
return ($bundle == DEFAULT_BUNDLE) ? $GLOBALS['APP_PATH'] : static::$bundles[$bundle]['location'];
}
/**