more refactoring and dependency injection.
This commit is contained in:
@@ -1,11 +1,5 @@
|
||||
<?php namespace Laravel;
|
||||
|
||||
class Lang_Facade extends Facade {
|
||||
|
||||
public static $resolve = 'lang';
|
||||
|
||||
}
|
||||
|
||||
class Lang_Factory {
|
||||
|
||||
/**
|
||||
@@ -25,6 +19,9 @@ class Lang_Factory {
|
||||
/**
|
||||
* Create a new language factory instance.
|
||||
*
|
||||
* Note: The entire configuration manager is used in case the default language
|
||||
* is changed during the course of a request to the application.
|
||||
*
|
||||
* @param Config $config
|
||||
* @param array $paths
|
||||
* @return void
|
||||
@@ -105,6 +102,18 @@ class Lang {
|
||||
$this->replacements = $replacements;
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a new Lang instance.
|
||||
*
|
||||
* @param string $key
|
||||
* @param array $replacements
|
||||
* @return Lang
|
||||
*/
|
||||
public static function line($key, $replacements = array())
|
||||
{
|
||||
return IoC::container()->resolve('laravel.lang')->line($key, $replacements);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the language line.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user