var/cache/dev/twig/0a/0a89f59ee787ae6eb122d52a08c5b44a.php line 50

  1. <?php
  2. use Twig\Environment;
  3. use Twig\Error\LoaderError;
  4. use Twig\Error\RuntimeError;
  5. use Twig\Extension\SandboxExtension;
  6. use Twig\Markup;
  7. use Twig\Sandbox\SecurityError;
  8. use Twig\Sandbox\SecurityNotAllowedTagError;
  9. use Twig\Sandbox\SecurityNotAllowedFilterError;
  10. use Twig\Sandbox\SecurityNotAllowedFunctionError;
  11. use Twig\Source;
  12. use Twig\Template;
  13. /* @WebProfiler/Collector/http_client.html.twig */
  14. class __TwigTemplate_ba1cd25edb73abfe6fa034853b6066b0 extends Template
  15. {
  16.     private $source;
  17.     private $macros = [];
  18.     public function __construct(Environment $env)
  19.     {
  20.         parent::__construct($env);
  21.         $this->source $this->getSourceContext();
  22.         $this->blocks = [
  23.             'toolbar' => [$this'block_toolbar'],
  24.             'menu' => [$this'block_menu'],
  25.             'panel' => [$this'block_panel'],
  26.         ];
  27.     }
  28.     protected function doGetParent(array $context)
  29.     {
  30.         // line 1
  31.         return "@WebProfiler/Profiler/layout.html.twig";
  32.     }
  33.     protected function doDisplay(array $context, array $blocks = [])
  34.     {
  35.         $macros $this->macros;
  36.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  37.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@WebProfiler/Collector/http_client.html.twig"));
  38.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  39.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "template""@WebProfiler/Collector/http_client.html.twig"));
  40.         $this->parent $this->loadTemplate("@WebProfiler/Profiler/layout.html.twig""@WebProfiler/Collector/http_client.html.twig"1);
  41.         $this->parent->display($contextarray_merge($this->blocks$blocks));
  42.         
  43.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  44.         
  45.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  46.     }
  47.     // line 3
  48.     public function block_toolbar($context, array $blocks = [])
  49.     {
  50.         $macros $this->macros;
  51.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  52.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""toolbar"));
  53.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  54.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""toolbar"));
  55.         // line 4
  56.         echo "    ";
  57.         if (twig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'4$this->source); })()), "requestCount", [], "any"falsefalsefalse4)) {
  58.             // line 5
  59.             echo "        ";
  60.             ob_start();
  61.             // line 6
  62.             echo "            ";
  63.             echo twig_source($this->env"@WebProfiler/Icon/http-client.svg");
  64.             echo "
  65.             ";
  66.             // line 7
  67.             $context["status_color"] = "";
  68.             // line 8
  69.             echo "            <span class=\"sf-toolbar-value\">";
  70.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'8$this->source); })()), "requestCount", [], "any"falsefalsefalse8), "html"nulltrue);
  71.             echo "</span>
  72.         ";
  73.             $context["icon"] = ('' === $tmp ob_get_clean()) ? '' : new Markup($tmp$this->env->getCharset());
  74.             // line 10
  75.             echo "
  76.         ";
  77.             // line 11
  78.             ob_start();
  79.             // line 12
  80.             echo "            <div class=\"sf-toolbar-info-piece\">
  81.                 <b>Total requests</b>
  82.                 <span>";
  83.             // line 14
  84.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'14$this->source); })()), "requestCount", [], "any"falsefalsefalse14), "html"nulltrue);
  85.             echo "</span>
  86.             </div>
  87.             <div class=\"sf-toolbar-info-piece\">
  88.                 <b>HTTP errors</b>
  89.                 <span class=\"sf-toolbar-status ";
  90.             // line 18
  91.             echo (((twig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'18$this->source); })()), "errorCount", [], "any"falsefalsefalse18) > 0)) ? ("sf-toolbar-status-red") : (""));
  92.             echo "\">";
  93.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'18$this->source); })()), "errorCount", [], "any"falsefalsefalse18), "html"nulltrue);
  94.             echo "</span>
  95.             </div>
  96.         ";
  97.             $context["text"] = ('' === $tmp ob_get_clean()) ? '' : new Markup($tmp$this->env->getCharset());
  98.             // line 21
  99.             echo "
  100.         ";
  101.             // line 22
  102.             echo twig_include($this->env$context"@WebProfiler/Profiler/toolbar_item.html.twig", ["link" => (isset($context["profiler_url"]) || array_key_exists("profiler_url"$context) ? $context["profiler_url"] : (function () { throw new RuntimeError('Variable "profiler_url" does not exist.'22$this->source); })()), "status" => (isset($context["status_color"]) || array_key_exists("status_color"$context) ? $context["status_color"] : (function () { throw new RuntimeError('Variable "status_color" does not exist.'22$this->source); })())]);
  103.             echo "
  104.     ";
  105.         }
  106.         
  107.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  108.         
  109.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  110.     }
  111.     // line 26
  112.     public function block_menu($context, array $blocks = [])
  113.     {
  114.         $macros $this->macros;
  115.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  116.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""menu"));
  117.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  118.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""menu"));
  119.         // line 27
  120.         echo "<span class=\"label ";
  121.         echo (((twig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'27$this->source); })()), "requestCount", [], "any"falsefalsefalse27) == 0)) ? ("disabled") : (""));
  122.         echo "\">
  123.     <span class=\"icon\">";
  124.         // line 28
  125.         echo twig_source($this->env"@WebProfiler/Icon/http-client.svg");
  126.         echo "</span>
  127.     <strong>HTTP Client</strong>
  128.     ";
  129.         // line 30
  130.         if (twig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'30$this->source); })()), "requestCount", [], "any"falsefalsefalse30)) {
  131.             // line 31
  132.             echo "        <span class=\"count\">
  133.             ";
  134.             // line 32
  135.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'32$this->source); })()), "requestCount", [], "any"falsefalsefalse32), "html"nulltrue);
  136.             echo "
  137.         </span>
  138.     ";
  139.         }
  140.         // line 35
  141.         echo "</span>
  142. ";
  143.         
  144.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  145.         
  146.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  147.     }
  148.     // line 38
  149.     public function block_panel($context, array $blocks = [])
  150.     {
  151.         $macros $this->macros;
  152.         $__internal_5a27a8ba21ca79b61932376b2fa922d2 $this->extensions["Symfony\\Bundle\\WebProfilerBundle\\Twig\\WebProfilerExtension"];
  153.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->enter($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""panel"));
  154.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f $this->extensions["Symfony\\Bridge\\Twig\\Extension\\ProfilerExtension"];
  155.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->enter($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof = new \Twig\Profiler\Profile($this->getTemplateName(), "block""panel"));
  156.         // line 39
  157.         echo "    <h2>HTTP Client</h2>
  158.     ";
  159.         // line 40
  160.         if ((twig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'40$this->source); })()), "requestCount", [], "any"falsefalsefalse40) == 0)) {
  161.             // line 41
  162.             echo "        <div class=\"empty empty-panel\">
  163.             <p>No HTTP requests were made.</p>
  164.         </div>
  165.     ";
  166.         } else {
  167.             // line 45
  168.             echo "        <div class=\"metrics\">
  169.             <div class=\"metric\">
  170.                 <span class=\"value\">";
  171.             // line 47
  172.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'47$this->source); })()), "requestCount", [], "any"falsefalsefalse47), "html"nulltrue);
  173.             echo "</span>
  174.                 <span class=\"label\">Total requests</span>
  175.             </div>
  176.             <div class=\"metric\">
  177.                 <span class=\"value\">";
  178.             // line 51
  179.             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'51$this->source); })()), "errorCount", [], "any"falsefalsefalse51), "html"nulltrue);
  180.             echo "</span>
  181.                 <span class=\"label\">HTTP errors</span>
  182.             </div>
  183.         </div>
  184.         <h2>Clients</h2>
  185.         <div class=\"sf-tabs\">
  186.             ";
  187.             // line 57
  188.             $context['_parent'] = $context;
  189.             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source, (isset($context["collector"]) || array_key_exists("collector"$context) ? $context["collector"] : (function () { throw new RuntimeError('Variable "collector" does not exist.'57$this->source); })()), "clients", [], "any"falsefalsefalse57));
  190.             foreach ($context['_seq'] as $context["name"] => $context["client"]) {
  191.                 // line 58
  192.                 echo "                <div class=\"tab ";
  193.                 echo (((twig_length_filter($this->envtwig_get_attribute($this->env$this->source$context["client"], "traces", [], "any"falsefalsefalse58)) == 0)) ? ("disabled") : (""));
  194.                 echo "\">
  195.                     <h3 class=\"tab-title\">";
  196.                 // line 59
  197.                 echo twig_escape_filter($this->env$context["name"], "html"nulltrue);
  198.                 echo " <span class=\"badge\">";
  199.                 echo twig_escape_filter($this->envtwig_length_filter($this->envtwig_get_attribute($this->env$this->source$context["client"], "traces", [], "any"falsefalsefalse59)), "html"nulltrue);
  200.                 echo "</span></h3>
  201.                     <div class=\"tab-content\">
  202.                         ";
  203.                 // line 61
  204.                 if ((twig_length_filter($this->envtwig_get_attribute($this->env$this->source$context["client"], "traces", [], "any"falsefalsefalse61)) == 0)) {
  205.                     // line 62
  206.                     echo "                            <div class=\"empty\">
  207.                                 <p>No requests were made with the \"";
  208.                     // line 63
  209.                     echo twig_escape_filter($this->env$context["name"], "html"nulltrue);
  210.                     echo "\" service.</p>
  211.                             </div>
  212.                         ";
  213.                 } else {
  214.                     // line 66
  215.                     echo "                            <h4>Requests</h4>
  216.                             ";
  217.                     // line 67
  218.                     $context['_parent'] = $context;
  219.                     $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->source$context["client"], "traces", [], "any"falsefalsefalse67));
  220.                     foreach ($context['_seq'] as $context["_key"] => $context["trace"]) {
  221.                         // line 68
  222.                         echo "                                ";
  223.                         $context["profiler_token"] = "";
  224.                         // line 69
  225.                         echo "                                ";
  226.                         $context["profiler_link"] = "";
  227.                         // line 70
  228.                         echo "                                ";
  229.                         if (twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["trace"], "info", [], "any"falsetruefalse70), "response_headers", [], "any"truetruefalse70)) {
  230.                             // line 71
  231.                             echo "                                    ";
  232.                             $context['_parent'] = $context;
  233.                             $context['_seq'] = twig_ensure_traversable(twig_get_attribute($this->env$this->sourcetwig_get_attribute($this->env$this->source$context["trace"], "info", [], "any"falsefalsefalse71), "response_headers", [], "any"falsefalsefalse71));
  234.                             foreach ($context['_seq'] as $context["_key"] => $context["header"]) {
  235.                                 // line 72
  236.                                 echo "                                        ";
  237.                                 if (twig_matches("/^x-debug-token: .*\$/i"$context["header"])) {
  238.                                     // line 73
  239.                                     echo "                                            ";
  240.                                     $context["profiler_token"] = twig_slice($this->envtwig_get_attribute($this->env$this->source$context["header"], "getValue", [], "any"falsefalsefalse73), twig_length_filter($this->env"x-debug-token: "));
  241.                                     // line 74
  242.                                     echo "                                        ";
  243.                                 }
  244.                                 // line 75
  245.                                 echo "                                        ";
  246.                                 if (twig_matches("/^x-debug-token-link: .*\$/i"$context["header"])) {
  247.                                     // line 76
  248.                                     echo "                                            ";
  249.                                     $context["profiler_link"] = twig_slice($this->envtwig_get_attribute($this->env$this->source$context["header"], "getValue", [], "any"falsefalsefalse76), twig_length_filter($this->env"x-debug-token-link: "));
  250.                                     // line 77
  251.                                     echo "                                        ";
  252.                                 }
  253.                                 // line 78
  254.                                 echo "                                    ";
  255.                             }
  256.                             $_parent $context['_parent'];
  257.                             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['header'], $context['_parent'], $context['loop']);
  258.                             $context array_intersect_key($context$_parent) + $_parent;
  259.                             // line 79
  260.                             echo "                                ";
  261.                         }
  262.                         // line 80
  263.                         echo "                                <table class=\"sf-profiler-httpclient-requests\">
  264.                                     <thead>
  265.                                     <tr>
  266.                                         <th>
  267.                                             <span class=\"http-method\">";
  268.                         // line 84
  269.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["trace"], "method", [], "any"falsefalsefalse84), "html"nulltrue);
  270.                         echo "</span>
  271.                                         </th>
  272.                                         <th class=\"full-width\">
  273.                                             ";
  274.                         // line 87
  275.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["trace"], "url", [], "any"falsefalsefalse87), "html"nulltrue);
  276.                         echo "
  277.                                         </th>
  278.                                         ";
  279.                         // line 89
  280.                         if (((isset($context["profiler_token"]) || array_key_exists("profiler_token"$context) ? $context["profiler_token"] : (function () { throw new RuntimeError('Variable "profiler_token" does not exist.'89$this->source); })()) && (isset($context["profiler_link"]) || array_key_exists("profiler_link"$context) ? $context["profiler_link"] : (function () { throw new RuntimeError('Variable "profiler_link" does not exist.'89$this->source); })()))) {
  281.                             // line 90
  282.                             echo "                                            <th>
  283.                                                 Profile
  284.                                             </th>
  285.                                         ";
  286.                         }
  287.                         // line 94
  288.                         echo "                                        ";
  289.                         if ( !(null === twig_get_attribute($this->env$this->source$context["trace"], "curlCommand", [], "any"falsefalsefalse94))) {
  290.                             // line 95
  291.                             echo "                                            <th>
  292.                                                 <button class=\"btn btn-sm hidden\" title=\"Copy as cURL\" data-clipboard-text=\"";
  293.                             // line 96
  294.                             echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["trace"], "curlCommand", [], "any"falsefalsefalse96), "html"nulltrue);
  295.                             echo "\">Copy as cURL</button>
  296.                                             </th>
  297.                                         ";
  298.                         }
  299.                         // line 99
  300.                         echo "                                    </tr>
  301.                                     </thead>
  302.                                     <tbody>
  303.                                     ";
  304.                         // line 102
  305.                         if ( !twig_test_empty(twig_get_attribute($this->env$this->source$context["trace"], "options", [], "any"falsefalsefalse102))) {
  306.                             // line 103
  307.                             echo "                                        <tr>
  308.                                             <th class=\"font-normal\">Request options</th>
  309.                                             <td>";
  310.                             // line 105
  311.                             echo $this->extensions['Symfony\Bundle\WebProfilerBundle\Twig\WebProfilerExtension']->dumpData($this->envtwig_get_attribute($this->env$this->source$context["trace"], "options", [], "any"falsefalsefalse105), 1);
  312.                             echo "</td>
  313.                                         </tr>
  314.                                     ";
  315.                         }
  316.                         // line 108
  317.                         echo "                                    <tr>
  318.                                         <th class=\"font-normal\">Response</th>
  319.                                         <td";
  320.                         // line 110
  321.                         if (twig_get_attribute($this->env$this->source$context["trace"], "curlCommand", [], "any"falsefalsefalse110)) {
  322.                             echo " colspan=\"2\"";
  323.                         }
  324.                         echo ">
  325.                                             ";
  326.                         // line 111
  327.                         if ((twig_get_attribute($this->env$this->source$context["trace"], "http_code", [], "any"falsefalsefalse111) >= 500)) {
  328.                             // line 112
  329.                             echo "                                                ";
  330.                             $context["responseStatus"] = "error";
  331.                             // line 113
  332.                             echo "                                            ";
  333.                         } elseif ((twig_get_attribute($this->env$this->source$context["trace"], "http_code", [], "any"falsefalsefalse113) >= 400)) {
  334.                             // line 114
  335.                             echo "                                                ";
  336.                             $context["responseStatus"] = "warning";
  337.                             // line 115
  338.                             echo "                                            ";
  339.                         } else {
  340.                             // line 116
  341.                             echo "                                                ";
  342.                             $context["responseStatus"] = "success";
  343.                             // line 117
  344.                             echo "                                            ";
  345.                         }
  346.                         // line 118
  347.                         echo "                                            <span class=\"font-normal status-response-status-code status-";
  348.                         echo twig_escape_filter($this->env, (isset($context["responseStatus"]) || array_key_exists("responseStatus"$context) ? $context["responseStatus"] : (function () { throw new RuntimeError('Variable "responseStatus" does not exist.'118$this->source); })()), "html"nulltrue);
  349.                         echo "\">
  350.                                                 ";
  351.                         // line 119
  352.                         echo twig_escape_filter($this->envtwig_get_attribute($this->env$this->source$context["trace"], "http_code", [], "any"falsefalsefalse119), "html"nulltrue);
  353.                         echo "
  354.                                             </span>
  355.                                             ";
  356.                         // line 122
  357.                         echo $this->extensions['Symfony\Bundle\WebProfilerBundle\Twig\WebProfilerExtension']->dumpData($this->envtwig_get_attribute($this->env$this->source$context["trace"], "info", [], "any"falsefalsefalse122), 1);
  358.                         echo "
  359.                                         </td>
  360.                                         ";
  361.                         // line 124
  362.                         if (((isset($context["profiler_token"]) || array_key_exists("profiler_token"$context) ? $context["profiler_token"] : (function () { throw new RuntimeError('Variable "profiler_token" does not exist.'124$this->source); })()) && (isset($context["profiler_link"]) || array_key_exists("profiler_link"$context) ? $context["profiler_link"] : (function () { throw new RuntimeError('Variable "profiler_link" does not exist.'124$this->source); })()))) {
  363.                             // line 125
  364.                             echo "                                            <td>
  365.                                                 <span><a href=\"";
  366.                             // line 126
  367.                             echo twig_escape_filter($this->env, (isset($context["profiler_link"]) || array_key_exists("profiler_link"$context) ? $context["profiler_link"] : (function () { throw new RuntimeError('Variable "profiler_link" does not exist.'126$this->source); })()), "html"nulltrue);
  368.                             echo "\" target=\"_blank\">";
  369.                             echo twig_escape_filter($this->env, (isset($context["profiler_token"]) || array_key_exists("profiler_token"$context) ? $context["profiler_token"] : (function () { throw new RuntimeError('Variable "profiler_token" does not exist.'126$this->source); })()), "html"nulltrue);
  370.                             echo "</a></span>
  371.                                             </td>
  372.                                         ";
  373.                         }
  374.                         // line 129
  375.                         echo "                                    </tr>
  376.                                     </tbody>
  377.                                 </table>
  378.                             ";
  379.                     }
  380.                     $_parent $context['_parent'];
  381.                     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['trace'], $context['_parent'], $context['loop']);
  382.                     $context array_intersect_key($context$_parent) + $_parent;
  383.                     // line 133
  384.                     echo "                        ";
  385.                 }
  386.                 // line 134
  387.                 echo "                    </div>
  388.                 </div>
  389.             ";
  390.             }
  391.             $_parent $context['_parent'];
  392.             unset($context['_seq'], $context['_iterated'], $context['name'], $context['client'], $context['_parent'], $context['loop']);
  393.             $context array_intersect_key($context$_parent) + $_parent;
  394.             // line 137
  395.             echo "        ";
  396.         }
  397.         // line 138
  398.         echo "    </div>
  399. ";
  400.         
  401.         $__internal_6f47bbe9983af81f1e7450e9a3e3768f->leave($__internal_6f47bbe9983af81f1e7450e9a3e3768f_prof);
  402.         
  403.         $__internal_5a27a8ba21ca79b61932376b2fa922d2->leave($__internal_5a27a8ba21ca79b61932376b2fa922d2_prof);
  404.     }
  405.     public function getTemplateName()
  406.     {
  407.         return "@WebProfiler/Collector/http_client.html.twig";
  408.     }
  409.     public function isTraitable()
  410.     {
  411.         return false;
  412.     }
  413.     public function getDebugInfo()
  414.     {
  415.         return array (  423 => 138,  420 => 137,  412 => 134,  409 => 133,  400 => 129,  392 => 126,  389 => 125,  387 => 124,  382 => 122,  376 => 119,  371 => 118,  368 => 117,  365 => 116,  362 => 115,  359 => 114,  356 => 113,  353 => 112,  351 => 111,  345 => 110,  341 => 108,  335 => 105,  331 => 103,  329 => 102,  324 => 99,  318 => 96,  315 => 95,  312 => 94,  306 => 90,  304 => 89,  299 => 87,  293 => 84,  287 => 80,  284 => 79,  278 => 78,  275 => 77,  272 => 76,  269 => 75,  266 => 74,  263 => 73,  260 => 72,  255 => 71,  252 => 70,  249 => 69,  246 => 68,  242 => 67,  239 => 66,  233 => 63,  230 => 62,  228 => 61,  221 => 59,  216 => 58,  212 => 57,  203 => 51,  196 => 47,  192 => 45,  186 => 41,  184 => 40,  181 => 39,  171 => 38,  160 => 35,  154 => 32,  151 => 31,  149 => 30,  144 => 28,  139 => 27,  129 => 26,  116 => 22,  113 => 21,  105 => 18,  98 => 14,  94 => 12,  92 => 11,  89 => 10,  83 => 8,  81 => 7,  76 => 6,  73 => 5,  70 => 4,  60 => 3,  37 => 1,);
  416.     }
  417.     public function getSourceContext()
  418.     {
  419.         return new Source("{% extends '@WebProfiler/Profiler/layout.html.twig' %}
  420. {% block toolbar %}
  421.     {% if collector.requestCount %}
  422.         {% set icon %}
  423.             {{ source('@WebProfiler/Icon/http-client.svg') }}
  424.             {% set status_color = '' %}
  425.             <span class=\"sf-toolbar-value\">{{ collector.requestCount }}</span>
  426.         {% endset %}
  427.         {% set text %}
  428.             <div class=\"sf-toolbar-info-piece\">
  429.                 <b>Total requests</b>
  430.                 <span>{{ collector.requestCount }}</span>
  431.             </div>
  432.             <div class=\"sf-toolbar-info-piece\">
  433.                 <b>HTTP errors</b>
  434.                 <span class=\"sf-toolbar-status {{ collector.errorCount > 0 ? 'sf-toolbar-status-red' }}\">{{ collector.errorCount }}</span>
  435.             </div>
  436.         {% endset %}
  437.         {{ include('@WebProfiler/Profiler/toolbar_item.html.twig', { link: profiler_url, status: status_color }) }}
  438.     {% endif %}
  439. {% endblock %}
  440. {% block menu %}
  441. <span class=\"label {{ collector.requestCount == 0 ? 'disabled' }}\">
  442.     <span class=\"icon\">{{ source('@WebProfiler/Icon/http-client.svg') }}</span>
  443.     <strong>HTTP Client</strong>
  444.     {% if collector.requestCount %}
  445.         <span class=\"count\">
  446.             {{ collector.requestCount }}
  447.         </span>
  448.     {% endif %}
  449. </span>
  450. {% endblock %}
  451. {% block panel %}
  452.     <h2>HTTP Client</h2>
  453.     {% if collector.requestCount == 0 %}
  454.         <div class=\"empty empty-panel\">
  455.             <p>No HTTP requests were made.</p>
  456.         </div>
  457.     {% else %}
  458.         <div class=\"metrics\">
  459.             <div class=\"metric\">
  460.                 <span class=\"value\">{{ collector.requestCount }}</span>
  461.                 <span class=\"label\">Total requests</span>
  462.             </div>
  463.             <div class=\"metric\">
  464.                 <span class=\"value\">{{ collector.errorCount }}</span>
  465.                 <span class=\"label\">HTTP errors</span>
  466.             </div>
  467.         </div>
  468.         <h2>Clients</h2>
  469.         <div class=\"sf-tabs\">
  470.             {% for name, client in collector.clients %}
  471.                 <div class=\"tab {{ client.traces|length == 0 ? 'disabled' }}\">
  472.                     <h3 class=\"tab-title\">{{ name }} <span class=\"badge\">{{ client.traces|length }}</span></h3>
  473.                     <div class=\"tab-content\">
  474.                         {% if client.traces|length == 0 %}
  475.                             <div class=\"empty\">
  476.                                 <p>No requests were made with the \"{{ name }}\" service.</p>
  477.                             </div>
  478.                         {% else %}
  479.                             <h4>Requests</h4>
  480.                             {% for trace in client.traces %}
  481.                                 {% set profiler_token = '' %}
  482.                                 {% set profiler_link = '' %}
  483.                                 {% if trace.info.response_headers is defined %}
  484.                                     {% for header in trace.info.response_headers %}
  485.                                         {% if header matches '/^x-debug-token: .*\$/i' %}
  486.                                             {% set profiler_token = (header.getValue | slice('x-debug-token: ' | length)) %}
  487.                                         {% endif %}
  488.                                         {% if header matches '/^x-debug-token-link: .*\$/i' %}
  489.                                             {% set profiler_link = (header.getValue | slice('x-debug-token-link: ' | length)) %}
  490.                                         {% endif %}
  491.                                     {% endfor %}
  492.                                 {% endif %}
  493.                                 <table class=\"sf-profiler-httpclient-requests\">
  494.                                     <thead>
  495.                                     <tr>
  496.                                         <th>
  497.                                             <span class=\"http-method\">{{ trace.method }}</span>
  498.                                         </th>
  499.                                         <th class=\"full-width\">
  500.                                             {{ trace.url }}
  501.                                         </th>
  502.                                         {% if profiler_token and profiler_link %}
  503.                                             <th>
  504.                                                 Profile
  505.                                             </th>
  506.                                         {% endif %}
  507.                                         {% if trace.curlCommand is not null %}
  508.                                             <th>
  509.                                                 <button class=\"btn btn-sm hidden\" title=\"Copy as cURL\" data-clipboard-text=\"{{ trace.curlCommand }}\">Copy as cURL</button>
  510.                                             </th>
  511.                                         {% endif %}
  512.                                     </tr>
  513.                                     </thead>
  514.                                     <tbody>
  515.                                     {% if trace.options is not empty %}
  516.                                         <tr>
  517.                                             <th class=\"font-normal\">Request options</th>
  518.                                             <td>{{ profiler_dump(trace.options, maxDepth=1) }}</td>
  519.                                         </tr>
  520.                                     {% endif %}
  521.                                     <tr>
  522.                                         <th class=\"font-normal\">Response</th>
  523.                                         <td{% if trace.curlCommand %} colspan=\"2\"{% endif %}>
  524.                                             {% if trace.http_code >= 500 %}
  525.                                                 {% set responseStatus = 'error' %}
  526.                                             {% elseif trace.http_code >= 400 %}
  527.                                                 {% set responseStatus = 'warning' %}
  528.                                             {% else %}
  529.                                                 {% set responseStatus = 'success' %}
  530.                                             {% endif %}
  531.                                             <span class=\"font-normal status-response-status-code status-{{ responseStatus }}\">
  532.                                                 {{ trace.http_code }}
  533.                                             </span>
  534.                                             {{ profiler_dump(trace.info, maxDepth=1) }}
  535.                                         </td>
  536.                                         {% if profiler_token and profiler_link %}
  537.                                             <td>
  538.                                                 <span><a href=\"{{ profiler_link }}\" target=\"_blank\">{{ profiler_token }}</a></span>
  539.                                             </td>
  540.                                         {% endif %}
  541.                                     </tr>
  542.                                     </tbody>
  543.                                 </table>
  544.                             {% endfor %}
  545.                         {% endif %}
  546.                     </div>
  547.                 </div>
  548.             {% endfor %}
  549.         {% endif %}
  550.     </div>
  551. {% endblock %}
  552. ""@WebProfiler/Collector/http_client.html.twig""/home/bestofi/bestof/vendor/symfony/web-profiler-bundle/Resources/views/Collector/http_client.html.twig");
  553.     }
  554. }