| 1 | <?php namespace Anomaly\SettingsModule\Setting\Command; |
||
| 14 | class GetDefaultValue |
||
| 15 | { |
||
| 16 | |||
| 17 | /** |
||
| 18 | * The qualified key of the setting. |
||
| 19 | * |
||
| 20 | * {namespace}::{key} |
||
| 21 | * |
||
| 22 | * @var string |
||
| 23 | */ |
||
| 24 | protected $key; |
||
| 25 | |||
| 26 | /** |
||
| 27 | * GetDefaultValue constructor. |
||
| 28 | * |
||
| 29 | * @param $key |
||
| 30 | */ |
||
| 31 | public function __construct($key) |
||
| 35 | |||
| 36 | /** |
||
| 37 | * Look for a default value from the config definition file. If it has one then return it, otherwise return null. |
||
| 38 | * |
||
| 39 | * @param Repository $config |
||
| 40 | * @param Resolver $resolver |
||
| 41 | * @return mixed |
||
| 42 | */ |
||
| 43 | public function handle(Repository $config, Resolver $resolver) |
||
| 53 | } |