public function serviceDocument()
 {
     $service = new KT_atom_serviceDoc(KT_APP_BASE_URI);
     foreach ($this->services as $workspace => $collection) {
         //Creating the Default Workspace for use with standard atomPub Clients
         $ws = $service->newWorkspace($workspace);
         foreach ($collection as $serviceName => $serviceInstance) {
             $col = $service->newCollection(KT_APP_BASE_URI . $workspace . '/' . $serviceName . '/', $serviceInstance['title'], $ws);
         }
     }
     $this->output = $service->getAPPdoc();
 }
 public function serviceDocument()
 {
     $service = new KT_atom_serviceDoc(KT_APP_BASE_URI);
     foreach ($this->services as $workspace => $collection) {
         //Creating the Default Workspace for use with standard atomPub Clients
         $ws = $service->newWorkspace();
         $hadDetail = false;
         if (isset($this->workspaceDetail[$workspace])) {
             if (is_array($this->workspaceDetail[$workspace])) {
                 foreach ($this->workspaceDetail[$workspace] as $wsTag => $wsValue) {
                     $ws->appendChild($service->newElement($wsTag, $wsValue));
                     $hadDetail = true;
                 }
             }
         }
         if (!$hadDetail) {
             $ws->appendChild($service->newElement('atom:title', $workspace));
         }
         foreach ($collection as $serviceName => $serviceInstance) {
             $col = $service->newCollection(KT_APP_BASE_URI . $workspace . '/' . $serviceName . '/', $serviceInstance['title'], $ws);
         }
     }
     $this->output = $service->getAPPdoc();
 }