Upgrade to KH 3.1.3.1
This commit is contained in:
@@ -2,13 +2,33 @@
|
||||
<?php echo $doc->modifiers, $doc->class->name ?>
|
||||
<?php $parent = $doc->class; ?>
|
||||
<?php while ($parent = $parent->getParentClass()): ?>
|
||||
<br/><small>› <?php echo HTML::anchor($route->uri(array('class' => $parent->name)), $parent->name) ?></small>
|
||||
<br/><small>extends <?php echo HTML::anchor($route->uri(array('class' => $parent->name)), $parent->name, NULL, NULL, TRUE) ?></small>
|
||||
<?php endwhile ?>
|
||||
</h1>
|
||||
|
||||
<h2 id="toc"><?php echo __('Class Contents'); ?></h2>
|
||||
<div class="toc span-17 last">
|
||||
<div class="constants span-5">
|
||||
<?php echo $doc->description ?>
|
||||
|
||||
<?php if ($doc->tags): ?>
|
||||
<dl class="tags">
|
||||
<?php foreach ($doc->tags as $name => $set): ?>
|
||||
<dt><?php echo $name ?></dt>
|
||||
<?php foreach ($set as $tag): ?>
|
||||
<dd><?php echo $tag ?></dd>
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
</dl>
|
||||
<?php endif; ?>
|
||||
|
||||
<p class="note">
|
||||
<?php if ($path = $doc->class->getFilename()): ?>
|
||||
Class declared in <tt><?php echo Debug::path($path) ?></tt> on line <?php echo $doc->class->getStartLine() ?>.
|
||||
<?php else: ?>
|
||||
Class is not declared in a file, it is probably an internal <?php echo html::anchor('http://php.net/manual/class.'.strtolower($doc->class->name).'.php', 'PHP class') ?>.
|
||||
<?php endif ?>
|
||||
</p>
|
||||
|
||||
<div class="toc">
|
||||
<div class="constants">
|
||||
<h3><?php echo __('Constants'); ?></h3>
|
||||
<ul>
|
||||
<?php if ($doc->constants): ?>
|
||||
@@ -20,7 +40,7 @@
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="properties span-6">
|
||||
<div class="properties">
|
||||
<h3><?php echo __('Properties'); ?></h3>
|
||||
<ul>
|
||||
<?php if ($properties = $doc->properties()): ?>
|
||||
@@ -32,7 +52,7 @@
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="methods span-6 last">
|
||||
<div class="methods">
|
||||
<h3><?php echo __('Methods'); ?></h3>
|
||||
<ul>
|
||||
<?php if ($methods = $doc->methods()): ?>
|
||||
@@ -40,30 +60,20 @@
|
||||
<li><a href="#<?php echo $method->method->name ?>"><?php echo $method->method->name ?>()</a></li>
|
||||
<?php endforeach ?>
|
||||
<?php else: ?>
|
||||
<li><em><?php echo __('one'); ?></em></li>
|
||||
<li><em><?php echo __('None'); ?></em></li>
|
||||
<?php endif ?>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php echo $doc->description ?>
|
||||
|
||||
<?php if ($doc->tags) echo View::factory('userguide/api/tags')->set('tags', $doc->tags) ?>
|
||||
|
||||
<p class="note">
|
||||
<?php if ($path = $doc->class->getFilename()): ?>
|
||||
Class declared in <tt><?php echo Kohana::debug_path($path) ?></tt> on line <?php echo $doc->class->getStartLine() ?>.
|
||||
<?php else: ?>
|
||||
Class is not declared in a file, it is probably an internal <?php echo html::anchor('http://php.net/manual/class.'.strtolower($doc->class->name).'.php', 'PHP class') ?>.
|
||||
<?php endif ?>
|
||||
</p>
|
||||
<div class="clearfix"></div>
|
||||
|
||||
<?php if ($doc->constants): ?>
|
||||
<div class="constants">
|
||||
<h2 id="constants"><?php echo __('Constants'); ?></h2>
|
||||
<h1 id="constants"><?php echo __('Constants'); ?></h1>
|
||||
<dl>
|
||||
<?php foreach ($doc->constants as $name => $value): ?>
|
||||
<dt id="constant:<?php echo $name ?>"><?php echo $name ?></dt>
|
||||
<dt><h4 id="constant:<?php echo $name ?>"><?php echo $name ?></h4></dt>
|
||||
<dd><?php echo $value ?></dd>
|
||||
<?php endforeach; ?>
|
||||
</dl>
|
||||
@@ -71,11 +81,11 @@ Class is not declared in a file, it is probably an internal <?php echo html::anc
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($properties = $doc->properties()): ?>
|
||||
<h2 id="properties"><?php echo __('Properties'); ?></h2>
|
||||
<h1 id="properties"><?php echo __('Properties'); ?></h1>
|
||||
<div class="properties">
|
||||
<dl>
|
||||
<?php foreach ($properties as $prop): ?>
|
||||
<dt id="property:<?php echo $prop->property->name ?>"><?php echo $prop->modifiers ?> <code><?php echo $prop->type ?></code> $<?php echo $prop->property->name ?></dt>
|
||||
<dt><h4 id="property:<?php echo $prop->property->name ?>"><?php echo $prop->modifiers ?> <code><?php echo $prop->type ?></code> $<?php echo $prop->property->name ?></h4></dt>
|
||||
<dd><?php echo $prop->description ?></dd>
|
||||
<dd><?php echo $prop->value ?></dd>
|
||||
<?php endforeach ?>
|
||||
@@ -84,7 +94,7 @@ Class is not declared in a file, it is probably an internal <?php echo html::anc
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($methods = $doc->methods()): ?>
|
||||
<h2 id="methods"><?php echo __('Methods'); ?></h2>
|
||||
<h1 id="methods"><?php echo __('Methods'); ?></h1>
|
||||
<div class="methods">
|
||||
<?php foreach ($methods as $method): ?>
|
||||
<?php echo View::factory('userguide/api/method')->set('doc', $method)->set('route', $route) ?>
|
||||
|
@@ -1,14 +1,16 @@
|
||||
|
||||
<h2>Modules</h2>
|
||||
<ol class="menu">
|
||||
<?php foreach ($menu as $package => $categories): ksort($categories); ?>
|
||||
<li><strong><?php echo $package ?></strong>
|
||||
<li><span><strong><?php echo $package ?></strong></span>
|
||||
<ol>
|
||||
<?php foreach ($categories as $category => $classes): sort($classes); ?>
|
||||
<li><?php if ($category !== 'Base'): ?><strong><?php echo $category ?></strong><?php endif ?>
|
||||
<ol>
|
||||
<li><?php if ($category !== 'Base'): ?><span><?php echo $category ?></span>
|
||||
<ol><?php endif ?>
|
||||
<?php foreach ($classes as $class): ?>
|
||||
<li><?php echo $class ?></li>
|
||||
<?php endforeach ?>
|
||||
</ol>
|
||||
<?php if ($category !== 'Base'): ?></ol><?php endif ?>
|
||||
</li>
|
||||
<?php endforeach ?>
|
||||
</ol>
|
||||
|
@@ -3,48 +3,41 @@
|
||||
<?php $declares = $doc->method->getDeclaringClass(); ?>
|
||||
<h3 id="<?php echo $doc->method->name ?>">
|
||||
<?php echo $doc->modifiers, $doc->method->name ?>( <?php echo $doc->params ? $doc->params_short() : '' ?>)
|
||||
<br/><small>› <?php echo html::anchor($route->uri(array('class' => $declares->name)), $declares->name) ?></small>
|
||||
<small>(defined in <?php echo html::anchor($route->uri(array('class' => $declares->name)), $declares->name, NULL, NULL, TRUE) ?>)</small>
|
||||
</h3>
|
||||
|
||||
<div class="description">
|
||||
<?php echo $doc->description ?>
|
||||
</div>
|
||||
|
||||
<?php if ($doc->tags) echo View::factory('userguide/api/tags')->set('tags', $doc->tags) ?>
|
||||
|
||||
<?php // param tables disabled, removed the FALSE AND below to activate ?>
|
||||
<?php if ( FALSE AND $doc->params): ?>
|
||||
<h5><?php echo __('Parameters'); ?></h5>
|
||||
<table>
|
||||
<tr>
|
||||
<th><?php echo __('Parameter'); ?></th>
|
||||
<th><?php echo __('Type'); ?></th>
|
||||
<th><?php echo __('Description'); ?></th>
|
||||
<th><?php echo __('Default'); ?></th>
|
||||
</tr>
|
||||
<?php if ($doc->params): ?>
|
||||
<h4>Parameters</h4>
|
||||
<ul>
|
||||
<?php foreach ($doc->params as $param): ?>
|
||||
<tr>
|
||||
<td><strong><code><?php echo '$'.$param->name ?></code></strong></td>
|
||||
<td><code><?php echo $param->byref?'byref ':''.$param->type?$param->type:'unknown' ?></code></td>
|
||||
<td><?php echo ucfirst($param->description) ?></td>
|
||||
<td><?php echo $param->default ?></td>
|
||||
</tr>
|
||||
<li>
|
||||
<code><?php echo ($param->reference?'byref ':'').($param->type?$param->type:'unknown') ?></code>
|
||||
<strong><?php echo '$'.$param->name ?></strong>
|
||||
<?php echo $param->default?'<small> = '.$param->default.'</small>':'<small>required</small>' ?>
|
||||
<?php echo $param->description?' - '.$param->description:'' ?>
|
||||
</li>
|
||||
<?php endforeach; ?>
|
||||
</table>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($doc->tags) echo View::factory('userguide/api/tags')->set('tags', $doc->tags) ?>
|
||||
|
||||
<?php if ($doc->return): ?>
|
||||
<h5><?php echo __('Return Values'); ?></h5>
|
||||
<h4><?php echo __('Return Values'); ?></h4>
|
||||
<ul class="return">
|
||||
<?php foreach ($doc->return as $set): list($type, $text) = $set; ?>
|
||||
<li><code><?php echo HTML::chars($type) ?></code> <?php echo HTML::chars($text) ?></li>
|
||||
<li><code><?php echo HTML::chars($type) ?></code><?php if ($text) echo ' - '.HTML::chars(ucfirst($text)) ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
<?php endif ?>
|
||||
|
||||
<?php if ($doc->source): ?>
|
||||
<div class="method-source">
|
||||
<h5><?php echo __('Source Code'); ?></h5>
|
||||
<h4><?php echo __('Source Code'); ?></h4>
|
||||
<pre><code><?php echo HTML::chars($doc->source) ?></code></pre>
|
||||
</div>
|
||||
<?php endif ?>
|
||||
|
@@ -1,8 +1,6 @@
|
||||
<dl class="tags">
|
||||
<h4>Tags</h4>
|
||||
<ul class="tags">
|
||||
<?php foreach ($tags as $name => $set): ?>
|
||||
<dt><?php echo $name ?></dt>
|
||||
<?php foreach ($set as $tag): ?>
|
||||
<dd><?php echo $tag ?></dd>
|
||||
<li><?php echo ucfirst($name).($set?' - '.implode(', ',$set):''); ?>
|
||||
<?php endforeach ?>
|
||||
<?php endforeach ?>
|
||||
</dl>
|
||||
</ul>
|
@@ -1,13 +1,72 @@
|
||||
<h1><?php echo __('Available Classes') ?></h1>
|
||||
|
||||
<label>Filter:</label>
|
||||
<input type="text" id="api-filter-box" />
|
||||
|
||||
<script type="text/javascript">
|
||||
(function($) {
|
||||
$.fn.extend({
|
||||
filter_content: function(search){
|
||||
var search_regex = new RegExp(search,'gi');
|
||||
|
||||
// Run through each .class definition
|
||||
$('.class', this).each(function(k, container){
|
||||
if (search == '') {
|
||||
// If search box is empty show everything without doing any regex
|
||||
$(container).show();
|
||||
$('li', container).show();
|
||||
|
||||
// Continue
|
||||
return true;
|
||||
}
|
||||
|
||||
// Run through every anchor
|
||||
$('a', $(container)).each(function(k, anchor){
|
||||
// Keep track of the li
|
||||
var $parent = $(anchor).closest('li');
|
||||
|
||||
if ($(anchor).text().match(search_regex)) {
|
||||
// Show the li and .class parent if its a match
|
||||
$parent.show();
|
||||
$(container).show();
|
||||
} else {
|
||||
// Otherwise we can only assume to hide the li
|
||||
$parent.hide();
|
||||
}
|
||||
});
|
||||
|
||||
if ($('li:visible', $(container)).length == 0) {
|
||||
// If there are not any visible li's, the entire .class section needs to hide
|
||||
$(container).hide();
|
||||
} else {
|
||||
// Otherwise show the .class container
|
||||
$(container).show();
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
api_filter: function(api_container_selector){
|
||||
$(this).keyup(function(){
|
||||
// Run the filter method on this value
|
||||
$(api_container_selector).filter_content($(this).val());
|
||||
});
|
||||
}
|
||||
})
|
||||
})(jQuery);
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#api-filter-box').api_filter('#kodoc-main');
|
||||
});
|
||||
</script>
|
||||
|
||||
<div class="class-list">
|
||||
|
||||
<?php foreach ($classes as $class => $methods): $link = $route->uri(array('class' => $class)) ?>
|
||||
<div class="class <?php echo Text::alternate('left', 'right') ?>">
|
||||
<h2><?php echo HTML::anchor($link, $class) ?></h2>
|
||||
<h2><?php echo HTML::anchor($link, $class, NULL, NULL, TRUE) ?></h2>
|
||||
<ul class="methods">
|
||||
<?php foreach ($methods as $method): ?>
|
||||
<li><?php echo HTML::anchor("{$link}#{$method}", "{$class}::{$method}") ?></li>
|
||||
<li><?php echo HTML::anchor("{$link}#{$method}", "{$class}::{$method}", NULL, NULL, TRUE) ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
20
includes/kohana/modules/userguide/views/userguide/index.php
Normal file
20
includes/kohana/modules/userguide/views/userguide/index.php
Normal file
@@ -0,0 +1,20 @@
|
||||
<h1>User Guide</h1>
|
||||
|
||||
<p>The following modules have userguide pages:</p>
|
||||
|
||||
<?php if( ! empty($modules)): ?>
|
||||
|
||||
<?php foreach($modules as $url => $options): ?>
|
||||
|
||||
<p>
|
||||
<strong><?php echo html::anchor(Route::get('docs/guide')->uri(array('module' => $url)), $options['name'], NULL, NULL, TRUE) ?></strong> -
|
||||
<?php echo $options['description'] ?>
|
||||
</p>
|
||||
|
||||
<?php endforeach; ?>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<p class="error">I couldn't find any modules with userguide pages.</p>
|
||||
|
||||
<?php endif; ?>
|
17
includes/kohana/modules/userguide/views/userguide/menu.php
Normal file
17
includes/kohana/modules/userguide/views/userguide/menu.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<h2>Modules</h2>
|
||||
|
||||
<?php if( ! empty($modules)): ?>
|
||||
|
||||
<ul>
|
||||
<?php foreach($modules as $url => $options): ?>
|
||||
|
||||
<li><?php echo html::anchor(Route::get('docs/guide')->uri(array('module' => $url)), $options['name'], NULL, NULL, TRUE) ?></li>
|
||||
|
||||
<?php endforeach; ?>
|
||||
</ul>
|
||||
|
||||
<?php else: ?>
|
||||
|
||||
<p class="error">No modules.</p>
|
||||
|
||||
<?php endif; ?>
|
@@ -0,0 +1,10 @@
|
||||
<?php if (is_array($array)): ?>
|
||||
<div class="page-toc">
|
||||
<?php foreach ($array as $item): ?>
|
||||
<?php if ($item['level'] > 1): ?>
|
||||
<?php echo str_repeat(' ', ($item['level'] - 1) * 4) ?>
|
||||
<?php endif ?>
|
||||
<?php echo HTML::anchor('#'.$item['id'],$item['name'], NULL, NULL, TRUE); ?><br />
|
||||
<?php endforeach; ?>
|
||||
</div>
|
||||
<?php endif ?>
|
@@ -5,69 +5,88 @@
|
||||
|
||||
<title><?php echo $title ?> | Kohana <?php echo __('User Guide'); ?></title>
|
||||
|
||||
<?php foreach ($styles as $style => $media) echo HTML::style($style, array('media' => $media), TRUE), "\n" ?>
|
||||
<?php foreach ($styles as $style => $media) echo HTML::style($style, array('media' => $media), NULL, TRUE), "\n" ?>
|
||||
|
||||
<?php foreach ($scripts as $script) echo HTML::script($script, NULL, TRUE), "\n" ?>
|
||||
<?php foreach ($scripts as $script) echo HTML::script($script, NULL, NULL, TRUE), "\n" ?>
|
||||
|
||||
<!--[if lt IE 9]>
|
||||
<script src="http://ie7-js.googlecode.com/svn/version/2.1(beta4)/IE9.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
<body class="<?php echo $l ?>">
|
||||
<body>
|
||||
|
||||
<div id="topbar" class="clear">
|
||||
<div class="container">
|
||||
<div class="span-17 suffix-1">
|
||||
<ul class="breadcrumb">
|
||||
<?php foreach ($breadcrumb as $link => $title): ?>
|
||||
<li><?php echo is_int($link) ? $title : HTML::anchor($link, $title) ?></li>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="translations span-6 last">
|
||||
<?php echo form::open(NULL, array('method' => 'get')) ?>
|
||||
<?php echo form::select('lang', $translations, I18n::$lang) ?>
|
||||
<?php echo form::close() ?>
|
||||
<div id="header">
|
||||
<div class="container">
|
||||
<a href="http://kohanaframework.org/" id="logo">
|
||||
<img src="<?php echo Route::url('docs/media', array('file' => 'img/kohana.png')) ?>" />
|
||||
</a>
|
||||
<div id="menu">
|
||||
<ul>
|
||||
<li class="guide first">
|
||||
<a href="<?php echo Route::url('docs/guide') ?>"><?php echo __('User Guide') ?></a>
|
||||
</li>
|
||||
<li class="api">
|
||||
<a href="<?php echo Route::url('docs/api') ?>"><?php echo __('API Browser') ?></a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="docs" class="container clear">
|
||||
<div id="content" class="span-17 suffix-1 colborder">
|
||||
<?php echo $content ?>
|
||||
<div id="content">
|
||||
<div class="wrapper">
|
||||
<div class="container">
|
||||
<div class="span-22 prefix-1 suffix-1">
|
||||
<ul id="breadcrumb">
|
||||
<?php foreach ($breadcrumb as $link => $title): ?>
|
||||
<?php if (is_string($link)): ?>
|
||||
<li><?php echo HTML::anchor($link, $title, NULL, NULL, TRUE) ?></li>
|
||||
<?php else: ?>
|
||||
<li class="last"><?php echo $title ?></li>
|
||||
<?php endif ?>
|
||||
<?php endforeach ?>
|
||||
</ul>
|
||||
</div>
|
||||
<div class="span-6 prefix-1">
|
||||
<div id="topics">
|
||||
<?php echo $menu ?>
|
||||
</div>
|
||||
</div>
|
||||
<div id="body" class="span-16 suffix-1 last">
|
||||
<?php echo $content ?>
|
||||
|
||||
<?php if (Kohana::$environment === Kohana::PRODUCTION): ?>
|
||||
<div id="disqus_thread" class="clear"></div>
|
||||
<script type="text/javascript">
|
||||
var disqus_identifier = '<?php echo HTML::chars(Request::instance()->uri) ?>';
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = 'http://kohana.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<noscript><?php echo __('Please enable JavaScript to view the :anchor_open comments powered by Disqus.:anchor_close', array(':anchor_open' => '<a href="http://disqus.com/?ref_noscript=kohana">', ':anchor_close' => '</a>')); ?></noscript>
|
||||
<a href="http://disqus.com" class="dsq-brlink">Documentation comments powered by <span class="logo-disqus">Disqus</span></a>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
|
||||
<div id="menu" class="span-6 last">
|
||||
<?php echo $menu ?>
|
||||
<?php if (isset($module_menus) AND ! empty($module_menus)) : ?>
|
||||
<h3><?php echo __('Modules'); ?></h3>
|
||||
<?php echo implode("\n", $module_menus) ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer" class="clear">
|
||||
<div class="container">
|
||||
<div class="span-17 suffix-1">
|
||||
<p class="copyright right">© 2008–<?php echo date('Y') ?> Kohana Team</p>
|
||||
</div>
|
||||
<div class="span-6 last">
|
||||
<p class="powered center">Powered by <?php echo HTML::anchor('http://kohanaframework.org/', 'Kohana') ?> v<?php echo Kohana::VERSION ?></p>
|
||||
<?php if (Kohana::$environment === Kohana::PRODUCTION AND empty($hide_disqus)): ?>
|
||||
<div id="disqus_thread" class="clear"></div>
|
||||
<script type="text/javascript">
|
||||
var disqus_identifier = '<?php echo HTML::chars(Request::current()->uri()) ?>';
|
||||
(function() {
|
||||
var dsq = document.createElement('script'); dsq.type = 'text/javascript'; dsq.async = true;
|
||||
dsq.src = 'http://kohana.disqus.com/embed.js';
|
||||
(document.getElementsByTagName('head')[0] || document.getElementsByTagName('body')[0]).appendChild(dsq);
|
||||
})();
|
||||
</script>
|
||||
<noscript><?php echo __('Please enable JavaScript to view the :anchor_open comments powered by Disqus.:anchor_close', array(':anchor_open' => '<a href="http://disqus.com/?ref_noscript=kohana">', ':anchor_close' => '</a>')); ?></noscript>
|
||||
<a href="http://disqus.com" class="dsq-brlink">Documentation comments powered by <span class="logo-disqus">Disqus</span></a>
|
||||
<?php endif ?>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="footer">
|
||||
<div class="container">
|
||||
<div class="span-12">
|
||||
<?php if (isset($copyright)): ?>
|
||||
<p><?php echo $copyright ?></p>
|
||||
<?php else: ?>
|
||||
|
||||
<?php endif ?>
|
||||
</div>
|
||||
<div class="span-12 last right">
|
||||
<p>Powered by <?php echo HTML::anchor('http://kohanaframework.org/', 'Kohana') ?> v<?php echo Kohana::VERSION ?></p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<?php if (Kohana::$environment === Kohana::PRODUCTION): ?>
|
||||
<script type="text/javascript">
|
||||
|
Reference in New Issue
Block a user