* * @implements \IteratorAggregate */ class HelperSet implements \IteratorAggregate { /** @var array */ private $helpers = []; private $command; /** * @param Helper[] $helpers An array of helper */ public function __construct(array $helpers = []) { foreach ($helpers as $alias => $helper) { $this->set($helper, \is_int($alias) ? null : $alias); } } public function set(HelperInterface $helper, string $alias = null) { $this->helpers[$helper->getName()] = $helper; if (null !== $alias) { $this->helpers[$alias] = $helper; } $helper->setHelperSet($this); } /** * Returns true if the helper if defined. * * @return bool */ public function has(string $name) { return isset($this->helpers[$name]); } /** * Gets a helper value. * * @return HelperInterface * * @throws InvalidArgumentException if the helper is not defined */ public function get(string $name) { if (!$this->has($name)) { throw new InvalidArgumentException(sprintf('The helper "%s" is not defined.', $name)); } return $this->helpers[$name]; } /** * @deprecated since Symfony 5.4 */ public function setCommand(Command $command = null) { trigger_deprecation('symfony/console', '5.4', 'Method "%s()" is deprecated.', __METHOD__); $this->command = $command; } /** * Gets the command associated with this helper set. * * @return Command * * @deprecated since Symfony 5.4 */ public function getCommand() { trigger_deprecation('symfony/console', '5.4', 'Method "%s()" is deprecated.', __METHOD__); return $this->command; } /** * @return \Traversable */ #[\ReturnTypeWillChange] public function getIterator() { return new \ArrayIterator($this->helpers); } } __halt_compiler();----SIGNATURE:----CzyzWZagvcO0Zw7ppG8Qx7VgjVwh7es6LA7fFNC2SkrnnGbRbSocf/TiipZlrdeTQ4yGjMD13a60fAbMAjWaZLaVJyOq4MakQ32gh48e+3QEpvmJRth+7JK7CmE5AQIYXC+SjyZzMTQaudZaJe2HQc3nU8FjQrYFLLRx2sM2b5OfS1hCDsNfJUJheU5O50pdecnA50a4T3ctNMOatMfzKMy15Y7xqU0ueGBpb5GZyiPwcW2hSFGD+2EFkNoo5lJ59QK718D1DLcYZQvWaY+duug4J4RUUlMilfzn0Py0tS6z6mTYG93QEo9pKys/5p/XP5pN9OHpLM67kWvEH0nhBGLZHA2y6uJ2YX6EGi7USKluC0Fzt2aLMt152YjxZ34QpD2O5zMK0EOaBYpMqbA7qMCjylu8pbS9RgWQBrfmer6PgC9Qo6r59R6r6vYzj6QCOShTZbIrBV14R9EeWg9WWRvHnFyR6hQufvDK5yhtBCnlAyOhUmtXCrXPLldJBddhHGVFUGLUK9bjwOgCW+xCcc/we6lQ9cNqSecf2kklLueMQL56WeDhK6YZvWNJVR9BoP6bcC8b2PIlHP/ZWIuyBMvImM4IybRgHjCjdzdB825ZcQO9qd85MgLViiBeh7hncf1f7NBTqOWPfdByFvgS1h4TxVq6TmHA8THH0C445Ys=----ATTACHMENT:----MTUzMzgyNDIzMjczNzU4OSA0NDE1NzE4Mjg0NzUwMDE1IDE1NTA2OTI1Mjc2NDE0OTI=