/
githubmirror
/
symfony
Обзор
Документация
Войти
/
githubmirror
/
symfony
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
8.2
src/Symfony/Component/Security/Http/Attribute/CurrentUser.php
31 строка
1000 B
Alexandre Daubois
[Console][EventDispatcher][Security][Serializer][Workflow] Add PHPDoc to attribute classes and properties
02 янв 2024, 13:00
02 янв 2024, 13:00
8a2ac5a
Код
Авторство
О чём код?
<?php /* * This file is part of the Symfony package. * * (c) Fabien Potencier <fabien@symfony.com> * * For the full copyright and license information, please view the LICENSE * file that was distributed with this source code. */ namespace Symfony\Component\Security\Http\Attribute; use Symfony\Component\HttpKernel\Attribute\ValueResolver; use Symfony\Component\Security\Http\Controller\UserValueResolver; /** * Indicates that a controller argument should receive the current logged user. */ #[\Attribute(\Attribute::TARGET_PARAMETER)] class CurrentUser extends ValueResolver { /** * @param bool $disabled Whether this value resolver is disabled, which allows to enable a value resolver globally while disabling it in specific cases * @param string $resolver The class name of the resolver to use */ public function __construct(bool $disabled = false, string $resolver = UserValueResolver::class) { parent::__construct($resolver, $disabled); } }