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