Removed ApiGen files

This commit is contained in:
Claudio Sanches 2019-06-25 22:29:03 -03:00
parent 29d630b099
commit d6bd82865c
38 changed files with 0 additions and 3419 deletions

View File

@ -1,22 +0,0 @@
destination: wc-apidocs
templateConfig: apigen/theme-woocommerce/config.neon
extensions: [php]
source:
- woocommerce.php
- includes
exclude:
- includes/libraries/
- includes/api/legacy/
- api/legacy/
- libraries/
charset: [UTF-8]
main: WC
title: WooCommerce Code Reference
baseUrl: https://docs.woocommerce.com/wc-apidocs/
templateTheme: default
php: false
sourceCode: true
tree: true
deprecated: true
todo: true
download: false

View File

@ -1,226 +0,0 @@
<?php
/**
* Generate documentation for hooks in WC
*/
class WC_HookFinder {
private static $current_file = '';
private static $files_to_scan = array();
private static $pattern_custom_actions = '/do_action(.*?);/i';
private static $pattern_custom_filters = '/apply_filters(.*?);/i';
private static $found_files = array();
private static $custom_hooks_found = '';
private static function get_files( $pattern, $flags = 0, $path = '' ) {
if ( ! $path && ( $dir = dirname( $pattern ) ) != '.' ) {
if ( '\\' == $dir || '/' == $dir ) {
$dir = '';
}
return self::get_files( basename( $pattern ), $flags, $dir . '/' );
} // End IF Statement
$paths = glob( $path . '*', GLOB_ONLYDIR | GLOB_NOSORT );
$files = glob( $path . $pattern, $flags );
if ( is_array( $paths ) ) {
foreach ( $paths as $p ) {
$found_files = array();
$retrieved_files = (array) self::get_files( $pattern, $flags, $p . '/' );
foreach ( $retrieved_files as $file ) {
if ( ! in_array( $file, self::$found_files ) ) {
$found_files[] = $file;
}
}
self::$found_files = array_merge( self::$found_files, $found_files );
if ( is_array( $files ) && is_array( $found_files ) ) {
$files = array_merge( $files, $found_files );
}
} // End FOREACH Loop
}
return $files;
}
private static function get_hook_link( $hook, $details = array() ) {
if ( ! empty( $details['class'] ) ) {
$link = 'http://docs.woocommerce.com/wc-apidocs/source-class-' . $details['class'] . '.html#' . $details['line'];
} elseif ( ! empty( $details['function'] ) ) {
$link = 'http://docs.woocommerce.com/wc-apidocs/source-function-' . $details['function'] . '.html#' . $details['line'];
} else {
$link = 'https://github.com/woocommerce/woocommerce/search?utf8=%E2%9C%93&q=' . $hook;
}
return '<a href="' . $link . '">' . $hook . '</a>';
}
public static function process_hooks() {
self::$files_to_scan = array();
self::$files_to_scan['Template Files'] = self::get_files( '*.php', GLOB_MARK, '../templates/' );
self::$files_to_scan['Template Functions'] = array( '../includes/wc-template-functions.php', '../includes/wc-template-hooks.php' );
self::$files_to_scan['Shortcodes'] = self::get_files( '*.php', GLOB_MARK, '../includes/shortcodes/' );
self::$files_to_scan['Widgets'] = self::get_files( '*.php', GLOB_MARK, '../includes/widgets/' );
self::$files_to_scan['Data Stores'] = self::get_files( '*.php', GLOB_MARK, '../includes/data-stores' );
self::$files_to_scan['Core Classes'] = array_merge(
self::get_files( '*.php', GLOB_MARK, '../includes/' ),
self::get_files( '*.php', GLOB_MARK, '../includes/abstracts/' ),
self::get_files( '*.php', GLOB_MARK, '../includes/customizer/' ),
self::get_files( '*.php', GLOB_MARK, '../includes/emails/' ),
self::get_files( '*.php', GLOB_MARK, '../includes/export/' ),
self::get_files( '*.php', GLOB_MARK, '../includes/gateways/' ),
self::get_files( '*.php', GLOB_MARK, '../includes/import/' ),
self::get_files( '*.php', GLOB_MARK, '../includes/shipping/' )
);
self::$files_to_scan = array_filter( self::$files_to_scan );
$scanned = array();
ob_start();
$index = array();
foreach ( self::$files_to_scan as $heading => $files ) {
$index[] = '<a href="#hooks-' . str_replace( ' ', '-', strtolower( $heading ) ) . '">' . $heading . '</a>';
}
echo '<div id="content">';
echo '<h1>Action and Filter Hook Reference</h1>';
echo '<div class="description">
<p>This is simply a list of action and filter hooks found within WooCommerce files. View the source to see supported params and usage.</p>
<p>' . implode( ', ', $index ) . '</p>
</div>';
foreach ( self::$files_to_scan as $heading => $files ) {
self::$custom_hooks_found = array();
foreach ( $files as $f ) {
self::$current_file = basename( $f );
$tokens = token_get_all( file_get_contents( $f ) );
$token_type = false;
$current_class = '';
$current_function = '';
if ( in_array( self::$current_file, $scanned ) ) {
continue;
}
$scanned[] = self::$current_file;
foreach ( $tokens as $index => $token ) {
if ( is_array( $token ) ) {
$trimmed_token_1 = trim( $token[1] );
if ( T_CLASS == $token[0] ) {
$token_type = 'class';
} elseif ( T_FUNCTION == $token[0] ) {
$token_type = 'function';
} elseif ( 'do_action' === $token[1] ) {
$token_type = 'action';
} elseif ( 'apply_filters' === $token[1] ) {
$token_type = 'filter';
} elseif ( $token_type && ! empty( $trimmed_token_1 ) ) {
switch ( $token_type ) {
case 'class' :
$current_class = $token[1];
break;
case 'function' :
$current_function = $token[1];
break;
case 'filter' :
case 'action' :
$hook = trim( $token[1], "'" );
$hook = str_replace( '_FUNCTION_', strtoupper( $current_function ), $hook );
$hook = str_replace( '_CLASS_', strtoupper( $current_class ), $hook );
$hook = str_replace( '$this', strtoupper( $current_class ), $hook );
$hook = str_replace( array( '.', '{', '}', '"', "'", ' ', ')', '(' ), '', $hook );
$loop = 0;
// Keep adding to hook until we find a comma or colon
while ( 1 ) {
$loop ++;
$prev_hook = is_string( $tokens[ $index + $loop - 1 ] ) ? $tokens[ $index + $loop - 1 ] : $tokens[ $index + $loop - 1 ][1];
$next_hook = is_string( $tokens[ $index + $loop ] ) ? $tokens[ $index + $loop ] : $tokens[ $index + $loop ][1];
if ( in_array( $next_hook, array( '.', '{', '}', '"', "'", ' ', ')', '(' ) ) ) {
continue;
}
if ( in_array( $next_hook, array( ',', ';' ) ) ) {
break;
}
$hook_first = substr( $next_hook, 0, 1 );
$hook_last = substr( $next_hook, -1, 1 );
if ( '{' === $hook_first || '}' === $hook_last || '$' === $hook_first || ')' === $hook_last || '>' === substr( $prev_hook, -1, 1 ) ) {
$next_hook = strtoupper( $next_hook );
}
$next_hook = str_replace( array( '.', '{', '}', '"', "'", ' ', ')', '(' ), '', $next_hook );
$hook .= $next_hook;
}
if ( isset( self::$custom_hooks_found[ $hook ] ) ) {
self::$custom_hooks_found[ $hook ]['file'][] = self::$current_file;
} else {
self::$custom_hooks_found[ $hook ] = array(
'line' => $token[2],
'class' => $current_class,
'function' => $current_function,
'file' => array( self::$current_file ),
'type' => $token_type,
);
}
break;
}
$token_type = false;
}
}
}
}
foreach ( self::$custom_hooks_found as $hook => $details ) {
if ( ! strstr( $hook, 'woocommerce' ) && ! strstr( $hook, 'product' ) && ! strstr( $hook, 'wc_' ) ) {
//unset( self::$custom_hooks_found[ $hook ] );
}
}
ksort( self::$custom_hooks_found );
if ( ! empty( self::$custom_hooks_found ) ) {
echo '<div class="panel panel-default"><div class="panel-heading"><h2 id="hooks-' . str_replace( ' ', '-', strtolower( $heading ) ) . '">' . $heading . '</h2></div>';
echo '<table class="summary table table-bordered table-striped"><thead><tr><th>Hook</th><th>Type</th><th>File(s)</th></tr></thead><tbody>';
foreach ( self::$custom_hooks_found as $hook => $details ) {
echo '<tr>
<td>' . self::get_hook_link( $hook, $details ) . '</td>
<td>' . $details['type'] . '</td>
<td>' . implode( ', ', array_unique( $details['file'] ) ) . '</td>
</tr>' . "\n";
}
echo '</tbody></table></div>';
}
}
echo '</div><div id="footer">';
$html = file_get_contents( '../wc-apidocs/tree.html' );
$header = explode( '<div id="content">', $html );
$header = str_replace( '<li class="active">', '<li>', current( $header ) );
$header = str_replace( '<li class="hooks">', '<li class="active">', $header );
$header = str_replace( 'Tree | ', 'Hook Reference | ', $header );
$footer = explode( '<div id="footer">', $html );
file_put_contents( '../wc-apidocs/hook-docs.html', $header . ob_get_clean() . end( $footer ) );
echo "Hook docs generated :)\n";
}
}
WC_HookFinder::process_hooks();

View File

@ -1,13 +0,0 @@
{layout '@layout.latte'}
{var $robots = false}
{block title}Page not found{/block}
{block content}
<div id="content">
<h1>{include title}</h1>
<p>The requested page could not be found.</p>
<p>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.</p>
<p>To continue please try to find requested page in the menu,{if $config->tree} take a look at <a href="tree.html">the tree view</a> of the whole project{/if} or use search field on the top.</p>
</div>
{/block}

View File

@ -1,60 +0,0 @@
{define elements}
<tr n:foreach="$elements as $element">
<td class="name"><a href="{$element|elementUrl}" n:class="$element->deprecated ? deprecated, !$element->valid ? invalid">{if $namespace}{$element->shortName}{else}{$element->name}{/if}</a></td>
<td>{$element|shortDescription|noescape}</td>
</tr>
{/define}
{if $classes}
<div class="panel panel-default">
<div class="panel-heading"><h2>Classes summary</h2></div>
<table class="summary table table-bordered table-striped" id="classes">
{include elements, elements => $classes}
</table>
</div>
{/if}
{if $interfaces}
<div class="panel panel-default">
<div class="panel-heading"><h2>Interfaces summary</h2></div>
<table class="summary table table-bordered table-striped" id="interfaces">
{include elements, elements => $interfaces}
</table>
</div>
{/if}
{if $traits}
<div class="panel panel-default">
<div class="panel-heading"><h2>Traits summary</h2></div>
<table class="summary table table-bordered table-striped" id="traits">
{include elements, elements => $traits}
</table>
</div>
{/if}
{if $exceptions}
<div class="panel panel-default">
<div class="panel-heading"><h2>Exceptions summary</h2></div>
<table class="summary table table-bordered table-striped" id="exceptions">
{include elements, elements => $exceptions}
</table>
</div>
{/if}
{if $constants}
<div class="panel panel-default">
<div class="panel-heading"><h2>Constants summary</h2></div>
<table class="summary table table-bordered table-striped" id="constants">
{include elements, elements => $constants}
</table>
</div>
{/if}
{if $functions}
<div class="panel panel-default">
<div class="panel-heading"><h2>Functions summary</h2></div>
<table class="summary table table-bordered table-striped" id="functions">
{include elements, elements => $functions}
</table>
</div>
{/if}

View File

@ -1,185 +0,0 @@
{default $robots = true}
{default $active = ''}
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="robots" content="noindex" n:if="!$robots">
<title>{include title}{if 'overview' !== $active && $config->title} | {$config->title}{/if}</title>
<link rel="stylesheet" href="{='resources/bootstrap.min.css'|staticFile}">
<link rel="stylesheet" href="{='resources/style.css'|staticFile}">
<link n:if="$config->googleCseId" rel="search" type="application/opensearchdescription+xml" title="{$config->title}" href="{$config->baseUrl}/opensearch.xml">
<script n:if="$config->googleAnalytics">
var _gaq = _gaq || [];
_gaq.push(['_setAccount', {$config->googleAnalytics}]);
_gaq.push(['_trackPageview']);
(function() {
var ga = document.createElement('script'); ga.type = 'text/javascript'; ga.async = true;
ga.src = ('https:' == document.location.protocol ? 'https://ssl' : 'http://www') + '.google-analytics.com/ga.js';
var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(ga, s);
})();
</script>
</head>
<body>
<nav id="navigation" class="navbar navbar-default navbar-fixed-top">
<div class="container-fluid">
<div class="navbar-header">
<a href="index.html" class="navbar-brand">{if $config->title}{$config->title}{else}Overview{/if}</a>
</div>
<div class="collapse navbar-collapse">
<form{if $config->googleCseId} action="http://www.google.com/cse"{/if} id="search" class="navbar-form navbar-left" role="search">
<input type="hidden" name="cx" value="{$config->googleCseId}">
<input type="hidden" name="ie" value="UTF-8">
<div class="form-group">
<input type="text" name="q" class="search-query form-control" placeholder="Search"{if 'overview' === $active} autofocus{/if}>
</div>
</form>
<ul class="nav navbar-nav">
<li n:class="'package' === $active ? active" n:if="$packages">
<a n:tag-if="'package' !== $active && $package" href="{$package|packageUrl}" title="Summary of {$package}"><span>Package</span></a>
</li>
<li n:class="'namespace' === $active ? active" n:if="$namespaces">
<a n:tag-if="'namespace' !== $active && $namespace" href="{$namespace|namespaceUrl}" title="Summary of {$namespace}"><span>Namespace</span></a>
</li>
<li n:class="'class' === $active ? active" n:if="!$function && !$constant">
<a n:tag-if="'class' !== $active && $class" href="{$class|classUrl}" title="Summary of {$class->name}"><span>Class</span></a>
</li>
<li n:class="'function' === $active ? active" n:if="$function">
<a n:tag-if="'function' !== $active" href="{$function|functionUrl}" title="Summary of {$function->name}"><span>Function</span></a>
</li>
<li n:class="'constant' === $active ? active" n:if="$constant">
<a n:tag-if="'constant' !== $active" href="{$constant|constantUrl}" title="Summary of {$constant->name}"><span>Constant</span></a>
</li>
<li class="divider-vertical" n:if="$config->tree || $config->deprecated || $config->todo"></li>
<li n:class="'tree' === $active ? active" n:if="$config->tree">
<a n:tag-if="'tree' !== $active" href="tree.html" title="Tree view of classes, interfaces, traits and exceptions"><span>Tree</span></a>
</li>
{foreach $annotationGroups as $annotation}
<li n:class="$active === 'annotation-group-' . $annotation ? active">
<a n:tag-if="$active !== 'annotation-group-' . $annotation" href="annotation-group-{$annotation}.html" title="List of elements with {$annotation} annotation">
<span>{$annotation|firstUpper}</span>
</a>
</li>
{/foreach}
<li class="divider-vertical"></li>
<li class="hooks">
<a href="hook-docs.html" title="Hooks"><span>Hook Reference</span></a>
</li>
<li class="woocommerce-com-docs">
<a href="https://docs.woocommerce.com/"><span>WooCommerce Docs</span></a>
</li>
<li class="api">
<a href="https://woocommerce.github.io/woocommerce-rest-api-docs/"><span>REST API Docs</span></a>
</li>
<li class="divider-vertical" n:if="$config->download"></li>
<li n:if="$config->download">
<a href="{$archive}" title="Download documentation as ZIP archive"><span>Download</span></a>
</li>
</ul>
</div>
</div>
</nav>
<div id="left">
<div id="menu">
{define group}
<ul>
{foreach $groups as $group}
{var $nextLevel = substr_count($iterator->nextValue, '\\') > substr_count($group, '\\')}
<li n:class="$actualGroup === $group || 0 === strpos($actualGroup, $group . '\\') ? active, $config->main && 0 === strpos($group, $config->main) ? main">
<a href="{if $groupBy === 'package'}{$group|packageUrl}{else}{$group|namespaceUrl}{/if}">
{$group|subgroupName}<span n:tag-if="$nextLevel"></span>
</a>
{if $nextLevel}
<ul>
{else}
</li>
{if substr_count($iterator->nextValue, '\\') < substr_count($group, '\\')}
{='</ul></li>'|repeat:substr_count($group, '\\') - substr_count($iterator->nextValue, '\\')|noescape}
{/if}
{/if}
{/foreach}
</ul>
{/define}
<div id="groups">
{if $namespaces}
<h3>Namespaces</h3>
{include group, groups => $namespaces, actualGroup => $namespace, groupBy => 'namespace'}
{elseif $packages}
<h3>Packages</h3>
{include group, groups => $packages, actualGroup => $package, groupBy => 'package'}
{/if}
</div>
{define elements}
<ul>
<li n:foreach="$elements as $element" n:class="$activeElement === $element ? active"><a n:class="$element->deprecated ? deprecated, !$element->valid ? invalid" href="{$element|elementUrl}">{if $namespace}{$element->shortName}{else}{$element->name}{/if}</a></li>
</ul>
{/define}
<div id="elements">
{if $classes}
<h3>Classes</h3>
{include elements, elements => $classes, activeElement => $class}
{/if}
{if $interfaces}
<h3>Interfaces</h3>
{include elements, elements => $interfaces, activeElement => $class}
{/if}
{if $traits}
<h3>Traits</h3>
{include elements, elements => $traits, activeElement => $class}
{/if}
{if $exceptions}
<h3>Exceptions</h3>
{include elements, elements => $exceptions, activeElement => $class}
{/if}
{if $constants}
<h3>Constants</h3>
{include elements, elements => $constants, activeElement => $constant}
{/if}
{if $functions}
<h3>Functions</h3>
{include elements, elements => $functions, activeElement => $function}
{/if}
</div>
</div>
</div>
<div id="splitter"></div>
<div id="right">
<div id="rightInner">
{include content}
</div>
<div id="footer">
{$config->title} API documentation generated by <a href="http://apigen.org">ApiGen</a>
</div>
</div>
<script src="{='resources/combined.js'|staticFile}"></script>
<script src="{='elementlist.js'|staticFile}"></script>
</body>
</html>

View File

@ -1,149 +0,0 @@
{layout '@layout.latte'}
{var $active = 'annotation-group-' . $annotation}
{block title}{$annotation|firstUpper}{/block}
{block content}
<div id="content">
<h1>{include title}</h1>
{if $hasElements}
{if $annotationClasses}
<div class="panel panel-default">
<div class="panel-heading"><h2>Classes summary</h2></div>
<table class="summary table table-bordered table-striped" id="classes">
{include classes, items => $annotationClasses}
</table>
</div>
{/if}
{if $annotationInterfaces}
<div class="panel panel-default">
<div class="panel-heading"><h2>Interfaces summary</h2></div>
<table class="summary table table-bordered table-striped" id="interfaces">
{include classes, items => $annotationInterfaces}
</table>
</div>
{/if}
{if $annotationTraits}
<div class="panel panel-default">
<div class="panel-heading"><h2>Traits summary</h2></div>
<table class="summary table table-bordered table-striped" id="traits">
{include classes, items => $annotationTraits}
</table>
</div>
{/if}
{if $annotationExceptions}
<div class="panel panel-default">
<div class="panel-heading"><h2>Exceptions summary</h2></div>
<table class="summary table table-bordered table-striped" id="exceptions">
{include classes, items => $annotationExceptions}
</table>
</div>
{/if}
{if $annotationMethods}
<div class="panel panel-default">
<div class="panel-heading"><h2>Methods summary</h2></div>
<table class="summary table table-bordered table-striped" id="methods">
<tr n:foreach="$annotationMethods as $method">
<td class="name"><a href="{$method->declaringClassName|classUrl}">{$method->declaringClassName}</a></td>
<td class="name"><code><a href="{$method|methodUrl}">{$method->name}()</a></code></td>
<td>
{if $method->hasAnnotation($annotation)}
{foreach $method->annotations[$annotation] as $description}
{if $description}
{$description|annotation:$annotation:$method|noescape}<br>
{/if}
{/foreach}
{/if}
</td>
</tr>
</table>
</div>
{/if}
{if $annotationConstants}
<div class="panel panel-default">
<div class="panel-heading"><h2>Constants summary</h2></div>
<table class="summary table table-bordered table-striped" id="constants">
<tr n:foreach="$annotationConstants as $constant">
{if $constant->declaringClassName}
<td class="name"><a href="{$constant->declaringClassName|classUrl}">{$constant->declaringClassName}</a></td>
<td class="name"><code><a href="{$constant|constantUrl}"><b>{$constant->name}</b></a></code></td>
{else}
<td class="name" n:if="$namespaces || $classes || $interfaces || $traits || $exceptions"><a n:if="$constant->namespaceName" href="{$constant->namespaceName|namespaceUrl}">{$constant->namespaceName}</a></td>
<td n:class="name"><code><a href="{$constant|constantUrl}"><b>{$constant->shortName}</b></a></code></td>
{/if}
<td>
{foreach $constant->annotations[$annotation] as $description}
{if $description}
{$description|annotation:$annotation:$constant|noescape}<br>
{/if}
{/foreach}
</td>
</tr>
</table>
</div>
{/if}
{if $annotationProperties}
<div class="panel panel-default">
<div class="panel-heading"><h2>Properties summary</h2></div>
<table class="summary table table-bordered table-striped" id="properties">
<tr n:foreach="$annotationProperties as $property">
<td class="name"><a href="{$property->declaringClassName|classUrl}">{$property->declaringClassName}</a></td>
<td class="name"><a href="{$property|propertyUrl}"><var>${$property->name}</var></a></td>
<td>
{foreach $property->annotations[$annotation] as $description}
{if $description}
{$description|annotation:$annotation:$property|noescape}<br>
{/if}
{/foreach}
</td>
</tr>
</table>
</div>
{/if}
{if $annotationFunctions}
<div class="panel panel-default">
<div class="panel-heading"><h2>Functions summary</h2></div>
<table class="summary table table-bordered table-striped" id="functions">
<tr n:foreach="$annotationFunctions as $function">
<td class="name" n:if="$namespaces"><a n:if="$function->namespaceName" href="{$function->namespaceName|namespaceUrl}">{$function->namespaceName}</a></td>
<td class="name"><code><a href="{$function|functionUrl}">{$function->shortName}</a></code></td>
<td>
{foreach $function->annotations[$annotation] as $description}
{if $description}
{$description|annotation:$annotation:$function|noescape}<br>
{/if}
{/foreach}
</td>
</tr>
</table>
</div>
{/if}
{else}
<p>No elements with <code>@{$annotation}</code> annotation found.</p>
{/if}
</div>
{/block}
{define classes}
<tr n:foreach="$items as $class">
<td class="name"><a href="{$class|classUrl}">{$class->name}</a></td>
<td>
{foreach $class->annotations[$annotation] as $description}
{if $description}
{$description|annotation:$annotation:$class|noescape}<br>
{/if}
{/foreach}
</td>
</tr>
{/define}

View File

@ -1,462 +0,0 @@
{layout '@layout.latte'}
{var $active = 'class'}
{block title}{if $class->deprecated}Deprecated {/if}{if $class->interface}Interface{elseif $class->trait}Trait{else}Class{/if} {$class->name}{/block}
{block content}
<div id="content" class="class">
<h1 n:class="$class->deprecated ? deprecated">{if $class->interface}Interface{elseif $class->trait}Trait{else}Class{/if} {$class->shortName}</h1>
{if $class->valid}
<div class="description" n:if="$template->longDescription($class)">
{$class|longDescription|noescape}
</div>
<dl class="tree well" n:if="$class->parentClass || $class->ownInterfaces || $class->ownTraits">
<dd n:foreach="$tree as $item" style="padding-left:{($iterator->counter - 1) * 30}px">
<img src="resources/inherit.png" alt="Extended by" n:if="$iterator->counter > 1">
{if $item->documented}
<a href="{$item|classUrl}" n:tag-if="!$iterator->last">{last}<b>{/last}<span n:class="$item->deprecated ? deprecated, !$item->valid ? invalid">{$item->name}</span>{last}</b>{/last}</a>
{else}{$item->name}{/if}
{var $itemOwnInterfaces = $item->ownInterfaces}
{if $itemOwnInterfaces} implements {foreach $itemOwnInterfaces as $interface}
<a href="{$interface|classUrl}" n:tag-if="$interface->documented"><span n:class="$interface->deprecated ? deprecated, !$interface->valid ? invalid">{$interface->name}</span></a>{sep}, {/sep}
{/foreach}{/if}
{var $itemOwnTraits = $item->ownTraits}
{if $itemOwnTraits} uses {foreach $itemOwnTraits as $trait}
{if is_string($trait)}
{$trait} (not available)
{else}
<a href="{$trait|classUrl}" n:tag-if="$trait->documented"><span n:class="$trait->deprecated ? deprecated, !$trait->valid ? invalid">{$trait->name}</span></a>{sep}, {/sep}
{/}
{/foreach}{/if}
</dd>
</dl>
{define children}
<p class="elementList">
{foreach $children as $child}
<code><a href="{$child|classUrl}" n:tag-if="$child->documented"><span n:tag-if="$child->deprecated" class="deprecated">{$child->name}</span></a></code>{sep}, {/sep}
{/foreach}
</p>
{/define}
<div n:if="$directSubClasses">
<h3>Direct known subclasses</h3>
{include children, children => $directSubClasses}
</div>
<div n:if="$indirectSubClasses">
<h3>Indirect known subclasses</h3>
{include children, children => $indirectSubClasses}
</div>
<div n:if="$directImplementers">
<h3>Direct known implementers</h3>
{include children, children => $directImplementers}
</div>
<div n:if="$indirectImplementers">
<h3>Indirect known implementers</h3>
{include children, children => $indirectImplementers}
</div>
<div n:if="$directUsers">
<h3>Direct Known Users</h3>
{include children, children => $directUsers}
</div>
<div n:if="$indirectUsers">
<h3>Indirect Known Users</h3>
{include children, children => $indirectUsers}
</div>
<div class="alert alert-info">
{if !$class->interface && !$class->trait && ($class->abstract || $class->final)}<b>{if $class->abstract}Abstract{else}Final{/if}</b><br>{/if}
{if $class->internal}<b>PHP Extension:</b> <a href="{$class->extension|manualUrl}" title="Go to PHP documentation">{$class->extension->name|firstUpper}</a><br>{/if}
{if $class->inNamespace()}<b>Namespace:</b> {$class->namespaceName|namespaceLinks|noescape}<br>{/if}
{if $class->inPackage()}<b>Package:</b> {$class->packageName|packageLinks|noescape}<br>{/if}
{foreach $template->annotationSort($template->annotationFilter($class->annotations)) as $annotation => $values}
{foreach $values as $value}
<b>{$annotation|annotationBeautify}{if $value}:{/if}</b>
{$value|annotation:$annotation:$class|noescape}<br>
{/foreach}
{/foreach}
{if $class->internal}
<b>Documented at</b> <a href="{$class|manualUrl}" title="Go to PHP documentation">php.net</a>
{else}
<b>Located at</b> <a n:tag-if="$config->sourceCode" href="{$class|sourceUrl}" title="Go to source code">{$class->fileName|relativePath}</a>
{/if}
<br>
</div>
{var $ownMethods = $class->ownMethods}
{var $inheritedMethods = $class->inheritedMethods}
{var $usedMethods = $class->usedMethods}
{var $ownMagicMethods = $class->ownMagicMethods}
{var $inheritedMagicMethods = $class->inheritedMagicMethods}
{var $usedMagicMethods = $class->usedMagicMethods}
{if $ownMethods || $inheritedMethods || $usedMethods || $ownMagicMethods || $usedMagicMethods}
{define method}
<tr data-order="{$method->name}" id="{if $method->magic}m{/if}_{$method->name}">
{var $annotations = $method->annotations}
<td class="attributes"><code>
{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}
{ifset $annotations['return']}{$annotations['return'][0]|typeLinks:$method|noescape}{/ifset}
{if $method->returnsReference()}&amp;{/if}
</code>
</td>
<td class="name"><div>
<a class="anchor" href="#{if $method->magic}m{/if}_{$method->name}">#</a>
<code n:class="$method->deprecated ? deprecated">{block|strip}
{if $class->internal}
<a href="{$method|manualUrl}" title="Go to PHP documentation">{$method->name}</a>(
{else}
<a n:tag-if="$config->sourceCode" href="{$method|sourceUrl}" title="Go to source code">{$method->name}</a>(
{/if}
{foreach $method->parameters as $parameter}
<span>{$parameter->typeHint|typeLinks:$method|noescape}
<var>{if $parameter->passedByReference}&amp; {/if}${$parameter->name}</var>{if $parameter->defaultValueAvailable} = {$parameter->defaultValueDefinition|highlightPHP:$class|noescape}{elseif $parameter->unlimited},…{/if}</span>{sep}, {/sep}
{/foreach}
){/block}</code>
{if $config->template['options']['elementDetailsCollapsed']}
<div class="description short">
{$method|shortDescription:true|noescape}
</div>
{/if}
<div n:class="description, detailed, $config->template['options']['elementDetailsCollapsed'] ? hidden">
{$method|longDescription|noescape}
{if !$class->deprecated && $method->deprecated}
<h4>Deprecated</h4>
{ifset $annotations['deprecated']}
<div class="list">
{foreach $annotations['deprecated'] as $description}
{if $description}
{$description|annotation:'deprecated':$method|noescape}<br>
{/if}
{/foreach}
</div>
{/ifset}
{/if}
{if $method->parameters && isset($annotations['param'])}
<h4>Parameters</h4>
<div class="list"><dl>
{foreach $method->parameters as $parameter}
<dt><var>${$parameter->name}</var>{if $parameter->unlimited},…{/if}</dt>
<dd>{$parameter->description|description:$method|noescape}</dd>
{/foreach}
</dl></div>
{/if}
{if isset($annotations['return']) && 'void' !== $annotations['return'][0]}
<h4>Returns</h4>
<div class="list">
{foreach $annotations['return'] as $description}
{$description|annotation:'return':$method|noescape}{sep}<br>{/}
{/foreach}
</div>
{/if}
{ifset $annotations['throws']}
<h4>Throws</h4>
<div class="list">
{foreach $annotations['throws'] as $description}
{$description|annotation:'throws':$method|noescape}{sep}<br>{/}
{/foreach}
</div>
{/ifset}
{foreach $template->annotationSort($template->annotationFilter($annotations, array('deprecated', 'param', 'return', 'throws'))) as $annotation => $descriptions}
<h4>{$annotation|annotationBeautify}</h4>
<div class="list">
{foreach $descriptions as $description}
{if $description}
{$description|annotation:$annotation:$method|noescape}<br>
{/if}
{/foreach}
</div>
{/foreach}
{var $overriddenMethod = $method->overriddenMethod}
{if $overriddenMethod}
<h4>Overrides</h4>
<div class="list"><code><a n:tag-if="$template->getClass($overriddenMethod->declaringClassName)" href="{$overriddenMethod|methodUrl}">{$overriddenMethod->declaringClassName}::{$overriddenMethod->name}</a></code></div>
{/if}
{var $implementedMethod = $method->implementedMethod}
{if $implementedMethod}
<h4>Implementation of</h4>
<div class="list"><code><a n:tag-if="$template->getClass($implementedMethod->declaringClassName)" href="{$implementedMethod|methodUrl}">{$implementedMethod->prettyName}</a></code></div>
{/if}
</div>
</div></td>
</tr>
{/define}
<div class="panel panel-default">
<div class="panel-heading"><h2>Methods summary</h2></div>
<table class="summary table table-bordered table-striped methods" id="methods" n:if="$ownMethods">
{foreach $ownMethods as $method}
{include method, method => $method}
{/foreach}
</table>
</div>
{foreach $inheritedMethods as $parentName => $methods}
<div class="panel panel-default">
<div class="panel-heading"><h3>Methods inherited from <a href="{$parentName|classUrl}#methods" n:tag-if="$template->getClass($parentName)">{$parentName}</a></h3></div>
<p class="elementList">
{foreach $methods as $method}
<code><a href="{$method|methodUrl}" n:tag-if="$template->getClass($parentName)"><span n:tag-if="$method->deprecated" class="deprecated">{$method->name}()</span></a></code>{sep}, {/sep}
{/foreach}
</p>
</div>
{/foreach}
{foreach $usedMethods as $traitName => $methods}
<div class="panel panel-default">
<div class="panel-heading"><h3>Methods used from <a href="{$traitName|classUrl}#methods" n:tag-if="$template->getClass($traitName)">{$traitName}</a></h3></div>
<p class="elementList">
{foreach $methods as $data}
<code><a href="{$data['method']|methodUrl:$data['method']->declaringTrait}" n:tag-if="$template->getClass($traitName)"><span n:tag-if="$data['method']->deprecated" class="deprecated">{$data['method']->name}()</span></a>{if $data['aliases']}(as {foreach $data['aliases'] as $alias}<span n:tag-if="$data['method']->deprecated" class="deprecated">{$alias->name}()</span>{sep}, {/sep}{/foreach}){/if}</code>{sep}, {/sep}
{/foreach}
</p>
</div>
{/foreach}
{if $ownMagicMethods}
<div class="panel panel-default">
<div class="panel-heading"><h3>Magic methods summary</h3></div>
<table class="summary table table-bordered table-striped methods" id="magicMethods" n:if="$ownMagicMethods">
{foreach $ownMagicMethods as $method}
{include method, method => $method}
{/foreach}
</table>
</div>
{/if}
{foreach $inheritedMagicMethods as $parentName => $methods}
<div class="panel panel-default">
<div class="panel-heading"><h3>Magic methods inherited from <a href="{$parentName|classUrl}#methods" n:tag-if="$template->getClass($parentName)">{$parentName}</a></h3></div>
<p class="elementList">
{foreach $methods as $method}
<code><a href="{$method|methodUrl}" n:tag-if="$template->getClass($parentName)"><span n:tag-if="$method->deprecated" class="deprecated">{$method->name}()</span></a></code>{sep}, {/sep}
{/foreach}
</p>
</div>
{/foreach}
{foreach $usedMagicMethods as $traitName => $methods}
<div class="panel panel-default">
<div class="panel-heading"><h3>Magic methods used from <a href="{$traitName|classUrl}#methods" n:tag-if="$template->getClass($traitName)">{$traitName}</a></h3></div>
<p class="elementList">
{foreach $methods as $data}
<code><a href="{$data['method']|methodUrl:$data['method']->declaringTrait}" n:tag-if="$template->getClass($traitName)"><span n:tag-if="$data['method']->deprecated" class="deprecated">{$data['method']->name}()</span></a>{if $data['aliases']}(as {foreach $data['aliases'] as $alias}<span n:tag-if="$data['method']->deprecated" class="deprecated">{$alias->name}()</span>{sep}, {/sep}{/foreach}){/if}</code>{sep}, {/sep}
{/foreach}
</p>
</div>
{/foreach}
{/if}
{var $ownConstants = $class->ownConstants}
{var $inheritedConstants = $class->inheritedConstants}
{if $ownConstants || $inheritedConstants}
<div class="panel panel-default">
<div class="panel-heading"><h2>Constants summary</h2></div>
<table class="summary table table-bordered table-striped constants" id="constants" n:if="$ownConstants">
<tr n:foreach="$ownConstants as $constant" data-order="{$constant->name}" id="{$constant->name}">
{var $annotations = $constant->annotations}
<td class="attributes"><code>{$constant->typeHint|typeLinks:$constant|noescape}</code></td>
<td class="name">
<code>
{if $class->internal}
<a href="{$constant|manualUrl}" title="Go to PHP documentation"><b>{$constant->name}</b></a>
{else}
<a n:tag-if="$config->sourceCode" href="{$constant|sourceUrl}" title="Go to source code"><b>{$constant->name}</b></a>
{/if}
</code>
<div n:if="$config->template['options']['elementDetailsCollapsed']" class="description short">
{$constant|shortDescription:true|noescape}
</div>
<div n:class="description, detailed, $config->template['options']['elementDetailsCollapsed'] ? hidden">
{$constant|longDescription|noescape}
{foreach $template->annotationSort($template->annotationFilter($annotations, array('var'))) as $annotation => $descriptions}
<h4>{$annotation|annotationBeautify}</h4>
<div class="list">
{foreach $descriptions as $description}
{if $description}
{$description|annotation:$annotation:$constant|noescape}<br>
{/if}
{/foreach}
</div>
{/foreach}
</div>
</td>
<td class="value">
<div>
<a href="#{$constant->name}" class="anchor">#</a>
<code>{$constant->valueDefinition|highlightValue:$class|noescape}</code>
</div>
</td>
</tr>
</table>
</div>
{foreach $inheritedConstants as $parentName => $constants}
<div class="panel panel-default">
<div class="panel-heading"><h3>Constants inherited from <a href="{$parentName|classUrl}#constants" n:tag-if="$template->getClass($parentName)">{$parentName}</a></h3></div>
<p class="elementList">
{foreach $constants as $constant}
<code><a href="{$constant|constantUrl}" n:tag-if="$template->getClass($parentName)"><b><span n:tag-if="$constant->deprecated" class"deprecated">{$constant->name}</span></b></a></code>{sep}, {/sep}
{/foreach}
</p>
</div>
{/foreach}
{/if}
{var $ownProperties = $class->ownProperties}
{var $inheritedProperties = $class->inheritedProperties}
{var $usedProperties = $class->usedProperties}
{var $ownMagicProperties = $class->ownMagicProperties}
{var $inheritedMagicProperties = $class->inheritedMagicProperties}
{var $usedMagicProperties = $class->usedMagicProperties}
{if $ownProperties || $inheritedProperties || $usedProperties || $ownMagicProperties || $inheritedMagicProperties || $usedMagicProperties}
{define property}
<tr data-order="{$property->name}" id="{if $property->magic}m{/if}${$property->name}">
<td class="attributes"><code>
{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}
{$property->typeHint|typeLinks:$property|noescape}
</code></td>
<td class="name">
{if $class->internal}
<a href="{$property|manualUrl}" title="Go to PHP documentation"><var>${$property->name}</var></a>
{else}
<a n:tag-if="$config->sourceCode" href="{$property|sourceUrl}" title="Go to source code"><var>${$property->name}</var></a>
{/if}
<div n:if="$config->template['options']['elementDetailsCollapsed']" class="description short">
{$property|shortDescription:true|noescape}
</div>
<div n:class="description, detailed, $config->template['options']['elementDetailsCollapsed'] ? hidden">
{$property|longDescription|noescape}
{foreach $template->annotationSort($template->annotationFilter($property->annotations, array('var'))) as $annotation => $descriptions}
<h4>{$annotation|annotationBeautify}</h4>
<div class="list">
{foreach $descriptions as $description}
{if $description}
{$description|annotation:$annotation:$property|noescape}<br>
{/if}
{/foreach}
</div>
{/foreach}
</div>
</td>
<td n:if="!$property->magic" class="value">
<div>
<a href="#{if $property->magic}m{/if}${$property->name}" class="anchor">#</a>
<code>{$property->defaultValueDefinition|highlightValue:$class|noescape}</code>
</div>
</td>
</tr>
{/define}
<div class="panel panel-default">
<div class="panel-heading"><h2>Properties summary</h2></div>
<table class="summary table table-bordered table-striped properties" id="properties" n:if="$ownProperties">
{foreach $ownProperties as $property}
{include property, property => $property}
{/foreach}
</table>
</div>
{foreach $inheritedProperties as $parentName => $properties}
<div class="panel panel-default">
<div class="panel-heading"><h3>Properties inherited from <a href="{$parentName|classUrl}#properties" n:tag-if="$template->getClass($parentName)">{$parentName}</a></h3></div>
<p class="elementList">
{foreach $properties as $property}
<code><a href="{$property|propertyUrl}" n:tag-if="$template->getClass($parentName)"><var><span n:tag-if="$property->deprecated" class="deprecated">${$property->name}</span></var></a></code>{sep}, {/sep}
{/foreach}
</p>
</div>
{/foreach}
{foreach $usedProperties as $traitName => $properties}
<div class="panel panel-default">
<div class="panel-heading"><h3>Properties used from <a href="{$traitName|classUrl}#properties" n:tag-if="$template->getClass($traitName)">{$traitName}</a></h3></div>
<p class="elementList">
{foreach $properties as $property}
<code><a href="{$property|propertyUrl:$property->declaringTrait}" n:tag-if="$template->getClass($traitName)"><var><span n:tag-if="$property->deprecated" class="deprecated">${$property->name}</span></var></a></code>{sep}, {/sep}
{/foreach}
</p>
</div>
{/foreach}
{if $ownMagicProperties}
<div class="panel panel-default">
<div class="panel-heading"><h3>Magic properties</h3></div>
<table class="summary table table-bordered table-striped properties" id="magicProperties">
{foreach $ownMagicProperties as $property}
{include property, property => $property}
{/foreach}
</table>
</div>
{/if}
{foreach $inheritedMagicProperties as $parentName => $properties}
<div class="panel panel-default">
<div class="panel-heading"><h3>Magic properties inherited from <a href="{$parentName|classUrl}#properties" n:tag-if="$template->getClass($parentName)">{$parentName}</a></h3></div>
<p class="elementList">
{foreach $properties as $property}
<code><a href="{$property|propertyUrl}" n:tag-if="$template->getClass($parentName)"><var><span n:tag-if="$property->deprecated" class="deprecated">${$property->name}</span></var></a></code>{sep}, {/sep}
{/foreach}
</p>
</div>
{/foreach}
{foreach $usedMagicProperties as $traitName => $properties}
<div class="panel panel-default">
<div class="panel-heading"><h3>Magic properties used from <a href="{$traitName|classUrl}#properties" n:tag-if="$template->getClass($traitName)">{$traitName}</a></h3></div>
<p class="elementList">
{foreach $properties as $property}
<code><a href="{$property|propertyUrl:$property->declaringTrait}" n:tag-if="$template->getClass($traitName)"><var><span n:tag-if="$property->deprecated" class="deprecated">${$property->name}</span></var></a></code>{sep}, {/sep}
{/foreach}
</p>
</div>
{/foreach}
{/if}
{else}
<div class="alert alert-error">
<p>
Documentation of this class could not be generated.
</p>
<p>
Class was originally declared in {$class->fileName|relativePath} and is invalid because of:
</p>
<ul>
<li n:foreach="$class->reasons as $reason">Class was redeclared in {$reason->getSender()->getFileName()|relativePath}.</li>
</ul>
</div>
{/if}
</div>
{/block}

View File

@ -1,10 +0,0 @@
{contentType javascript}
var ApiGen = ApiGen || {};
ApiGen.config = {$config->template};
{var $scripts = ['jquery.min.js', 'jquery.cookie.js', 'jquery.sprintf.js', 'jquery.autocomplete.js', 'jquery.sortElements.js', 'main.js']}
{foreach $scripts as $script}
{file_get_contents("$basePath/js/$script")|noescape}
{/foreach}

View File

@ -1 +0,0 @@
name: "Twitter Bootstrap theme"

View File

@ -1,60 +0,0 @@
{layout '@layout.latte'}
{var $active = 'constant'}
{block title}{if $constant->deprecated}Deprecated {/if}Constant {$constant->name}{/block}
{block content}
<div id="content" class="constant">
<h1 n:class="$constant->deprecated ? deprecated">Constant {$constant->shortName}</h1>
{if $constant->valid}
<div class="description" n:if="$template->longDescription($constant)">
{$constant|longDescription|noescape}
</div>
<div class="alert alert-info">
{if $constant->inNamespace()}<b>Namespace:</b> {$constant->namespaceName|namespaceLinks|noescape}<br>{/if}
{if $constant->inPackage()}<b>Package:</b> {$constant->packageName|packageLinks|noescape}<br>{/if}
{foreach $template->annotationSort($template->annotationFilter($constant->annotations, array('var'))) as $annotation => $values}
{foreach $values as $value}
<b>{$annotation|annotationBeautify}{if $value}:{/if}</b>
{$value|annotation:$annotation:$constant|noescape}<br>
{/foreach}
{/foreach}
<b>Located at</b>
<a n:tag-if="$config->sourceCode" href="{$constant|sourceUrl}" title="Go to source code">
{$constant->fileName|relativePath}
</a><br>
</div>
{var $annotations = $constant->annotations}
<div class="panel panel-default">
<div class="panel-heading"><h2>Value summary</h2></div>
<table class="summary table table-bordered table-striped" id="vars">
<tr>
<td class="name"><code>{$constant->typeHint|typeLinks:$constant|noescape}</code></td>
<td class="value">{block|strip}
{var $element = $template->resolveElement($constant->valueDefinition, $constant)}
{if $element}<a href="{$element|constantUrl}">{$constant->valueDefinition}</a>{else}<code>{$constant->valueDefinition|highlightValue:$constant|noescape}</code>{/if}
{/block}</td>
</tr>
</table>
</div>
{else}
<div class="alert alert-error">
<p>
Documentation of this constant could not be generated.
</p>
<p>
Constant was originally declared in {$constant->fileName|relativePath} and is invalid because of:
</p>
<ul>
<li n:foreach="$constant->reasons as $reason">Constant was redeclared in {$reason->getSender()->getFileName()|relativePath}.</li>
</ul>
</div>
{/if}
</div>
{/block}

View File

@ -1,4 +0,0 @@
{contentType javascript}
var ApiGen = ApiGen || {};
ApiGen.elements = {$elements};

View File

@ -1,94 +0,0 @@
{layout '@layout.latte'}
{var $active = 'function'}
{block title}{if $function->deprecated}Deprecated {/if}Function {$function->name}{/block}
{block content}
<div id="content" class="function">
<h1 n:class="$function->deprecated ? deprecated">Function {$function->shortName}</h1>
{if $function->valid}
<div class="description" n:if="$template->longDescription($function)">
{$function|longDescription|noescape}
</div>
<div class="alert alert-info">
{if $function->inNamespace()}<b>Namespace:</b> {$function->namespaceName|namespaceLinks|noescape}<br>{/if}
{if $function->inPackage()}<b>Package:</b> {$function->packageName|packageLinks|noescape}<br>{/if}
{foreach $template->annotationSort($template->annotationFilter($function->annotations, array('param', 'return', 'throws'))) as $annotation => $values}
{foreach $values as $value}
<b>{$annotation|annotationBeautify}{if $value}:{/if}</b>
{$value|annotation:$annotation:$function|noescape}<br>
{/foreach}
{/foreach}
<b>Located at</b>
<a n:tag-if="$config->sourceCode" href="{$function|sourceUrl}" title="Go to source code">
{$function->fileName|relativePath}
</a><br>
</div>
{var $annotations = $function->annotations}
{if count($function->parameters)}
<div class="panel panel-default">
<div class="panel-heading"><h2>Parameters summary</h2></div>
<table class="summary table table-bordered table-striped" id="parameters">
<tr n:foreach="$function->parameters as $parameter" id="${$parameter->name}">
<td class="name"><code>{$parameter->typeHint|typeLinks:$function|noescape}</code></td>
<td class="value"><code>{block|strip}
<var>{if $parameter->passedByReference}&amp; {/if}${$parameter->name}</var>{if $parameter->defaultValueAvailable} = {$parameter->defaultValueDefinition|highlightPHP:$function|noescape}{elseif $parameter->unlimited},…{/if}
{/block}</code></td>
<td>{$parameter->description|description:$function}</td>
</tr>
</table>
</div>
{/if}
{if isset($annotations['return']) && 'void' !== $annotations['return'][0]}
<div class="panel panel-default">
<div class="panel-heading"><h2>Return value summary</h2></div>
<table class="summary table table-bordered table-striped" id="returns">
<tr>
<td class="name"><code>
{$annotations['return'][0]|typeLinks:$function|noescape}
</code></td>
<td>
{$annotations['return'][0]|description:$function|noescape}
</td>
</tr>
</table>
</div>
{/if}
{if isset($annotations['throws'])}
<div class="panel panel-default">
<div class="panel-heading"><h2>Thrown exceptions summary</h2></div>
<table class="summary table table-bordered table-striped" id="throws">
<tr n:foreach="$annotations['throws'] as $throws">
<td class="name"><code>
{$throws|typeLinks:$function|noescape}
</code></td>
<td>
{$throws|description:$function|noescape}
</td>
</tr>
</table>
</div>
{/if}
{else}
<div class="alert alert-error">
<p>
Documentation of this function could not be generated.
</p>
<p>
Function was originally declared in {$function->fileName|relativePath} and is invalid because of:
</p>
<ul>
<li n:foreach="$function->reasons as $reason">Function was redeclared in {$reason->getSender()->getFileName()|relativePath}.</li>
</ul>
</div>
{/if}
</div>
{/block}

View File

@ -1,841 +0,0 @@
/*
* jQuery Autocomplete plugin 1.2.3
*
* Copyright (c) 2009 Jörn Zaefferer
*
* Dual licensed under the MIT and GPL licenses:
* http://www.opensource.org/licenses/mit-license.php
* http://www.gnu.org/licenses/gpl.html
*
* With small modifications by Alfonso Gómez-Arzola.
* See changelog for details.
*
*/
;(function($) {
'use strict';
$.fn.extend({
autocomplete: function(urlOrData, options) {
var isUrl = typeof urlOrData == "string";
options = $.extend({}, $.Autocompleter.defaults, {
url: isUrl ? urlOrData : null,
data: isUrl ? null : urlOrData,
delay: isUrl ? $.Autocompleter.defaults.delay : 10,
max: options && !options.scroll ? 10 : 150,
noRecord: "No Records."
}, options);
// if highlight is set to false, replace it with a do-nothing function
options.highlight = options.highlight || function(value) { return value; };
// if the formatMatch option is not specified, then use formatItem for backwards compatibility
options.formatMatch = options.formatMatch || options.formatItem;
return this.each(function() {
new $.Autocompleter(this, options);
});
},
result: function(handler) {
return this.bind("result", handler);
},
search: function(handler) {
return this.trigger("search", [handler]);
},
flushCache: function() {
return this.trigger("flushCache");
},
setOptions: function(options){
return this.trigger("setOptions", [options]);
},
unautocomplete: function() {
return this.trigger("unautocomplete");
}
});
$.Autocompleter = function(input, options) {
var KEY = {
UP: 38,
DOWN: 40,
DEL: 46,
TAB: 9,
RETURN: 13,
ESC: 27,
COMMA: 188,
PAGEUP: 33,
PAGEDOWN: 34,
BACKSPACE: 8
};
var globalFailure = null;
if(options.failure != null && typeof options.failure == "function") {
globalFailure = options.failure;
}
// Create $ object for input element
var $input = $(input).attr("autocomplete", "off").addClass(options.inputClass);
var timeout;
var previousValue = "";
var cache = $.Autocompleter.Cache(options);
var hasFocus = 0;
var lastKeyPressCode;
var config = {
mouseDownOnSelect: false
};
var select = $.Autocompleter.Select(options, input, selectCurrent, config);
var blockSubmit;
// prevent form submit in opera when selecting with return key
navigator.userAgent.indexOf("Opera") != -1 && $(input.form).bind("submit.autocomplete", function() {
if (blockSubmit) {
blockSubmit = false;
return false;
}
});
// older versions of opera don't trigger keydown multiple times while pressed, others don't work with keypress at all
$input.bind((navigator.userAgent.indexOf("Opera") != -1 && !'KeyboardEvent' in window ? "keypress" : "keydown") + ".autocomplete", function(event) {
// a keypress means the input has focus
// avoids issue where input had focus before the autocomplete was applied
hasFocus = 1;
// track last key pressed
lastKeyPressCode = event.keyCode;
switch(event.keyCode) {
case KEY.UP:
if ( select.visible() ) {
event.preventDefault();
select.prev();
} else {
onChange(0, true);
}
break;
case KEY.DOWN:
if ( select.visible() ) {
event.preventDefault();
select.next();
} else {
onChange(0, true);
}
break;
case KEY.PAGEUP:
if ( select.visible() ) {
event.preventDefault();
select.pageUp();
} else {
onChange(0, true);
}
break;
case KEY.PAGEDOWN:
if ( select.visible() ) {
event.preventDefault();
select.pageDown();
} else {
onChange(0, true);
}
break;
// matches also semicolon
case options.multiple && $.trim(options.multipleSeparator) == "," && KEY.COMMA:
case KEY.TAB:
case KEY.RETURN:
if( selectCurrent() ) {
// stop default to prevent a form submit, Opera needs special handling
event.preventDefault();
blockSubmit = true;
return false;
}
break;
case KEY.ESC:
select.hide();
break;
default:
clearTimeout(timeout);
timeout = setTimeout(onChange, options.delay);
break;
}
}).focus(function(){
// track whether the field has focus, we shouldn't process any
// results if the field no longer has focus
hasFocus++;
}).blur(function() {
hasFocus = 0;
if (!config.mouseDownOnSelect) {
hideResults();
}
}).click(function() {
// show select when clicking in a focused field
// but if clickFire is true, don't require field
// to be focused to begin with; just show select
if( options.clickFire ) {
if ( !select.visible() ) {
onChange(0, true);
}
} else {
if ( hasFocus++ > 1 && !select.visible() ) {
onChange(0, true);
}
}
}).bind("search", function() {
var fn = (arguments.length > 1) ? arguments[1] : null;
function findValueCallback(q, data) {
var result;
if( data && data.length ) {
for (var i=0; i < data.length; i++) {
if( data[i].result.toLowerCase() == q.toLowerCase() ) {
result = data[i];
break;
}
}
}
if( typeof fn == "function" ) fn(result);
else $input.trigger("result", result && [result.data, result.value]);
}
$.each(trimWords($input.val()), function(i, value) {
request(value, findValueCallback, findValueCallback);
});
}).bind("flushCache", function() {
cache.flush();
}).bind("setOptions", function() {
$.extend(true, options, arguments[1]);
// if we've updated the data, repopulate
if ( "data" in arguments[1] )
cache.populate();
}).bind("unautocomplete", function() {
select.unbind();
$input.unbind();
$(input.form).unbind(".autocomplete");
});
function selectCurrent() {
var selected = select.selected();
if( !selected )
return false;
var v = selected.result;
previousValue = v;
if ( options.multiple ) {
var words = trimWords($input.val());
if ( words.length > 1 ) {
var seperator = options.multipleSeparator.length;
var cursorAt = $(input).selection().start;
var wordAt, progress = 0;
$.each(words, function(i, word) {
progress += word.length;
if (cursorAt <= progress) {
wordAt = i;
return false;
}
progress += seperator;
});
words[wordAt] = v;
//$.Autocompleter.Selection(input, progress + seperator, progress + seperator);
v = words.join( options.multipleSeparator );
}
v += options.multipleSeparator;
}
$input.val(v);
hideResultsNow();
$input.trigger("result", [selected.data, selected.value]);
return true;
}
function onChange(crap, skipPrevCheck) {
if( lastKeyPressCode == KEY.DEL ) {
select.hide();
return;
}
var currentValue = $input.val();
if ( !skipPrevCheck && currentValue == previousValue )
return;
previousValue = currentValue;
currentValue = lastWord(currentValue);
if ( currentValue.length >= options.minChars) {
$input.addClass(options.loadingClass);
if (!options.matchCase)
currentValue = currentValue.toLowerCase();
request(currentValue, receiveData, hideResultsNow);
} else {
stopLoading();
select.hide();
}
};
function trimWords(value) {
if (!value)
return [""];
if (!options.multiple)
return [$.trim(value)];
return $.map(value.split(options.multipleSeparator), function(word) {
return $.trim(value).length ? $.trim(word) : null;
});
}
function lastWord(value) {
if ( !options.multiple )
return value;
var words = trimWords(value);
if (words.length == 1)
return words[0];
var cursorAt = $(input).selection().start;
if (cursorAt == value.length) {
words = trimWords(value)
} else {
words = trimWords(value.replace(value.substring(cursorAt), ""));
}
return words[words.length - 1];
}
// fills in the input box w/the first match (assumed to be the best match)
// q: the term entered
// sValue: the first matching result
function autoFill(q, sValue){
// autofill in the complete box w/the first match as long as the user hasn't entered in more data
// if the last user key pressed was backspace, don't autofill
if( options.autoFill && (lastWord($input.val()).toLowerCase() == q.toLowerCase()) && lastKeyPressCode != KEY.BACKSPACE ) {
// fill in the value (keep the case the user has typed)
$input.val($input.val() + sValue.substring(lastWord(previousValue).length));
// select the portion of the value not typed by the user (so the next character will erase)
$(input).selection(previousValue.length, previousValue.length + sValue.length);
}
};
function hideResults() {
clearTimeout(timeout);
timeout = setTimeout(hideResultsNow, 200);
};
function hideResultsNow() {
var wasVisible = select.visible();
select.hide();
clearTimeout(timeout);
stopLoading();
if (options.mustMatch) {
// call search and run callback
$input.search(
function (result){
// if no value found, clear the input box
if( !result ) {
if (options.multiple) {
var words = trimWords($input.val()).slice(0, -1);
$input.val( words.join(options.multipleSeparator) + (words.length ? options.multipleSeparator : "") );
}
else {
$input.val( "" );
$input.trigger("result", null);
}
}
}
);
}
};
function receiveData(q, data) {
if ( data && data.length && hasFocus ) {
stopLoading();
select.display(data, q);
autoFill(q, data[0].value);
select.show();
} else {
hideResultsNow();
}
};
function request(term, success, failure) {
if (!options.matchCase)
term = term.toLowerCase();
var data = cache.load(term);
// recieve the cached data
if (data) {
if(data.length) {
success(term, data);
}
else{
var parsed = options.parse && options.parse(options.noRecord) || parse(options.noRecord);
success(term,parsed);
}
// if an AJAX url has been supplied, try loading the data now
} else if( (typeof options.url == "string") && (options.url.length > 0) ){
var extraParams = {
timestamp: +new Date()
};
$.each(options.extraParams, function(key, param) {
extraParams[key] = typeof param == "function" ? param() : param;
});
$.ajax({
// try to leverage ajaxQueue plugin to abort previous requests
mode: "abort",
// limit abortion to this input
port: "autocomplete" + input.name,
dataType: options.dataType,
url: options.url,
data: $.extend({
q: lastWord(term),
limit: options.max
}, extraParams),
success: function(data) {
var parsed = options.parse && options.parse(data) || parse(data);
cache.add(term, parsed);
success(term, parsed);
}
});
} else {
// if we have a failure, we need to empty the list -- this prevents the the [TAB] key from selecting the last successful match
select.emptyList();
if(globalFailure != null) {
globalFailure();
}
else {
failure(term);
}
}
};
function parse(data) {
var parsed = [];
var rows = data.split("\n");
for (var i=0; i < rows.length; i++) {
var row = $.trim(rows[i]);
if (row) {
row = row.split("|");
parsed[parsed.length] = {
data: row,
value: row[0],
result: options.formatResult && options.formatResult(row, row[0]) || row[0]
};
}
}
return parsed;
};
function stopLoading() {
$input.removeClass(options.loadingClass);
};
};
$.Autocompleter.defaults = {
inputClass: "ac_input",
resultsClass: "ac_results",
loadingClass: "ac_loading",
minChars: 1,
delay: 400,
matchCase: false,
matchSubset: true,
matchContains: false,
cacheLength: 100,
max: 1000,
mustMatch: false,
extraParams: {},
selectFirst: true,
formatItem: function(row) { return row[0]; },
formatMatch: null,
autoFill: false,
width: 0,
multiple: false,
multipleSeparator: " ",
inputFocus: true,
clickFire: false,
highlight: function(value, term) {
return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term.replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1") + ")(?![^<>]*>)(?![^&;]+;)", "gi"), "<strong>$1</strong>");
},
scroll: true,
scrollHeight: 180,
scrollJumpPosition: true
};
$.Autocompleter.Cache = function(options) {
var data = {};
var length = 0;
function matchSubset(s, sub) {
return (new RegExp(sub.toUpperCase().replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1").replace(/[A-Z0-9]/g, function(m, offset) {
return offset === 0 ? '(?:' + m + '|^' + m.toLowerCase() + ')' : '(?:.*' + m + '|' + m.toLowerCase() + ')';
}))).test(s); // find by initials
};
function add(q, value) {
if (length > options.cacheLength){
flush();
}
if (!data[q]){
length++;
}
data[q] = value;
}
function populate(){
if( !options.data ) return false;
// track the matches
var stMatchSets = {},
nullData = 0;
// no url was specified, we need to adjust the cache length to make sure it fits the local data store
if( !options.url ) options.cacheLength = 1;
// track all options for minChars = 0
stMatchSets[""] = [];
// loop through the array and create a lookup structure
for ( var i = 0, ol = options.data.length; i < ol; i++ ) {
var rawValue = options.data[i];
// if rawValue is a string, make an array otherwise just reference the array
rawValue = (typeof rawValue == "string") ? [rawValue] : rawValue;
var value = options.formatMatch(rawValue, i+1, options.data.length);
if ( typeof(value) === 'undefined' || value === false )
continue;
var firstChar = value.charAt(0).toLowerCase();
// if no lookup array for this character exists, look it up now
if( !stMatchSets[firstChar] )
stMatchSets[firstChar] = [];
// if the match is a string
var row = {
value: value,
data: rawValue,
result: options.formatResult && options.formatResult(rawValue) || value
};
// push the current match into the set list
stMatchSets[firstChar].push(row);
// keep track of minChars zero items
if ( nullData++ < options.max ) {
stMatchSets[""].push(row);
}
};
// add the data items to the cache
$.each(stMatchSets, function(i, value) {
// increase the cache size
options.cacheLength++;
// add to the cache
add(i, value);
});
}
// populate any existing data
setTimeout(populate, 25);
function flush(){
data = {};
length = 0;
}
return {
flush: flush,
add: add,
populate: populate,
load: function(q) {
if (!options.cacheLength || !length)
return null;
/*
* if dealing w/local data and matchContains than we must make sure
* to loop through all the data collections looking for matches
*/
if( !options.url && options.matchContains ){
// track all matches
var csub = [];
// loop through all the data grids for matches
for( var k in data ){
// don't search through the stMatchSets[""] (minChars: 0) cache
// this prevents duplicates
if( k.length > 0 ){
var c = data[k];
$.each(c, function(i, x) {
// if we've got a match, add it to the array
if (matchSubset(x.value, q)) {
csub.push(x);
}
});
}
}
return csub;
} else
// if the exact item exists, use it
if (data[q]){
return data[q];
} else
if (options.matchSubset) {
for (var i = q.length - 1; i >= options.minChars; i--) {
var c = data[q.substr(0, i)];
if (c) {
var csub = [];
$.each(c, function(i, x) {
if (matchSubset(x.value, q)) {
csub[csub.length] = x;
}
});
return csub;
}
}
}
return null;
}
};
};
$.Autocompleter.Select = function (options, input, select, config) {
var CLASSES = {
ACTIVE: "ac_over"
};
var listItems,
active = -1,
data,
term = "",
needsInit = true,
element,
list;
// Create results
function init() {
if (!needsInit)
return;
element = $("<div/>")
.hide()
.addClass(options.resultsClass)
.css("position", "absolute")
.appendTo(document.body)
.hover(function(event) {
// Browsers except FF do not fire mouseup event on scrollbars, resulting in mouseDownOnSelect remaining true, and results list not always hiding.
if($(this).is(":visible")) {
input.focus();
}
config.mouseDownOnSelect = false;
});
list = $("<ul/>").appendTo(element).mouseover( function(event) {
if(target(event).nodeName && target(event).nodeName.toUpperCase() == 'LI') {
active = $("li", list).removeClass(CLASSES.ACTIVE).index(target(event));
$(target(event)).addClass(CLASSES.ACTIVE);
}
}).click(function(event) {
$(target(event)).addClass(CLASSES.ACTIVE);
select();
if( options.inputFocus )
input.focus();
return false;
}).mousedown(function() {
config.mouseDownOnSelect = true;
}).mouseup(function() {
config.mouseDownOnSelect = false;
});
if( options.width > 0 )
element.css("width", options.width);
needsInit = false;
}
function target(event) {
var element = event.target;
while(element && element.tagName != "LI")
element = element.parentNode;
// more fun with IE, sometimes event.target is empty, just ignore it then
if(!element)
return [];
return element;
}
function moveSelect(step) {
listItems.slice(active, active + 1).removeClass(CLASSES.ACTIVE);
movePosition(step);
var activeItem = listItems.slice(active, active + 1).addClass(CLASSES.ACTIVE);
if(options.scroll) {
var offset = 0;
listItems.slice(0, active).each(function() {
offset += this.offsetHeight;
});
if((offset + activeItem[0].offsetHeight - list.scrollTop()) > list[0].clientHeight) {
list.scrollTop(offset + activeItem[0].offsetHeight - list.innerHeight());
} else if(offset < list.scrollTop()) {
list.scrollTop(offset);
}
}
};
function movePosition(step) {
if (options.scrollJumpPosition || (!options.scrollJumpPosition && !((step < 0 && active == 0) || (step > 0 && active == listItems.length - 1)) )) {
active += step;
if (active < 0) {
active = listItems.length - 1;
} else if (active >= listItems.length) {
active = 0;
}
}
}
function limitNumberOfItems(available) {
return options.max && options.max < available
? options.max
: available;
}
function fillList() {
list.empty();
var max = limitNumberOfItems(data.length);
for (var i=0; i < max; i++) {
if (!data[i])
continue;
var formatted = options.formatItem(data[i].data, i+1, max, data[i].value, term);
if ( formatted === false )
continue;
var li = $("<li/>").html( options.highlight(formatted, term) ).addClass(i%2 == 0 ? "ac_even" : "ac_odd").appendTo(list)[0];
$.data(li, "ac_data", data[i]);
}
listItems = list.find("li");
if ( options.selectFirst ) {
listItems.slice(0, 1).addClass(CLASSES.ACTIVE);
active = 0;
}
// apply bgiframe if available
if ( $.fn.bgiframe )
list.bgiframe();
}
return {
display: function(d, q) {
init();
data = d;
term = q;
fillList();
},
next: function() {
moveSelect(1);
},
prev: function() {
moveSelect(-1);
},
pageUp: function() {
if (active != 0 && active - 8 < 0) {
moveSelect( -active );
} else {
moveSelect(-8);
}
},
pageDown: function() {
if (active != listItems.length - 1 && active + 8 > listItems.length) {
moveSelect( listItems.length - 1 - active );
} else {
moveSelect(8);
}
},
hide: function() {
element && element.hide();
listItems && listItems.removeClass(CLASSES.ACTIVE);
active = -1;
},
visible : function() {
return element && element.is(":visible");
},
current: function() {
return this.visible() && (listItems.filter("." + CLASSES.ACTIVE)[0] || options.selectFirst && listItems[0]);
},
show: function() {
var offset = $(input).offset();
element.css({
width: typeof options.width == "string" || options.width > 0 ? options.width : $(input).width(),
top: offset.top + input.offsetHeight,
left: offset.left
}).show();
if(options.scroll) {
list.scrollTop(0);
list.css({
maxHeight: options.scrollHeight,
overflow: 'auto'
});
if(navigator.userAgent.indexOf("MSIE") != -1 && typeof document.body.style.maxHeight === "undefined") {
var listHeight = 0;
listItems.each(function() {
listHeight += this.offsetHeight;
});
var scrollbarsVisible = listHeight > options.scrollHeight;
list.css('height', scrollbarsVisible ? options.scrollHeight : listHeight );
if (!scrollbarsVisible) {
// IE doesn't recalculate width when scrollbar disappears
listItems.width( list.width() - parseInt(listItems.css("padding-left")) - parseInt(listItems.css("padding-right")) );
}
}
}
},
selected: function() {
var selected = listItems && listItems.filter("." + CLASSES.ACTIVE).removeClass(CLASSES.ACTIVE);
return selected && selected.length && $.data(selected[0], "ac_data");
},
emptyList: function (){
list && list.empty();
},
unbind: function() {
element && element.remove();
}
};
};
$.fn.selection = function(start, end) {
if (start !== undefined) {
return this.each(function() {
if( this.createTextRange ){
var selRange = this.createTextRange();
if (end === undefined || start == end) {
selRange.move("character", start);
selRange.select();
} else {
selRange.collapse(true);
selRange.moveStart("character", start);
selRange.moveEnd("character", end);
selRange.select();
}
} else if( this.setSelectionRange ){
this.setSelectionRange(start, end);
} else if( this.selectionStart ){
this.selectionStart = start;
this.selectionEnd = end;
}
});
}
var field = this[0];
if ( field.createTextRange ) {
var range = document.selection.createRange(),
orig = field.value,
teststring = "<->",
textLength = range.text.length;
range.text = teststring;
var caretAt = field.value.indexOf(teststring);
field.value = orig;
this.selection(caretAt, caretAt + textLength);
return {
start: caretAt,
end: caretAt + textLength
}
} else if( field.selectionStart !== undefined ){
return {
start: field.selectionStart,
end: field.selectionEnd
}
}
};
})(jQuery);

View File

@ -1,114 +0,0 @@
/*!
* jQuery Cookie Plugin v1.4.1
* https://github.com/carhartl/jquery-cookie
*
* Copyright 2006, 2014 Klaus Hartl
* Released under the MIT license
*/
(function (factory) {
if (typeof define === 'function' && define.amd) {
// AMD (Register as an anonymous module)
define(['jquery'], factory);
} else if (typeof exports === 'object') {
// Node/CommonJS
module.exports = factory(require('jquery'));
} else {
// Browser globals
factory(jQuery);
}
}(function ($) {
var pluses = /\+/g;
function encode(s) {
return config.raw ? s : encodeURIComponent(s);
}
function decode(s) {
return config.raw ? s : decodeURIComponent(s);
}
function stringifyCookieValue(value) {
return encode(config.json ? JSON.stringify(value) : String(value));
}
function parseCookieValue(s) {
if (s.indexOf('"') === 0) {
// This is a quoted cookie as according to RFC2068, unescape...
s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\');
}
try {
// Replace server-side written pluses with spaces.
// If we can't decode the cookie, ignore it, it's unusable.
// If we can't parse the cookie, ignore it, it's unusable.
s = decodeURIComponent(s.replace(pluses, ' '));
return config.json ? JSON.parse(s) : s;
} catch(e) {}
}
function read(s, converter) {
var value = config.raw ? s : parseCookieValue(s);
return $.isFunction(converter) ? converter(value) : value;
}
var config = $.cookie = function (key, value, options) {
// Write
if (arguments.length > 1 && !$.isFunction(value)) {
options = $.extend({}, config.defaults, options);
if (typeof options.expires === 'number') {
var days = options.expires, t = options.expires = new Date();
t.setMilliseconds(t.getMilliseconds() + days * 864e+5);
}
return (document.cookie = [
encode(key), '=', stringifyCookieValue(value),
options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE
options.path ? '; path=' + options.path : '',
options.domain ? '; domain=' + options.domain : '',
options.secure ? '; secure' : ''
].join(''));
}
// Read
var result = key ? undefined : {},
// To prevent the for loop in the first place assign an empty array
// in case there are no cookies at all. Also prevents odd result when
// calling $.cookie().
cookies = document.cookie ? document.cookie.split('; ') : [],
i = 0,
l = cookies.length;
for (; i < l; i++) {
var parts = cookies[i].split('='),
name = decode(parts.shift()),
cookie = parts.join('=');
if (key === name) {
// If second argument (value) is a function it's a converter...
result = read(cookie, value);
break;
}
// Prevent storing a cookie that we couldn't decode.
if (!key && (cookie = read(cookie)) !== undefined) {
result[name] = cookie;
}
}
return result;
};
config.defaults = {};
$.removeCookie = function (key, options) {
// Must not alter options, thus extending a fresh object...
$.cookie(key, '', $.extend({}, options, { expires: -1 }));
return !$.cookie(key);
};
}));

File diff suppressed because one or more lines are too long

View File

@ -1,69 +0,0 @@
/**
* jQuery.fn.sortElements
* --------------
* @author James Padolsey (http://james.padolsey.com)
* @version 0.11
* @updated 18-MAR-2010
* --------------
* @param Function comparator:
* Exactly the same behaviour as [1,2,3].sort(comparator)
*
* @param Function getSortable
* A function that should return the element that is
* to be sorted. The comparator will run on the
* current collection, but you may want the actual
* resulting sort to occur on a parent or another
* associated element.
*
* E.g. $('td').sortElements(comparator, function(){
* return this.parentNode;
* })
*
* The <td>'s parent (<tr>) will be sorted instead
* of the <td> itself.
*/
jQuery.fn.sortElements = (function(){
var sort = [].sort;
return function(comparator, getSortable) {
getSortable = getSortable || function(){return this;};
var placements = this.map(function(){
var sortElement = getSortable.call(this),
parentNode = sortElement.parentNode,
// Since the element itself will change position, we have
// to have some way of storing it's original position in
// the DOM. The easiest way is to have a 'flag' node:
nextSibling = parentNode.insertBefore(
document.createTextNode(''),
sortElement.nextSibling
);
return function() {
if (parentNode === this) {
throw new Error(
"You can't sort elements if any one is a descendant of another."
);
}
// Insert before flag:
parentNode.insertBefore(this, nextSibling);
// Remove flag:
parentNode.removeChild(nextSibling);
};
});
return sort.call(this, comparator).each(function(i){
placements[i].call(getSortable.call(this));
});
};
})();

View File

@ -1,8 +0,0 @@
/*!
* sprintf and vsprintf for jQuery
* somewhat based on http://jan.moesen.nu/code/javascript/sprintf-and-printf-in-javascript/
* Copyright (c) 2008 Sabin Iacob (m0n5t3r) <iacobs@m0n5t3r.info>
* @license http://www.gnu.org/licenses/gpl.html
* @project jquery.sprintf
*/
(function(d){var a={b:function(e){return parseInt(e,10).toString(2)},c:function(e){return String.fromCharCode(parseInt(e,10))},d:function(e){return parseInt(e,10)},u:function(e){return Math.abs(e)},f:function(f,e){e=parseInt(e,10);f=parseFloat(f);if(isNaN(e&&f)){return NaN}return e&&f.toFixed(e)||f},o:function(e){return parseInt(e,10).toString(8)},s:function(e){return e},x:function(e){return(""+parseInt(e,10).toString(16)).toLowerCase()},X:function(e){return(""+parseInt(e,10).toString(16)).toUpperCase()}};var c=/%(?:(\d+)?(?:\.(\d+))?|\(([^)]+)\))([%bcdufosxX])/g;var b=function(f){if(f.length==1&&typeof f[0]=="object"){f=f[0];return function(i,h,k,j,g,m,l){return a[g](f[j])}}else{var e=0;return function(i,h,k,j,g,m,l){if(g=="%"){return"%"}return a[g](f[e++],k)}}};d.extend({sprintf:function(f){var e=Array.apply(null,arguments).slice(1);return f.replace(c,b(e))},vsprintf:function(f,e){return f.replace(c,b(e))}})})(jQuery);

View File

@ -1,308 +0,0 @@
$(window).load(function() {
var $document = $(document);
var $navigation = $('#navigation');
var navigationHeight = $navigation.height();
var $left = $('#left');
var $right = $('#right');
var $rightInner = $('#rightInner');
var $splitter = $('#splitter');
var $groups = $('#groups');
var $content = $('#content');
// Menu
// Hide deep packages and namespaces
$('ul span', $groups).click(function(event) {
event.preventDefault();
event.stopPropagation();
$(this)
.toggleClass('collapsed')
.parent()
.next('ul')
.toggleClass('collapsed');
}).click();
$active = $('ul li.active', $groups);
if ($active.length > 0) {
// Open active
$('> a > span', $active).click();
} else {
$main = $('> ul > li.main', $groups);
if ($main.length > 0) {
// Open first level of the main project
$('> a > span', $main).click();
} else {
// Open first level of all
$('> ul > li > a > span', $groups).click();
}
}
// Content
// Search autocompletion
var autocompleteFound = false;
var autocompleteFiles = {'c': 'class', 'co': 'constant', 'f': 'function', 'm': 'class', 'mm': 'class', 'p': 'class', 'mp': 'class', 'cc': 'class'};
var $search = $('#search input[name=q]');
$search
.autocomplete(ApiGen.elements, {
matchContains: true,
scrollHeight: 200,
max: 20,
width: 300,
noRecord: '',
highlight: function(value, term) {
var term = term.toUpperCase().replace(/([\^\$\(\)\[\]\{\}\*\.\+\?\|\\])/gi, "\\$1").replace(/[A-Z0-9]/g, function(m, offset) {
return offset === 0 ? '(?:' + m + '|^' + m.toLowerCase() + ')' : '(?:(?:[^<>]|<[^<>]*>)*' + m + '|' + m.toLowerCase() + ')';
});
return value.replace(new RegExp("(?![^&;]+;)(?!<[^<>]*)(" + term + ")(?![^<>]*>)(?![^&;]+;)"), "<strong>$1</strong>");
},
formatItem: function(data) {
return data.length > 1 ? data[1].replace(/^(.+\\)(.+)$/, '<span><small>$1</small>$2</span>') : data[0];
},
formatMatch: function(data) {
return data[1];
},
formatResult: function(data) {
return data[1];
},
show: function($list) {
var $items = $('li span', $list);
var maxWidth = Math.max.apply(null, $items.map(function() {
return $(this).width();
}));
// 10px padding
$list.width(Math.max(maxWidth + 10, $search.innerWidth()));
}
}).result(function(event, data) {
autocompleteFound = true;
var location = window.location.href.split('/');
location.pop();
var parts = data[1].split(/::|$/);
var file = $.sprintf(ApiGen.config.templates[autocompleteFiles[data[0]]].filename, parts[0].replace(/\(\)/, '').replace(/[^\w]/g, '.'));
if (parts[1]) {
file += '#' + ('mm' === data[0] || 'mp' === data[0] ? 'm' : '') + parts[1].replace(/([\w]+)\(\)/, '_$1');
}
location.push(file);
window.location = location.join('/');
// Workaround for Opera bug
$(this).closest('form').attr('action', location.join('/'));
}).closest('form')
.submit(function() {
var query = $search.val();
if ('' === query) {
return false;
}
return !autocompleteFound && '' !== $('#search input[name=cx]').val();
});
// Save natural order
$('table.summary tr[data-order]', $content).each(function(index) {
do {
index = '0' + index;
} while (index.length < 3);
$(this).attr('data-order-natural', index);
});
// Switch between natural and alphabetical order
var $caption = $('table.summary', $content)
.filter(':has(tr[data-order])')
.prev('h2');
$caption
.click(function() {
var $this = $(this);
var order = $this.data('order') || 'natural';
order = 'natural' === order ? 'alphabetical' : 'natural';
$this.data('order', order);
$.cookie('order', order, {expires: 365});
var attr = 'alphabetical' === order ? 'data-order' : 'data-order-natural';
$this
.next('table')
.find('tr').sortElements(function(a, b) {
return $(a).attr(attr) > $(b).attr(attr) ? 1 : -1;
});
return false;
})
.addClass('switchable')
.attr('title', 'Switch between natural and alphabetical order');
if ((null === $.cookie('order') && 'alphabetical' === ApiGen.config.options.elementsOrder) || 'alphabetical' === $.cookie('order')) {
$caption.click();
}
// Open details
if (ApiGen.config.options.elementDetailsCollapsed) {
$(document.body).on('click', 'tr', function(ev) {
var short = this.querySelector('.short')
, detailed = this.querySelector('.detailed')
if (!short || !detailed) return
$(short).toggleClass('hidden')
$(detailed).toggleClass('hidden')
})
}
// Splitter
var splitterWidth = $splitter.width();
var splitterPosition = $.cookie('splitter') ? parseInt($.cookie('splitter')) : null;
var splitterPositionBackup = $.cookie('splitterBackup') ? parseInt($.cookie('splitterBackup')) : null;
function setSplitterPosition(position)
{
splitterPosition = position;
$left.width(position);
$right.css('margin-left', position + splitterWidth);
$splitter.css('left', position);
}
function setNavigationPosition()
{
var height = $(window).height() - navigationHeight;
$left.height(height);
$splitter.height(height);
$right.height(height);
}
function setContentWidth()
{
var width = $rightInner.width();
$rightInner
.toggleClass('medium', width <= 960)
.toggleClass('small', width <= 650);
}
$splitter.mousedown(function() {
$splitter.addClass('active');
$document.mousemove(function(event) {
if (event.pageX >= 230 && $document.width() - event.pageX >= 600 + splitterWidth) {
setSplitterPosition(event.pageX);
setContentWidth();
}
});
$()
.add($splitter)
.add($document)
.mouseup(function() {
$splitter
.removeClass('active')
.unbind('mouseup');
$document
.unbind('mousemove')
.unbind('mouseup');
$.cookie('splitter', splitterPosition, {expires: 365});
});
return false;
});
$splitter.dblclick(function() {
if (splitterPosition) {
splitterPositionBackup = $left.width();
setSplitterPosition(0);
} else {
setSplitterPosition(splitterPositionBackup);
splitterPositionBackup = null;
}
setContentWidth();
$.cookie('splitter', splitterPosition, {expires: 365});
$.cookie('splitterBackup', splitterPositionBackup, {expires: 365});
});
if (null !== splitterPosition) {
setSplitterPosition(splitterPosition);
}
setNavigationPosition();
setContentWidth();
$(window)
.resize(setNavigationPosition)
.resize(setContentWidth);
// Select selected lines
var matches = window.location.hash.substr(1).match(/^\d+(?:-\d+)?(?:,\d+(?:-\d+)?)*$/);
if (null !== matches) {
var lists = matches[0].split(',');
for (var i = 0; i < lists.length; i++) {
var lines = lists[i].split('-');
lines[0] = parseInt(lines[0]);
lines[1] = parseInt(lines[1] || lines[0]);
for (var j = lines[0]; j <= lines[1]; j++) {
$('#' + j).addClass('selected');
}
}
var $firstLine = $('#' + parseInt(matches[0]));
if ($firstLine.length > 0) {
$right.scrollTop($firstLine.position().top);
}
}
// Save selected lines
var lastLine;
$('.l a').click(function(event) {
event.preventDefault();
var selectedLine = $(this).parent().index() + 1;
var $selectedLine = $('pre.code .l').eq(selectedLine - 1);
if (event.shiftKey) {
if (lastLine) {
for (var i = Math.min(selectedLine, lastLine); i <= Math.max(selectedLine, lastLine); i++) {
$('#' + i).addClass('selected');
}
} else {
$selectedLine.addClass('selected');
}
} else if (event.ctrlKey) {
$selectedLine.toggleClass('selected');
} else {
var $selected = $('.l.selected')
.not($selectedLine)
.removeClass('selected');
if ($selected.length > 0) {
$selectedLine.addClass('selected');
} else {
$selectedLine.toggleClass('selected');
}
}
lastLine = $selectedLine.hasClass('selected') ? selectedLine : null;
// Update hash
var lines = $('.l.selected')
.map(function() {
return parseInt($(this).attr('id'));
})
.get()
.sort(function(a, b) {
return a - b;
});
var hash = [];
var list = [];
for (var j = 0; j < lines.length; j++) {
if (0 === j && j + 1 === lines.length) {
hash.push(lines[j]);
} else if (0 === j) {
list[0] = lines[j];
} else if (lines[j - 1] + 1 !== lines[j] && j + 1 === lines.length) {
hash.push(list.join('-'));
hash.push(lines[j]);
} else if (lines[j - 1] + 1 !== lines[j]) {
hash.push(list.join('-'));
list = [lines[j]];
} else if (j + 1 === lines.length) {
list[1] = lines[j];
hash.push(list.join('-'));
} else {
list[1] = lines[j];
}
}
hash = hash.join(',');
$backup = $('#' + hash).removeAttr('id');
window.location.hash = hash;
$backup.attr('id', hash);
});
});

View File

@ -1,23 +0,0 @@
{layout '@layout.latte'}
{var $active = 'namespace'}
{block title}{if $namespace != 'None'}Namespace {$namespace}{else}No namespace{/if}{/block}
{block content}
<div id="content" class="namespace">
<h1>{if $namespace != 'None'}Namespace {$namespace|namespaceLinks:false|noescape}{else}No namespace{/if}</h1>
{if $subnamespaces}
<div class="panel panel-default">
<div class="panel-heading"><h2>Namespaces summary</h2></div>
<table class="summary table table-bordered table-striped" id="namespaces">
<tr n:foreach="$subnamespaces as $namespace">
<td class="name"><a href="{$namespace|namespaceUrl}">{$namespace}</a></td>
</tr>
</table>
</div>
{/if}
{include '@elementlist.latte'}
</div>
{/block}

View File

@ -1,11 +0,0 @@
{contentType xml}
<?xml version="1.0" encoding="UTF-8"?>
<OpenSearchDescription xmlns="http://a9.com/-/spec/opensearch/1.1/">
<ShortName>{$config->title}</ShortName>
<Description>{$config->title} Documentation</Description>
<Url type="text/html" method="GET" template="http://www.google.com/cse?cx={$config->googleCseId|url}&amp;ie=UTF-8&amp;q={l}searchTerms{r}"/>
<Image width="16" height="16">{$config->baseUrl}/favicon.ico</Image>
<SyndicationRight>open</SyndicationRight>
<InputEncoding>UTF-8</InputEncoding>
<OutputEncoding>UTF-8</OutputEncoding>
</OpenSearchDescription>

View File

@ -1,48 +0,0 @@
{layout '@layout.latte'}
{var $active = 'overview'}
{block title}{$config->title ?: 'Overview'}{/block}
{block content}
<div id="content">
<h1>{include title}</h1>
{var $group = false}
{if count($namespaces)}
<div class="panel panel-default">
<div class="panel-heading"><h2>Namespaces summary</h2></div>
<table class="summary table table-bordered table-striped" id="namespaces">
{foreach $namespaces as $namespace}
{continueIf $config->main && 0 !== strpos($namespace, $config->main)}
<tr>
{var $group = true}
<td class="name"><a href="{$namespace|namespaceUrl}">{$namespace}</a></td>
</tr>
{/foreach}
</table>
</div>
{/if}
{if count($packages)}
<div class="panel panel-default">
<div class="panel-heading"><h2>Packages summary</h2></div>
<table class="summary table table-bordered table-striped" id="packages">
{foreach $packages as $package}
{continueIf $config->main && 0 !== strpos($package, $config->main)}
<tr>
{var $group = true}
<td class="name">
<a href="{$package|packageUrl}">{$package}</a>
</td>
</tr>
{/foreach}
</table>
</div>
{/if}
{if ! $group}
{include '@elementlist.latte'}
{/if}
</div>
{/block}

View File

@ -1,23 +0,0 @@
{layout '@layout.latte'}
{var $active = 'package'}
{block title}{if $package != 'None'}Package {$package}{else}No package{/if}{/block}
{block content}
<div id="content" class="package">
<h1>{if $package != 'None'}Package {$package|packageLinks:false|noescape}{else}No package{/if}</h1>
{if $subpackages}
<div class="panel panel-default">
<div class="panel-heading"><h2>Packages summary</h2></div>
<table class="summary table table-bordered table-striped" id="packages">
<tr n:foreach="$subpackages as $package">
<td class="name"><a href="{$package|packageUrl}">{$package}</a></td>
</tr>
</table>
</div>
{/if}
{include '@elementlist.latte'}
</div>
{/block}

File diff suppressed because one or more lines are too long

Binary file not shown.

Before

Width:  |  Height:  |  Size: 288 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 152 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 171 B

View File

@ -1,569 +0,0 @@
/* Normal styles */
body {
padding: 50px 0 0 0;
}
h1 {
font-size: 2em;
margin: 0.67em 0;
}
h2 {
font-size: 1.5em;
margin: 0.83em 0;
}
h3 {
font-size: 1.17em;
margin: 1em 0 0.2em 0;
}
h4 {
font-size: 100%;
margin: 0;
padding: 0;
}
.panel-heading h2,
.panel-heading h3 {
margin-top: 0;
margin-bottom: 0;
}
.panel > p {
margin: 10px;
}
ul, ol {
margin-bottom: 0;
}
a, a:hover {
text-decoration: none;
}
var {
font-weight: bold;
font-style: normal;
color: #c09853;
}
code {
color: #000;
white-space: nowrap;
border: none;
background: transparent;
padding: 0
}
code:empty {
display: none;
}
code a b {
color: #000;
}
pre code {
white-space: pre;
}
.deprecated {
text-decoration: line-through;
opacity: .5;
}
.invalid {
color: #dd1144;
}
.hidden {
display: none;
}
/* Left side */
#left {
overflow: auto;
width: 270px;
height: 100%;
position: fixed;
}
/* Menu */
#menu {
padding: 10px;
overflow-x: hidden;
}
#menu h3 {
border-bottom: 1px solid #E7E7E7;
margin-left: -10px;
margin-right: -10px;
padding: 0 10px 5px 10px;
}
#menu ul {
list-style: none;
padding: 0;
margin: 0;
}
#menu ul ul {
padding-left: 10px;
}
#menu li {
white-space: nowrap;
position: relative;
}
#menu a {
display: block;
padding: 3px;
border-radius: 3px;
width: 100%;
overflow: hidden;
text-overflow: ellipsis;
}
#menu a:hover {
background-color: #a46497;
color: #fff !important;
}
#menu .active > a {
font-weight: bold;
color: #000;
}
#menu .active > a.invalid {
color: #dd1144;
}
#menu #groups span {
position: absolute;
top: 6px;
right: 3px;
cursor: pointer;
display: block;
width: 12px;
height: 12px;
background: url('collapsed.png') transparent 0 0 no-repeat;
}
#menu #groups span:hover {
background-position: -12px 0;
}
#menu #groups span.collapsed {
background-position: 0 -12px;
}
#menu #groups span.collapsed:hover {
background-position: -12px -12px;
}
#menu #groups ul.collapsed {
display: none;
}
/* Autocomplete */
.ac_results {
border-radius: 4px;
margin-top: 2px;
background-color: #fff;
border: 1px solid #E7E7E7;
box-shadow: 0 5px 10px rgba(0, 0, 0, 0.2);
overflow: hidden;
z-index: 99999;
}
.ac_results ul {
display: block;
list-style: none;
padding: 0;
margin: 0;
}
.ac_results li {
margin: 0;
padding: 0 5px;
line-height: 2;
cursor: default;
display: block;
overflow: hidden;
white-space: nowrap;
text-overflow: ellipsis;
}
.ac_results li strong {
color: #000;
}
.ac_over {
background-color: #a46497;
color: #fff;
}
.ac_results li.ac_over strong {
color: #fff;
}
/* Right side */
#right {
overflow: auto;
margin-left: 275px;
height: 100%;
position: relative;
left: 0;
right: 0;
}
#rightInner {
max-width: 1000px;
min-width: 350px;
}
/* Navigation */
#navigation {
margin-bottom: 0;
}
.navbar .nav > li > span {
position: relative;
display: block;
color: #777;
line-height: 20px;
padding: 15px;
}
.navbar .nav > li.active > span {
background-color: #E7E7E7;
color: #555;
}
/* Content */
#content {
clear: both;
padding: 5px 15px;
}
#content > .description {
margin: 1.2em 0;
}
#content .alert-info {
margin-top: 18px;
}
dl.tree {
margin: 1.2em 0;
padding: 10px;
}
dl.tree dd {
margin: 0;
padding: 0;
line-height: 18px;
}
.elementList {
line-height: 24px;
}
h2.switchable {
background: transparent url('sort.png') no-repeat center right;
cursor: pointer;
}
.summary td:first-child {
text-align: right;
}
.summary td hr {
margin: 8px -8px;
}
#packages.summary td:first-child, #namespaces.summary td:first-child, .inherited.summary td:first-child, .used.summary td:first-child {
text-align: left;
}
.summary tr:hover td {
background: #f6f6f4;
}
.summary .description p {
margin: 0;
}
.class #methods.summary .description p:first-child, .summary .description.detailed h4:first-child {
margin-top: 8px;
}
.summary .description p + p, .summary .description ul, .summary .description pre, .summary .description.detailed h4 {
margin-top: 4px;
}
.summary dl {
margin: 0;
}
.summary dd {
margin: 0 0 0 25px;
}
.summary dt, dd {
line-height: 24px;
}
.name, .attributes {
white-space: nowrap;
}
.value code {
white-space: pre-wrap;
}
td.name, td.attributes {
width: 1%;
}
.class .methods .name, .class .properties .name, .class .constants .name {
width: auto;
white-space: normal;
}
.class .methods .name > div > code {
white-space: pre-wrap;
}
.class .methods .name > div > code span, .function .value > code {
white-space: nowrap;
display: inline-block;
}
.class .methods td.name > div, .class td.value > div {
position: relative;
padding-right: 1em;
}
.attributes code, .name code, dd code {
color: #468847;
}
.anchor {
position: absolute;
top: 0;
right: 0;
line-height: 1;
font-size: 85%;
margin: 0;
color: #a46497 !important;
}
.list {
margin: 0 0 5px 25px;
line-height: 24px;
}
/* Splitter */
#splitter {
position: fixed;
height: 100%;
width: 5px;
left: 270px;
background: #E7E7E7 url('resize.png') left center no-repeat;
cursor: e-resize;
}
#splitter.active {
opacity: .5;
}
/* Footer */
#footer {
border-top: 1px solid #e5e5e5;
clear: both;
color: #808080;
text-align: right;
padding: 2em 1em;
margin: 3em 0 40px 0;
}
/* Tree */
div.tree ul {
list-style: none;
background: url('tree-vertical.png') left repeat-y;
padding: 0;
margin-left: 20px;
}
div.tree li {
margin: 0;
padding: 0;
}
div.tree div {
padding-left: 30px;
}
div.tree div.notlast {
background: url('tree-hasnext.png') left 10px no-repeat;
}
div.tree div.last {
background: url('tree-last.png') left -240px no-repeat;
}
div.tree li.last {
background: url('tree-cleaner.png') left center repeat-y;
}
div.tree span.padding {
padding-left: 15px;
}
/* Source code */
#source {
margin: 1em 0 1em 1em;
border: 1px solid #ccc;
border-radius: 4px;
overflow: auto;
}
#source pre {
padding: 0;
border: none;
overflow: visible;
}
#source .numbers {
float: left;
background-color: transparent;
}
#source .code {
}
.php-keyword1 {
color: #468847;
font-weight: bold;
}
.php-keyword2 {
font-weight: bold;
}
.php-var {
color: #c09853;
font-weight: bold;
}
.php-num {
color: #006dcc;
}
.php-quote {
color: #006dcc;
}
.php-comment {
color: #929292;
}
.xlang {
color: #468847;
font-weight: bold;
}
span.l {
display: block;
}
span.l.selected {
background: #f9f2d2;
}
span.l a {
color: #333333;
}
span.l a:hover, span.l a:active, span.l a:focus {
background: transparent;
color: #333333 !important;
}
span.l .php-var a {
color: #c09853;
}
span.l .php-var a:hover, span.l .php-var a:active, span.l .php-var a:focus {
color: #c09853 !important;
}
span.l a.l {
background: #fbfbfc;
margin-right: 8px;
padding: 2px 2px 2px 8px;
color: #c0c0c0;
}
span.l a.l:hover, span.l a.l:active, span.l a.l:focus {
background: #fbfbfc;
color: #c0c0c0 !important;
}
/* Small screens */
#rightInner.medium .name, #rightInner.medium .attributes {
white-space: normal;
}
/* global style */
.left, .summary td.left {
text-align: left;
}
.right, .summary td.right {
text-align: right;
}
/* Custom styles for Woo */
.navbar-header {
padding: 10px;
}
.navbar-brand {
background: url(woocommerce_logo_white.png) no-repeat left top;
background-size: 149px 30px;
width: 159px;
padding: 30px 0 0 0;
overflow: hidden;
height: 0;
}
#navigation {
background: #3c3c3c;
color: #fff;
}
#navigation a {
color: #fff;
}
.navbar .nav > li > span {
color: #999;
}
.navbar .nav > li > a:hover > span {
color: #a46497;
}
.navbar .nav > li.active > span, .navbar .nav > li.active > a {
background: #a46497;
color: #fff;
}
a {
color: #a46497;
}

Binary file not shown.

Before

Width:  |  Height:  |  Size: 126 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 128 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 172 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 127 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 5.8 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -1,4 +0,0 @@
{contentType text}
User-agent: *
Disallow:
Sitemap: {$config->baseUrl}/sitemap.xml

View File

@ -1,26 +0,0 @@
{contentType xml}
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
<url>
<loc>{$config->baseUrl}/index.html</loc>
</url>
<url n:foreach="$namespaces as $namespace">
<loc>{$config->baseUrl}/{$namespace|namespaceUrl}</loc>
</url>
<url n:foreach="$packages as $package">
<loc>{$config->baseUrl}/{$package|packageUrl}</loc>
</url>
{define elements}
<url n:foreach="$elements as $element">
<loc>{$config->baseUrl}/{$element|elementUrl}</loc>
</url>
{/define}
{include elements, elements => $classes}
{include elements, elements => $interfaces}
{include elements, elements => $traits}
{include elements, elements => $exceptions}
{include elements, elements => $constants}
{include elements, elements => $functions}
</urlset>

View File

@ -1,12 +0,0 @@
{layout '@layout.latte'}
{var $robots = false}
{block title}File {$fileName}{/block}
{block content}
<div id="source">
{var $lineRegex = '~<span class="line">(\s*)(\d+):(\s*)</span>([^\\n]*(?:\\n|$))~'}
<pre class="numbers"><code>{$source|replaceRE:$lineRegex,'<span class="l"><a href="#$2">$1$2$3</a></span>'|noescape}</code></pre>
<pre class="code"><code>{$source|replaceRE:$lineRegex,'<span id="$2" class="l">$4</span>'|noescape}</code></pre>
</div>
{/block}

View File

@ -1,67 +0,0 @@
{layout '@layout.latte'}
{var $active = 'tree'}
{block title}Tree{/block}
{define tree}
<div class="tree">
<ul>
{var $level = -1}
{foreach $tree as $reflectionName => $reflection|noiterator}
{if $level === $tree->getDepth()}
</li>
{elseif $level > $tree->getDepth()}
{='</ul></li>'|repeat:$level - $tree->getDepth()|noescape}
{elseif -1 !== $level}
<ul>
{/if}
<li n:class="!$tree->hasSibling() ? last"><div class="{if $tree->hasSibling()}not{/if}last"><a href="{$reflectionName|classUrl}" n:tag-if="$reflection->documented"><span n:class="$reflection->deprecated ? deprecated, !$reflection->valid ? invalid">{$reflectionName}</span></a>
{var $interfaces = $reflection->ownInterfaces}
{if $interfaces} implements {foreach $interfaces as $interface}
<a href="{$interface|classUrl}" n:tag-if="$interface->documented"><span n:class="$interface->deprecated ? deprecated, !$interface->valid ? invalid">{$interface->name}</span></a>{sep}, {/sep}
{/foreach}{/if}
{var $traits = $reflection->ownTraits}
{if $traits}{if $interfaces}<br><span class="padding"></span>{/if} uses {foreach $traits as $trait}
{if is_string($trait)}
{$trait} (not available)
{else}
<a href="{$trait|classUrl}" n:tag-if="$trait->documented"><span n:class="$trait->deprecated ? deprecated, !$trait->valid ? invalid">{$trait->name}</span></a>{sep}, {/sep}
{/}
{/foreach}{/if}
</div>
{var $level = $tree->getDepth()}
{/foreach}
</li>
{='</ul></li>'|repeat:$level|noescape}
</ul>
</div>
{/define}
{block content}
<div id="content">
<h1>{include title}</h1>
{if $classTree->valid()}
<h2>Classes</h2>
{include tree, tree => $classTree}
{/if}
{if $interfaceTree->valid()}
<h2>Interfaces</h2>
{include tree, tree => $interfaceTree}
{/if}
{if $traitTree->valid()}
<h2>Traits</h2>
{include tree, tree => $traitTree}
{/if}
{if $exceptionTree->valid()}
<h2>Exceptions</h2>
{include tree, tree => $exceptionTree}
{/if}
</div>
{/block}