]> git.mxchange.org Git - quix0rs-gnu-social.git/blob - actions/publicxrds.php
Merge branch 'master' of gitorious.org:statusnet/mainline into 0.9.x
[quix0rs-gnu-social.git] / actions / publicxrds.php
1 <?php
2
3 /**
4  * Public XRDS for OpenID
5  *
6  * PHP version 5
7  *
8  * @category Action
9  * @package  StatusNet
10  * @author   Evan Prodromou <evan@status.net>
11  * @author   Craig Andrews <candrews@integralblue.com>
12  * @author   Robin Millette <millette@status.net>
13  * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org
14  * @license  http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
15  * @link     http://status.net/
16  *
17  * StatusNet - the distributed open-source microblogging tool
18  * Copyright (C) 2008, 2009, StatusNet, Inc.
19  *
20  * This program is free software: you can redistribute it and/or modify
21  * it under the terms of the GNU Affero General Public License as published by
22  * the Free Software Foundation, either version 3 of the License, or
23  * (at your option) any later version.
24  *
25  * This program is distributed in the hope that it will be useful,
26  * but WITHOUT ANY WARRANTY; without even the implied warranty of
27  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28  * GNU Affero General Public License for more details.
29  *
30  * You should have received a copy of the GNU Affero General Public License
31  * along with this program.  If not, see <http://www.gnu.org/licenses/>.
32  */
33
34 if (!defined('STATUSNET') && !defined('LACONICA')) {
35     exit(1);
36 }
37
38 require_once INSTALLDIR.'/plugins/OpenID/openid.php';
39 require_once INSTALLDIR.'/lib/xrdsoutputter.php';
40
41 /**
42  * Public XRDS
43  *
44  * @category Action
45  * @package  StatusNet
46  * @author   Evan Prodromou <evan@status.net>
47  * @author   Robin Millette <millette@status.net>
48  * @author   Craig Andrews <candrews@integralblue.com>
49  * @copyright 2009 Free Software Foundation, Inc http://www.fsf.org
50  * @license  http://www.fsf.org/licensing/licenses/agpl.html AGPLv3
51  * @link     http://status.net/
52  *
53  * @todo factor out similarities with XrdsAction
54  */
55 class PublicxrdsAction extends Action
56 {
57     /**
58      * Is read only?
59      *
60      * @return boolean true
61      */
62     function isReadOnly($args)
63     {
64         return true;
65     }
66
67     /**
68      * Class handler.
69      *
70      * @param array $args array of arguments
71      *
72      * @return nothing
73      */
74     function handle($args)
75     {
76         parent::handle($args);
77         $xrdsOutputter = new XRDSOutputter();
78         $xrdsOutputter->startXRDS();
79         Event::handle('StartPublicXRDS', array($this,&$xrdsOutputter));
80         Event::handle('EndPublicXRDS', array($this,&$xrdsOutputter));
81         $xrdsOutputter->endXRDS();
82     }
83 }
84