tweaked config and lang classes.
This commit is contained in:
@@ -61,12 +61,6 @@
|
|||||||
.wrapper h2:first-of-type {
|
.wrapper h2:first-of-type {
|
||||||
margin-top: 0;
|
margin-top: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.footer {
|
|
||||||
background-color: #eee;
|
|
||||||
font-size: 12px;
|
|
||||||
text-align: right;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
@@ -81,9 +75,5 @@
|
|||||||
|
|
||||||
<p>Need to learn more? Peruse our <a href="http://laravel.com">wonderful documentation</a>.</p>
|
<p>Need to learn more? Peruse our <a href="http://laravel.com">wonderful documentation</a>.</p>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="wrapper footer">
|
|
||||||
<?php echo Benchmark::check('laravel').'ms | '.Benchmark::memory().'mb'; ?>
|
|
||||||
</div>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
@@ -110,7 +110,12 @@ class Config {
|
|||||||
$config = array_merge($config, require $path);
|
$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 @@ class Lang {
|
|||||||
* @param mixed $default
|
* @param mixed $default
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
public function get($language = null, $default = '')
|
public function get($language = null, $default = null)
|
||||||
{
|
{
|
||||||
if (is_null($language))
|
if (is_null($language))
|
||||||
{
|
{
|
||||||
@@ -72,7 +72,12 @@ class Lang {
|
|||||||
|
|
||||||
$this->load($file, $language);
|
$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)
|
foreach ($this->replacements as $key => $value)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user