__ __ __ __ _____ _ _ _____ _ _ _ | \/ | \ \ / / | __ \ (_) | | / ____| | | | | | \ / |_ __\ V / | |__) | __ ___ ____ _| |_ ___ | (___ | |__ ___| | | | |\/| | '__|> < | ___/ '__| \ \ / / _` | __/ _ \ \___ \| '_ \ / _ \ | | | | | | |_ / . \ | | | | | |\ V / (_| | || __/ ____) | | | | __/ | | |_| |_|_(_)_/ \_\ |_| |_| |_| \_/ \__,_|\__\___| |_____/|_| |_|\___V 2.1 if you need WebShell for Seo everyday contact me on Telegram Telegram Address : @jackleetFor_More_Tools:
<?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\DependencyInjection\Attribute;
use Symfony\Component\DependencyInjection\Exception\InvalidArgumentException;
use Symfony\Component\DependencyInjection\Exception\LogicException;
/**
* An attribute to tell how a dependency is used and hint named autowiring aliases.
*
* @author Nicolas Grekas <p@tchwork.com>
*/
#[\Attribute(\Attribute::TARGET_PARAMETER)]
final class Target
{
public function __construct(
public ?string $name = null,
) {
}
public function getParsedName(): string
{
if (null === $this->name) {
throw new LogicException(sprintf('Cannot parse the name of a #[Target] attribute that has not been resolved. Did you forget to call "%s::parseName()"?', __CLASS__));
}
return lcfirst(str_replace(' ', '', ucwords(preg_replace('/[^a-zA-Z0-9\x7f-\xff]++/', ' ', $this->name))));
}
public static function parseName(\ReflectionParameter $parameter, ?self &$attribute = null, ?string &$parsedName = null): string
{
$attribute = null;
if (!$target = $parameter->getAttributes(self::class)[0] ?? null) {
$parsedName = (new self($parameter->name))->getParsedName();
return $parameter->name;
}
$attribute = $target->newInstance();
$name = $attribute->name ??= $parameter->name;
$parsedName = $attribute->getParsedName();
if (!preg_match('/^[a-zA-Z_\x7f-\xff]/', $parsedName)) {
if (($function = $parameter->getDeclaringFunction()) instanceof \ReflectionMethod) {
$function = $function->class.'::'.$function->name;
} else {
$function = $function->name;
}
throw new InvalidArgumentException(sprintf('Invalid #[Target] name "%s" on parameter "$%s" of "%s()": the first character must be a letter.', $name, $parameter->name, $function));
}
return preg_match('/^[a-zA-Z0-9_\x7f-\xff]++$/', $name) ? $name : $parsedName;
}
}
| Name | Type | Size | Permission | Actions |
|---|---|---|---|---|
| AsAlias.php | File | 704 B | 0644 |
|
| AsDecorator.php | File | 622 B | 0644 |
|
| AsTaggedItem.php | File | 654 B | 0644 |
|
| Autoconfigure.php | File | 965 B | 0644 |
|
| AutoconfigureTag.php | File | 735 B | 0644 |
|
| Autowire.php | File | 3.31 KB | 0644 |
|
| AutowireCallable.php | File | 1.84 KB | 0644 |
|
| AutowireDecorated.php | File | 370 B | 0644 |
|
| AutowireIterator.php | File | 1.03 KB | 0644 |
|
| AutowireLocator.php | File | 3.26 KB | 0644 |
|
| AutowireServiceClosure.php | File | 733 B | 0644 |
|
| Exclude.php | File | 487 B | 0644 |
|
| MapDecorated.php | File | 596 B | 0644 |
|
| TaggedIterator.php | File | 824 B | 0644 |
|
| TaggedLocator.php | File | 822 B | 0644 |
|
| Target.php | File | 2.2 KB | 0644 |
|
| When.php | File | 661 B | 0644 |
|