Exemplo n.º 1
0
 /**
  * The getManifest action, acts as a service and should be requested through an XML HTTP REQUEST
  * in order to retrieve a widget's manifest (with palette extension) for a user.
  * Actually, the XML manifest will contain the preferences of the widget for user requesting this service through its user-agent.
  *
  * The manifest will be simply written in the XML HTTP RESPONSE.
  *
  * @param string $widget The widget's identifier.
  */
 public function getManifest($widget)
 {
     if (!Auth::isAuth()) {
         throw new ServiceException(MwwException::CONTROLLER, 'getManifest', ServiceException::SERV_AUTH);
     }
     $manifest = UserInterface::retrieveWidgetManifest(Auth::getUserId(), $widget);
     // XML Header sent and output to the user-agent.
     header('Content-Type: text/xml');
     echo $manifest;
 }