AppParamsContainer.php 594 B

12345678910111213141516171819202122232425262728293031323334
  1. <?php
  2. namespace ModulesGarden\Servers\KerioEmail\Core\App;
  3. class AppParamsContainer
  4. {
  5. /**
  6. * @var array
  7. * params container
  8. */
  9. protected $params = [];
  10. public function getParams()
  11. {
  12. return $this->params;
  13. }
  14. public function getParam($key, $default = null)
  15. {
  16. if (isset($this->params[$key]))
  17. {
  18. return $this->params[$key];
  19. }
  20. return $default;
  21. }
  22. public function setParam($key, $value = null)
  23. {
  24. $this->params[$key] = $value;
  25. return $this;
  26. }
  27. }