/app/vendor/twig/twig/src/Loader/FilesystemLoader.php
if (!$this->isAbsolutePath($path)) {
$path = $this->rootPath.$path;
}
if (is_file($path.'/'.$shortname)) {
if (false !== $realpath = realpath($path.'/'.$shortname)) {
return $this->cache[$name] = $realpath;
}
return $this->cache[$name] = $path.'/'.$shortname;
}
}
$this->errorCache[$name] = sprintf('Unable to find template "%s" (looked into: %s).', $name, implode(', ', $this->paths[$namespace]));
if (!$throw) {
return null;
}
throw new LoaderError($this->errorCache[$name]);
}
private function normalizeName(string $name): string
{
return preg_replace('#/{2,}#', '/', str_replace('\\', '/', $name));
}
private function parseName(string $name, string $default = self::MAIN_NAMESPACE): array
{
if (isset($name[0]) && '@' == $name[0]) {
if (false === $pos = strpos($name, '/')) {
throw new LoaderError(sprintf('Malformed namespaced template name "%s" (expecting "@namespace/template_name").', $name));
}
$namespace = substr($name, 1, $pos - 1);
$shortname = substr($name, $pos + 1);
return [$namespace, $shortname];
}
Arguments
"Unable to find template "page_templates/action_ru.twig" (looked into: /app/src/Modules/App/views) in "index/page.twig" at line 4."
/app/vendor/twig/twig/src/Loader/FilesystemLoader.php
if (!isset($this->paths[$namespace])) {
$this->paths[$namespace][] = $path;
} else {
array_unshift($this->paths[$namespace], $path);
}
}
public function getSourceContext(string $name): Source
{
if (null === $path = $this->findTemplate($name)) {
return new Source('', $name, '');
}
return new Source(file_get_contents($path), $name, $path);
}
public function getCacheKey(string $name): string
{
if (null === $path = $this->findTemplate($name)) {
return '';
}
$len = \strlen($this->rootPath);
if (0 === strncmp($this->rootPath, $path, $len)) {
return substr($path, $len);
}
return $path;
}
/**
* @return bool
*/
public function exists(string $name)
{
$name = $this->normalizeName($name);
if (isset($this->cache[$name])) {
return true;
}
Arguments
"page_templates/action_ru.twig"
/app/vendor/twig/twig/src/Environment.php
/**
* Gets the template class associated with the given string.
*
* The generated template class is based on the following parameters:
*
* * The cache key for the given template;
* * The currently enabled extensions;
* * Whether the Twig C extension is available or not;
* * PHP version;
* * Twig version;
* * Options with what environment was created.
*
* @param string $name The name for which to calculate the template class name
* @param int|null $index The index if it is an embedded template
*
* @internal
*/
public function getTemplateClass(string $name, int $index = null): string
{
$key = $this->getLoader()->getCacheKey($name).$this->optionsHash;
return $this->templateClassPrefix.hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $key).(null === $index ? '' : '___'.$index);
}
/**
* Renders a template.
*
* @param string|TemplateWrapper $name The template name
*
* @throws LoaderError When the template cannot be found
* @throws SyntaxError When an error occurred during compilation
* @throws RuntimeError When an error occurred during rendering
*/
public function render($name, array $context = []): string
{
return $this->load($name)->render($context);
}
/**
* Displays a template.
Arguments
"page_templates/action_ru.twig"
/app/vendor/twig/twig/src/Template.php
* @return Template|TemplateWrapper
*/
protected function loadTemplate($template, $templateName = null, $line = null, $index = null)
{
try {
if (\is_array($template)) {
return $this->env->resolveTemplate($template);
}
if ($template instanceof self || $template instanceof TemplateWrapper) {
return $template;
}
if ($template === $this->getTemplateName()) {
$class = static::class;
if (false !== $pos = strrpos($class, '___', -1)) {
$class = substr($class, 0, $pos);
}
} else {
$class = $this->env->getTemplateClass($template);
}
return $this->env->loadTemplate($class, $template, $index);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($templateName ? new Source('', $templateName) : $this->getSourceContext());
}
if ($e->getTemplateLine() > 0) {
throw $e;
}
if (!$line) {
$e->guess();
} else {
$e->setTemplateLine($line);
}
throw $e;
}
Arguments
"page_templates/action_ru.twig"
/app/cache/2c/2cfd32898c3255ce783a0c17699eaef0.php
$this->parent = false;
$this->blocks = [
];
}
protected function doDisplay(array $context, array $blocks = [])
{
$macros = $this->macros;
// line 1
$this->loadTemplate("parts/header.twig", "index/page.twig", 1)->display($context);
// line 2
echo "
";
// line 3
if (($context["is_custom"] ?? null)) {
// line 4
echo " ";
$this->loadTemplate(($context["template_path"] ?? null), "index/page.twig", 4)->display($context);
} else {
// line 6
echo "
";
}
// line 8
echo "
";
// line 9
$this->loadTemplate("parts/footer.twig", "index/page.twig", 9)->display($context);
}
/**
* @codeCoverageIgnore
*/
public function getTemplateName()
{
return "index/page.twig";
}
Arguments
"page_templates/action_ru.twig"
"index/page.twig"
4
/app/vendor/twig/twig/src/Template.php
} else {
ob_start(function () { return ''; });
}
try {
$this->display($context);
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
protected function displayWithErrorHandling(array $context, array $blocks = [])
{
try {
$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;
}
}
Arguments
array:28 [
"lang" => "en"
"langs" => array:16 [
0 => array:4 [
"id" => 1
"skey" => "en"
"title" => "English"
"link" => "https://www.formacar.com/en/action.html"
]
1 => array:4 [
"id" => 4
"skey" => "de"
"title" => "Deutsch"
"link" => "https://www.formacar.com/de/action.html"
]
2 => array:4 [
"id" => 5
"skey" => "fr"
"title" => "France"
"link" => "https://www.formacar.com/fr/action.html"
]
3 => array:4 [
"id" => 7
"skey" => "es"
"title" => "Español"
"link" => "https://www.formacar.com/es/action.html"
]
4 => array:4 [
"id" => 10
"skey" => "ar"
"title" => "العربية"
"link" => "https://www.formacar.com/ar/action.html"
]
5 => array:4 [
"id" => 11
"skey" => "it"
"title" => "Italiano"
"link" => "https://www.formacar.com/it/action.html"
]
6 => array:4 [
"id" => 12
"skey" => "ja"
"title" => "日本語"
"link" => "https://www.formacar.com/ja/action.html"
]
7 => array:4 [
"id" => 13
"skey" => "ko"
"title" => "한국의"
"link" => "https://www.formacar.com/ko/action.html"
]
8 => array:4 [
"id" => 14
"skey" => "ms"
"title" => "Malay"
"link" => "https://www.formacar.com/ms/action.html"
]
9 => array:4 [
"id" => 15
"skey" => "nl"
"title" => "Nederlands"
"link" => "https://www.formacar.com/nl/action.html"
]
10 => array:4 [
"id" => 16
"skey" => "pt"
"title" => "Português"
"link" => "https://www.formacar.com/pt/action.html"
]
11 => array:4 [
"id" => 17
"skey" => "tr"
"title" => "Türkçe"
"link" => "https://www.formacar.com/tr/action.html"
]
12 => array:4 [
"id" => 18
"skey" => "el"
"title" => "Ελληνικά"
"link" => "https://www.formacar.com/el/action.html"
]
13 => array:4 [
"id" => 19
"skey" => "zh"
"title" => "汉语"
"link" => "https://www.formacar.com/zh/action.html"
]
14 => array:4 [
"id" => 20
"skey" => "hi"
"title" => "हिंदी"
"link" => "https://www.formacar.com/hi/action.html"
]
15 => array:4 [
"id" => 21
"skey" => "id"
"title" => "Indonesian"
"link" => "https://www.formacar.com/id/action.html"
]
]
"is_custom" => true
"template_path" => "page_templates/action_ru.twig"
"title" => "Трансляция"
"text" => "<p><br></p>"
"is_mobile" => false
"page_title" => "Formacar: Трансляция"
"shop_url" => "https://shop.formacar.com"
"assets" => Phalcon\Assets\Manager {#267}
"_me" => null
"_cdn" => "https://www.formacar.com"
"_dispatcher" => Phalcon\Mvc\Dispatcher {#212}
"session_id" => "e8e3496eb9f54bd5479c418caf1b0738"
"t" => Phalcon\Translate\Adapter\NativeArray {#248}
"_uperm" => Models\RolePermission {#257}
"current_lang" => Models\Langs {#253}
"lang_id" => 2
"home_url" => "https://www.formacar.com"
"search_story" => []
"current_section" => "/home/"
"current_sub_section" => "/home/"
"banners_links" => array:2 [
"crypto" => "https://t.me/formacarcrypto"
"scl" => "https://scl-performance.com/ru"
]
"_domain" => "formacar.com"
"languages" => array:1 [
"items" => array:21 [
"en" => 1
"ru" => 2
"de" => 4
"fr" => 5
"es" => 7
"ar" => 10
"it" => 11
"ja" => 12
"ko" => 13
"ms" => 14
"nl" => 15
"pt" => 16
"tr" => 17
"el" => 18
"zh" => 19
"hi" => 20
"id" => 21
"kk" => 25
"ky" => 28
"hy" => 29
"uk" => 32
]
]
"currentLanguage" => "ru"
"content" => ""
"view" => Phalcon\Mvc\View {#210}
]
[]
/app/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()
{
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(function () { return ''; });
}
try {
$this->display($context);
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
Arguments
array:28 [
"lang" => "en"
"langs" => array:16 [
0 => array:4 [
"id" => 1
"skey" => "en"
"title" => "English"
"link" => "https://www.formacar.com/en/action.html"
]
1 => array:4 [
"id" => 4
"skey" => "de"
"title" => "Deutsch"
"link" => "https://www.formacar.com/de/action.html"
]
2 => array:4 [
"id" => 5
"skey" => "fr"
"title" => "France"
"link" => "https://www.formacar.com/fr/action.html"
]
3 => array:4 [
"id" => 7
"skey" => "es"
"title" => "Español"
"link" => "https://www.formacar.com/es/action.html"
]
4 => array:4 [
"id" => 10
"skey" => "ar"
"title" => "العربية"
"link" => "https://www.formacar.com/ar/action.html"
]
5 => array:4 [
"id" => 11
"skey" => "it"
"title" => "Italiano"
"link" => "https://www.formacar.com/it/action.html"
]
6 => array:4 [
"id" => 12
"skey" => "ja"
"title" => "日本語"
"link" => "https://www.formacar.com/ja/action.html"
]
7 => array:4 [
"id" => 13
"skey" => "ko"
"title" => "한국의"
"link" => "https://www.formacar.com/ko/action.html"
]
8 => array:4 [
"id" => 14
"skey" => "ms"
"title" => "Malay"
"link" => "https://www.formacar.com/ms/action.html"
]
9 => array:4 [
"id" => 15
"skey" => "nl"
"title" => "Nederlands"
"link" => "https://www.formacar.com/nl/action.html"
]
10 => array:4 [
"id" => 16
"skey" => "pt"
"title" => "Português"
"link" => "https://www.formacar.com/pt/action.html"
]
11 => array:4 [
"id" => 17
"skey" => "tr"
"title" => "Türkçe"
"link" => "https://www.formacar.com/tr/action.html"
]
12 => array:4 [
"id" => 18
"skey" => "el"
"title" => "Ελληνικά"
"link" => "https://www.formacar.com/el/action.html"
]
13 => array:4 [
"id" => 19
"skey" => "zh"
"title" => "汉语"
"link" => "https://www.formacar.com/zh/action.html"
]
14 => array:4 [
"id" => 20
"skey" => "hi"
"title" => "हिंदी"
"link" => "https://www.formacar.com/hi/action.html"
]
15 => array:4 [
"id" => 21
"skey" => "id"
"title" => "Indonesian"
"link" => "https://www.formacar.com/id/action.html"
]
]
"is_custom" => true
"template_path" => "page_templates/action_ru.twig"
"title" => "Трансляция"
"text" => "<p><br></p>"
"is_mobile" => false
"page_title" => "Formacar: Трансляция"
"shop_url" => "https://shop.formacar.com"
"assets" => Phalcon\Assets\Manager {#267}
"_me" => null
"_cdn" => "https://www.formacar.com"
"_dispatcher" => Phalcon\Mvc\Dispatcher {#212}
"session_id" => "e8e3496eb9f54bd5479c418caf1b0738"
"t" => Phalcon\Translate\Adapter\NativeArray {#248}
"_uperm" => Models\RolePermission {#257}
"current_lang" => Models\Langs {#253}
"lang_id" => 2
"home_url" => "https://www.formacar.com"
"search_story" => []
"current_section" => "/home/"
"current_sub_section" => "/home/"
"banners_links" => array:2 [
"crypto" => "https://t.me/formacarcrypto"
"scl" => "https://scl-performance.com/ru"
]
"_domain" => "formacar.com"
"languages" => array:1 [
"items" => array:21 [
"en" => 1
"ru" => 2
"de" => 4
"fr" => 5
"es" => 7
"ar" => 10
"it" => 11
"ja" => 12
"ko" => 13
"ms" => 14
"nl" => 15
"pt" => 16
"tr" => 17
"el" => 18
"zh" => 19
"hi" => 20
"id" => 21
"kk" => 25
"ky" => 28
"hy" => 29
"uk" => 32
]
]
"currentLanguage" => "ru"
"content" => ""
"view" => Phalcon\Mvc\View {#210}
]
[]
/app/vendor/twig/twig/src/Template.php
public function getBlocks()
{
return $this->blocks;
}
public function display(array $context, array $blocks = [])
{
$this->displayWithErrorHandling($this->env->mergeGlobals($context), array_merge($this->blocks, $blocks));
}
public function render(array $context)
{
$level = ob_get_level();
if ($this->env->isDebug()) {
ob_start();
} else {
ob_start(function () { return ''; });
}
try {
$this->display($context);
} catch (\Throwable $e) {
while (ob_get_level() > $level) {
ob_end_clean();
}
throw $e;
}
return ob_get_clean();
}
protected function displayWithErrorHandling(array $context, array $blocks = [])
{
try {
$this->doDisplay($context, $blocks);
} catch (Error $e) {
if (!$e->getSourceContext()) {
$e->setSourceContext($this->getSourceContext());
}
Arguments
array:28 [
"lang" => "en"
"langs" => array:16 [
0 => array:4 [
"id" => 1
"skey" => "en"
"title" => "English"
"link" => "https://www.formacar.com/en/action.html"
]
1 => array:4 [
"id" => 4
"skey" => "de"
"title" => "Deutsch"
"link" => "https://www.formacar.com/de/action.html"
]
2 => array:4 [
"id" => 5
"skey" => "fr"
"title" => "France"
"link" => "https://www.formacar.com/fr/action.html"
]
3 => array:4 [
"id" => 7
"skey" => "es"
"title" => "Español"
"link" => "https://www.formacar.com/es/action.html"
]
4 => array:4 [
"id" => 10
"skey" => "ar"
"title" => "العربية"
"link" => "https://www.formacar.com/ar/action.html"
]
5 => array:4 [
"id" => 11
"skey" => "it"
"title" => "Italiano"
"link" => "https://www.formacar.com/it/action.html"
]
6 => array:4 [
"id" => 12
"skey" => "ja"
"title" => "日本語"
"link" => "https://www.formacar.com/ja/action.html"
]
7 => array:4 [
"id" => 13
"skey" => "ko"
"title" => "한국의"
"link" => "https://www.formacar.com/ko/action.html"
]
8 => array:4 [
"id" => 14
"skey" => "ms"
"title" => "Malay"
"link" => "https://www.formacar.com/ms/action.html"
]
9 => array:4 [
"id" => 15
"skey" => "nl"
"title" => "Nederlands"
"link" => "https://www.formacar.com/nl/action.html"
]
10 => array:4 [
"id" => 16
"skey" => "pt"
"title" => "Português"
"link" => "https://www.formacar.com/pt/action.html"
]
11 => array:4 [
"id" => 17
"skey" => "tr"
"title" => "Türkçe"
"link" => "https://www.formacar.com/tr/action.html"
]
12 => array:4 [
"id" => 18
"skey" => "el"
"title" => "Ελληνικά"
"link" => "https://www.formacar.com/el/action.html"
]
13 => array:4 [
"id" => 19
"skey" => "zh"
"title" => "汉语"
"link" => "https://www.formacar.com/zh/action.html"
]
14 => array:4 [
"id" => 20
"skey" => "hi"
"title" => "हिंदी"
"link" => "https://www.formacar.com/hi/action.html"
]
15 => array:4 [
"id" => 21
"skey" => "id"
"title" => "Indonesian"
"link" => "https://www.formacar.com/id/action.html"
]
]
"is_custom" => true
"template_path" => "page_templates/action_ru.twig"
"title" => "Трансляция"
"text" => "<p><br></p>"
"is_mobile" => false
"page_title" => "Formacar: Трансляция"
"shop_url" => "https://shop.formacar.com"
"assets" => Phalcon\Assets\Manager {#267}
"_me" => null
"_cdn" => "https://www.formacar.com"
"_dispatcher" => Phalcon\Mvc\Dispatcher {#212}
"session_id" => "e8e3496eb9f54bd5479c418caf1b0738"
"t" => Phalcon\Translate\Adapter\NativeArray {#248}
"_uperm" => Models\RolePermission {#257}
"current_lang" => Models\Langs {#253}
"lang_id" => 2
"home_url" => "https://www.formacar.com"
"search_story" => []
"current_section" => "/home/"
"current_sub_section" => "/home/"
"banners_links" => array:2 [
"crypto" => "https://t.me/formacarcrypto"
"scl" => "https://scl-performance.com/ru"
]
"_domain" => "formacar.com"
"languages" => array:1 [
"items" => array:21 [
"en" => 1
"ru" => 2
"de" => 4
"fr" => 5
"es" => 7
"ar" => 10
"it" => 11
"ja" => 12
"ko" => 13
"ms" => 14
"nl" => 15
"pt" => 16
"tr" => 17
"el" => 18
"zh" => 19
"hi" => 20
"id" => 21
"kk" => 25
"ky" => 28
"hy" => 29
"uk" => 32
]
]
"currentLanguage" => "ru"
"content" => ""
"view" => Phalcon\Mvc\View {#210}
]
/app/vendor/twig/twig/src/TemplateWrapper.php
final class TemplateWrapper
{
private $env;
private $template;
/**
* This method is for internal use only and should never be called
* directly (use Twig\Environment::load() instead).
*
* @internal
*/
public function __construct(Environment $env, Template $template)
{
$this->env = $env;
$this->template = $template;
}
public function render(array $context = []): string
{
return $this->template->render($context);
}
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
*/
public function getBlockNames(array $context = []): array
{
return $this->template->getBlockNames($context);
Arguments
array:28 [
"lang" => "en"
"langs" => array:16 [
0 => array:4 [
"id" => 1
"skey" => "en"
"title" => "English"
"link" => "https://www.formacar.com/en/action.html"
]
1 => array:4 [
"id" => 4
"skey" => "de"
"title" => "Deutsch"
"link" => "https://www.formacar.com/de/action.html"
]
2 => array:4 [
"id" => 5
"skey" => "fr"
"title" => "France"
"link" => "https://www.formacar.com/fr/action.html"
]
3 => array:4 [
"id" => 7
"skey" => "es"
"title" => "Español"
"link" => "https://www.formacar.com/es/action.html"
]
4 => array:4 [
"id" => 10
"skey" => "ar"
"title" => "العربية"
"link" => "https://www.formacar.com/ar/action.html"
]
5 => array:4 [
"id" => 11
"skey" => "it"
"title" => "Italiano"
"link" => "https://www.formacar.com/it/action.html"
]
6 => array:4 [
"id" => 12
"skey" => "ja"
"title" => "日本語"
"link" => "https://www.formacar.com/ja/action.html"
]
7 => array:4 [
"id" => 13
"skey" => "ko"
"title" => "한국의"
"link" => "https://www.formacar.com/ko/action.html"
]
8 => array:4 [
"id" => 14
"skey" => "ms"
"title" => "Malay"
"link" => "https://www.formacar.com/ms/action.html"
]
9 => array:4 [
"id" => 15
"skey" => "nl"
"title" => "Nederlands"
"link" => "https://www.formacar.com/nl/action.html"
]
10 => array:4 [
"id" => 16
"skey" => "pt"
"title" => "Português"
"link" => "https://www.formacar.com/pt/action.html"
]
11 => array:4 [
"id" => 17
"skey" => "tr"
"title" => "Türkçe"
"link" => "https://www.formacar.com/tr/action.html"
]
12 => array:4 [
"id" => 18
"skey" => "el"
"title" => "Ελληνικά"
"link" => "https://www.formacar.com/el/action.html"
]
13 => array:4 [
"id" => 19
"skey" => "zh"
"title" => "汉语"
"link" => "https://www.formacar.com/zh/action.html"
]
14 => array:4 [
"id" => 20
"skey" => "hi"
"title" => "हिंदी"
"link" => "https://www.formacar.com/hi/action.html"
]
15 => array:4 [
"id" => 21
"skey" => "id"
"title" => "Indonesian"
"link" => "https://www.formacar.com/id/action.html"
]
]
"is_custom" => true
"template_path" => "page_templates/action_ru.twig"
"title" => "Трансляция"
"text" => "<p><br></p>"
"is_mobile" => false
"page_title" => "Formacar: Трансляция"
"shop_url" => "https://shop.formacar.com"
"assets" => Phalcon\Assets\Manager {#267}
"_me" => null
"_cdn" => "https://www.formacar.com"
"_dispatcher" => Phalcon\Mvc\Dispatcher {#212}
"session_id" => "e8e3496eb9f54bd5479c418caf1b0738"
"t" => Phalcon\Translate\Adapter\NativeArray {#248}
"_uperm" => Models\RolePermission {#257}
"current_lang" => Models\Langs {#253}
"lang_id" => 2
"home_url" => "https://www.formacar.com"
"search_story" => []
"current_section" => "/home/"
"current_sub_section" => "/home/"
"banners_links" => array:2 [
"crypto" => "https://t.me/formacarcrypto"
"scl" => "https://scl-performance.com/ru"
]
"_domain" => "formacar.com"
"languages" => array:1 [
"items" => array:21 [
"en" => 1
"ru" => 2
"de" => 4
"fr" => 5
"es" => 7
"ar" => 10
"it" => 11
"ja" => 12
"ko" => 13
"ms" => 14
"nl" => 15
"pt" => 16
"tr" => 17
"el" => 18
"zh" => 19
"hi" => 20
"id" => 21
"kk" => 25
"ky" => 28
"hy" => 29
"uk" => 32
]
]
"currentLanguage" => "ru"
"content" => ""
"view" => Phalcon\Mvc\View {#210}
]
/app/vendor/twig/twig/src/Environment.php
*/
public function getTemplateClass(string $name, int $index = null): string
{
$key = $this->getLoader()->getCacheKey($name).$this->optionsHash;
return $this->templateClassPrefix.hash(\PHP_VERSION_ID < 80100 ? 'sha256' : 'xxh128', $key).(null === $index ? '' : '___'.$index);
}
/**
* Renders a template.
*
* @param string|TemplateWrapper $name The template name
*
* @throws LoaderError When the template cannot be found
* @throws SyntaxError When an error occurred during compilation
* @throws RuntimeError When an error occurred during rendering
*/
public function render($name, array $context = []): string
{
return $this->load($name)->render($context);
}
/**
* Displays a template.
*
* @param string|TemplateWrapper $name The template name
*
* @throws LoaderError When the template cannot be found
* @throws SyntaxError When an error occurred during compilation
* @throws RuntimeError When an error occurred during rendering
*/
public function display($name, array $context = []): void
{
$this->load($name)->display($context);
}
/**
* Loads a template.
*
* @param string|TemplateWrapper $name The template name
Arguments
array:28 [
"lang" => "en"
"langs" => array:16 [
0 => array:4 [
"id" => 1
"skey" => "en"
"title" => "English"
"link" => "https://www.formacar.com/en/action.html"
]
1 => array:4 [
"id" => 4
"skey" => "de"
"title" => "Deutsch"
"link" => "https://www.formacar.com/de/action.html"
]
2 => array:4 [
"id" => 5
"skey" => "fr"
"title" => "France"
"link" => "https://www.formacar.com/fr/action.html"
]
3 => array:4 [
"id" => 7
"skey" => "es"
"title" => "Español"
"link" => "https://www.formacar.com/es/action.html"
]
4 => array:4 [
"id" => 10
"skey" => "ar"
"title" => "العربية"
"link" => "https://www.formacar.com/ar/action.html"
]
5 => array:4 [
"id" => 11
"skey" => "it"
"title" => "Italiano"
"link" => "https://www.formacar.com/it/action.html"
]
6 => array:4 [
"id" => 12
"skey" => "ja"
"title" => "日本語"
"link" => "https://www.formacar.com/ja/action.html"
]
7 => array:4 [
"id" => 13
"skey" => "ko"
"title" => "한국의"
"link" => "https://www.formacar.com/ko/action.html"
]
8 => array:4 [
"id" => 14
"skey" => "ms"
"title" => "Malay"
"link" => "https://www.formacar.com/ms/action.html"
]
9 => array:4 [
"id" => 15
"skey" => "nl"
"title" => "Nederlands"
"link" => "https://www.formacar.com/nl/action.html"
]
10 => array:4 [
"id" => 16
"skey" => "pt"
"title" => "Português"
"link" => "https://www.formacar.com/pt/action.html"
]
11 => array:4 [
"id" => 17
"skey" => "tr"
"title" => "Türkçe"
"link" => "https://www.formacar.com/tr/action.html"
]
12 => array:4 [
"id" => 18
"skey" => "el"
"title" => "Ελληνικά"
"link" => "https://www.formacar.com/el/action.html"
]
13 => array:4 [
"id" => 19
"skey" => "zh"
"title" => "汉语"
"link" => "https://www.formacar.com/zh/action.html"
]
14 => array:4 [
"id" => 20
"skey" => "hi"
"title" => "हिंदी"
"link" => "https://www.formacar.com/hi/action.html"
]
15 => array:4 [
"id" => 21
"skey" => "id"
"title" => "Indonesian"
"link" => "https://www.formacar.com/id/action.html"
]
]
"is_custom" => true
"template_path" => "page_templates/action_ru.twig"
"title" => "Трансляция"
"text" => "<p><br></p>"
"is_mobile" => false
"page_title" => "Formacar: Трансляция"
"shop_url" => "https://shop.formacar.com"
"assets" => Phalcon\Assets\Manager {#267}
"_me" => null
"_cdn" => "https://www.formacar.com"
"_dispatcher" => Phalcon\Mvc\Dispatcher {#212}
"session_id" => "e8e3496eb9f54bd5479c418caf1b0738"
"t" => Phalcon\Translate\Adapter\NativeArray {#248}
"_uperm" => Models\RolePermission {#257}
"current_lang" => Models\Langs {#253}
"lang_id" => 2
"home_url" => "https://www.formacar.com"
"search_story" => []
"current_section" => "/home/"
"current_sub_section" => "/home/"
"banners_links" => array:2 [
"crypto" => "https://t.me/formacarcrypto"
"scl" => "https://scl-performance.com/ru"
]
"_domain" => "formacar.com"
"languages" => array:1 [
"items" => array:21 [
"en" => 1
"ru" => 2
"de" => 4
"fr" => 5
"es" => 7
"ar" => 10
"it" => 11
"ja" => 12
"ko" => 13
"ms" => 14
"nl" => 15
"pt" => 16
"tr" => 17
"el" => 18
"zh" => 19
"hi" => 20
"id" => 21
"kk" => 25
"ky" => 28
"hy" => 29
"uk" => 32
]
]
"currentLanguage" => "ru"
"content" => ""
"view" => Phalcon\Mvc\View {#210}
]
/app/src/Library/Twig/Twig.php
* @param boolean $mustClean
*/
public function render(string $path, $params, bool $mustClean = false): void
{
$view = $this->view;
if (!isset($params['content'])) {
$params['content'] = $view->getContent();
}
if (!isset($params['view'])) {
$params['view'] = $view;
}
$relativePath = str_replace(
$view->getViewsDir(),
'',
$path
);
$content = $this->twig->render($relativePath, $params);
if ($mustClean) {
$this->view->setContent($content);
} else {
echo $content;
}
}
public function getTwig() : Environment
{
return $this->twig;
}
}
Arguments
"index/page.twig"
array:28 [
"lang" => "en"
"langs" => array:16 [
0 => array:4 [
"id" => 1
"skey" => "en"
"title" => "English"
"link" => "https://www.formacar.com/en/action.html"
]
1 => array:4 [
"id" => 4
"skey" => "de"
"title" => "Deutsch"
"link" => "https://www.formacar.com/de/action.html"
]
2 => array:4 [
"id" => 5
"skey" => "fr"
"title" => "France"
"link" => "https://www.formacar.com/fr/action.html"
]
3 => array:4 [
"id" => 7
"skey" => "es"
"title" => "Español"
"link" => "https://www.formacar.com/es/action.html"
]
4 => array:4 [
"id" => 10
"skey" => "ar"
"title" => "العربية"
"link" => "https://www.formacar.com/ar/action.html"
]
5 => array:4 [
"id" => 11
"skey" => "it"
"title" => "Italiano"
"link" => "https://www.formacar.com/it/action.html"
]
6 => array:4 [
"id" => 12
"skey" => "ja"
"title" => "日本語"
"link" => "https://www.formacar.com/ja/action.html"
]
7 => array:4 [
"id" => 13
"skey" => "ko"
"title" => "한국의"
"link" => "https://www.formacar.com/ko/action.html"
]
8 => array:4 [
"id" => 14
"skey" => "ms"
"title" => "Malay"
"link" => "https://www.formacar.com/ms/action.html"
]
9 => array:4 [
"id" => 15
"skey" => "nl"
"title" => "Nederlands"
"link" => "https://www.formacar.com/nl/action.html"
]
10 => array:4 [
"id" => 16
"skey" => "pt"
"title" => "Português"
"link" => "https://www.formacar.com/pt/action.html"
]
11 => array:4 [
"id" => 17
"skey" => "tr"
"title" => "Türkçe"
"link" => "https://www.formacar.com/tr/action.html"
]
12 => array:4 [
"id" => 18
"skey" => "el"
"title" => "Ελληνικά"
"link" => "https://www.formacar.com/el/action.html"
]
13 => array:4 [
"id" => 19
"skey" => "zh"
"title" => "汉语"
"link" => "https://www.formacar.com/zh/action.html"
]
14 => array:4 [
"id" => 20
"skey" => "hi"
"title" => "हिंदी"
"link" => "https://www.formacar.com/hi/action.html"
]
15 => array:4 [
"id" => 21
"skey" => "id"
"title" => "Indonesian"
"link" => "https://www.formacar.com/id/action.html"
]
]
"is_custom" => true
"template_path" => "page_templates/action_ru.twig"
"title" => "Трансляция"
"text" => "<p><br></p>"
"is_mobile" => false
"page_title" => "Formacar: Трансляция"
"shop_url" => "https://shop.formacar.com"
"assets" => Phalcon\Assets\Manager {#267}
"_me" => null
"_cdn" => "https://www.formacar.com"
"_dispatcher" => Phalcon\Mvc\Dispatcher {#212}
"session_id" => "e8e3496eb9f54bd5479c418caf1b0738"
"t" => Phalcon\Translate\Adapter\NativeArray {#248}
"_uperm" => Models\RolePermission {#257}
"current_lang" => Models\Langs {#253}
"lang_id" => 2
"home_url" => "https://www.formacar.com"
"search_story" => []
"current_section" => "/home/"
"current_sub_section" => "/home/"
"banners_links" => array:2 [
"crypto" => "https://t.me/formacarcrypto"
"scl" => "https://scl-performance.com/ru"
]
"_domain" => "formacar.com"
"languages" => array:1 [
"items" => array:21 [
"en" => 1
"ru" => 2
"de" => 4
"fr" => 5
"es" => 7
"ar" => 10
"it" => 11
"ja" => 12
"ko" => 13
"ms" => 14
"nl" => 15
"pt" => 16
"tr" => 17
"el" => 18
"zh" => 19
"hi" => 20
"id" => 21
"kk" => 25
"ky" => 28
"hy" => 29
"uk" => 32
]
]
"currentLanguage" => "ru"
"content" => ""
"view" => Phalcon\Mvc\View {#210}
]
[internal]
Arguments
"/app/src/Modules/App/views/index/page.twig"
array:28 [
"lang" => "en"
"langs" => array:16 [
0 => array:4 [
"id" => 1
"skey" => "en"
"title" => "English"
"link" => "https://www.formacar.com/en/action.html"
]
1 => array:4 [
"id" => 4
"skey" => "de"
"title" => "Deutsch"
"link" => "https://www.formacar.com/de/action.html"
]
2 => array:4 [
"id" => 5
"skey" => "fr"
"title" => "France"
"link" => "https://www.formacar.com/fr/action.html"
]
3 => array:4 [
"id" => 7
"skey" => "es"
"title" => "Español"
"link" => "https://www.formacar.com/es/action.html"
]
4 => array:4 [
"id" => 10
"skey" => "ar"
"title" => "العربية"
"link" => "https://www.formacar.com/ar/action.html"
]
5 => array:4 [
"id" => 11
"skey" => "it"
"title" => "Italiano"
"link" => "https://www.formacar.com/it/action.html"
]
6 => array:4 [
"id" => 12
"skey" => "ja"
"title" => "日本語"
"link" => "https://www.formacar.com/ja/action.html"
]
7 => array:4 [
"id" => 13
"skey" => "ko"
"title" => "한국의"
"link" => "https://www.formacar.com/ko/action.html"
]
8 => array:4 [
"id" => 14
"skey" => "ms"
"title" => "Malay"
"link" => "https://www.formacar.com/ms/action.html"
]
9 => array:4 [
"id" => 15
"skey" => "nl"
"title" => "Nederlands"
"link" => "https://www.formacar.com/nl/action.html"
]
10 => array:4 [
"id" => 16
"skey" => "pt"
"title" => "Português"
"link" => "https://www.formacar.com/pt/action.html"
]
11 => array:4 [
"id" => 17
"skey" => "tr"
"title" => "Türkçe"
"link" => "https://www.formacar.com/tr/action.html"
]
12 => array:4 [
"id" => 18
"skey" => "el"
"title" => "Ελληνικά"
"link" => "https://www.formacar.com/el/action.html"
]
13 => array:4 [
"id" => 19
"skey" => "zh"
"title" => "汉语"
"link" => "https://www.formacar.com/zh/action.html"
]
14 => array:4 [
"id" => 20
"skey" => "hi"
"title" => "हिंदी"
"link" => "https://www.formacar.com/hi/action.html"
]
15 => array:4 [
"id" => 21
"skey" => "id"
"title" => "Indonesian"
"link" => "https://www.formacar.com/id/action.html"
]
]
"is_custom" => true
"template_path" => "page_templates/action_ru.twig"
"title" => "Трансляция"
"text" => "<p><br></p>"
"is_mobile" => false
"page_title" => "Formacar: Трансляция"
"shop_url" => "https://shop.formacar.com"
"assets" => Phalcon\Assets\Manager {#267}
"_me" => null
"_cdn" => "https://www.formacar.com"
"_dispatcher" => Phalcon\Mvc\Dispatcher {#212}
"session_id" => "e8e3496eb9f54bd5479c418caf1b0738"
"t" => Phalcon\Translate\Adapter\NativeArray {#248}
"_uperm" => Models\RolePermission {#257}
"current_lang" => Models\Langs {#253}
"lang_id" => 2
"home_url" => "https://www.formacar.com"
"search_story" => []
"current_section" => "/home/"
"current_sub_section" => "/home/"
"banners_links" => array:2 [
"crypto" => "https://t.me/formacarcrypto"
"scl" => "https://scl-performance.com/ru"
]
"_domain" => "formacar.com"
"languages" => array:1 [
"items" => array:21 [
"en" => 1
"ru" => 2
"de" => 4
"fr" => 5
"es" => 7
"ar" => 10
"it" => 11
"ja" => 12
"ko" => 13
"ms" => 14
"nl" => 15
"pt" => 16
"tr" => 17
"el" => 18
"zh" => 19
"hi" => 20
"id" => 21
"kk" => 25
"ky" => 28
"hy" => 29
"uk" => 32
]
]
"currentLanguage" => "ru"
"content" => ""
"view" => Phalcon\Mvc\View {#210}
]
true
[internal]
Arguments
array:2 [
".twig" => Library\Twig\Twig {#243}
".phtml" => Phalcon\Mvc\View\Engine\Php {#256}
]
"index/page"
true
/app/src/Framework/ControllerBase.php
}
protected function getLanguages(): array
{
return $this->locale->availableLanguages();
}
protected function render(array $path, array $params = null): View|\Phalcon\Mvc\ViewInterface|bool
{
$_lng = $this->lang;
$params = $params ?? [];
$params['languages']['items'] = $this->getLanguages();
$params['currentLanguage'] = $_lng;
$this->view->setVars($params);
return $this->view->render(...$path);
}
public function beforeExecuteRoute(Dispatcher $dispatcher): bool
{
$controllerName = $dispatcher->getControllerName();
// Get the current identity
$auth = $this->getDI()->get('auth');
$token = $this->request->getHeader("Authorization");
if ($token == '') {
$this->CURRENT_USER_ID = 0;
} else {
list($type, $BearerToken) = explode(" ", $token, 2);
if (!$type || stripos($type, 'Bearer') !== 0) {
$this->CURRENT_USER_ID = 0;
} else {
if ($BearerToken == '') {
$this->CURRENT_USER_ID = -2;
} else {
Arguments
/app/src/Framework/ControllerBase.php
{
$controllerName = $controllerName ?? $this->dispatcher->getControllerName();
$actionName = $actionName ?? $this->dispatcher->getActionName();
$this->setDefaultRenderParams($params);
return $this->render([
$controllerName,
$actionName,
],
$params
);
}
public function defaultRender(array $params = []): View|bool
{
$this->setDefaultRenderParams($params);
return $this->render([
$this->dispatcher->getControllerName(),
$this->dispatcher->getActionName(),
],
$params
);
}
protected function getLanguages(): array
{
return $this->locale->availableLanguages();
}
protected function render(array $path, array $params = null): View|\Phalcon\Mvc\ViewInterface|bool
{
$_lng = $this->lang;
$params = $params ?? [];
$params['languages']['items'] = $this->getLanguages();
$params['currentLanguage'] = $_lng;
Arguments
/app/src/Modules/App/src/Controllers/IndexController.php
$template = Template::findFirstById($page->template_id);
if ($template && $template->id != 14) {
$varIsCustomTemplate = true;
$varTemplatePath = 'page_templates/' . str_ireplace('.tpl', '.twig', $template->filename);
}
if (in_array($pageUrl, $this->custom_templates)) {
$varIsCustomTemplate = true;
$varTemplatePath = 'page_templates/' . $pageUrl . '.twig';
}
$this->page_title = $this->company_name . ': ' . $t->t(\htmlspecialchars_decode($page->title));
return $this->defaultRender([
'lang' => $this->locale->currentLang(),
'langs' => $this->get_langs(),
'is_custom' => $varIsCustomTemplate,
'template_path' => $varTemplatePath,
'title' => \htmlspecialchars_decode($page->title),
'text' => \htmlspecialchars_decode($page->text),
]);
}
public function feedAction()
{
$t = $this->locale->getTranslation();
$ID = $this->dispatcher->getParam('id');
$this->page_title = $t->t('Feed') . ' - ' . $this->company_name;
$this->current_section = '/feed/';
$page = $this->request->getQuery('p', 'int', 1);
$ajax = $this->request->getQuery('ajax', 'int', 0);
$limit = 8;
$posts = [];
if ($ajax != 0) {
$offset = ($page == 1) ? 0 : ($page - 1) * $limit;
$posts = $this->get_posts($limit, $offset);
$items = [
'items' => $posts
];
Arguments
array:24 [
"lang" => "en"
"langs" => array:16 [
0 => array:4 [
"id" => 1
"skey" => "en"
"title" => "English"
"link" => "https://www.formacar.com/en/action.html"
]
1 => array:4 [
"id" => 4
"skey" => "de"
"title" => "Deutsch"
"link" => "https://www.formacar.com/de/action.html"
]
2 => array:4 [
"id" => 5
"skey" => "fr"
"title" => "France"
"link" => "https://www.formacar.com/fr/action.html"
]
3 => array:4 [
"id" => 7
"skey" => "es"
"title" => "Español"
"link" => "https://www.formacar.com/es/action.html"
]
4 => array:4 [
"id" => 10
"skey" => "ar"
"title" => "العربية"
"link" => "https://www.formacar.com/ar/action.html"
]
5 => array:4 [
"id" => 11
"skey" => "it"
"title" => "Italiano"
"link" => "https://www.formacar.com/it/action.html"
]
6 => array:4 [
"id" => 12
"skey" => "ja"
"title" => "日本語"
"link" => "https://www.formacar.com/ja/action.html"
]
7 => array:4 [
"id" => 13
"skey" => "ko"
"title" => "한국의"
"link" => "https://www.formacar.com/ko/action.html"
]
8 => array:4 [
"id" => 14
"skey" => "ms"
"title" => "Malay"
"link" => "https://www.formacar.com/ms/action.html"
]
9 => array:4 [
"id" => 15
"skey" => "nl"
"title" => "Nederlands"
"link" => "https://www.formacar.com/nl/action.html"
]
10 => array:4 [
"id" => 16
"skey" => "pt"
"title" => "Português"
"link" => "https://www.formacar.com/pt/action.html"
]
11 => array:4 [
"id" => 17
"skey" => "tr"
"title" => "Türkçe"
"link" => "https://www.formacar.com/tr/action.html"
]
12 => array:4 [
"id" => 18
"skey" => "el"
"title" => "Ελληνικά"
"link" => "https://www.formacar.com/el/action.html"
]
13 => array:4 [
"id" => 19
"skey" => "zh"
"title" => "汉语"
"link" => "https://www.formacar.com/zh/action.html"
]
14 => array:4 [
"id" => 20
"skey" => "hi"
"title" => "हिंदी"
"link" => "https://www.formacar.com/hi/action.html"
]
15 => array:4 [
"id" => 21
"skey" => "id"
"title" => "Indonesian"
"link" => "https://www.formacar.com/id/action.html"
]
]
"is_custom" => true
"template_path" => "page_templates/action_ru.twig"
"title" => "Трансляция"
"text" => "<p><br></p>"
"is_mobile" => false
"page_title" => "Formacar: Трансляция"
"shop_url" => "https://shop.formacar.com"
"assets" => Phalcon\Assets\Manager {#267}
"_me" => null
"_cdn" => "https://www.formacar.com"
"_dispatcher" => Phalcon\Mvc\Dispatcher {#212}
"session_id" => "e8e3496eb9f54bd5479c418caf1b0738"
"t" => Phalcon\Translate\Adapter\NativeArray {#248}
"_uperm" => Models\RolePermission {#257}
"current_lang" => Models\Langs {#253}
"lang_id" => 2
"home_url" => "https://www.formacar.com"
"search_story" => []
"current_section" => "/home/"
"current_sub_section" => "/home/"
"banners_links" => array:2 [
"crypto" => "https://t.me/formacarcrypto"
"scl" => "https://scl-performance.com/ru"
]
"_domain" => "formacar.com"
]
[internal]
Arguments
Modules\App\Controllers\IndexController {#208}
"pageAction"
array:2 [
"lang" => "ru"
"page" => "action.html"
]
/app/src/Framework/App.php
*/
protected function loadModules(Builder $builder): void
{
$this->registerModules($builder->modules()->toArray());
}
/**
* Terminate application
* @throws Throwable
*/
public function terminate()
{
if ($this->debug() && class_exists(Run::class)) {
//new \Whoops\Provider\Phalcon\WhoopsServiceProvider();
$this->builder->whoops();
}
try {
$response = $this->handle(
$this->builder->urlPath()
);
} catch (Throwable $throwable) {
if ($this->debug()) {
if (class_exists(Run::class) && str_starts_with($this->request->getURI(), '/api/')) {
$this->builder->whoopsApi();
}
throw $throwable;
}
$response = $this->handle('/404');
}
//echo $response->getContent();
$response->send();
if (function_exists('\fastcgi_finish_request')) {
fastcgi_finish_request();
}
die;
Arguments
/app/web/index.php
<?php
//var_dump($_REQUEST);exit();
error_reporting(E_ALL);
ini_set('display_errors', 1);
define('BASE_PATH', dirname(__DIR__));
define('PUBLIC_PATH', __DIR__);
include_once BASE_PATH . '/vendor/autoload.php';
$builder = new \Framework\Builder(BASE_PATH);
$builder->app()->terminate();