Adding more PHP Doc comments.

This commit is contained in:
jgen 2014-04-28 17:36:11 -04:00
parent eadf1d9e87
commit 86612bb1ff
2 changed files with 42 additions and 4 deletions

View file

@ -1438,6 +1438,9 @@ function _fatal_error(Exception $e) {
*
* Necessary because various servers and various clients
* think that / is special...
*
* @param string $str
* @return string
*/
function _decaret($str) {
$out = "";
@ -1456,6 +1459,9 @@ function _decaret($str) {
return $out;
}
/**
* @return User
*/
function _get_user() {
global $config;
$user = null;

View file

@ -1,7 +1,10 @@
<?php
class Themelet extends BaseThemelet {
/**
* Put something in a rounded rectangle box; specific to the default theme
* Put something in a rounded rectangle box; specific to the default theme.
*
* @param string $html
* @return string
*/
public function rr($html) {
return "
@ -12,7 +15,13 @@ class Themelet extends BaseThemelet {
}
/**
* Add a generic paginator
* Add a generic paginator.
*
* @param Page $page
* @param string $base
* @param string $query
* @param int $page_number
* @param int $total_pages
*/
public function display_paginator(Page $page, $base, $query, $page_number, $total_pages) {
if($total_pages == 0) $total_pages = 1;
@ -20,11 +29,27 @@ class Themelet extends BaseThemelet {
$page->add_block(new Block(null, $body, "main", 90));
}
/**
* @param string $base_url
* @param string $query
* @param string $page
* @param string $name
* @param null|string $link_class
* @return string
*/
public function litetheme_gen_page_link($base_url, $query, $page, $name, $link_class=null) {
$link = make_link("$base_url/$page", $query);
return "<a class='$link_class' href='$link'>$name</a>";
}
/**
* @param string $base_url
* @param string $query
* @param string $page
* @param string $current_page
* @param string $name
* @return string
*/
public function litetheme_gen_page_link_block($base_url, $query, $page, $current_page, $name) {
$paginator = "";
@ -33,7 +58,14 @@ class Themelet extends BaseThemelet {
return $paginator;
}
/**
* @param int $current_page
* @param int $total_pages
* @param string $base_url
* @param string $query
* @return string
*/
public function litetheme_build_paginator($current_page, $total_pages, $base_url, $query) {
$next = $current_page + 1;
$prev = $current_page - 1;