1
|
<?php
|
2
|
// $Id$
|
3
|
|
4
|
/**
|
5
|
* Copyright (C) 2007 EDIT
|
6
|
* European Distributed Institute of Taxonomy
|
7
|
* http://www.e-taxonomy.eu
|
8
|
*
|
9
|
* The contents of this file are subject to the Mozilla Public License Version 1.1
|
10
|
* See http://www.mozilla.org/MPL/MPL-1.1.html for the full license terms.
|
11
|
*/
|
12
|
|
13
|
class RenderHints
|
14
|
{
|
15
|
|
16
|
|
17
|
private static $renderStack = array();
|
18
|
|
19
|
private static $footnoteListKey = false;
|
20
|
|
21
|
// private constructor
|
22
|
private function __construct() {
|
23
|
|
24
|
}
|
25
|
|
26
|
public static function getfootnoteListKey(){
|
27
|
return self::$footnoteListKey;
|
28
|
}
|
29
|
|
30
|
public static function setfootnoteListKey($key){
|
31
|
return self::$footnoteListKey = $footnoteListKey;
|
32
|
}
|
33
|
|
34
|
public static function pushToRenderStack($pathelement){
|
35
|
return array_push(self::$renderStack, $pathelement);
|
36
|
}
|
37
|
|
38
|
|
39
|
public static function popFromRenderStack(){
|
40
|
return array_pop(self::$renderStack);
|
41
|
}
|
42
|
|
43
|
/**
|
44
|
*
|
45
|
* @return
|
46
|
*/
|
47
|
public static function getRenderPath(){
|
48
|
return join('.', array_reverse(self::$renderStack));
|
49
|
}
|
50
|
|
51
|
// stop users from cloning
|
52
|
public function __clone() {
|
53
|
|
54
|
trigger_error('Cloning instances of the singleton class RenderHints is prohibited', E_USER_ERROR);
|
55
|
}
|
56
|
|
57
|
}
|