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

tweaked config and lang classes.

parent f087df9b
...@@ -61,12 +61,6 @@ ...@@ -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 @@ ...@@ -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>
\ No newline at end of file
...@@ -110,7 +110,12 @@ class Config { ...@@ -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]);
} }
} }
\ No newline at end of file
...@@ -61,7 +61,7 @@ class Lang { ...@@ -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 { ...@@ -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)
{ {
......
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