PublicTrait.php 715 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.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\Loader\Configurator\Traits;
  11. /**
  12. * @method $this public()
  13. * @method $this private()
  14. */
  15. trait PublicTrait
  16. {
  17. /**
  18. * @return $this
  19. */
  20. final protected function setPublic()
  21. {
  22. $this->definition->setPublic(true);
  23. return $this;
  24. }
  25. /**
  26. * @return $this
  27. */
  28. final protected function setPrivate()
  29. {
  30. $this->definition->setPublic(false);
  31. return $this;
  32. }
  33. }