├── .gitattributes ├── LICENSE ├── README.md ├── composer.json └── src ├── 404.latte ├── @elementlist.latte ├── @layout.latte ├── annotation-group.latte ├── class.latte ├── combined.js.latte ├── config.neon ├── constant.latte ├── elementlist.js.latte ├── function.latte ├── js ├── jquery.autocomplete.js ├── jquery.cookie.js ├── jquery.min.js ├── jquery.sortElements.js ├── jquery.sprintf.js └── main.js ├── namespace.latte ├── opensearch.xml.latte ├── overview.latte ├── package.latte ├── resources ├── collapsed.png ├── style.css ├── tree-cleaner.png ├── tree-hasnext.png ├── tree-last.png └── tree-vertical.png ├── robots.txt.latte ├── sitemap.xml.latte ├── source.latte └── tree.latte /.gitattributes: -------------------------------------------------------------------------------- 1 | screenshot.png export-ignore 2 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License 2 | --------------- 3 | 4 | - Copyright (c) 2012-2017 [Olivier Laviale](https://github.com/olvlvl) 5 | - Copyright (c) 2014 [Tomáš Votruba](http://tomasvotruba.cz) 6 | 7 | Permission is hereby granted, free of charge, to any person 8 | obtaining a copy of this software and associated documentation 9 | files (the "Software"), to deal in the Software without 10 | restriction, including without limitation the rights to use, 11 | copy, modify, merge, publish, distribute, sublicense, and/or sell 12 | copies of the Software, and to permit persons to whom the 13 | Software is furnished to do so, subject to the following 14 | conditions: 15 | 16 | The above copyright notice and this permission notice shall be 17 | included in all copies or substantial portions of the Software. 18 | 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 20 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES 21 | OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 22 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 23 | HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 24 | WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 25 | FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 26 | OTHER DEALINGS IN THE SOFTWARE. 27 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Twitter Bootstrap Theme 2 | 3 | [![Downloads this Month](https://img.shields.io/packagist/dm/apigen/theme-bootstrap.svg)](https://packagist.org/packages/apigen/theme-bootstrap) 4 | [![Latest stable](https://img.shields.io/packagist/v/apigen/theme-bootstrap.svg)](https://packagist.org/packages/apigen/theme-bootstrap) 5 | 6 | A theme for [ApiGen](http://www.apigen.org/) that matches [Twitter Bootstrap v4.0.0-alpha.6](https://github.com/twbs/bootstrap/releases/tag/v4.0.0-alpha.6). 7 | 8 | ![Twitter Bootstrap Theme](screenshot.png) 9 | 10 | ## Installation 11 | 12 | Clone the theme as `ApiGen/vendor/apigen/theme-bootstrap`. 13 | 14 | ## Usage 15 | 16 | Add `--template-theme bootstrap` to ApiGen command like : 17 | 18 | apigen generate --source app --destination docs/api/v1 --template-theme bootstrap 19 | 20 | -------------------------------------------------------------------------------- /composer.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "apigen/theme-bootstrap", 3 | "description": "Twitter Bootstrap theme for ApiGen", 4 | "homepage": "http://apigen.org/", 5 | "license": "MIT", 6 | "authors": [ 7 | { "name": "Tomáš Votruba", "email": "tomas.vot@gmail.com" }, 8 | { "name": "Olivier Laviale", "homepage": "https://github.com/olvlvl" } 9 | ], 10 | "require": { 11 | "latte/latte": "~2.2" 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/404.latte: -------------------------------------------------------------------------------- 1 | {layout '@layout.latte'} 2 | {var $robots = false} 3 | 4 | {block title}Page not found{/block} 5 | 6 | {block content} 7 |
8 |

{include title}

9 |

The requested page could not be found.

10 |

You have probably clicked on a link that is outdated and points to a page that does not exist any more or you have made an typing error in the address.

11 |

To continue please try to find requested page in the menu,{if $config->tree} take a look at the tree view of the whole project{/if} or use search field on the top.

12 |
13 | {/block} 14 | -------------------------------------------------------------------------------- /src/@elementlist.latte: -------------------------------------------------------------------------------- 1 | {define elements} 2 | 3 | {if $namespace}{$element->shortName}{else}{$element->name}{/if} 4 | {$element|shortDescription|noescape} 5 | 6 | {/define} 7 | 8 | {if $classes} 9 |

Classes summary

10 | 11 | {include elements, elements => $classes} 12 |
13 | {/if} 14 | 15 | {if $interfaces} 16 |

Interfaces summary

17 | 18 | {include elements, elements => $interfaces} 19 |
20 | {/if} 21 | 22 | {if $traits} 23 |

Traits summary

24 | 25 | {include elements, elements => $traits} 26 |
27 | {/if} 28 | 29 | {if $exceptions} 30 |

Exceptions summary

31 | 32 | {include elements, elements => $exceptions} 33 |
34 | {/if} 35 | 36 | {if $constants} 37 |

Constants summary

38 | 39 | {include elements, elements => $constants} 40 |
41 | {/if} 42 | 43 | {if $functions} 44 |

Functions summary

45 | 46 | {include elements, elements => $functions} 47 |
48 | {/if} 49 | -------------------------------------------------------------------------------- /src/@layout.latte: -------------------------------------------------------------------------------- 1 | {default $robots = true} 2 | {default $active = ''} 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | {include title}{if 'overview' !== $active && $config->title} | {$config->title}{/if} 11 | 12 | 13 | 14 | 15 | {**} 24 | 25 | 26 | 27 | 85 | 86 |
87 | 88 | 164 | 165 | 174 | 175 | 182 | 183 | 184 | 185 | 186 | 187 | -------------------------------------------------------------------------------- /src/annotation-group.latte: -------------------------------------------------------------------------------- 1 | {layout '@layout.latte'} 2 | {var $active = 'annotation-group-' . $annotation} 3 | 4 | {block title}{$annotation|firstUpper}{/block} 5 | 6 | {block content} 7 |
8 |

{include title}

9 | 10 | {if $hasElements} 11 | {if $annotationClasses} 12 |

Classes summary

13 | 14 | {include classes, items => $annotationClasses} 15 |
16 | {/if} 17 | 18 | {if $annotationInterfaces} 19 |

Interfaces summary

20 | 21 | {include classes, items => $annotationInterfaces} 22 |
23 | {/if} 24 | 25 | {if $annotationTraits} 26 |

Traits summary

27 | 28 | {include classes, items => $annotationTraits} 29 |
30 | {/if} 31 | 32 | {if $annotationExceptions} 33 |

Exceptions summary

34 | 35 | {include classes, items => $annotationExceptions} 36 |
37 | {/if} 38 | 39 | {if $annotationMethods} 40 |

Methods summary

41 | 42 | 43 | 44 | 45 | 54 | 55 |
{$method->declaringClassName}{$method->name}() 46 | {if $method->hasAnnotation($annotation)} 47 | {foreach $method->annotations[$annotation] as $description} 48 | {if $description} 49 | {$description|annotation:$annotation:$method|noescape}
50 | {/if} 51 | {/foreach} 52 | {/if} 53 |
56 | {/if} 57 | 58 | {if $annotationConstants} 59 |

Constants summary

60 | 61 | 62 | {if $constant->declaringClassName} 63 | 64 | 65 | 66 | {else} 67 | 68 | 69 | {/if} 70 | 77 | 78 |
{$constant->declaringClassName}{$constant->name}{$constant->namespaceName}{$constant->shortName} 71 | {foreach $constant->annotations[$annotation] as $description} 72 | {if $description} 73 | {$description|annotation:$annotation:$constant|noescape}
74 | {/if} 75 | {/foreach} 76 |
79 | {/if} 80 | 81 | {if $annotationProperties} 82 |

Properties summary

83 | 84 | 85 | 86 | 87 | 94 | 95 |
{$property->declaringClassName}${$property->name} 88 | {foreach $property->annotations[$annotation] as $description} 89 | {if $description} 90 | {$description|annotation:$annotation:$property|noescape}
91 | {/if} 92 | {/foreach} 93 |
96 | {/if} 97 | 98 | {if $annotationFunctions} 99 |

Functions summary

100 | 101 | 102 | 103 | 104 | 111 | 112 |
{$function->namespaceName}{$function->shortName} 105 | {foreach $function->annotations[$annotation] as $description} 106 | {if $description} 107 | {$description|annotation:$annotation:$function|noescape}
108 | {/if} 109 | {/foreach} 110 |
113 | {/if} 114 | 115 | {else} 116 |

No elements with @{$annotation} annotation found.

117 | {/if} 118 |
119 | {/block} 120 | 121 | 122 | {define classes} 123 | 124 | {$class->name} 125 | 126 | {foreach $class->annotations[$annotation] as $description} 127 | {if $description} 128 | {$description|annotation:$annotation:$class|noescape}
129 | {/if} 130 | {/foreach} 131 | 132 | 133 | {/define} 134 | -------------------------------------------------------------------------------- /src/class.latte: -------------------------------------------------------------------------------- 1 | {layout '@layout.latte'} 2 | {var $active = 'class'} 3 | 4 | {block title}{if $class->deprecated}Deprecated {/if}{if $class->interface}Interface{elseif $class->trait}Trait{else}Class{/if} {$class->name}{/block} 5 | 6 | {block content} 7 |
8 |

{if $class->interface}Interface{elseif $class->trait}Trait{else}Class{/if} {$class->shortName}

9 | 10 | {if $class->valid} 11 | 12 |
13 | {$class|longDescription|noescape} 14 |
15 | 16 |
17 |
18 | 19 | {if $item->documented} 20 | {last}{/last}{$item->name}{last}{/last} 21 | {else}{$item->name}{/if} 22 | {var $itemOwnInterfaces = $item->ownInterfaces} 23 | {if $itemOwnInterfaces} implements {foreach $itemOwnInterfaces as $interface} 24 | {$interface->name}{sep}, {/sep} 25 | {/foreach}{/if} 26 | {var $itemOwnTraits = $item->ownTraits} 27 | {if $itemOwnTraits} uses {foreach $itemOwnTraits as $trait} 28 | {if is_string($trait)} 29 | {$trait} (not available) 30 | 31 | {else} 32 | {$trait->name}{sep}, {/sep} 33 | {/} 34 | {/foreach}{/if} 35 |
36 |
37 | 38 | {define children} 39 |

40 | {foreach $children as $child} 41 | {$child->name}{sep}, {/sep} 42 | {/foreach} 43 |

44 | {/define} 45 | 46 |
47 |

Direct known subclasses

48 | {include children, children => $directSubClasses} 49 |
50 | 51 |
52 |

Indirect known subclasses

53 | {include children, children => $indirectSubClasses} 54 |
55 | 56 |
57 |

Direct known implementers

58 | {include children, children => $directImplementers} 59 |
60 | 61 |
62 |

Indirect known implementers

63 | {include children, children => $indirectImplementers} 64 |
65 | 66 |
67 |

Direct Known Users

68 | {include children, children => $directUsers} 69 |
70 | 71 |
72 |

Indirect Known Users

73 | {include children, children => $indirectUsers} 74 |
75 | 76 |
77 | {if !$class->interface && !$class->trait && ($class->abstract || $class->final)}{if $class->abstract}Abstract{else}Final{/if}
{/if} 78 | {if $class->internal}PHP Extension: {$class->extension->name|firstUpper}
{/if} 79 | {if $class->inNamespace()}Namespace: {$class->namespaceName|namespaceLinks|noescape}
{/if} 80 | {if $class->inPackage()}Package: {$class->packageName|packageLinks|noescape}
{/if} 81 | 82 | {foreach $template->annotationSort($template->annotationFilter($class->annotations)) as $annotation => $values} 83 | {foreach $values as $value} 84 | {$annotation|annotationBeautify}{if $value}:{/if} 85 | {$value|annotation:$annotation:$class|noescape}
86 | {/foreach} 87 | {/foreach} 88 | {if $class->internal} 89 | Documented at php.net 90 | {else} 91 | Located at {$class->fileName|relativePath} 92 | {/if} 93 |
94 |
95 | 96 | {var $ownMethods = $class->ownMethods} 97 | {var $inheritedMethods = $class->inheritedMethods} 98 | {var $usedMethods = $class->usedMethods} 99 | {var $ownMagicMethods = $class->ownMagicMethods} 100 | {var $inheritedMagicMethods = $class->inheritedMagicMethods} 101 | {var $usedMagicMethods = $class->usedMagicMethods} 102 | 103 | {if $ownMethods || $inheritedMethods || $usedMethods || $ownMagicMethods || $usedMagicMethods} 104 | {define method} 105 |
106 | {var $annotations = $method->annotations} 107 | 108 | 109 | 110 | {if !$class->interface && $method->abstract}abstract{elseif $method->final}final{/if} {if $method->protected}protected{elseif $method->private}private{else}public{/if} {if $method->static}static{/if} 111 | {if $method->returnsReference()}&{/if} 112 | 113 | 114 | {block|strip} 115 | {if $class->internal} 116 | {$method->name}( 117 | {else} 118 | {$method->name}( 119 | {/if} 120 | {if $method->parameters} 121 | {foreach $method->parameters as $parameter} 122 | {$parameter->typeHint|typeLinks:$method|noescape} 123 | {if $parameter->passedByReference}& {/if}${$parameter->name}{if $parameter->defaultValueAvailable} = {$parameter->defaultValueDefinition|noescape}{elseif $parameter->unlimited},…{/if}{sep}, {/sep} 124 | {/foreach} 125 | {else} 126 | void 127 | {/if} 128 | ){/block} 129 | 130 | 131 | {ifset $annotations['return']}: {$annotations['return'][0]|typeLinks:$method|noescape}{/ifset} 132 | 133 | 134 | {if $config->template['options']['elementDetailsCollapsed']} 135 |
136 | {$method|shortDescription:true|noescape} 137 |
138 | {/if} 139 | 140 |
141 | {$method|longDescription|noescape} 142 | 143 | {if !$class->deprecated && $method->deprecated} 144 |

Deprecated

145 | {ifset $annotations['deprecated']} 146 |
147 | {foreach $annotations['deprecated'] as $description} 148 | {if $description} 149 | {$description|annotation:'deprecated':$method|noescape}
150 | {/if} 151 | {/foreach} 152 |
153 | {/ifset} 154 | {/if} 155 | 156 | {if $method->parameters && isset($annotations['param'])} 157 |

Parameters

158 |
159 | {foreach $method->parameters as $parameter} 160 |
${$parameter->name}{if $parameter->unlimited},…{/if}
161 |
{$parameter->description|description:$method|noescape}
162 | {/foreach} 163 |
164 | {/if} 165 | 166 | {if isset($annotations['return']) && 'void' !== $annotations['return'][0]} 167 |

Returns

168 |
169 | {foreach $annotations['return'] as $description} 170 | {$description|annotation:'return':$method|noescape}{sep}
{/} 171 | {/foreach} 172 |
173 | {/if} 174 | 175 | {ifset $annotations['throws']} 176 |

Throws

177 |
178 | {foreach $annotations['throws'] as $description} 179 | {$description|annotation:'throws':$method|noescape}{sep}
{/} 180 | {/foreach} 181 |
182 | {/ifset} 183 | 184 | {foreach $template->annotationSort($template->annotationFilter($annotations, array('deprecated', 'param', 'return', 'throws'))) as $annotation => $descriptions} 185 |

{$annotation|annotationBeautify}

186 |
187 | {foreach $descriptions as $description} 188 | {if $description} 189 | {$description|annotation:$annotation:$method|noescape}
190 | {/if} 191 | {/foreach} 192 |
193 | {/foreach} 194 | 195 | {var $overriddenMethod = $method->overriddenMethod} 196 | {if $overriddenMethod} 197 |

Overrides

198 | 199 | {/if} 200 | 201 | {var $implementedMethod = $method->implementedMethod} 202 | {if $implementedMethod} 203 |

Implementation of

204 | 205 | {/if} 206 |
207 |
208 | {/define} 209 | 210 |

Methods summary

211 |
212 | {foreach $ownMethods as $method} 213 | {include method, method => $method} 214 | {/foreach} 215 |
216 | 217 | {foreach $inheritedMethods as $parentName => $methods} 218 |

Methods inherited from {$parentName}

219 |

220 | {foreach $methods as $method} 221 | {$method->name}(){sep}, {/sep} 222 | {/foreach} 223 |

224 | {/foreach} 225 | 226 | {foreach $usedMethods as $traitName => $methods} 227 |

Methods used from {$traitName}

228 |

229 | {foreach $methods as $data} 230 | {$data['method']->name}(){if $data['aliases']}(as {foreach $data['aliases'] as $alias}{$alias->name}(){sep}, {/sep}{/foreach}){/if}{sep}, {/sep} 231 | {/foreach} 232 |

233 | {/foreach} 234 | 235 | {if $ownMagicMethods} 236 |

Magic methods summary

237 |
238 | {foreach $ownMagicMethods as $method} 239 | {include method, method => $method} 240 | {/foreach} 241 |
242 | {/if} 243 | 244 | {foreach $inheritedMagicMethods as $parentName => $methods} 245 |

Magic methods inherited from {$parentName}

246 |

247 | {foreach $methods as $method} 248 | {$method->name}(){sep}, {/sep} 249 | {/foreach} 250 |

251 | {/foreach} 252 | 253 | {foreach $usedMagicMethods as $traitName => $methods} 254 |

Magic methods used from {$traitName}

255 |

256 | {foreach $methods as $data} 257 | {$data['method']->name}(){if $data['aliases']}(as {foreach $data['aliases'] as $alias}{$alias->name}(){sep}, {/sep}{/foreach}){/if}{sep}, {/sep} 258 | {/foreach} 259 |

260 | {/foreach} 261 | {/if} 262 | 263 | 264 | {var $ownConstants = $class->ownConstants} 265 | {var $inheritedConstants = $class->inheritedConstants} 266 | 267 | {if $ownConstants || $inheritedConstants} 268 |

Constants summary

269 |
270 |
271 | 272 | {var $annotations = $constant->annotations} 273 | 274 | 275 | 276 | {if $class->internal} 277 | {$constant->name} 278 | {else} 279 | {$constant->name} 280 | {/if} 281 | 282 | 283 | : {$constant->typeHint|typeLinks:$constant|noescape} 284 | 285 | 286 |
287 | {$constant|shortDescription:true|noescape} 288 |
289 | 290 |
291 | {$constant|longDescription|noescape} 292 | 293 | {foreach $template->annotationSort($template->annotationFilter($annotations, array('var'))) as $annotation => $descriptions} 294 |

{$annotation|annotationBeautify}

295 |
296 | {foreach $descriptions as $description} 297 | {if $description} 298 | {$description|annotation:$annotation:$constant|noescape}
299 | {/if} 300 | {/foreach} 301 |
302 | {/foreach} 303 |
304 | 305 |
{$constant->valueDefinition|highlightValue:$class|noescape}
306 |
307 |
308 | 309 | {foreach $inheritedConstants as $parentName => $constants} 310 |

Constants inherited from {$parentName}

311 |

312 | {foreach $constants as $constant} 313 | {$constant->name}{sep}, {/sep} 314 | {/foreach} 315 |

316 | {/foreach} 317 | {/if} 318 | 319 | {var $ownProperties = $class->ownProperties} 320 | {var $inheritedProperties = $class->inheritedProperties} 321 | {var $usedProperties = $class->usedProperties} 322 | {var $ownMagicProperties = $class->ownMagicProperties} 323 | {var $inheritedMagicProperties = $class->inheritedMagicProperties} 324 | {var $usedMagicProperties = $class->usedMagicProperties} 325 | 326 | {if $ownProperties || $inheritedProperties || $usedProperties || $ownMagicProperties || $inheritedMagicProperties || $usedMagicProperties} 327 | {define property} 328 |
329 | 330 | 331 | 332 | {if $property->protected}protected{elseif $property->private}private{else}public{/if} {if $property->static}static{/if} {if $property->readOnly}read-only{elseif $property->writeOnly}write-only{/if} 333 | 334 | 335 | 336 | {if $class->internal} 337 | ${$property->name} 338 | {else} 339 | ${$property->name} 340 | {/if} 341 | 342 | 343 | {if $property->typeHint}: {$property->typeHint|typeLinks:$property|noescape}{/if} 344 | 345 | 346 |
347 | {$property|shortDescription:true|noescape} 348 |
349 | 350 |
351 | {$property|longDescription|noescape} 352 | 353 | {foreach $template->annotationSort($template->annotationFilter($property->annotations, array('var'))) as $annotation => $descriptions} 354 |

{$annotation|annotationBeautify}

355 |
356 | {foreach $descriptions as $description} 357 | {if $description} 358 | {$description|annotation:$annotation:$property|noescape}
359 | {/if} 360 | {/foreach} 361 |
362 | {/foreach} 363 |
364 | 365 |
{$property->defaultValueDefinition|highlightValue:$class|noescape}
366 |
367 | {/define} 368 | 369 |

Properties summary

370 |
371 | {foreach $ownProperties as $property} 372 | {include property, property => $property} 373 | {/foreach} 374 |
375 | 376 | {foreach $inheritedProperties as $parentName => $properties} 377 |

Properties inherited from {$parentName}

378 |

379 | {foreach $properties as $property} 380 | ${$property->name}{sep}, {/sep} 381 | {/foreach} 382 |

383 | {/foreach} 384 | 385 | {foreach $usedProperties as $traitName => $properties} 386 |

Properties used from {$traitName}

387 |

388 | {foreach $properties as $property} 389 | ${$property->name}{sep}, {/sep} 390 | {/foreach} 391 |

392 | {/foreach} 393 | 394 | {if $ownMagicProperties} 395 |

Magic properties

396 |
397 | {foreach $ownMagicProperties as $property} 398 | {include property, property => $property} 399 | {/foreach} 400 |
401 | {/if} 402 | 403 | {foreach $inheritedMagicProperties as $parentName => $properties} 404 |

Magic properties inherited from {$parentName}

405 |

406 | {foreach $properties as $property} 407 | ${$property->name}{sep}, {/sep} 408 | {/foreach} 409 |

410 | {/foreach} 411 | 412 | {foreach $usedMagicProperties as $traitName => $properties} 413 |

Magic properties used from {$traitName}

414 |

415 | {foreach $properties as $property} 416 | ${$property->name}{sep}, {/sep} 417 | {/foreach} 418 |

419 | {/foreach} 420 | {/if} 421 | 422 | {else} 423 |
424 |

425 | Documentation of this class could not be generated. 426 |

427 |

428 | Class was originally declared in {$class->fileName|relativePath} and is invalid because of: 429 |

430 | 433 |
434 | {/if} 435 |
436 | {/block} 437 | -------------------------------------------------------------------------------- /src/combined.js.latte: -------------------------------------------------------------------------------- 1 | {contentType javascript} 2 | 3 | var ApiGen = ApiGen || {}; 4 | ApiGen.config = {$config->template}; 5 | 6 | {var $scripts = ['jquery.min.js', 'jquery.cookie.js', 'jquery.sprintf.js', 'jquery.autocomplete.js', 'jquery.sortElements.js', 'main.js']} 7 | 8 | {foreach $scripts as $script} 9 | {file_get_contents("$basePath/js/$script")|noescape} 10 | {/foreach} 11 | -------------------------------------------------------------------------------- /src/config.neon: -------------------------------------------------------------------------------- 1 | name: "Twitter Bootstrap theme" 2 | -------------------------------------------------------------------------------- /src/constant.latte: -------------------------------------------------------------------------------- 1 | {layout '@layout.latte'} 2 | {var $active = 'constant'} 3 | 4 | {block title}{if $constant->deprecated}Deprecated {/if}Constant {$constant->name}{/block} 5 | 6 | {block content} 7 |
8 |

Constant {$constant->shortName}

9 | 10 | {if $constant->valid} 11 | 12 |
13 | {$constant|longDescription|noescape} 14 |
15 | 16 |
17 | {if $constant->inNamespace()}Namespace: {$constant->namespaceName|namespaceLinks|noescape}
{/if} 18 | {if $constant->inPackage()}Package: {$constant->packageName|packageLinks|noescape}
{/if} 19 | {foreach $template->annotationSort($template->annotationFilter($constant->annotations, array('var'))) as $annotation => $values} 20 | {foreach $values as $value} 21 | {$annotation|annotationBeautify}{if $value}:{/if} 22 | {$value|annotation:$annotation:$constant|noescape}
23 | {/foreach} 24 | {/foreach} 25 | Located at 26 | 27 | {$constant->fileName|relativePath} 28 |
29 |
30 | 31 | {var $annotations = $constant->annotations} 32 | 33 |

Value summary

34 | 35 | 36 | 37 | 41 | 42 |
{$constant->typeHint|typeLinks:$constant|noescape}{block|strip} 38 | {var $element = $template->resolveElement($constant->valueDefinition, $constant)} 39 | {if $element}{$constant->valueDefinition}{else}{$constant->valueDefinition|highlightValue:$constant|noescape}{/if} 40 | {/block}
43 | 44 | {else} 45 |
46 |

47 | Documentation of this constant could not be generated. 48 |

49 |

50 | Constant was originally declared in {$constant->fileName|relativePath} and is invalid because of: 51 |

52 | 55 |
56 | {/if} 57 |
58 | {/block} 59 | -------------------------------------------------------------------------------- /src/elementlist.js.latte: -------------------------------------------------------------------------------- 1 | {contentType javascript} 2 | 3 | var ApiGen = ApiGen || {}; 4 | ApiGen.elements = {$elements}; 5 | -------------------------------------------------------------------------------- /src/function.latte: -------------------------------------------------------------------------------- 1 | {layout '@layout.latte'} 2 | {var $active = 'function'} 3 | 4 | {block title}{if $function->deprecated}Deprecated {/if}Function {$function->name}{/block} 5 | 6 | {block content} 7 |
8 |

Function {$function->shortName}

9 | 10 | {if $function->valid} 11 | 12 |
13 | {$function|longDescription|noescape} 14 |
15 | 16 |
17 | {if $function->inNamespace()}Namespace: {$function->namespaceName|namespaceLinks|noescape}
{/if} 18 | {if $function->inPackage()}Package: {$function->packageName|packageLinks|noescape}
{/if} 19 | {foreach $template->annotationSort($template->annotationFilter($function->annotations, array('param', 'return', 'throws'))) as $annotation => $values} 20 | {foreach $values as $value} 21 | {$annotation|annotationBeautify}{if $value}:{/if} 22 | {$value|annotation:$annotation:$function|noescape}
23 | {/foreach} 24 | {/foreach} 25 | Located at 26 | 27 | {$function->fileName|relativePath} 28 |
29 |
30 | 31 | {var $annotations = $function->annotations} 32 | 33 | {if count($function->parameters)} 34 |

Parameters summary

35 | 36 | 37 | 38 | 41 | 42 | 43 |
{$parameter->typeHint|typeLinks:$function|noescape}{block|strip} 39 | {if $parameter->passedByReference}& {/if}${$parameter->name}{if $parameter->defaultValueAvailable} = {$parameter->defaultValueDefinition|highlightPHP:$function|noescape}{elseif $parameter->unlimited},…{/if} 40 | {/block}{$parameter->description|description:$function}
44 | {/if} 45 | 46 | {if isset($annotations['return']) && 'void' !== $annotations['return'][0]} 47 |

Return value summary

48 | 49 | 50 | 53 | 56 | 57 |
51 | {$annotations['return'][0]|typeLinks:$function|noescape} 52 | 54 | {$annotations['return'][0]|description:$function|noescape} 55 |
58 | {/if} 59 | 60 | {if isset($annotations['throws'])} 61 |

Thrown exceptions summary

62 | 63 | 64 | 67 | 70 | 71 |
65 | {$throws|typeLinks:$function|noescape} 66 | 68 | {$throws|description:$function|noescape} 69 |
72 | {/if} 73 | 74 | {else} 75 |
76 |

77 | Documentation of this function could not be generated. 78 |

79 |

80 | Function was originally declared in {$function->fileName|relativePath} and is invalid because of: 81 |

82 | 85 |
86 | {/if} 87 |
88 | {/block} 89 | -------------------------------------------------------------------------------- /src/js/jquery.autocomplete.js: -------------------------------------------------------------------------------- 1 | /* 2 | * jQuery Autocomplete plugin 1.2.3 3 | * 4 | * Copyright (c) 2009 Jörn Zaefferer 5 | * 6 | * Dual licensed under the MIT and GPL licenses: 7 | * http://www.opensource.org/licenses/mit-license.php 8 | * http://www.gnu.org/licenses/gpl.html 9 | * 10 | * With small modifications by Alfonso Gómez-Arzola. 11 | * See changelog for details. 12 | * 13 | */ 14 | 15 | ;(function($) { 16 | 17 | $.fn.extend({ 18 | autocomplete: function(urlOrData, options) { 19 | var isUrl = typeof urlOrData == "string"; 20 | options = $.extend({}, $.Autocompleter.defaults, { 21 | url: isUrl ? urlOrData : null, 22 | data: isUrl ? null : urlOrData, 23 | delay: isUrl ? $.Autocompleter.defaults.delay : 10, 24 | max: options && !options.scroll ? 10 : 150, 25 | noRecord: "No Records." 26 | }, options); 27 | 28 | // if highlight is set to false, replace it with a do-nothing function 29 | options.highlight = options.highlight || function(value) { return value; }; 30 | 31 | // if the formatMatch option is not specified, then use formatItem for backwards compatibility 32 | options.formatMatch = options.formatMatch || options.formatItem; 33 | 34 | return this.each(function() { 35 | new $.Autocompleter(this, options); 36 | }); 37 | }, 38 | result: function(handler) { 39 | return this.bind("result", handler); 40 | }, 41 | search: function(handler) { 42 | return this.trigger("search", [handler]); 43 | }, 44 | flushCache: function() { 45 | return this.trigger("flushCache"); 46 | }, 47 | setOptions: function(options){ 48 | return this.trigger("setOptions", [options]); 49 | }, 50 | unautocomplete: function() { 51 | return this.trigger("unautocomplete"); 52 | } 53 | }); 54 | 55 | $.Autocompleter = function(input, options) { 56 | 57 | var KEY = { 58 | UP: 38, 59 | DOWN: 40, 60 | DEL: 46, 61 | TAB: 9, 62 | RETURN: 13, 63 | ESC: 27, 64 | COMMA: 188, 65 | PAGEUP: 33, 66 | PAGEDOWN: 34, 67 | BACKSPACE: 8 68 | }; 69 | 70 | var globalFailure = null; 71 | if(options.failure != null && typeof options.failure == "function") { 72 | globalFailure = options.failure; 73 | } 74 | 75 | // Create $ object for input element 76 | var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass); 77 | 78 | var timeout; 79 | var previousValue = ""; 80 | var cache = $.Autocompleter.Cache(options); 81 | var hasFocus = 0; 82 | var lastKeyPressCode; 83 | var config = { 84 | mouseDownOnSelect: false 85 | }; 86 | var select = $.Autocompleter.Select(options, input, selectCurrent, config); 87 | 88 | var blockSubmit; 89 | 90 | // prevent form submit in opera when selecting with return key 91 | navigator.userAgent.indexOf("Opera") != -1 && $(input.form).bind("submit.autocomplete", function() { 92 | if (blockSubmit) { 93 | blockSubmit = false; 94 | return false; 95 | } 96 | }); 97 | 98 | // older versions of opera don't trigger keydown multiple times while pressed, others don't work with keypress at all 99 | $input.bind((navigator.userAgent.indexOf("Opera") != -1 && !'KeyboardEvent' in window ? "keypress" : "keydown") + ".autocomplete", function(event) { 100 | // a keypress means the input has focus 101 | // avoids issue where input had focus before the autocomplete was applied 102 | hasFocus = 1; 103 | // track last key pressed 104 | lastKeyPressCode = event.keyCode; 105 | switch(event.keyCode) { 106 | 107 | case KEY.UP: 108 | if ( select.visible() ) { 109 | event.preventDefault(); 110 | select.prev(); 111 | } else { 112 | onChange(0, true); 113 | } 114 | break; 115 | 116 | case KEY.DOWN: 117 | if ( select.visible() ) { 118 | event.preventDefault(); 119 | select.next(); 120 | } else { 121 | onChange(0, true); 122 | } 123 | break; 124 | 125 | case KEY.PAGEUP: 126 | if ( select.visible() ) { 127 | event.preventDefault(); 128 | select.pageUp(); 129 | } else { 130 | onChange(0, true); 131 | } 132 | break; 133 | 134 | case KEY.PAGEDOWN: 135 | if ( select.visible() ) { 136 | event.preventDefault(); 137 | select.pageDown(); 138 | } else { 139 | onChange(0, true); 140 | } 141 | break; 142 | 143 | // matches also semicolon 144 | case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA: 145 | case KEY.TAB: 146 | case KEY.RETURN: 147 | if( selectCurrent() ) { 148 | // stop default to prevent a form submit, Opera needs special handling 149 | event.preventDefault(); 150 | blockSubmit = true; 151 | return false; 152 | } 153 | break; 154 | 155 | case KEY.ESC: 156 | select.hide(); 157 | break; 158 | 159 | default: 160 | clearTimeout(timeout); 161 | timeout = setTimeout(onChange, options.delay); 162 | break; 163 | } 164 | }).focus(function(){ 165 | // track whether the field has focus, we shouldn't process any 166 | // results if the field no longer has focus 167 | hasFocus++; 168 | }).blur(function() { 169 | hasFocus = 0; 170 | if (!config.mouseDownOnSelect) { 171 | hideResults(); 172 | } 173 | }).click(function() { 174 | // show select when clicking in a focused field 175 | // but if clickFire is true, don't require field 176 | // to be focused to begin with; just show select 177 | if( options.clickFire ) { 178 | if ( !select.visible() ) { 179 | onChange(0, true); 180 | } 181 | } else { 182 | if ( hasFocus++ > 1 && !select.visible() ) { 183 | onChange(0, true); 184 | } 185 | } 186 | }).bind("search", function() { 187 | var fn = (arguments.length > 1) ? arguments[1] : null; 188 | function findValueCallback(q, data) { 189 | var result; 190 | if( data && data.length ) { 191 | for (var i=0; i < data.length; i++) { 192 | if( data[i].result.toLowerCase() == q.toLowerCase() ) { 193 | result = data[i]; 194 | break; 195 | } 196 | } 197 | } 198 | if( typeof fn == "function" ) fn(result); 199 | else $input.trigger("result", result && [result.data, result.value]); 200 | } 201 | $.each(trimWords($input.val()), function(i, value) { 202 | request(value, findValueCallback, findValueCallback); 203 | }); 204 | }).bind("flushCache", function() { 205 | cache.flush(); 206 | }).bind("setOptions", function() { 207 | $.extend(true, options, arguments[1]); 208 | // if we've updated the data, repopulate 209 | if ( "data" in arguments[1] ) 210 | cache.populate(); 211 | }).bind("unautocomplete", function() { 212 | select.unbind(); 213 | $input.unbind(); 214 | $(input.form).unbind(".autocomplete"); 215 | }); 216 | 217 | 218 | function selectCurrent() { 219 | var selected = select.selected(); 220 | if( !selected ) 221 | return false; 222 | 223 | var v = selected.result; 224 | previousValue = v; 225 | 226 | if ( options.multiple ) { 227 | var words = trimWords($input.val()); 228 | if ( words.length > 1 ) { 229 | var seperator = options.multipleSeparator.length; 230 | var cursorAt = $(input).selection().start; 231 | var wordAt, progress = 0; 232 | $.each(words, function(i, word) { 233 | progress += word.length; 234 | if (cursorAt <= progress) { 235 | wordAt = i; 236 | return false; 237 | } 238 | progress += seperator; 239 | }); 240 | words[wordAt] = v; 241 | //$.Autocompleter.Selection(input, progress + seperator, progress + seperator); 242 | v = words.join( options.multipleSeparator ); 243 | } 244 | v += options.multipleSeparator; 245 | } 246 | 247 | $input.val(v); 248 | hideResultsNow(); 249 | $input.trigger("result", [selected.data, selected.value]); 250 | return true; 251 | } 252 | 253 | function onChange(crap, skipPrevCheck) { 254 | if( lastKeyPressCode == KEY.DEL ) { 255 | select.hide(); 256 | return; 257 | } 258 | 259 | var currentValue = $input.val(); 260 | 261 | if ( !skipPrevCheck && currentValue == previousValue ) 262 | return; 263 | 264 | previousValue = currentValue; 265 | 266 | currentValue = lastWord(currentValue); 267 | if ( currentValue.length >= options.minChars) { 268 | $input.addClass(options.loadingClass); 269 | if (!options.matchCase) 270 | currentValue = currentValue.toLowerCase(); 271 | request(currentValue, receiveData, hideResultsNow); 272 | } else { 273 | stopLoading(); 274 | select.hide(); 275 | } 276 | }; 277 | 278 | function trimWords(value) { 279 | if (!value) 280 | return [""]; 281 | if (!options.multiple) 282 | return [$.trim(value)]; 283 | return $.map(value.split(options.multipleSeparator), function(word) { 284 | return $.trim(value).length ? $.trim(word) : null; 285 | }); 286 | } 287 | 288 | function lastWord(value) { 289 | if ( !options.multiple ) 290 | return value; 291 | var words = trimWords(value); 292 | if (words.length == 1) 293 | return words[0]; 294 | var cursorAt = $(input).selection().start; 295 | if (cursorAt == value.length) { 296 | words = trimWords(value) 297 | } else { 298 | words = trimWords(value.replace(value.substring(cursorAt), "")); 299 | } 300 | return words[words.length - 1]; 301 | } 302 | 303 | // fills in the input box w/the first match (assumed to be the best match) 304 | // q: the term entered 305 | // sValue: the first matching result 306 | function autoFill(q, sValue){ 307 | // autofill in the complete box w/the first match as long as the user hasn't entered in more data 308 | // if the last user key pressed was backspace, don't autofill 309 | if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) { 310 | // fill in the value (keep the case the user has typed) 311 | $input.val($input.val() + sValue.substring(lastWord(previousValue).length)); 312 | // select the portion of the value not typed by the user (so the next character will erase) 313 | $(input).selection(previousValue.length, previousValue.length + sValue.length); 314 | } 315 | }; 316 | 317 | function hideResults() { 318 | clearTimeout(timeout); 319 | timeout = setTimeout(hideResultsNow, 200); 320 | }; 321 | 322 | function hideResultsNow() { 323 | var wasVisible = select.visible(); 324 | select.hide(); 325 | clearTimeout(timeout); 326 | stopLoading(); 327 | if (options.mustMatch) { 328 | // call search and run callback 329 | $input.search( 330 | function (result){ 331 | // if no value found, clear the input box 332 | if( !result ) { 333 | if (options.multiple) { 334 | var words = trimWords($input.val()).slice(0, -1); 335 | $input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") ); 336 | } 337 | else { 338 | $input.val( "" ); 339 | $input.trigger("result", null); 340 | } 341 | } 342 | } 343 | ); 344 | } 345 | }; 346 | 347 | function receiveData(q, data) { 348 | if ( data && data.length && hasFocus ) { 349 | stopLoading(); 350 | select.display(data, q); 351 | autoFill(q, data[0].value); 352 | select.show(); 353 | } else { 354 | hideResultsNow(); 355 | } 356 | }; 357 | 358 | function request(term, success, failure) { 359 | if (!options.matchCase) 360 | term = term.toLowerCase(); 361 | var data = cache.load(term); 362 | // recieve the cached data 363 | if (data) { 364 | if(data.length) { 365 | success(term, data); 366 | } 367 | else{ 368 | var parsed = options.parse && options.parse(options.noRecord) || parse(options.noRecord); 369 | success(term,parsed); 370 | } 371 | // if an AJAX url has been supplied, try loading the data now 372 | } else if( (typeof options.url == "string") && (options.url.length > 0) ){ 373 | 374 | var extraParams = { 375 | timestamp: +new Date() 376 | }; 377 | $.each(options.extraParams, function(key, param) { 378 | extraParams[key] = typeof param == "function" ? param() : param; 379 | }); 380 | 381 | $.ajax({ 382 | // try to leverage ajaxQueue plugin to abort previous requests 383 | mode: "abort", 384 | // limit abortion to this input 385 | port: "autocomplete" + input.name, 386 | dataType: options.dataType, 387 | url: options.url, 388 | data: $.extend({ 389 | q: lastWord(term), 390 | limit: options.max 391 | }, extraParams), 392 | success: function(data) { 393 | var parsed = options.parse && options.parse(data) || parse(data); 394 | cache.add(term, parsed); 395 | success(term, parsed); 396 | } 397 | }); 398 | } else { 399 | // if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match 400 | select.emptyList(); 401 | if(globalFailure != null) { 402 | globalFailure(); 403 | } 404 | else { 405 | failure(term); 406 | } 407 | } 408 | }; 409 | 410 | function parse(data) { 411 | var parsed = []; 412 | var rows = data.split("\n"); 413 | for (var i=0; i < rows.length; i++) { 414 | var row = $.trim(rows[i]); 415 | if (row) { 416 | row = row.split("|"); 417 | parsed[parsed.length] = { 418 | data: row, 419 | value: row[0], 420 | result: options.formatResult && options.formatResult(row, row[0]) || row[0] 421 | }; 422 | } 423 | } 424 | return parsed; 425 | }; 426 | 427 | function stopLoading() { 428 | $input.removeClass(options.loadingClass); 429 | }; 430 | 431 | }; 432 | 433 | $.Autocompleter.defaults = { 434 | inputClass: "ac_input", 435 | resultsClass: "search-suggestion", 436 | loadingClass: "ac_loading", 437 | minChars: 1, 438 | delay: 400, 439 | matchCase: false, 440 | matchSubset: true, 441 | matchContains: false, 442 | cacheLength: 100, 443 | max: 1000, 444 | mustMatch: false, 445 | extraParams: {}, 446 | selectFirst: true, 447 | formatItem: function(row) { return row[0]; }, 448 | formatMatch: null, 449 | autoFill: false, 450 | width: 0, 451 | multiple: false, 452 | multipleSeparator: " ", 453 | inputFocus: true, 454 | clickFire: false, 455 | highlight: function(value, term) { 456 | return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "$1"); 457 | }, 458 | scroll: true, 459 | scrollHeight: 180, 460 | scrollJumpPosition: true 461 | }; 462 | 463 | $.Autocompleter.Cache = function(options) { 464 | 465 | var data = {}; 466 | var length = 0; 467 | 468 | function matchSubset(s, sub) { 469 | return (new RegExp(sub.toUpperCase().replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1").replace(/[A-Z0-9]/g, function(m, offset) { 470 | return offset === 0 ? '(?:' + m + '|^' + m.toLowerCase() + ')' : '(?:.*' + m + '|' + m.toLowerCase() + ')'; 471 | }))).test(s); // find by initials 472 | }; 473 | 474 | function add(q, value) { 475 | if (length > options.cacheLength){ 476 | flush(); 477 | } 478 | if (!data[q]){ 479 | length++; 480 | } 481 | data[q] = value; 482 | } 483 | 484 | function populate(){ 485 | if( !options.data ) return false; 486 | // track the matches 487 | var stMatchSets = {}, 488 | nullData = 0; 489 | 490 | // no url was specified, we need to adjust the cache length to make sure it fits the local data store 491 | if( !options.url ) options.cacheLength = 1; 492 | 493 | // track all options for minChars = 0 494 | stMatchSets[""] = []; 495 | 496 | // loop through the array and create a lookup structure 497 | for ( var i = 0, ol = options.data.length; i < ol; i++ ) { 498 | var rawValue = options.data[i]; 499 | // if rawValue is a string, make an array otherwise just reference the array 500 | rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue; 501 | 502 | var value = options.formatMatch(rawValue, i+1, options.data.length); 503 | if ( typeof(value) === 'undefined' || value === false ) 504 | continue; 505 | 506 | var firstChar = value.charAt(0).toLowerCase(); 507 | // if no lookup array for this character exists, look it up now 508 | if( !stMatchSets[firstChar] ) 509 | stMatchSets[firstChar] = []; 510 | 511 | // if the match is a string 512 | var row = { 513 | value: value, 514 | data: rawValue, 515 | result: options.formatResult && options.formatResult(rawValue) || value 516 | }; 517 | 518 | // push the current match into the set list 519 | stMatchSets[firstChar].push(row); 520 | 521 | // keep track of minChars zero items 522 | if ( nullData++ < options.max ) { 523 | stMatchSets[""].push(row); 524 | } 525 | }; 526 | 527 | // add the data items to the cache 528 | $.each(stMatchSets, function(i, value) { 529 | // increase the cache size 530 | options.cacheLength++; 531 | // add to the cache 532 | add(i, value); 533 | }); 534 | } 535 | 536 | // populate any existing data 537 | setTimeout(populate, 25); 538 | 539 | function flush(){ 540 | data = {}; 541 | length = 0; 542 | } 543 | 544 | return { 545 | flush: flush, 546 | add: add, 547 | populate: populate, 548 | load: function(q) { 549 | if (!options.cacheLength || !length) 550 | return null; 551 | /* 552 | * if dealing w/local data and matchContains than we must make sure 553 | * to loop through all the data collections looking for matches 554 | */ 555 | if( !options.url && options.matchContains ){ 556 | // track all matches 557 | var csub = []; 558 | // loop through all the data grids for matches 559 | for( var k in data ){ 560 | // don't search through the stMatchSets[""] (minChars: 0) cache 561 | // this prevents duplicates 562 | if( k.length > 0 ){ 563 | var c = data[k]; 564 | $.each(c, function(i, x) { 565 | // if we've got a match, add it to the array 566 | if (matchSubset(x.value, q)) { 567 | csub.push(x); 568 | } 569 | }); 570 | } 571 | } 572 | return csub; 573 | } else 574 | // if the exact item exists, use it 575 | if (data[q]){ 576 | return data[q]; 577 | } else 578 | if (options.matchSubset) { 579 | for (var i = q.length - 1; i >= options.minChars; i--) { 580 | var c = data[q.substr(0, i)]; 581 | if (c) { 582 | var csub = []; 583 | $.each(c, function(i, x) { 584 | if (matchSubset(x.value, q)) { 585 | csub[csub.length] = x; 586 | } 587 | }); 588 | return csub; 589 | } 590 | } 591 | } 592 | return null; 593 | } 594 | }; 595 | }; 596 | 597 | $.Autocompleter.Select = function (options, input, select, config) { 598 | var CLASSES = { 599 | ACTIVE: "search-suggestion-highlight" 600 | }; 601 | 602 | var listItems, 603 | active = -1, 604 | data, 605 | term = "", 606 | needsInit = true, 607 | element, 608 | list; 609 | 610 | // Create results 611 | function init() { 612 | if (!needsInit) 613 | return; 614 | element = $("
") 615 | .hide() 616 | .addClass(options.resultsClass) 617 | .appendTo(document.body) 618 | .hover(function(event) { 619 | // Browsers except FF do not fire mouseup event on scrollbars, resulting in mouseDownOnSelect remaining true, and results list not always hiding. 620 | if($(this).is(":visible")) { 621 | input.focus(); 622 | } 623 | config.mouseDownOnSelect = false; 624 | }); 625 | 626 | list = $("