| 1 | <?php |
||
| 8 | class AppOptions extends AbstractOptions |
||
| 9 | { |
||
| 10 | use StringUtilsTrait; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var string |
||
| 14 | */ |
||
| 15 | protected $name = ''; |
||
| 16 | /** |
||
| 17 | * @var string |
||
| 18 | */ |
||
| 19 | protected $version = '1.0'; |
||
| 20 | /** |
||
| 21 | * @var string |
||
| 22 | */ |
||
| 23 | protected $secretKey = ''; |
||
| 24 | |||
| 25 | /** |
||
| 26 | * AppOptions constructor. |
||
| 27 | * @param array|null|\Traversable $options |
||
| 28 | * |
||
| 29 | * @Inject({"config.app_options"}) |
||
| 30 | */ |
||
| 31 | 6 | public function __construct($options = null) |
|
| 35 | |||
| 36 | /** |
||
| 37 | * @return string |
||
| 38 | */ |
||
| 39 | public function getName() |
||
| 43 | |||
| 44 | /** |
||
| 45 | * @param string $name |
||
| 46 | * @return $this |
||
| 47 | */ |
||
| 48 | 6 | protected function setName($name) |
|
| 53 | |||
| 54 | /** |
||
| 55 | * @return string |
||
| 56 | */ |
||
| 57 | public function getVersion() |
||
| 61 | |||
| 62 | /** |
||
| 63 | * @param string $version |
||
| 64 | * @return $this |
||
| 65 | */ |
||
| 66 | 6 | protected function setVersion($version) |
|
| 71 | |||
| 72 | /** |
||
| 73 | * @return mixed |
||
| 74 | */ |
||
| 75 | 6 | public function getSecretKey() |
|
| 79 | |||
| 80 | /** |
||
| 81 | * @param mixed $secretKey |
||
| 82 | * @return $this |
||
| 83 | */ |
||
| 84 | 6 | protected function setSecretKey($secretKey) |
|
| 89 | |||
| 90 | /** |
||
| 91 | * @return string |
||
| 92 | */ |
||
| 93 | 1 | public function __toString() |
|
| 97 | } |
||
| 98 |