refactoring lang and url classes.

This commit is contained in:
Taylor Otwell 2011-10-20 22:23:32 -05:00
parent 21dccae755
commit 49b13e6960
2 changed files with 9 additions and 9 deletions

View File

@ -11,6 +11,13 @@ class Lang {
*/ */
protected static $lines = array(); protected static $lines = array();
/**
* The paths containing the language files.
*
* @var array
*/
protected static $paths = array(LANG_PATH);
/** /**
* The key of the language line being retrieved. * The key of the language line being retrieved.
* *
@ -32,13 +39,6 @@ class Lang {
*/ */
protected $language; protected $language;
/**
* The paths containing the language files.
*
* @var array
*/
protected $paths = array(LANG_PATH);
/** /**
* Create a new Lang instance. * Create a new Lang instance.
* *
@ -164,7 +164,7 @@ protected function load($file)
$language = array(); $language = array();
foreach ($this->paths as $directory) foreach (static::$paths as $directory)
{ {
if (file_exists($path = $directory.$this->language.'/'.$file.EXT)) if (file_exists($path = $directory.$this->language.'/'.$file.EXT))
{ {

View File

@ -59,7 +59,7 @@ public static function to_asset($url, $https = null)
{ {
if (is_null($https)) $https = Request::secure(); if (is_null($https)) $https = Request::secure();
return str_replace('index.php/', '', static::to($url, $https)); return str_replace(Config::$items['application']['index'].'/', '', static::to($url, $https));
} }
/** /**