AliasItem.php 857 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <?php
  2. /* vim: set expandtab sw=4 ts=4 sts=4: */
  3. /**
  4. * Holds the PhpMyAdmin\Di\AliasItem class
  5. *
  6. * @package PhpMyAdmin\Di
  7. */
  8. namespace PhpMyAdmin\Di;
  9. /**
  10. * Class AliasItem
  11. *
  12. * @package PhpMyAdmin\Di
  13. */
  14. class AliasItem implements Item
  15. {
  16. /** @var Container */
  17. protected $container;
  18. /** @var string */
  19. protected $target;
  20. /**
  21. * Constructor
  22. *
  23. * @param Container $container Container
  24. * @param string $target Target
  25. */
  26. public function __construct(Container $container, $target)
  27. {
  28. $this->container = $container;
  29. $this->target = $target;
  30. }
  31. /**
  32. * Get the target item
  33. *
  34. * @param array $params Parameters
  35. * @return mixed
  36. */
  37. public function get(array $params = array())
  38. {
  39. return $this->container->get($this->target, $params);
  40. }
  41. }