/
githubmirror
/
symfony
Обзор
Документация
Войти
/
githubmirror
/
symfony
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
8.2
src/Symfony/Component/Workflow/SupportStrategy/InstanceOfSupportStrategy.php
36 строк
861 B
Christian Flothmann
use constructor property promotion
06 июн 2024, 00:29
06 июн 2024, 00:29
f184ada
Код
Авторство
О чём код?
<?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\Workflow\SupportStrategy; use Symfony\Component\Workflow\WorkflowInterface; /** * @author Andreas Kleemann <akleemann@inviqa.com> * @author Amrouche Hamza <hamza.simperfit@gmail.com> */ final class InstanceOfSupportStrategy implements WorkflowSupportStrategyInterface { public function __construct( private string $className, ) { } public function supports(WorkflowInterface $workflow, object $subject): bool { return $subject instanceof $this->className; } public function getClassName(): string { return $this->className; } }