PageRenderTime 50ms CodeModel.GetById 19ms RepoModel.GetById 0ms app.codeStats 0ms

/app/cache/prod/twig/41/ac/995f8349c5704e83c3586f44fb40.php

https://bitbucket.org/pyneff/carsharing
PHP | 340 lines | 273 code | 17 blank | 50 comment | 19 complexity | a664bbc3ade9cd62c822cfb1bf1b5be9 MD5 | raw file
Possible License(s): Apache-2.0, LGPL-3.0, BSD-3-Clause, BSD-2-Clause
  1. <?php
  2. /* DoctrineBundle:Collector:db.html.twig */
  3. class __TwigTemplate_41ac995f8349c5704e83c3586f44fb40 extends Twig_Template
  4. {
  5. public function __construct(Twig_Environment $env)
  6. {
  7. parent::__construct($env);
  8. $this->blocks = array(
  9. 'toolbar' => array($this, 'block_toolbar'),
  10. 'menu' => array($this, 'block_menu'),
  11. 'panel' => array($this, 'block_panel'),
  12. 'queries' => array($this, 'block_queries'),
  13. );
  14. }
  15. protected function doGetParent(array $context)
  16. {
  17. return $this->env->resolveTemplate((($this->getAttribute($this->getAttribute((isset($context["app"]) ? $context["app"] : null), "request"), "isXmlHttpRequest")) ? ("WebProfilerBundle:Profiler:ajax_layout.html.twig") : ("WebProfilerBundle:Profiler:layout.html.twig")));
  18. }
  19. protected function doDisplay(array $context, array $blocks = array())
  20. {
  21. $this->getParent($context)->display($context, array_merge($this->blocks, $blocks));
  22. }
  23. // line 3
  24. public function block_toolbar($context, array $blocks = array())
  25. {
  26. // line 4
  27. echo " ";
  28. ob_start();
  29. // line 5
  30. echo " <img width=\"20\" height=\"28\" alt=\"Database\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAcCAYAAABh2p9gAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQRJREFUeNpi/P//PwM1ARMDlcGogZQDlpMnT7pxc3NbA9nhQKxOpL5rQLwJiPeBsI6Ozl+YBOOOHTv+AOllQNwtLS39F2owKYZ/gRq8G4i3ggxEToggWzvc3d2Pk+1lNL4fFAs6ODi8JzdS7mMRVyDVoAMHDsANdAPiOCC+jCQvQKqBQB/BDbwBxK5AHA3E/kB8nKJkA8TMQBwLxaBIKQbi70AvTADSBiSadwFXpCikpKQU8PDwkGTaly9fHFigkaKIJid4584dkiMFFI6jkTJII0WVmpHCAixZQEXWYhDeuXMnyLsVlEQKI45qFBQZ8eRECi4DBaAlDqle/8A48ip6gAADANdQY88Uc0oGAAAAAElFTkSuQmCC\"/>
  31. <span class=\"sf-toolbar-status";
  32. // line 6
  33. if ((50 < $this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "querycount"))) {
  34. echo " sf-toolbar-status-yellow";
  35. }
  36. echo "\">";
  37. echo twig_escape_filter($this->env, $this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "querycount"), "html", null, true);
  38. echo "</span>
  39. <span class=\"sf-toolbar-info-piece-additional-detail\">in ";
  40. // line 7
  41. echo twig_escape_filter($this->env, sprintf("%0.2f", ($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "time") * 1000)), "html", null, true);
  42. echo " ms</span>
  43. ";
  44. $context["icon"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
  45. // line 9
  46. echo " ";
  47. ob_start();
  48. // line 10
  49. echo " <div class=\"sf-toolbar-info-piece\">
  50. <b>DB Queries</b>
  51. <span>";
  52. // line 12
  53. echo twig_escape_filter($this->env, $this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "querycount"), "html", null, true);
  54. echo "</span>
  55. </div>
  56. <div class=\"sf-toolbar-info-piece\">
  57. <b>Query time</b>
  58. <span>";
  59. // line 16
  60. echo twig_escape_filter($this->env, sprintf("%0.2f", ($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "time") * 1000)), "html", null, true);
  61. echo " ms</span>
  62. </div>
  63. ";
  64. $context["text"] = ('' === $tmp = ob_get_clean()) ? '' : new Twig_Markup($tmp, $this->env->getCharset());
  65. // line 19
  66. echo " ";
  67. $this->env->loadTemplate("WebProfilerBundle:Profiler:toolbar_item.html.twig")->display(array_merge($context, array("link" => (isset($context["profiler_url"]) ? $context["profiler_url"] : null))));
  68. }
  69. // line 22
  70. public function block_menu($context, array $blocks = array())
  71. {
  72. // line 23
  73. echo "<span class=\"label\">
  74. <span class=\"icon\"><img src=\"";
  75. // line 24
  76. echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/webprofiler/images/profiler/db.png"), "html", null, true);
  77. echo "\" alt=\"\" /></span>
  78. <strong>Doctrine</strong>
  79. <span class=\"count\">
  80. <span>";
  81. // line 27
  82. echo twig_escape_filter($this->env, $this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "querycount"), "html", null, true);
  83. echo "</span>
  84. <span>";
  85. // line 28
  86. echo twig_escape_filter($this->env, sprintf("%0.0f", ($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "time") * 1000)), "html", null, true);
  87. echo " ms</span>
  88. </span>
  89. </span>
  90. ";
  91. }
  92. // line 33
  93. public function block_panel($context, array $blocks = array())
  94. {
  95. // line 34
  96. echo " ";
  97. if (("explain" == (isset($context["page"]) ? $context["page"] : null))) {
  98. // line 35
  99. echo " ";
  100. echo $this->env->getExtension('actions')->renderAction("DoctrineBundle:Profiler:explain", array("token" => (isset($context["token"]) ? $context["token"] : null), "panel" => "db", "connectionName" => $this->getAttribute($this->getAttribute($this->getAttribute((isset($context["app"]) ? $context["app"] : null), "request"), "query"), "get", array(0 => "connection"), "method"), "query" => $this->getAttribute($this->getAttribute($this->getAttribute((isset($context["app"]) ? $context["app"] : null), "request"), "query"), "get", array(0 => "query"), "method")), array());
  101. // line 41
  102. echo " ";
  103. } else {
  104. // line 42
  105. echo " ";
  106. $this->displayBlock("queries", $context, $blocks);
  107. echo "
  108. ";
  109. }
  110. }
  111. // line 46
  112. public function block_queries($context, array $blocks = array())
  113. {
  114. // line 47
  115. echo " <h2>Queries</h2>
  116. ";
  117. // line 49
  118. $context['_parent'] = (array) $context;
  119. $context['_seq'] = twig_ensure_traversable($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "queries"));
  120. $context['loop'] = array(
  121. 'parent' => $context['_parent'],
  122. 'index0' => 0,
  123. 'index' => 1,
  124. 'first' => true,
  125. );
  126. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
  127. $length = count($context['_seq']);
  128. $context['loop']['revindex0'] = $length - 1;
  129. $context['loop']['revindex'] = $length;
  130. $context['loop']['length'] = $length;
  131. $context['loop']['last'] = 1 === $length;
  132. }
  133. foreach ($context['_seq'] as $context["connection"] => $context["queries"]) {
  134. // line 50
  135. echo " <h3>Connection <em>";
  136. echo twig_escape_filter($this->env, (isset($context["connection"]) ? $context["connection"] : null), "html", null, true);
  137. echo "</em></h3>
  138. ";
  139. // line 51
  140. if (twig_test_empty((isset($context["queries"]) ? $context["queries"] : null))) {
  141. // line 52
  142. echo " <p>
  143. <em>No queries.</em>
  144. </p>
  145. ";
  146. } else {
  147. // line 56
  148. echo " <ul class=\"alt\">
  149. ";
  150. // line 57
  151. $context['_parent'] = (array) $context;
  152. $context['_seq'] = twig_ensure_traversable((isset($context["queries"]) ? $context["queries"] : null));
  153. $context['loop'] = array(
  154. 'parent' => $context['_parent'],
  155. 'index0' => 0,
  156. 'index' => 1,
  157. 'first' => true,
  158. );
  159. if (is_array($context['_seq']) || (is_object($context['_seq']) && $context['_seq'] instanceof Countable)) {
  160. $length = count($context['_seq']);
  161. $context['loop']['revindex0'] = $length - 1;
  162. $context['loop']['revindex'] = $length;
  163. $context['loop']['length'] = $length;
  164. $context['loop']['last'] = 1 === $length;
  165. }
  166. foreach ($context['_seq'] as $context["i"] => $context["query"]) {
  167. // line 58
  168. echo " <li class=\"";
  169. echo twig_escape_filter($this->env, twig_cycle(array(0 => "odd", 1 => "even"), (isset($context["i"]) ? $context["i"] : null)), "html", null, true);
  170. echo "\">
  171. <div>
  172. ";
  173. // line 60
  174. if ($this->getAttribute((isset($context["query"]) ? $context["query"] : null), "explainable")) {
  175. // line 61
  176. echo " <a href=\"";
  177. echo twig_escape_filter($this->env, $this->env->getExtension('routing')->getPath("_profiler", array("panel" => "db", "token" => (isset($context["token"]) ? $context["token"] : null), "page" => "explain", "connection" => (isset($context["connection"]) ? $context["connection"] : null), "query" => (isset($context["i"]) ? $context["i"] : null))), "html", null, true);
  178. echo "\" onclick=\"return explain(this);\" style=\"text-decoration: none;\" title=\"Explains\" data-target-id=\"explain-";
  179. echo twig_escape_filter($this->env, (isset($context["i"]) ? $context["i"] : null), "html", null, true);
  180. echo "-";
  181. echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute((isset($context["loop"]) ? $context["loop"] : null), "parent"), "loop"), "index"), "html", null, true);
  182. echo "\" >
  183. <img alt=\"+\" src=\"";
  184. // line 62
  185. echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/framework/images/blue_picto_more.gif"), "html", null, true);
  186. echo "\" style=\"display: inline;\" />
  187. <img alt=\"-\" src=\"";
  188. // line 63
  189. echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/framework/images/blue_picto_less.gif"), "html", null, true);
  190. echo "\" style=\"display: none;\" />
  191. </a>
  192. ";
  193. }
  194. // line 66
  195. echo " <code>";
  196. echo twig_escape_filter($this->env, $this->getAttribute((isset($context["query"]) ? $context["query"] : null), "sql"), "html", null, true);
  197. echo "</code>
  198. </div>
  199. <small>
  200. <strong>Parameters</strong>: ";
  201. // line 69
  202. echo twig_escape_filter($this->env, $this->env->getExtension('yaml')->encode($this->getAttribute((isset($context["query"]) ? $context["query"] : null), "params")), "html", null, true);
  203. echo "<br />
  204. <strong>Time</strong>: ";
  205. // line 70
  206. echo twig_escape_filter($this->env, sprintf("%0.2f", ($this->getAttribute((isset($context["query"]) ? $context["query"] : null), "executionMS") * 1000)), "html", null, true);
  207. echo " ms
  208. </small>
  209. ";
  210. // line 72
  211. if ($this->getAttribute((isset($context["query"]) ? $context["query"] : null), "explainable")) {
  212. // line 73
  213. echo " <div id=\"explain-";
  214. echo twig_escape_filter($this->env, (isset($context["i"]) ? $context["i"] : null), "html", null, true);
  215. echo "-";
  216. echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute($this->getAttribute((isset($context["loop"]) ? $context["loop"] : null), "parent"), "loop"), "index"), "html", null, true);
  217. echo "\" class=\"loading\"></div>
  218. ";
  219. }
  220. // line 75
  221. echo " </li>
  222. ";
  223. ++$context['loop']['index0'];
  224. ++$context['loop']['index'];
  225. $context['loop']['first'] = false;
  226. if (isset($context['loop']['length'])) {
  227. --$context['loop']['revindex0'];
  228. --$context['loop']['revindex'];
  229. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  230. }
  231. }
  232. $_parent = $context['_parent'];
  233. unset($context['_seq'], $context['_iterated'], $context['i'], $context['query'], $context['_parent'], $context['loop']);
  234. $context = array_merge($_parent, array_intersect_key($context, $_parent));
  235. // line 77
  236. echo " </ul>
  237. ";
  238. }
  239. // line 79
  240. echo " ";
  241. ++$context['loop']['index0'];
  242. ++$context['loop']['index'];
  243. $context['loop']['first'] = false;
  244. if (isset($context['loop']['length'])) {
  245. --$context['loop']['revindex0'];
  246. --$context['loop']['revindex'];
  247. $context['loop']['last'] = 0 === $context['loop']['revindex0'];
  248. }
  249. }
  250. $_parent = $context['_parent'];
  251. unset($context['_seq'], $context['_iterated'], $context['connection'], $context['queries'], $context['_parent'], $context['loop']);
  252. $context = array_merge($_parent, array_intersect_key($context, $_parent));
  253. // line 80
  254. echo "
  255. <h2>Database Connections</h2>
  256. ";
  257. // line 83
  258. if ($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "connections")) {
  259. // line 84
  260. echo " ";
  261. $this->env->loadTemplate("WebProfilerBundle:Profiler:table.html.twig")->display(array("data" => $this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "connections")));
  262. // line 85
  263. echo " ";
  264. } else {
  265. // line 86
  266. echo " <p>
  267. <em>No connections.</em>
  268. </p>
  269. ";
  270. }
  271. // line 90
  272. echo "
  273. <h2>Entity Managers</h2>
  274. ";
  275. // line 93
  276. if ($this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "managers")) {
  277. // line 94
  278. echo " ";
  279. $this->env->loadTemplate("WebProfilerBundle:Profiler:table.html.twig")->display(array("data" => $this->getAttribute((isset($context["collector"]) ? $context["collector"] : null), "managers")));
  280. // line 95
  281. echo " ";
  282. } else {
  283. // line 96
  284. echo " <p>
  285. <em>No entity managers.</em>
  286. </p>
  287. ";
  288. }
  289. // line 100
  290. echo "
  291. <script type=\"text/javascript\">//<![CDATA[
  292. function explain(link) {
  293. \"use strict\";
  294. var imgs = link.children,
  295. target = link.getAttribute('data-target-id');
  296. Sfjs.toggle(target, imgs[0], imgs[1])
  297. .load(
  298. target,
  299. link.href,
  300. null,
  301. function(xhr, el) {
  302. el.innerHTML = 'An error occurred while loading the details';
  303. Sfjs.removeClass(el, 'loading');
  304. }
  305. );
  306. return false;
  307. }
  308. //]]></script>
  309. ";
  310. }
  311. public function getTemplateName()
  312. {
  313. return "DoctrineBundle:Collector:db.html.twig";
  314. }
  315. public function isTraitable()
  316. {
  317. return false;
  318. }
  319. public function getDebugInfo()
  320. {
  321. return array ( 299 => 100, 293 => 96, 290 => 95, 287 => 94, 285 => 93, 280 => 90, 274 => 86, 271 => 85, 268 => 84, 266 => 83, 261 => 80, 247 => 79, 243 => 77, 228 => 75, 220 => 73, 218 => 72, 213 => 70, 209 => 69, 202 => 66, 196 => 63, 183 => 61, 181 => 60, 175 => 58, 158 => 57, 147 => 51, 121 => 47, 118 => 46, 107 => 41, 101 => 34, 80 => 24, 63 => 16, 36 => 6, 156 => 58, 148 => 55, 142 => 50, 140 => 50, 127 => 45, 123 => 44, 115 => 42, 110 => 42, 104 => 35, 85 => 28, 68 => 20, 65 => 19, 59 => 16, 45 => 9, 103 => 24, 94 => 21, 91 => 20, 81 => 18, 74 => 22, 70 => 14, 66 => 12, 48 => 10, 25 => 4, 89 => 20, 82 => 19, 72 => 16, 64 => 15, 53 => 13, 92 => 39, 86 => 27, 77 => 23, 57 => 22, 19 => 2, 44 => 7, 27 => 3, 42 => 10, 33 => 5, 29 => 5, 41 => 7, 26 => 3, 223 => 96, 214 => 90, 210 => 88, 203 => 84, 199 => 83, 194 => 80, 192 => 62, 189 => 78, 187 => 77, 184 => 76, 178 => 72, 170 => 67, 161 => 63, 157 => 61, 152 => 59, 145 => 53, 130 => 48, 125 => 49, 119 => 45, 116 => 44, 112 => 43, 102 => 36, 98 => 33, 76 => 24, 73 => 23, 69 => 19, 61 => 24, 56 => 12, 39 => 7, 32 => 11, 24 => 3, 22 => 3, 30 => 4, 23 => 3, 20 => 2, 17 => 1, 182 => 70, 176 => 71, 169 => 62, 163 => 58, 160 => 57, 155 => 56, 151 => 54, 149 => 52, 141 => 54, 136 => 47, 134 => 50, 131 => 43, 128 => 47, 120 => 37, 117 => 36, 114 => 35, 109 => 32, 106 => 31, 100 => 30, 96 => 34, 93 => 33, 90 => 28, 87 => 19, 83 => 24, 79 => 25, 71 => 19, 62 => 15, 58 => 23, 55 => 14, 52 => 10, 49 => 9, 46 => 14, 43 => 8, 40 => 7, 37 => 6, 34 => 5, 31 => 4, 28 => 3,);
  322. }
  323. }