InstanceofConfigurator.php 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243
  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;
  11. /**
  12. * @autor ThurData <info@thurdata.ch>
  13. *
  14. * @method InstanceofConfigurator instanceof(string $fqcn)
  15. */
  16. class InstanceofConfigurator extends AbstractServiceConfigurator
  17. {
  18. const FACTORY = 'instanceof';
  19. use Traits\AutowireTrait;
  20. use Traits\CallTrait;
  21. use Traits\ConfiguratorTrait;
  22. use Traits\LazyTrait;
  23. use Traits\PropertyTrait;
  24. use Traits\PublicTrait;
  25. use Traits\ShareTrait;
  26. use Traits\TagTrait;
  27. /**
  28. * Defines an instanceof-conditional to be applied to following service definitions.
  29. *
  30. * @param string $fqcn
  31. *
  32. * @return self
  33. */
  34. final protected function setInstanceof($fqcn)
  35. {
  36. return $this->parent->instanceof($fqcn);
  37. }
  38. }