| 1 | <?php namespace Anomaly\PreferencesModule\Preference\Command; |
||
| 13 | class GetPreferenceValue |
||
| 14 | { |
||
| 15 | |||
| 16 | /** |
||
| 17 | * The preference key. |
||
| 18 | * |
||
| 19 | * @var string |
||
| 20 | */ |
||
| 21 | protected $key; |
||
| 22 | |||
| 23 | /** |
||
| 24 | * The default value. |
||
| 25 | * |
||
| 26 | * @var mixed |
||
| 27 | */ |
||
| 28 | protected $default; |
||
| 29 | |||
| 30 | /** |
||
| 31 | * Create a new GetPreferenceValue instance. |
||
| 32 | * |
||
| 33 | * @param $key |
||
| 34 | * @param null $default |
||
| 35 | */ |
||
| 36 | public function __construct($key, $default = null) |
||
| 41 | |||
| 42 | /** |
||
| 43 | * Handle the command. |
||
| 44 | * |
||
| 45 | * @param PreferenceRepositoryInterface $preferences |
||
| 46 | * @return mixed |
||
| 47 | */ |
||
| 48 | public function handle(PreferenceRepositoryInterface $preferences) |
||
| 52 | } |
||
| 53 |