1 | <?php |
||
23 | class ProjectDescriptor implements Interfaces\ProjectInterface, Descriptor |
||
24 | { |
||
25 | /** @var string $name */ |
||
26 | protected $name = ''; |
||
27 | |||
28 | /** @var NamespaceDescriptor $namespace */ |
||
29 | protected $namespace; |
||
30 | |||
31 | /** @var Collection $files */ |
||
32 | protected $files; |
||
33 | |||
34 | /** @var Collection $indexes */ |
||
35 | protected $indexes; |
||
36 | |||
37 | /** @var Settings $settings */ |
||
38 | protected $settings; |
||
39 | |||
40 | /** @var Collection $partials */ |
||
41 | protected $partials; |
||
42 | |||
43 | /** |
||
44 | * Initializes this descriptor. |
||
45 | */ |
||
46 | 7 | public function __construct($name) |
|
61 | |||
62 | /** |
||
63 | * Sets the name for this project. |
||
64 | * |
||
65 | * @param string $name |
||
66 | */ |
||
67 | 2 | public function setName($name) |
|
71 | |||
72 | /** |
||
73 | * Returns the name of this project. |
||
74 | * |
||
75 | * @return string |
||
76 | */ |
||
77 | 1 | public function getName() |
|
81 | |||
82 | /** |
||
83 | * Returns the description for this element. |
||
84 | * |
||
85 | * @return string |
||
86 | */ |
||
87 | 2 | public function getDescription() |
|
91 | |||
92 | /** |
||
93 | * Sets all files on this project. |
||
94 | * |
||
95 | * @param Collection $files |
||
96 | */ |
||
97 | 2 | public function setFiles($files) |
|
101 | |||
102 | /** |
||
103 | * Returns all files with their sub-elements. |
||
104 | * |
||
105 | * @return Collection|FileDescriptor[] |
||
106 | */ |
||
107 | public function getFiles() |
||
111 | 2 | ||
112 | 2 | /** |
|
113 | * Sets all indexes for this project. |
||
114 | * |
||
115 | * An index is a compilation of references to elements, usually constructed in a compiler step, that aids template |
||
116 | * generation by providing a conveniently assembled list. An example of such an index is the 'marker' index where |
||
117 | * a list of TODOs and FIXMEs are located in a central location for reporting. |
||
118 | */ |
||
119 | public function setIndexes(Collection $indexes) |
||
123 | 1 | ||
124 | /** |
||
125 | * Returns all indexes in this project. |
||
126 | * |
||
127 | * @see setIndexes() for more information on what indexes are. |
||
128 | * |
||
129 | * @return Collection |
||
130 | */ |
||
131 | 2 | public function getIndexes() |
|
135 | |||
136 | /** |
||
137 | * Sets the root namespace for this project together with all sub-namespaces. |
||
138 | * |
||
139 | * @param NamespaceDescriptor $namespace |
||
140 | */ |
||
141 | 1 | public function setNamespace($namespace) |
|
145 | |||
146 | /** |
||
147 | * Returns the root (global) namespace. |
||
148 | * |
||
149 | * @return NamespaceDescriptor |
||
150 | */ |
||
151 | 2 | public function getNamespace() |
|
155 | |||
156 | /** |
||
157 | * Sets the settings used to build the documentation for this project. |
||
158 | * |
||
159 | * @param Settings $settings |
||
160 | */ |
||
161 | 2 | public function setSettings($settings) |
|
165 | |||
166 | /** |
||
167 | * Returns the settings used to build the documentation for this project. |
||
168 | * |
||
169 | * @return Settings |
||
170 | */ |
||
171 | public function getSettings() |
||
175 | 2 | ||
176 | /** |
||
177 | * Sets all partials that can be used in a template. |
||
178 | * |
||
179 | * Partials are blocks of text that can be inserted anywhere in a template using a special indicator. An example is |
||
180 | * the introduction partial that can add a custom piece of text to the homepage. |
||
181 | */ |
||
182 | public function setPartials(Collection $partials) |
||
186 | 1 | ||
187 | /** |
||
188 | * Returns a list of all partials. |
||
189 | * |
||
190 | * @see setPartials() for more information on partials. |
||
191 | * |
||
192 | * @return Collection |
||
193 | */ |
||
194 | public function getPartials() |
||
198 | 1 | ||
199 | /** |
||
200 | 1 | * Checks whether the Project supports the given visibility. |
|
201 | 1 | * |
|
202 | 1 | * @param integer $visibility One of the VISIBILITY_* constants of the Settings class. |
|
203 | * |
||
204 | 1 | * @see Settings for a list of the available VISIBILITY_* constants. |
|
205 | * |
||
206 | * @return boolean |
||
207 | */ |
||
208 | public function isVisibilityAllowed($visibility) |
||
216 | } |
||
217 |