1: <?php
 2: /**
 3:  * Renders collected links for a Wiki page.
 4:  *
 5:  * Copyright 2011-2012 Horde LLC (http://www.horde.org/)
 6:  *
 7:  * See the enclosed file COPYING for license information (GPLv2). If
 8:  * you did not receive this file, see
 9:  * http://www.horde.org/licenses/gpl
10:  *
11:  * PHP version 5
12:  *
13:  * @category Horde
14:  * @package  Wicked
15:  * @author   Gunnar Wrobel <wrobel@pardus.de>
16:  * @link     http://www.horde.org/apps/wicked
17:  * @license  http://www.horde.org/licenses/gpl GNU General Public License, version 2
18:  */
19: 
20: /**
21:  * Renders collected links for a Wiki page.
22:  *
23:  * @category Horde
24:  * @package  Wicked
25:  * @author   Gunnar Wrobel <wrobel@pardus.de>
26:  * @link     http://www.horde.org/apps/wicked
27:  * @license  http://www.horde.org/licenses/gpl GNU General Public License, version 2
28:  */
29: class Text_Wiki_Render_Rst_Links
30: {
31:     static public function append()
32:     {
33:         $result = '';
34:         $links = array_merge(
35:             Text_Wiki_Render_Rst_Url::$paragraph_links,
36:             Text_Wiki_Render_Rst_Freelink::$paragraph_links
37:         );
38:         if (!empty($links)) {
39:             $result .= "\n";
40:             foreach ($links as $link) {
41:                 $result .= "\n" . $link ;
42:             }
43:             Text_Wiki_Render_Rst_Url::$paragraph_links = array();
44:             Text_Wiki_Render_Rst_Freelink::$paragraph_links = array();
45:         }
46:         return $result;
47:     }
48: }
49: