Project

General

Profile

Download (1.36 KB) Statistics
| Branch: | Tag: | Revision:
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
      self::$footnoteListKey = $key;
32
    }
33
    
34
    public static function pushToRenderStack($pathelement){
35
      array_push(self::$renderStack, $pathelement);
36
    }
37
    
38
   
39
    public static function popFromRenderStack(){
40
      return array_pop(self::$renderStack);
41
    }
42
    
43
    public static function sizeof(){
44
    	return sizeof(self::$renderStack);
45
    }
46
    
47
    /**
48
     * 
49
     * @return
50
     */
51
    public static function getRenderPath(){
52
      return join('.', array_reverse(self::$renderStack));
53
    }
54

    
55
    // stop users from cloning
56
    public function __clone() {
57
      
58
        trigger_error('Cloning instances of the singleton class RenderHints is prohibited', E_USER_ERROR);
59
    }
60

    
61
}
(4-4/4)