php Class Yadis Extension which provide YADIS support see http yadis o

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
<?php
/*
* Class Yadis
*
* Extension which provide YADIS support
*
* @see: http://yadis.org
*/
class yadis {
// extension output
static public $render = null;
/*
* Class constructor
*
* @param void
* @return self
*/
public function __construct() {
$serverURL = core::config('base_url');
$localID = core::config('site_domain');
ob_start();
include (EXTPATH . __CLASS__ . '/yadis.xrds');
self::$render = ob_get_clean();
event::add('controller.xrds', array(__CLASS__, 'render'));
}
/*
* Show output if exists
*
* @param: void
* @return: void
*/
public function render() {
if(self::$render !== null) echo self::$render;
}
}