]> git.mxchange.org Git - friendica.git/blob - src/Module/ReallySimpleDiscovery.php
Added parameter to rawContent
[friendica.git] / src / Module / ReallySimpleDiscovery.php
1 <?php
2
3 namespace Friendica\Module;
4
5 use Friendica\BaseModule;
6 use Friendica\Util\XML;
7
8 /**
9  * Prints the rsd.xml
10  * @see http://danielberlinger.github.io/rsd/
11  */
12 class ReallySimpleDiscovery extends BaseModule
13 {
14         public static function rawContent($parameters)
15         {
16                 header('Content-Type: text/xml');
17
18                 $app = self::getApp();
19                 $xml = null;
20                 echo XML::fromArray([
21                         'rsd' => [
22                                 '@attributes' => [
23                                         'version' => '1.0',
24                                         'xmlns'   => 'http://archipelago.phrasewise.com/rsd',
25                                 ],
26                                 'service'     => [
27                                         'engineName' => 'Friendica',
28                                         'engineLink' => 'http://friendica.com',
29                                         'apis'       => [
30                                                 'api' => [
31                                                         '@attributes' => [
32                                                                 'name'      => 'Twitter',
33                                                                 'preferred' => 'true',
34                                                                 'apiLink'   => $app->getBaseURL(),
35                                                                 'blogID'    => '',
36                                                         ],
37                                                         'settings'    => [
38                                                                 'docs'    => [
39                                                                         'http://status.net/wiki/TwitterCompatibleAPI',
40                                                                 ],
41                                                                 'setting' => [
42                                                                         '@attributes' => [
43                                                                                 'name' => 'OAuth',
44                                                                         ],
45                                                                         'false',
46                                                                 ],
47                                                         ],
48                                                 ]
49                                         ],
50                                 ],
51                         ],
52                 ], $xml);
53                 exit();
54         }
55 }