Commit 3583bc3b authored by Taylor Otwell's avatar Taylor Otwell

tweaked config and lang classes.

parent f087df9b
......@@ -61,12 +61,6 @@
.wrapper h2:first-of-type {
margin-top: 0;
}
.footer {
background-color: #eee;
font-size: 12px;
text-align: right;
}
</style>
</head>
<body>
......@@ -81,9 +75,5 @@
<p>Need to learn more? Peruse our <a href="http://laravel.com">wonderful documentation</a>.</p>
</div>
<div class="wrapper footer">
<?php echo Benchmark::check('laravel').'ms | '.Benchmark::memory().'mb'; ?>
</div>
</body>
</html>
\ No newline at end of file
......@@ -110,7 +110,12 @@ class Config {
$config = array_merge($config, require $path);
}
return (count(static::$items[$file] = $config) > 0);
if (count($config) > 0)
{
static::$items[$file] = $config;
}
return isset(static::$items[$file]);
}
}
\ No newline at end of file
......@@ -61,7 +61,7 @@ class Lang {
* @param mixed $default
* @return string
*/
public function get($language = null, $default = '')
public function get($language = null, $default = null)
{
if (is_null($language))
{
......@@ -72,7 +72,12 @@ class Lang {
$this->load($file, $language);
$line = Arr::get(static::$lines[$language.$file], $line, $default);
if ( ! isset(static::$lines[$language.$file][$line]))
{
return is_callable($default) ? call_user_func($default) : $default;
}
$line = static::$lines[$language.$file][$line];
foreach ($this->replacements as $key => $value)
{
......
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