if (!$throw) {
return false;
}
throw new LoaderError($this->errorCache[$name]);
}
private function normalizeName($name)
{
return preg_replace('#/{2,}#', '/', str_replace('\\', '/', (string) $name));
return new Source(file_get_contents($path), $name, $path);
}
public function getCacheKey($name)
{
if (null === ($path = $this->findTemplate($name)) || false === $path) {
return '';
}
$len = \strlen($this->rootPath);
if (0 === strncmp($this->rootPath, $path, $len)) {
return substr($path, $len);
*
* @internal
*/
public function getTemplateClass($name, $index = null)
{
$key = $this->getLoader()->getCacheKey($name).$this->optionsHash;
return $this->templateClassPrefix.hash('sha256', $key).(null === $index ? '' : '___'.$index);
}
/**
*
* @internal
*/
public function loadTemplate($name, $index = null)
{
return $this->loadClass($this->getTemplateClass($name), $name, $index);
}
/**
* @internal
*/
@trigger_error('Passing a \Twig\Template instance to '.__METHOD__.' is deprecated since Twig 2.7.0, use \Twig\TemplateWrapper instead.', \E_USER_DEPRECATED);
return new TemplateWrapper($this, $name);
}
return new TemplateWrapper($this, $this->loadTemplate($name));
}
/**
* Loads a template internal representation.
*
* @throws SyntaxError When an error occurred during compilation
* @throws RuntimeError When an error occurred during rendering
*/
public function render($name, array $context = [])
{
return $this->load($name)->render($context);
}
/**
* Displays a template.
*
{
if (!$this->container->has('twig')) {
throw new \LogicException('You can not use the "renderView" method if the Twig Bundle is not available. Try running "composer require symfony/twig-bundle".');
}
return $this->container->get('twig')->render($view, $parameters);
}
/**
* Renders a view.
*/
/**
* Renders a view.
*/
protected function render(string $view, array $parameters = [], Response $response = null): Response
{
$content = $this->renderView($view, $parameters);
if (null === $response) {
$response = new Response();
}
if ($locale && in_array($locale, ['en', 'fr', 'de', 'es', 'it'])) {
$translator->setLocale($locale);
}
}
$locales = $this->getParameter('app.locales');
return $this->render('bundles/frontend/StaticPages/bonusTerms.html.twig',["locale" => $locale, "locales" => $locales,]);
}
/**
* @Route("/bitcoin-affiliate-program", name="playpearls_frontend_staticpages_bitcoinaffiliateprogram")
$this->dispatcher->dispatch($event, KernelEvents::CONTROLLER_ARGUMENTS);
$controller = $event->getController();
$arguments = $event->getArguments();
// call controller
$response = $controller(...$arguments);
// view
if (!$response instanceof Response) {
$event = new ViewEvent($this, $request, $type, $response);
$this->dispatcher->dispatch($event, KernelEvents::VIEW);
public function handle(Request $request, int $type = HttpKernelInterface::MAIN_REQUEST, bool $catch = true)
{
$request->headers->set('X-Php-Ob-Level', (string) ob_get_level());
try {
return $this->handleRaw($request, $type);
} catch (\Exception $e) {
if ($e instanceof RequestExceptionInterface) {
$e = new BadRequestHttpException($e->getMessage(), $e);
}
if (false === $catch) {
$this->boot();
++$this->requestStackSize;
$this->resetServices = true;
try {
return $this->getHttpKernel()->handle($request, $type, $catch);
} finally {
--$this->requestStackSize;
}
}
Request::setTrustedHosts([$trustedHosts]);
}
$kernel = new Kernel($_SERVER['APP_ENV'], (bool) $_SERVER['APP_DEBUG']);
$request = Request::createFromGlobals();
$response = $kernel->handle($request);
$response->send();
$kernel->terminate($request, $response);
No log messages
LoaderError
|
---|
Twig\Error\LoaderError: Unable to find template "bundles/frontend/StaticPages/bonusTerms.html.twig" (looked into: /var/www/betbit.com/templates, /var/www/betbit.com/vendor/symfony/twig-bridge/Resources/views/Form). at vendor/twig/twig/src/Loader/FilesystemLoader.php:250 at Twig\Loader\FilesystemLoader->findTemplate() (vendor/twig/twig/src/Loader/FilesystemLoader.php:150) at Twig\Loader\FilesystemLoader->getCacheKey() (vendor/twig/twig/src/Environment.php:299) at Twig\Environment->getTemplateClass() (vendor/twig/twig/src/Environment.php:381) at Twig\Environment->loadTemplate() (vendor/twig/twig/src/Environment.php:359) at Twig\Environment->load() (vendor/twig/twig/src/Environment.php:318) at Twig\Environment->render() (vendor/symfony/framework-bundle/Controller/AbstractController.php:251) at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->renderView() (vendor/symfony/framework-bundle/Controller/AbstractController.php:259) at Symfony\Bundle\FrameworkBundle\Controller\AbstractController->render() (src/Controller/Frontend/StaticPagesController.php:441) at App\Controller\Frontend\StaticPagesController->bonusTerms() (vendor/symfony/http-kernel/HttpKernel.php:156) at Symfony\Component\HttpKernel\HttpKernel->handleRaw() (vendor/symfony/http-kernel/HttpKernel.php:78) at Symfony\Component\HttpKernel\HttpKernel->handle() (vendor/symfony/http-kernel/Kernel.php:199) at Symfony\Component\HttpKernel\Kernel->handle() (public/index.php:29) |