Spaces:
Runtime error
Runtime error
Download symfony/dependency-injection/Attribute/AutowireServiceClosure.php from Alcazard/vibe-coding-api: direct link, hf CLI and curl.
- Browser
- Download file 817 Bytes
-
https://huggingface.co/spaces/Alcazard/vibe-coding-api/resolve/main/symfony/dependency-injection/Attribute/AutowireServiceClosure.php
- Command line
-
hf download hf://spaces/Alcazard/vibe-coding-api/symfony/dependency-injection/Attribute/AutowireServiceClosure.php
-
curl -L -o AutowireServiceClosure.php https://huggingface.co/spaces/Alcazard/vibe-coding-api/resolve/main/symfony/dependency-injection/Attribute/AutowireServiceClosure.php
817 Bytes
| /* | |
| * 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\Argument\ServiceClosureArgument; | |
| use Symfony\Component\DependencyInjection\Reference; | |
| /** | |
| * Attribute to wrap a service in a closure that returns it. | |
| */ | |
| (\Attribute::TARGET_PARAMETER) | |
| class AutowireServiceClosure extends Autowire | |
| { | |
| /** | |
| * @param string $service The service id to wrap in the closure | |
| */ | |
| public function __construct(string $service) | |
| { | |
| parent::__construct(new ServiceClosureArgument(new Reference($service))); | |
| } | |
| } | |