Commit 9f8e56d6 authored by Taylor Otwell's avatar Taylor Otwell

Added ability to pass replacements in Lang constructor.

parent 0f17aff7
...@@ -32,23 +32,26 @@ class Lang { ...@@ -32,23 +32,26 @@ class Lang {
* "messages.required" language line would return the "required" line * "messages.required" language line would return the "required" line
* from the "messages" language file. * from the "messages" language file.
* *
* @param string $line * @param string $key
* @param array $replacements
* @return void * @return void
*/ */
public function __construct($key) public function __construct($key, $replacements = array())
{ {
$this->key = $key; $this->key = $key;
$this->replacements = $replacements;
} }
/** /**
* Create a Lang instance for a language line. * Create a Lang instance for a language line.
* *
* @param string $key * @param string $key
* @param array $replacements
* @return Lang * @return Lang
*/ */
public static function line($key) public static function line($key, $replacements = array())
{ {
return new static($key); return new static($key, $replacements);
} }
/** /**
......
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