summaryrefslogtreecommitdiff
path: root/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/function.counter.php
diff options
context:
space:
mode:
authorctrlaltca@gmail.com <>2011-11-19 11:05:46 +0000
committerctrlaltca@gmail.com <>2011-11-19 11:05:46 +0000
commit1f09b786730956d01c48a82272617a0f8b2597f0 (patch)
treefe733def390a3c7ec41933ef4a55c06cf403e9f4 /buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/function.counter.php
parentd840107832b1f59a9fc3b93ffb97ef976be1b83c (diff)
updating phpDocumentor, part 1: removal of the old version
Diffstat (limited to 'buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/function.counter.php')
-rw-r--r--buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/function.counter.php88
1 files changed, 0 insertions, 88 deletions
diff --git a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/function.counter.php b/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/function.counter.php
deleted file mode 100644
index 8d17d2bb..00000000
--- a/buildscripts/PhpDocumentor/phpDocumentor/Smarty-2.6.0/libs/plugins/function.counter.php
+++ /dev/null
@@ -1,88 +0,0 @@
-<?php
-/**
- * Smarty plugin
- * @package Smarty
- * @subpackage plugins
- */
-
-
-/**
- * Smarty {counter} function plugin
- *
- * Type: function<br>
- * Name: counter<br>
- * Purpose: print out a counter value
- * @link http://smarty.php.net/manual/en/language.function.counter.php {counter}
- * (Smarty online manual)
- * @param array parameters
- * @param Smarty
- * @return string|null
- */
-function smarty_function_counter($params, &$smarty)
-{
- static $counters = array();
-
- extract($params);
-
- if (!isset($name)) {
- if(isset($id)) {
- $name = $id;
- } else {
- $name = "default";
- }
- }
-
- if (!isset($counters[$name])) {
- $counters[$name] = array(
- 'start'=>1,
- 'skip'=>1,
- 'direction'=>'up',
- 'count'=>1
- );
- }
- $counter =& $counters[$name];
-
- if (isset($start)) {
- $counter['start'] = $counter['count'] = $start;
- }
-
- if (!empty($assign)) {
- $counter['assign'] = $assign;
- }
-
- if (isset($counter['assign'])) {
- $smarty->assign($counter['assign'], $counter['count']);
- }
-
- if (isset($print)) {
- $print = (bool)$print;
- } else {
- $print = empty($counter['assign']);
- }
-
- if ($print) {
- $retval = $counter['count'];
- } else {
- $retval = null;
- }
-
- if (isset($skip)) {
- $counter['skip'] = $skip;
- }
-
- if (isset($direction)) {
- $counter['direction'] = $direction;
- }
-
- if ($counter['direction'] == "down")
- $counter['count'] -= $counter['skip'];
- else
- $counter['count'] += $counter['skip'];
-
- return $retval;
-
-}
-
-/* vim: set expandtab: */
-
-?>