tweaked config and lang classes.
This commit is contained in:
parent
f087df9bb8
commit
3583bc3b09
|
@ -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>
|
|
@ -110,7 +110,12 @@ public static function load($file)
|
|||
$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]);
|
||||
}
|
||||
|
||||
}
|
|
@ -61,7 +61,7 @@ public static function line($key, $replacements = array())
|
|||
* @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 @@ public function get($language = null, $default = '')
|
|||
|
||||
$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)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue