Commit 49b13e69 by Taylor Otwell

refactoring lang and url classes.

parent 21dccae7
...@@ -12,6 +12,13 @@ class Lang { ...@@ -12,6 +12,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.
* *
* @var string * @var string
...@@ -33,13 +40,6 @@ class Lang { ...@@ -33,13 +40,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.
* *
* @param string $key * @param string $key
...@@ -164,7 +164,7 @@ class Lang { ...@@ -164,7 +164,7 @@ class Lang {
$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))
{ {
......
...@@ -59,7 +59,7 @@ class URL { ...@@ -59,7 +59,7 @@ class URL {
{ {
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));
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment