vendor/symfony/ux-twig-component/src/AnonymousComponent.php line 21

Open in your IDE?
  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\UX\TwigComponent;
  11. use Symfony\UX\TwigComponent\Attribute\ExposeInTemplate;
  12. /**
  13.  * @author Matheo Daninos <matheo.daninos@gmail.com>
  14.  *
  15.  * @internal
  16.  */
  17. final class AnonymousComponent
  18. {
  19.     private array $props;
  20.     public function mount($props = []): void
  21.     {
  22.         $this->props $props;
  23.     }
  24.     #[ExposeInTemplate(destructtrue)]
  25.     public function getProps(): array
  26.     {
  27.         return $this->props;
  28.     }
  29. }