Project

General

Profile

Download (1.03 KB) Statistics
| Branch: | Tag: | Revision:
1
<?php
2
/**
3
 * @file
4
 * Class to provide a footnote.
5
 *
6
 * @copyright
7
 *   (C) 2007-2012 EDIT
8
 *   European Distributed Institute of Taxonomy
9
 *   http://www.e-taxonomy.eu
10
 *
11
 *   The contents of this module are subject to the Mozilla
12
 *   Public License Version 1.1.
13
 * @see http://www.mozilla.org/MPL/MPL-1.1.html
14
 */
15

    
16
/**
17
 * Provides a footnote.
18
 */
19
class Footnote {
20
  public $key, $object, $enclosing_tag;
21

    
22
  /**
23
   * Private constructor.
24
   */
25
  public function __construct($footnoteKey, $object, $enclosing_tag = NULL) {
26
    $this->key = $footnoteKey;
27
    $this->object = $object;
28
    $this->enclosing_tag = $enclosing_tag;
29
  }
30

    
31
  /**
32
   * Creates markup for the footnote.
33
   *
34
   * @param $footnote_list_key
35
   *
36
   * @return string
37
   *  The markup for the footnote
38
   */
39
  public function doRender($footnote_list_key = null) {
40

    
41
    $enclosing_tag = null;
42
    if(is_string($this->enclosing_tag)){
43
      $enclosing_tag = $this->enclosing_tag;
44
    }
45

    
46
    return render_footnote($this->key, $this->object, $enclosing_tag, $footnote_list_key);
47
  }
48
}
(5-5/8)