/var/www/clientes/themes/huraga/html/layout_default.html.twig
,'/support/contact-us'
,'/support/contact-us/conversation'
,'/support/ticket'
{% endif %}
];
const currentPath = window.location.pathname;
const isAllowed = publicPaths.some(path => currentPath.startsWith(path));
if (!isAllowed) {
window.location.href = '{{ "login"|url }}';
}
});
</script>
{% endif %}
{% if client and profile is not defined %}
{% set profile = client.profile_get %}
{% endif %}
{% set company = guest.system_company %}
{% set guest_support_url = guest.support_guest_tickets_enabled() ? 'support/contact-us'|url : 'login'|url %}
{% set support_url = client ? 'support'|url : guest_support_url %}
<div class="container">
<header>
{{ render_widgets('client.theme.header.start') }}
<nav class="navbar navbar-expand-md py-4">
<div class="container-fluid">
{{ include('partial_company_logo.html.twig', {
logo_url: settings.show_company_logo ? company.logo_url : null,
dark_logo_url: settings.show_company_logo ? company.logo_url_dark : null,
link_class: 'navbar-brand',
image_class: 'd-none d-sm-block',
show_mobile_name: true
}) }}
<button class="navbar-toggler" type="button" data-bs-toggle="collapse"
data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent"
aria-expanded="false" aria-label="{{ 'Toggle navigation'|trans }}">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
Arguments
"An exception has been thrown during the rendering of a template ("Class "Api_Abstract" not found") in "layout_default.html.twig" at line 80."
/var/www/clientes/modules/Support/Api/Guest.php
declare(strict_types=1);
/**
* Copyright 2022-2025 FOSSBilling
* Copyright 2011-2021 BoxBilling, Inc.
* SPDX-License-Identifier: Apache-2.0.
*
* @copyright FOSSBilling (https://www.fossbilling.org)
* @license http://www.apache.org/licenses/LICENSE-2.0 Apache-2.0
*/
/**
* Public tickets management.
*/
namespace Box\Mod\Support\Api;
use FOSSBilling\PaginationOptions;
use FOSSBilling\Validation\Api\RequiredParams;
class Guest extends \Api_Abstract
{
/**
* Submit new public ticket.
*
* @return string - ticket hash
*/
#[RequiredParams([
'name' => 'Please enter your name',
'email' => 'Please enter your email address',
'subject' => 'Please enter the subject',
'message' => 'Please enter your message',
])]
public function ticket_create(array $data): string
{
$this->di['rate_limiter']->consumeOrThrow('guest_ticket_create', (string) $this->getIp());
if (!is_string($data['message']) || strlen($data['message']) < 4) {
throw new \FOSSBilling\InformationException('Please enter your message');
}
Arguments
"Class "Api_Abstract" not found"
/var/www/clientes/vendor/composer/ClassLoader.php
/**
* @return void
*/
private static function initializeIncludeClosure()
{
if (self::$includeFile !== null) {
return;
}
/**
* Scope isolated include.
*
* Prevents access to $this/self from included files.
*
* @param string $file
* @return void
*/
self::$includeFile = \Closure::bind(static function($file) {
include $file;
}, null, null);
}
}
/var/www/clientes/vendor/composer/ClassLoader.php
public function unregister()
{
spl_autoload_unregister(array($this, 'loadClass'));
if (null !== $this->vendorDir) {
unset(self::$registeredLoaders[$this->vendorDir]);
}
}
/**
* Loads the given class or interface.
*
* @param string $class The name of the class
* @return true|null True if loaded, null otherwise
*/
public function loadClass($class)
{
if ($file = $this->findFile($class)) {
$includeFile = self::$includeFile;
$includeFile($file);
return true;
}
return null;
}
/**
* Finds the path to the file where the class is defined.
*
* @param string $class The name of the class
*
* @return string|false The path if found, false otherwise
*/
public function findFile($class)
{
// class map lookup
if (isset($this->classMap[$class])) {
return $this->classMap[$class];
}
/var/www/clientes/library/FOSSBilling/Api/Dispatcher.php
$methodName = implode('_', $parts);
if (empty($mod)) {
throw new Exception('Invalid module name', null, 714);
}
$extensionService = $this->getDi()['mod']('extension')->getService();
if (!$extensionService->isExtensionActive('mod', $mod)) {
throw new Exception('FOSSBilling module :mod is not installed/activated', [':mod' => $mod], 715);
}
if ($role === 'admin') {
$staffService = $this->getDi()['mod_service']('Staff');
if (!$staffService->hasPermission($identity, $mod)) {
throw new Exception('You do not have access to the :mod module', [':mod' => $mod], 725);
}
}
$apiClass = '\Box\Mod\\' . ucfirst($mod) . '\Api\\' . ucfirst($role);
if (!class_exists($apiClass)) {
throw new Exception(':type API call :method does not exist in module :module', [':type' => ucfirst($role), ':method' => $methodName, ':module' => $mod], 740);
}
$api = new $apiClass();
if (!$api instanceof AbstractApi) {
throw new Exception('Api class must be an instance of FOSSBilling\Api\AbstractApi', null, 730);
}
$module = $this->getDi()['mod']($mod);
$api->setDi($this->di);
$api->setMod($module);
$api->setIdentity($identity);
$api->setIp($this->getDi()['request']->getClientIp());
if ($module->hasService()) {
$api->setService($this->getDi()['mod_service']($mod));
}
if (!method_exists($api, $methodName) || !is_callable([$api, $methodName])) {
$reflector = new \ReflectionClass($api);
if (!$reflector->hasMethod('__call')) {
/var/www/clientes/library/FOSSBilling/Api/Proxy.php
}
public function getIdentity(): object
{
return $this->identity;
}
public function getType(): string
{
return $this->type;
}
public function call(string $method, array $data = []): mixed
{
return $this->getDispatcher()->dispatch($this->identity, $method, $data);
}
public function __call($method, $arguments)
{
return $this->getDispatcher()->dispatchWithArguments($this->identity, (string) $method, $arguments);
}
private function getDispatcher(): Dispatcher
{
if ($this->di === null || !$this->di->offsetExists('api_dispatcher')) {
throw new \LogicException('API proxy requires the api_dispatcher service');
}
$dispatcher = $this->di['api_dispatcher'];
if (!$dispatcher instanceof Dispatcher) {
throw new \LogicException('API dispatcher service must resolve to a FOSSBilling\Api\Dispatcher instance');
}
return $dispatcher;
}
}
/var/www/clientes/vendor/twig/twig/src/Extension/CoreExtension.php
if ($isDefinedTest) {
return false;
}
if ($propertyNotAllowedError) {
throw $propertyNotAllowedError;
}
throw $e;
}
}
if ($isDefinedTest) {
return true;
}
// Some objects throw exceptions when they have __call, and the method we try
// to call is not supported. If ignoreStrictCheck is true, we should return null.
try {
$ret = $object->$method(...$arguments);
} catch (\BadMethodCallException $e) {
if ($call && ($ignoreStrictCheck || !$env->isStrictVariables())) {
return;
}
throw $e;
}
return $ret;
}
/**
* Returns the values from a single column in the input array.
*
* <pre>
* {% set items = [{ 'fruit' : 'apple'}, {'fruit' : 'orange' }] %}
*
* {% set fruits = items|column('fruit') %}
*
* {# fruits now contains ['apple', 'orange'] #}
* </pre>
/var/www/clientes/data/cache/7e/7ec8e662c149720f5e3982cbc8132790.php
yield $this->env->getRuntime('FOSSBilling\Twig\Extension\FOSSBillingExtension')->url($this->env, "login");
yield "\x27;
}
});
</script>
";
}
// line 75
yield "
";
// line 76
if ((($context["client"] ?? null) && !array_key_exists("profile", $context))) {
// line 77
yield " ";
$context["profile"] = CoreExtension::getAttribute($this->env, $this->source, ($context["client"] ?? null), "profile_get", [], "any", false, false, false, 77);
}
// line 79
$context["company"] = CoreExtension::getAttribute($this->env, $this->source, ($context["guest"] ?? null), "system_company", [], "any", false, false, false, 79);
// line 80
$context["guest_support_url"] = (((($tmp = CoreExtension::getAttribute($this->env, $this->source, ($context["guest"] ?? null), "support_guest_tickets_enabled", [], "method", false, false, false, 80)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('FOSSBilling\Twig\Extension\FOSSBillingExtension')->url($this->env, "support/contact-us")) : ($this->env->getRuntime('FOSSBilling\Twig\Extension\FOSSBillingExtension')->url($this->env, "login")));
// line 81
$context["support_url"] = (((($tmp = ($context["client"] ?? null)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? ($this->env->getRuntime('FOSSBilling\Twig\Extension\FOSSBillingExtension')->url($this->env, "support")) : (($context["guest_support_url"] ?? null)));
// line 82
yield "
<div class=\"container\">
<header>
";
// line 85
yield $this->env->getRuntime('FOSSBilling\Twig\Extension\FOSSBillingExtension')->renderWidgets($this->env, "client.theme.header.start");
yield "
<nav class=\"navbar navbar-expand-md py-4\">
<div class=\"container-fluid\">
";
// line 88
yield Twig\Extension\CoreExtension::include($this->env, $context, "partial_company_logo.html.twig", ["logo_url" => (((($tmp = CoreExtension::getAttribute($this->env, $this->source, // line 89
($context["settings"] ?? null), "show_company_logo", [], "any", false, false, false, 89)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? (CoreExtension::getAttribute($this->env, $this->source, ($context["company"] ?? null), "logo_url", [], "any", false, false, false, 89)) : (null)), "dark_logo_url" => (((($tmp = CoreExtension::getAttribute($this->env, $this->source, // line 90
($context["settings"] ?? null), "show_company_logo", [], "any", false, false, false, 90)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) ? (CoreExtension::getAttribute($this->env, $this->source, ($context["company"] ?? null), "logo_url_dark", [], "any", false, false, false, 90)) : (null)), "link_class" => "navbar-brand", "image_class" => "d-none d-sm-block", "show_mobile_name" => true]);
// line 94
yield "
<button class=\"navbar-toggler\" type=\"button\" data-bs-toggle=\"collapse\"
/var/www/clientes/vendor/twig/twig/src/Template.php
if ($useBlocks && isset($blocks[$name])) {
$template = $blocks[$name][0];
$block = $blocks[$name][1];
} elseif (isset($this->blocks[$name])) {
$template = $this->blocks[$name][0];
$block = $this->blocks[$name][1];
} else {
$template = null;
$block = null;
}
// avoid RCEs when sandbox is enabled
if (null !== $template && !$template instanceof self) {
throw new \LogicException('A block must be a method on a \Twig\Template instance.');
}
if (null !== $template) {
try {
$template->ensureSecurityChecked();
yield from $template->$block($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($template->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Throwable $e) {
$e = new RuntimeError(\sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $template->getSourceContext(), $e);
$e->guess();
throw $e;
}
} elseif ($parent = $this->getParent($context)) {
yield from $parent->unwrap()->yieldBlock($name, $context, array_merge($this->blocks, $blocks), false, $templateContext ?? $this);
/var/www/clientes/data/cache/7e/7ec8e662c149720f5e3982cbc8132790.php
yield "</head>
<body class=\"";
// line 46
yield from $this->unwrap()->yieldBlock('body_class', $context, $blocks);
yield "\">
<div class=\"d-none\">";
// line 48
yield $this->env->getRuntime('FOSSBilling\Twig\Extension\FOSSBillingExtension')->svgSprite($this->env);
yield "</div>
";
// line 50
yield $this->env->getRuntime('FOSSBilling\Twig\Extension\FOSSBillingExtension')->renderWidgets($this->env, "client.theme.body.start");
yield "
";
// line 52
yield from $this->unwrap()->yieldBlock('body', $context, $blocks);
// line 273
yield "
";
// line 274
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, ($context["settings"] ?? null), "inject_javascript", [], "any", false, false, false, 274)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 275
yield " ";
yield CoreExtension::getAttribute($this->env, $this->source, ($context["settings"] ?? null), "inject_javascript", [], "any", false, false, false, 275);
yield "
";
}
// line 277
yield " ";
yield Twig\Extension\CoreExtension::include($this->env, $context, "partial_pending_messages.html.twig", [], true, true);
yield "
";
// line 278
if ((($tmp = CoreExtension::getAttribute($this->env, $this->source, ($context["guest"] ?? null), "extension_is_on", [["mod" => "cookieconsent"]], "method", false, false, false, 278)) && $tmp instanceof Markup ? (string) $tmp : $tmp)) {
// line 279
yield " ";
/var/www/clientes/vendor/twig/twig/src/Template.php
$content = '';
foreach ($this->yield($context) as $data) {
$content .= $data;
}
return $content;
}
/**
* @return iterable<scalar|\Stringable|null>
*/
public function yield(array $context, array $blocks = []): iterable
{
$context += $this->env->getGlobals();
$blocks = array_merge($this->blocks, $blocks);
try {
$this->ensureSecurityChecked();
yield from $this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Throwable $e) {
$e = new RuntimeError(\sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
$e->guess();
throw $e;
}
}
/var/www/clientes/data/cache/8d/8d317820d774a757c392e1c66dc890b5.php
$this->blocks = [
'meta_title' => [$this, 'block_meta_title'],
'body_class' => [$this, 'block_body_class'],
'breadcrumb' => [$this, 'block_breadcrumb'],
'content' => [$this, 'block_content'],
];
}
protected function doGetParent(array $context): bool|string|Template|TemplateWrapper
{
// line 1
return "layout_default.html.twig";
}
protected function doDisplay(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
$this->parent = $this->load("layout_default.html.twig", 1);
yield from $this->parent->unwrap()->yield($context, array_merge($this->blocks, $blocks));
}
// line 3
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_meta_title(array $context, array $blocks = []): iterable
{
$macros = $this->macros;
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape($this->env->getRuntime('FOSSBilling\Twig\Extension\FOSSBillingExtension')->trans("Error"), "html", null, true);
yield " ";
yield $this->env->getRuntime('Twig\Runtime\EscaperRuntime')->escape(CoreExtension::getAttribute($this->env, $this->source, ($context["exception"] ?? null), "getCode", [], "any", false, false, false, 3), "html", null, true);
yield from [];
}
// line 5
/**
* @return iterable<null|scalar|\Stringable>
*/
public function block_body_class(array $context, array $blocks = []): iterable
/var/www/clientes/vendor/twig/twig/src/Template.php
$content = '';
foreach ($this->yield($context) as $data) {
$content .= $data;
}
return $content;
}
/**
* @return iterable<scalar|\Stringable|null>
*/
public function yield(array $context, array $blocks = []): iterable
{
$context += $this->env->getGlobals();
$blocks = array_merge($this->blocks, $blocks);
try {
$this->ensureSecurityChecked();
yield from $this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
// this is mostly useful for \Twig\Error\LoaderError exceptions
// see \Twig\Error\LoaderError
if (-1 === $e->getTemplateLine()) {
$e->guess();
}
throw $e;
} catch (\Throwable $e) {
$e = new RuntimeError(\sprintf('An exception has been thrown during the rendering of a template ("%s").', $e->getMessage()), -1, $this->getSourceContext(), $e);
$e->guess();
throw $e;
}
}
/var/www/clientes/vendor/twig/twig/src/Template.php
{
return $this;
}
/**
* Returns all blocks.
*
* This method is for internal use only and should never be called
* directly.
*
* @return array An array of blocks
*/
public function getBlocks(): array
{
return $this->blocks;
}
public function display(array $context, array $blocks = []): void
{
foreach ($this->yield($context, $blocks) as $data) {
echo $data;
}
}
public function render(array $context): string
{
if (!$this->useYield) {
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(static function () { return ''; });
}
try {
$this->display($context);
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
/var/www/clientes/vendor/twig/twig/src/Template.php
}
public function display(array $context, array $blocks = []): void
{
foreach ($this->yield($context, $blocks) as $data) {
echo $data;
}
}
public function render(array $context): string
{
if (!$this->useYield) {
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(static function () { return ''; });
}
try {
$this->display($context);
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
$content = '';
foreach ($this->yield($context) as $data) {
$content .= $data;
}
return $content;
}
/**
/var/www/clientes/vendor/twig/twig/src/TemplateWrapper.php
/**
* @return iterable<scalar|\Stringable|null>
*/
public function stream(array $context = []): iterable
{
yield from $this->template->yield($context);
}
/**
* @return iterable<scalar|\Stringable|null>
*/
public function streamBlock(string $name, array $context = []): iterable
{
yield from $this->template->yieldBlock($name, $context);
}
public function render(array $context = []): string
{
return $this->template->render($context);
}
/**
* @return void
*/
public function display(array $context = [])
{
// using func_get_args() allows to not expose the blocks argument
// as it should only be used by internal code
$this->template->display($context, \func_get_args()[1] ?? []);
}
public function hasBlock(string $name, array $context = []): bool
{
return $this->template->hasBlock($name, $context);
}
/**
* @return string[] An array of defined template block names
*/
/var/www/clientes/library/Box/AppClient.php
$this->di['logger']->setChannel('routing')->info($e->getMessage());
return $this->errorResponse($e, 404);
}
/**
* @param string $fileName
*/
#[Override]
public function render($fileName, $variableArray = [], $ext = 'html.twig'): string
{
try {
$template = $this->getTwig()->load(Path::changeExtension($fileName, $ext));
} catch (Twig\Error\LoaderError $e) {
$this->di['logger']->setChannel('routing')->info($e->getMessage());
throw new FOSSBilling\InformationException('Page not found', null, 404);
}
return $template->render($variableArray);
}
/**
* Get Twig environment for client area.
*/
protected function getTwig(): Twig\Environment
{
$twigFactory = $this->di['twig_factory'];
return $twigFactory->createClientEnvironment($this->debugBar);
}
}
/var/www/clientes/library/Box/App.php
return $this->request;
}
protected function getRequestPath(): string
{
return RequestFactory::getRoutePath($this->getRequest());
}
protected function normalizeResponse(mixed $result): Response
{
if ($result instanceof Response) {
return $result;
}
return new Response((string) ($result ?? ''));
}
public function renderResponse(string $fileName, array $variableArray = [], int $statusCode = 200, array $headers = []): Response
{
$response = new Response($this->render($fileName, $variableArray), $statusCode);
$response->headers->add($headers);
return $response;
}
public function errorResponse(Exception $e, ?int $statusCode = null, array $headers = []): Response
{
$statusCode ??= $e->getCode() > 0 ? $e->getCode() : 500;
return $this->renderResponse('error', ['exception' => $e], $statusCode, $headers);
}
public function abortWithResponse(Response $response): never
{
throw new HttpResponseException($response);
}
public function run(): Response
{
/** @var TimeDataCollector $timeCollector */
/var/www/clientes/library/Box/App.php
if ($result instanceof Response) {
return $result;
}
return new Response((string) ($result ?? ''));
}
public function renderResponse(string $fileName, array $variableArray = [], int $statusCode = 200, array $headers = []): Response
{
$response = new Response($this->render($fileName, $variableArray), $statusCode);
$response->headers->add($headers);
return $response;
}
public function errorResponse(Exception $e, ?int $statusCode = null, array $headers = []): Response
{
$statusCode ??= $e->getCode() > 0 ? $e->getCode() : 500;
return $this->renderResponse('error', ['exception' => $e], $statusCode, $headers);
}
public function abortWithResponse(Response $response): never
{
throw new HttpResponseException($response);
}
public function run(): Response
{
/** @var TimeDataCollector $timeCollector */
$timeCollector = $this->debugBar->getCollector('time');
try {
$timeCollector->startMeasure('registerModule', 'Registering module routes');
$this->registerModule();
$timeCollector->stopMeasure('registerModule');
$timeCollector->startMeasure('init', 'Initializing the app');
$this->init();
$timeCollector->stopMeasure('init');
/var/www/clientes/library/Box/AppClient.php
try {
$content = $this->render($tpl, ['post' => $this->getRequest()->request->all()], $ext);
if ("{$tpl}.{$ext}" === 'mod_page_sitemap.xml') {
return new Response($content, 200, ['Content-Type' => 'application/xml']);
}
return new Response($content);
} catch (Exception $e) {
// @phpstan-ignore if.alwaysFalse (DEBUG is a runtime constant that may be true during debugging)
if (DEBUG) {
error_log($e->getMessage());
}
}
$e = new FOSSBilling\InformationException('Page :url not found', [':url' => $this->url], 404);
$this->di['logger']->setChannel('routing')->info($e->getMessage());
return $this->errorResponse($e, 404);
}
/**
* @param string $fileName
*/
#[Override]
public function render($fileName, $variableArray = [], $ext = 'html.twig'): string
{
try {
$template = $this->getTwig()->load(Path::changeExtension($fileName, $ext));
} catch (Twig\Error\LoaderError $e) {
$this->di['logger']->setChannel('routing')->info($e->getMessage());
throw new FOSSBilling\InformationException('Page not found', null, 404);
}
return $template->render($variableArray);
}
/**
/var/www/clientes/library/Box/App.php
{
/** @var TimeDataCollector $timeCollector */
$timeCollector = $this->debugBar->getCollector('time');
$timeCollector->startMeasure('execute', 'Reflecting module controller');
$reflection = new ReflectionMethod(static::class, $methodName);
$args = [];
foreach ($reflection->getParameters() as $param) {
if (isset($params[$param->name])) {
$args[$param->name] = $params[$param->name];
} elseif ($param->isDefaultValueAvailable()) {
$args[$param->name] = $param->getDefaultValue();
}
}
$timeCollector->stopMeasure('execute');
return $reflection->invokeArgs($this, $args);
}
protected function event(string $httpMethod, string $url, string $methodName, ?array $conditions = [], ?string $classname = null): void
{
if (method_exists($this, $methodName)) {
$this->mappings[] = [$httpMethod, $url, $methodName, $conditions];
}
if ($classname !== null) {
$this->shared[] = [$httpMethod, $url, $methodName, $conditions, $classname];
}
}
protected function checkAllowedURLs(): bool
{
$requestPath = $this->getRequestPath();
$allowedURLs = Config::getProperty('maintenance_mode.allowed_urls', []);
// Allow access to the staff panel all the time
$adminApiPrefixes = [
'/api/guest/staff/login',
/var/www/clientes/library/Box/App.php
$mapping = $this->shared[$i];
$url = new Box_UrlHelper($mapping[0], $mapping[1], $mapping[3], $this->url, $this->getRequest()->getMethod());
if ($url->match) {
$timeCollector->stopMeasure('sharedMapping');
return $this->normalizeResponse($this->executeShared($mapping[4], $mapping[2], $url->params));
}
}
$timeCollector->stopMeasure('sharedMapping');
// this class mappings
$timeCollector->startMeasure('mapping', 'Checking mappings');
$mappingsCount = count($this->mappings);
for ($i = 0; $i < $mappingsCount; ++$i) {
$mapping = $this->mappings[$i];
$url = new Box_UrlHelper($mapping[0], $mapping[1], $mapping[3], $this->url, $this->getRequest()->getMethod());
if ($url->match) {
$timeCollector->stopMeasure('mapping');
return $this->normalizeResponse($this->execute($mapping[2], $url->params));
}
}
$timeCollector->stopMeasure('mapping');
$e = new FOSSBilling\InformationException('Page :url not found', [':url' => $this->url], 404);
return $this->show404($e);
}
}
/var/www/clientes/library/Box/App.php
public function run(): Response
{
/** @var TimeDataCollector $timeCollector */
$timeCollector = $this->debugBar->getCollector('time');
try {
$timeCollector->startMeasure('registerModule', 'Registering module routes');
$this->registerModule();
$timeCollector->stopMeasure('registerModule');
$timeCollector->startMeasure('init', 'Initializing the app');
$this->init();
$timeCollector->stopMeasure('init');
$timeCollector->startMeasure('checkperm', 'Checking access to module');
$this->checkPermission();
$timeCollector->stopMeasure('checkperm');
return $this->processRequest();
} catch (AuthenticationRequiredException $e) {
if ($e->getArea() === 'admin') {
$this->di['set_return_uri'];
return new RedirectResponse($this->di['url']->adminLink('staff/login'));
}
$this->di['set_return_uri'];
return new RedirectResponse($this->di['url']->link('login'));
} catch (EmailValidationRequiredException) {
return new RedirectResponse($this->di['url']->link('client/profile'));
} catch (HttpResponseException $e) {
return $e->getResponse();
}
}
/**
* @param string $path
*/
/var/www/clientes/index.php
$timeCollector?->stopMeasure('translate');
// If HTTP error code has been passed, handle it.
if (!is_null($http_err_code)) {
$http_err_code = intval($http_err_code);
switch ($http_err_code) {
case 404:
$e = new FOSSBilling\Exception('Page :url not found', [':url' => $url], 404);
$app->show404($e)->send();
break;
default:
$e = new FOSSBilling\Exception('HTTP Error :err_code occurred while attempting to load :url', [':err_code' => $http_err_code, ':url' => $url], $http_err_code);
(new Response($app->render('error', ['exception' => $e]), $http_err_code))->send();
}
exit;
}
// If no HTTP error passed, run the app.
$app->run()->send();
exit;