ValueItem.class.php 650 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Holds the PMA\DI\ValueItem class
  5. *
  6. * @package PMA
  7. */
  8. namespace PMA\DI;
  9. require_once 'libraries/di/Item.int.php';
  10. /**
  11. * Value manager
  12. *
  13. * @package PMA\DI
  14. */
  15. class ValueItem implements Item
  16. {
  17. /** @var mixed */
  18. protected $value;
  19. /**
  20. * Constructor
  21. *
  22. * @param mixed $value Value
  23. */
  24. public function __construct($value)
  25. {
  26. $this->value = $value;
  27. }
  28. /**
  29. * Get the value
  30. *
  31. * @param array $params Parameters
  32. * @return mixed
  33. */
  34. public function get($params = array())
  35. {
  36. return $this->value;
  37. }
  38. }