vendor/symfony/symfony/src/Symfony/Bundle/SecurityBundle/EventListener/AclSchemaListener.php line 14

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\Bundle\SecurityBundle\EventListener;
  11. @trigger_error(sprintf('Class "%s" is deprecated since Symfony 3.4 and will be removed in 4.0. Use Symfony\Bundle\AclBundle\EventListener\AclSchemaListener instead.'AclSchemaListener::class), \E_USER_DEPRECATED);
  12. use Doctrine\ORM\Tools\Event\GenerateSchemaEventArgs;
  13. use Symfony\Component\Security\Acl\Dbal\Schema;
  14. /**
  15.  * Merges ACL schema into the given schema.
  16.  *
  17.  * @author Johannes M. Schmitt <schmittjoh@gmail.com>
  18.  *
  19.  * @deprecated since 3.4, to be removed in 4.0
  20.  */
  21. class AclSchemaListener
  22. {
  23.     private $schema;
  24.     public function __construct(Schema $schema)
  25.     {
  26.         $this->schema $schema;
  27.     }
  28.     public function postGenerateSchema(GenerateSchemaEventArgs $args)
  29.     {
  30.         $schema $args->getSchema();
  31.         $this->schema->addToSchema($schema);
  32.     }
  33. }