1 | <?php |
||
4 | class AltsysBreadcrumbs |
||
5 | { |
||
6 | |||
7 | public $paths = array() ; |
||
8 | |||
9 | public function __construct() |
||
10 | { |
||
11 | } |
||
12 | //HACK by domifara for php5.3+ |
||
13 | //function &getInstance() |
||
14 | public static function &getInstance() |
||
22 | |||
23 | public function getXoopsBreadcrumbs() |
||
24 | { |
||
25 | $ret = array() ; |
||
26 | foreach ($this->paths as $val) { |
||
27 | // delayed language constant |
||
28 | if (substr($val['name'], 0, 1) == '_' && defined($val['name'])) { |
||
29 | $ret[] = array( |
||
30 | 'url' => $val['url'] , |
||
31 | 'name' => constant($val['name']) |
||
32 | ) ; |
||
33 | } else { |
||
34 | $ret[] = $val ; |
||
35 | } |
||
36 | } |
||
37 | unset($ret[count($ret) - 1 ]['url']) ; |
||
38 | return $ret ; |
||
39 | } |
||
40 | |||
41 | // all data should be escaped |
||
42 | public function appendPath($url_or_path, $name = '...') |
||
57 | |||
58 | public function hasPaths() |
||
62 | } |
||
63 |