Container.php 653 B

1234567891011121314151617181920212223242526272829303132333435
  1. <?php
  2. /**
  3. * @package Grav\Framework\DI
  4. *
  5. * @copyright Copyright (c) 2015 - 2021 Trilby Media, LLC. All rights reserved.
  6. * @license MIT License; see LICENSE file for details.
  7. */
  8. declare(strict_types=1);
  9. namespace Grav\Framework\DI;
  10. use Psr\Container\ContainerInterface;
  11. class Container extends \Pimple\Container implements ContainerInterface
  12. {
  13. /**
  14. * @param string $id
  15. * @return mixed
  16. */
  17. public function get($id)
  18. {
  19. return $this->offsetGet($id);
  20. }
  21. /**
  22. * @param string $id
  23. * @return bool
  24. */
  25. public function has($id): bool
  26. {
  27. return $this->offsetExists($id);
  28. }
  29. }