35a5a66b4ed16257e8019781a83d.php 9.4KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243
  1. <?php
  2. /* DoctrineBundle:Collector:db.html.twig */
  3. class __TwigTemplate_6dfd35a5a66b4ed16257e8019781a83d extends Twig_Template
  4. {
  5. protected $parent;
  6. public function __construct(Twig_Environment $env)
  7. {
  8. parent::__construct($env);
  9. $this->parent = array();
  10. $this->blocks = array(
  11. 'toolbar' => array($this, 'block_toolbar'),
  12. 'menu' => array($this, 'block_menu'),
  13. 'panel' => array($this, 'block_panel'),
  14. );
  15. }
  16. public function getParent(array $context)
  17. {
  18. $parent = "WebProfilerBundle:Profiler:layout.html.twig";
  19. if ($parent instanceof Twig_Template) {
  20. $name = $parent->getTemplateName();
  21. $this->parent[$name] = $parent;
  22. $parent = $name;
  23. } elseif (!isset($this->parent[$parent])) {
  24. $this->parent[$parent] = $this->env->loadTemplate($parent);
  25. }
  26. return $this->parent[$parent];
  27. }
  28. protected function doDisplay(array $context, array $blocks = array())
  29. {
  30. $context = array_merge($this->env->getGlobals(), $context);
  31. $this->getParent($context)->display($context, array_merge($this->blocks, $blocks));
  32. }
  33. // line 3
  34. public function block_toolbar($context, array $blocks = array())
  35. {
  36. // line 4
  37. echo " ";
  38. ob_start();
  39. // line 5
  40. echo " <img width=\"20\" height=\"28\" alt=\"Database\" style=\"border-width: 0; vertical-align: middle; margin-right: 5px;\" src=\"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAcCAYAAABh2p9gAAAAGXRFWHRTb2Z0d2FyZQBBZG9iZSBJbWFnZVJlYWR5ccllPAAAAQRJREFUeNpi/P//PwM1ARMDlcGogZQDlpMnT7pxc3NbA9nhQKxOpL5rQLwJiPeBsI6Ozl+YBOOOHTv+AOllQNwtLS39F2owKYZ/gRq8G4i3ggxEToggWzvc3d2Pk+1lNL4fFAs6ODi8JzdS7mMRVyDVoAMHDsANdAPiOCC+jCQvQKqBQB/BDbwBxK5AHA3E/kB8nKJkA8TMQBwLxaBIKQbi70AvTADSBiSadwFXpCikpKQU8PDwkGTaly9fHFigkaKIJid4584dkiMFFI6jkTJII0WVmpHCAixZQEXWYhDeuXMnyLsVlEQKI45qFBQZ8eRECi4DBaAlDqle/8A48ip6gAADANdQY88Uc0oGAAAAAElFTkSuQmCC\"/>
  41. ";
  42. $context['icon'] = new Twig_Markup(ob_get_clean());
  43. // line 7
  44. echo " ";
  45. ob_start();
  46. // line 8
  47. echo " <span title=\"";
  48. echo twig_escape_filter($this->env, sprintf("%0.2f", ($this->getAttribute($this->getContext($context, 'collector'), "time", array(), "any", false) * 1000)), "html");
  49. echo " ms\">";
  50. echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, 'collector'), "querycount", array(), "any", false), "html");
  51. echo "</span>
  52. ";
  53. $context['text'] = new Twig_Markup(ob_get_clean());
  54. // line 10
  55. echo " ";
  56. $this->env->loadTemplate("WebProfilerBundle:Profiler:toolbar_item.html.twig")->display(array_merge($context, array("link" => $this->getContext($context, 'profiler_url'))));
  57. }
  58. // line 13
  59. public function block_menu($context, array $blocks = array())
  60. {
  61. // line 14
  62. echo "<span class=\"label\">
  63. <span class=\"icon\"><img src=\"";
  64. // line 15
  65. echo twig_escape_filter($this->env, $this->env->getExtension('assets')->getAssetUrl("bundles/webprofiler/images/profiler/db.png"), "html");
  66. echo "\" alt=\"\" /></span>
  67. <strong>Doctrine</strong>
  68. <span class=\"count\">
  69. <span>";
  70. // line 18
  71. echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, 'collector'), "querycount", array(), "any", false), "html");
  72. echo "</span>
  73. <span>";
  74. // line 19
  75. echo twig_escape_filter($this->env, sprintf("%0.0f", ($this->getAttribute($this->getContext($context, 'collector'), "time", array(), "any", false) * 1000)), "html");
  76. echo " ms</span>
  77. </span>
  78. </span>
  79. ";
  80. }
  81. // line 24
  82. public function block_panel($context, array $blocks = array())
  83. {
  84. // line 25
  85. echo " <h2>Queries</h2>
  86. ";
  87. // line 27
  88. if ((!$this->getAttribute($this->getContext($context, 'collector'), "querycount", array(), "any", false))) {
  89. // line 28
  90. echo " <p>
  91. <em>No queries.</em>
  92. </p>
  93. ";
  94. } else {
  95. // line 32
  96. echo " <ul class=\"alt\">
  97. ";
  98. // line 33
  99. $context['_parent'] = (array) $context;
  100. $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getContext($context, 'collector'), "queries", array(), "any", false));
  101. foreach ($context['_seq'] as $context['i'] => $context['query']) {
  102. // line 34
  103. echo " <li class=\"";
  104. echo ((twig_test_odd($this->getContext($context, 'i'))) ? ("odd") : ("even"));
  105. echo "\">
  106. <div>
  107. <code>";
  108. // line 36
  109. echo twig_escape_filter($this->env, $this->getAttribute($this->getContext($context, 'query'), "sql", array(), "any", false), "html");
  110. echo "</code>
  111. </div>
  112. <small>
  113. <strong>Parameters</strong>: ";
  114. // line 39
  115. echo twig_escape_filter($this->env, $this->env->getExtension('yaml')->encode($this->getAttribute($this->getContext($context, 'query'), "params", array(), "any", false)), "html");
  116. echo "<br />
  117. <strong>Time</strong>: ";
  118. // line 40
  119. echo twig_escape_filter($this->env, sprintf("%0.2f", ($this->getAttribute($this->getContext($context, 'query'), "executionMS", array(), "any", false) * 1000)), "html");
  120. echo " ms
  121. </small>
  122. </li>
  123. ";
  124. }
  125. $_parent = $context['_parent'];
  126. unset($context['_seq'], $context['_iterated'], $context['i'], $context['query'], $context['_parent'], $context['loop']);
  127. $context = array_merge($_parent, array_intersect_key($context, $_parent));
  128. // line 44
  129. echo " </ul>
  130. ";
  131. }
  132. // line 46
  133. echo "
  134. <h2>Database Connections</h2>
  135. ";
  136. // line 49
  137. if ($this->getAttribute($this->getContext($context, 'collector'), "connections", array(), "any", false)) {
  138. // line 50
  139. echo " <table>
  140. <tr>
  141. <th>Name</th>
  142. <th>Service</th>
  143. </tr>
  144. ";
  145. // line 55
  146. $context['_parent'] = (array) $context;
  147. $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getContext($context, 'collector'), "connections", array(), "any", false));
  148. foreach ($context['_seq'] as $context['name'] => $context['service']) {
  149. // line 56
  150. echo " <tr>
  151. <th>";
  152. // line 57
  153. echo twig_escape_filter($this->env, $this->getContext($context, 'name'), "html");
  154. echo "</th>
  155. <td>";
  156. // line 58
  157. echo twig_escape_filter($this->env, $this->getContext($context, 'service'), "html");
  158. echo "</td>
  159. </tr>
  160. ";
  161. }
  162. $_parent = $context['_parent'];
  163. unset($context['_seq'], $context['_iterated'], $context['name'], $context['service'], $context['_parent'], $context['loop']);
  164. $context = array_merge($_parent, array_intersect_key($context, $_parent));
  165. // line 61
  166. echo " </table>
  167. ";
  168. } else {
  169. // line 63
  170. echo " <p>
  171. <em>No entity managers.</em>
  172. </p>
  173. ";
  174. }
  175. // line 67
  176. echo "
  177. <h2>Entity Managers</h2>
  178. ";
  179. // line 70
  180. if ($this->getAttribute($this->getContext($context, 'collector'), "managers", array(), "any", false)) {
  181. // line 71
  182. echo " <table>
  183. <tr>
  184. <th>Name</th>
  185. <th>Service</th>
  186. </tr>
  187. ";
  188. // line 76
  189. $context['_parent'] = (array) $context;
  190. $context['_seq'] = twig_ensure_traversable($this->getAttribute($this->getContext($context, 'collector'), "managers", array(), "any", false));
  191. foreach ($context['_seq'] as $context['name'] => $context['service']) {
  192. // line 77
  193. echo " <tr>
  194. <th>";
  195. // line 78
  196. echo twig_escape_filter($this->env, $this->getContext($context, 'name'), "html");
  197. echo "</th>
  198. <td>";
  199. // line 79
  200. echo twig_escape_filter($this->env, $this->getContext($context, 'service'), "html");
  201. echo "</td>
  202. </tr>
  203. ";
  204. }
  205. $_parent = $context['_parent'];
  206. unset($context['_seq'], $context['_iterated'], $context['name'], $context['service'], $context['_parent'], $context['loop']);
  207. $context = array_merge($_parent, array_intersect_key($context, $_parent));
  208. // line 82
  209. echo " </table>
  210. ";
  211. } else {
  212. // line 84
  213. echo " <p>
  214. <em>No entity managers.</em>
  215. </p>
  216. ";
  217. }
  218. }
  219. public function getTemplateName()
  220. {
  221. return "DoctrineBundle:Collector:db.html.twig";
  222. }
  223. public function isTraitable()
  224. {
  225. return false;
  226. }
  227. }