1
|
|
|
<?php |
2
|
|
|
|
3
|
|
|
/* namespaces.twig */ |
4
|
|
|
class __TwigTemplate_7b8f7f2f528d58b505743fb65d39227a6a06db1375e25a34ce46d4e331f6e74c extends Twig_Template |
|
|
|
|
5
|
|
|
{ |
6
|
|
|
public function __construct(Twig_Environment $env) |
7
|
|
|
{ |
8
|
|
|
parent::__construct($env); |
9
|
|
|
|
10
|
|
|
// line 1 |
11
|
|
|
$this->parent = $this->loadTemplate("layout/layout.twig", "namespaces.twig", 1); |
12
|
|
|
$this->blocks = array( |
13
|
|
|
'title' => array($this, 'block_title'), |
14
|
|
|
'body_class' => array($this, 'block_body_class'), |
15
|
|
|
'page_content' => array($this, 'block_page_content'), |
16
|
|
|
); |
17
|
|
|
} |
18
|
|
|
|
19
|
|
|
protected function doGetParent(array $context) |
20
|
|
|
{ |
21
|
|
|
return "layout/layout.twig"; |
|
|
|
|
22
|
|
|
} |
23
|
|
|
|
24
|
|
|
protected function doDisplay(array $context, array $blocks = array()) |
25
|
|
|
{ |
26
|
|
|
$this->parent->display($context, array_merge($this->blocks, $blocks)); |
|
|
|
|
27
|
|
|
} |
28
|
|
|
|
29
|
|
|
// line 2 |
30
|
|
|
public function block_title($context, array $blocks = array()) |
31
|
|
|
{ |
32
|
|
|
echo "Namespaces | "; |
33
|
|
|
$this->displayParentBlock("title", $context, $blocks); |
34
|
|
|
} |
35
|
|
|
|
36
|
|
|
// line 3 |
37
|
|
|
public function block_body_class($context, array $blocks = array()) |
|
|
|
|
38
|
|
|
{ |
39
|
|
|
echo "namespaces"; |
40
|
|
|
} |
41
|
|
|
|
42
|
|
|
// line 5 |
43
|
|
|
public function block_page_content($context, array $blocks = array()) |
|
|
|
|
44
|
|
|
{ |
45
|
|
|
// line 6 |
46
|
|
|
echo " <div class=\"page-header\"> |
47
|
|
|
<h1>Namespaces</h1> |
48
|
|
|
</div> |
49
|
|
|
|
50
|
|
|
"; |
51
|
|
|
// line 10 |
52
|
|
|
if ((isset($context["namespaces"]) || array_key_exists("namespaces", $context) ? $context["namespaces"] : (function () { throw new Twig_Error_Runtime('Variable "namespaces" does not exist.', 10, $this->getSourceContext()); })())) { |
53
|
|
|
// line 11 |
54
|
|
|
echo " <div class=\"namespaces clearfix\"> |
55
|
|
|
"; |
56
|
|
|
// line 12 |
57
|
|
|
$context["last_name"] = ""; |
58
|
|
|
// line 13 |
59
|
|
|
echo " "; |
60
|
|
|
$context['_parent'] = $context; |
61
|
|
|
$context['_seq'] = twig_ensure_traversable((isset($context["namespaces"]) || array_key_exists("namespaces", $context) ? $context["namespaces"] : (function () { throw new Twig_Error_Runtime('Variable "namespaces" does not exist.', 13, $this->getSourceContext()); })())); |
62
|
|
|
foreach ($context['_seq'] as $context["_key"] => $context["namespace"]) { |
63
|
|
|
// line 14 |
64
|
|
|
echo " "; |
65
|
|
|
$context["top_level"] = twig_first($this->env, twig_split_filter($this->env, $context["namespace"], "\\")); |
66
|
|
|
// line 15 |
67
|
|
|
echo " "; |
68
|
|
|
if (((isset($context["top_level"]) || array_key_exists("top_level", $context) ? $context["top_level"] : (function () { throw new Twig_Error_Runtime('Variable "top_level" does not exist.', 15, $this->getSourceContext()); })()) != (isset($context["last_name"]) || array_key_exists("last_name", $context) ? $context["last_name"] : (function () { throw new Twig_Error_Runtime('Variable "last_name" does not exist.', 15, $this->getSourceContext()); })()))) { |
69
|
|
|
// line 16 |
70
|
|
|
echo " "; |
71
|
|
|
if ((isset($context["last_name"]) || array_key_exists("last_name", $context) ? $context["last_name"] : (function () { throw new Twig_Error_Runtime('Variable "last_name" does not exist.', 16, $this->getSourceContext()); })())) { |
72
|
|
|
echo "</ul></div>"; |
73
|
|
|
} |
74
|
|
|
// line 17 |
75
|
|
|
echo " <div class=\"namespace-container\"> |
76
|
|
|
<h2>"; |
77
|
|
|
// line 18 |
78
|
|
|
echo (isset($context["top_level"]) || array_key_exists("top_level", $context) ? $context["top_level"] : (function () { throw new Twig_Error_Runtime('Variable "top_level" does not exist.', 18, $this->getSourceContext()); })()); |
79
|
|
|
echo "</h2> |
80
|
|
|
<ul> |
81
|
|
|
"; |
82
|
|
|
// line 20 |
83
|
|
|
$context["last_name"] = (isset($context["top_level"]) || array_key_exists("top_level", $context) ? $context["top_level"] : (function () { throw new Twig_Error_Runtime('Variable "top_level" does not exist.', 20, $this->getSourceContext()); })()); |
84
|
|
|
// line 21 |
85
|
|
|
echo " "; |
86
|
|
|
} |
87
|
|
|
// line 22 |
88
|
|
|
echo " <li><a href=\""; |
89
|
|
|
echo $this->env->getExtension('Sami\Renderer\TwigExtension')->pathForNamespace($context, $context["namespace"]); |
|
|
|
|
90
|
|
|
echo "\">"; |
91
|
|
|
echo $context["namespace"]; |
92
|
|
|
echo "</a></li> |
93
|
|
|
"; |
94
|
|
|
} |
95
|
|
|
$_parent = $context['_parent']; |
96
|
|
|
unset($context['_seq'], $context['_iterated'], $context['_key'], $context['namespace'], $context['_parent'], $context['loop']); |
97
|
|
|
$context = array_intersect_key($context, $_parent) + $_parent; |
|
|
|
|
98
|
|
|
// line 24 |
99
|
|
|
echo " </ul> |
100
|
|
|
</div> |
101
|
|
|
</div> |
102
|
|
|
"; |
103
|
|
|
} |
104
|
|
|
// line 28 |
105
|
|
|
echo " |
106
|
|
|
"; |
107
|
|
|
} |
108
|
|
|
|
109
|
|
|
public function getTemplateName() |
110
|
|
|
{ |
111
|
|
|
return "namespaces.twig"; |
112
|
|
|
} |
113
|
|
|
|
114
|
|
|
public function isTraitable() |
115
|
|
|
{ |
116
|
|
|
return false; |
117
|
|
|
} |
118
|
|
|
|
119
|
|
|
public function getDebugInfo() |
120
|
|
|
{ |
121
|
|
|
return array ( 105 => 28, 99 => 24, 88 => 22, 85 => 21, 83 => 20, 78 => 18, 75 => 17, 70 => 16, 67 => 15, 64 => 14, 59 => 13, 57 => 12, 54 => 11, 52 => 10, 46 => 6, 43 => 5, 37 => 3, 30 => 2, 11 => 1,); |
122
|
|
|
} |
123
|
|
|
|
124
|
|
|
public function getSourceContext() |
125
|
|
|
{ |
126
|
|
|
return new Twig_Source("{% extends \"layout/layout.twig\" %} |
127
|
|
|
{% block title %}Namespaces | {{ parent() }}{% endblock %} |
128
|
|
|
{% block body_class 'namespaces' %} |
129
|
|
|
|
130
|
|
|
{% block page_content %} |
131
|
|
|
<div class=\"page-header\"> |
132
|
|
|
<h1>Namespaces</h1> |
133
|
|
|
</div> |
134
|
|
|
|
135
|
|
|
{% if namespaces %} |
136
|
|
|
<div class=\"namespaces clearfix\"> |
137
|
|
|
{% set last_name = '' %} |
138
|
|
|
{% for namespace in namespaces %} |
139
|
|
|
{% set top_level = namespace|split('\\\\')|first %} |
140
|
|
|
{% if top_level != last_name %} |
141
|
|
|
{% if last_name %}</ul></div>{% endif %} |
142
|
|
|
<div class=\"namespace-container\"> |
143
|
|
|
<h2>{{ top_level|raw }}</h2> |
144
|
|
|
<ul> |
145
|
|
|
{% set last_name = top_level %} |
146
|
|
|
{% endif %} |
147
|
|
|
<li><a href=\"{{ namespace_path(namespace) }}\">{{ namespace|raw }}</a></li> |
148
|
|
|
{% endfor %} |
149
|
|
|
</ul> |
150
|
|
|
</div> |
151
|
|
|
</div> |
152
|
|
|
{% endif %} |
153
|
|
|
|
154
|
|
|
{% endblock %} |
155
|
|
|
", "namespaces.twig", "phar:///Users/bobby/Dropbox/Sites/OpenSource/Slackify/sami.phar/Sami/Resources/themes/default/namespaces.twig"); |
156
|
|
|
} |
157
|
|
|
} |
158
|
|
|
|
You can fix this by adding a namespace to your class:
When choosing a vendor namespace, try to pick something that is not too generic to avoid conflicts with other libraries.