Commit bee2a273 authored by Taylor Otwell's avatar Taylor Otwell

added default option to bundle::option method.

parent 3f2bdb76
......@@ -422,13 +422,19 @@ class Bundle {
*
* @param string $bundle
* @param string $option
* @param mixed $default
* @return mixed
*/
public static function option($bundle, $option)
public static function option($bundle, $option, $default = null)
{
$bundle = static::get($bundle);
if ( ! is_null($bundle)) return array_get($bundle, $option);
if (is_null($bundle))
{
return value($default);
}
return array_get($bundle, $option, $default);
}
/**
......
......@@ -49,6 +49,7 @@
- `Request::secure` now takes `application.ssl` configuration option into consideration.
- Simplified the `paths.php` file.
- Only write file caches if number of minutes is greater than zero.
- Added `$default` parameter to Bundle::option method.
<a name="upgrade-3.2"></a>
## Upgrading From 3.1
......
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