Alias.php 742 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien.potencier@symfony-project.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\DependencyInjection;
  11. class Alias
  12. {
  13. protected $id;
  14. protected $public;
  15. public function __construct($id, $public = true)
  16. {
  17. $this->id = strtolower($id);
  18. $this->public = $public;
  19. }
  20. public function isPublic()
  21. {
  22. return $this->public;
  23. }
  24. public function setPublic($boolean)
  25. {
  26. $this->public = (Boolean) $boolean;
  27. }
  28. public function __toString()
  29. {
  30. return $this->id;
  31. }
  32. }