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 __construct($baseURI = NULL)
 {
     parent::__construct();
     // get repositoryInfo
     // NOTE currently we only support one repository, which will be the first one found in the repositories.xml config
     // TODO multiple repositories as individual workspaces
     include 'services/cmis/RepositoryService.inc.php';
     $RepositoryService = new RepositoryService();
     // TODO add auth requirement here, don't want to even supply service doc without auth
     //        $RepositoryService->startSession();
     // fetch data for response
     $repositories = $RepositoryService->getRepositories();
     // fetch for default first repo;  NOTE that this will probably have to change at some point, quick and dirty for now
     $this->repositoryInfo = $RepositoryService->getRepositoryInfo($repositories[0]['repositoryId']);
 }
 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();
 }