publicxrds.php 2.2 KB

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