/**
  * Serves PROPFIND requests.
  *
  * The method receives a {@link ezcWebdavPropFindRequest} object containing
  * all relevant information obout the clients request and will either
  * return an instance of {@link ezcWebdavErrorResponse} to indicate an error
  * or a {@link ezcWebdavPropFindResponse} on success. If the referenced
  * resource is a collection or if some properties produced errors, an
  * instance of {@link ezcWebdavMultistatusResponse} may be returned.
  *
  * The {@link ezcWebdavPropFindRequest} object contains a definition to
  * find one or more properties of a given collection or non-collection
  * resource.
  *
  * This method acquires the internal lock of the backend, dispatches to
  * {@link ezcWebdavSimpleBackend} to perform the operation and releases the
  * lock afterwards.
  *
  * This method is an overwrite of the propFind method from
  * ezcWebdavSimpleBackend, a hack necessary to permit correct
  * output of eZ Publish nodes. The array of ezcWebdavPropFindResponse
  * objects returned by ezcWebdavSimpleBackend::propFind is iterated and
  * the paths of the nodes in the ezcWebdavPropFindResponse objects
  * are encoded properly, in order to be displayed correctly in WebDAV
  * clients. The encoding is from the ini setting Charset in
  * [CharacterSettings] in i18n.ini.
  *
  * The code for coding is taken from eZWebDAVServer::outputCollectionContent().
  *
  * @param ezcWebdavPropFindRequest $request
  * @return ezcWebdavResponse
  */
 public function propFind(ezcWebdavPropFindRequest $request)
 {
     $ini = eZINI::instance('i18n.ini');
     $dataCharset = $ini->variable('CharacterSettings', 'Charset');
     $xmlCharset = 'utf-8';
     $this->acquireLock(true);
     $return = parent::propFind($request);
     if (isset($return->responses) && is_array($return->responses)) {
         foreach ($return->responses as $response) {
             $href = $response->node->path;
             $pathArray = explode('/', self::recode($href, $dataCharset, $xmlCharset));
             $encodedPath = '/';
             foreach ($pathArray as $pathElement) {
                 if ($pathElement != '') {
                     $encodedPath .= rawurlencode($pathElement);
                     $encodedPath .= '/';
                 }
             }
             $encodedPath = rtrim($encodedPath, '/');
             $response->node->path = $encodedPath;
         }
     }
     $this->freeLock();
     return $return;
 }
 /**
  * Serves PROPFIND requests.
  * 
  * The method receives a {@link ezcWebdavPropFindRequest} object containing
  * all relevant information obout the clients request and will either
  * return an instance of {@link ezcWebdavErrorResponse} to indicate an error
  * or a {@link ezcWebdavPropFindResponse} on success. If the referenced
  * resource is a collection or if some properties produced errors, an
  * instance of {@link ezcWebdavMultistatusResponse} may be returned.
  *
  * The {@link ezcWebdavPropFindRequest} object contains a definition to
  * find one or more properties of a given collection or non-collection
  * resource.
  *
  * This method acquires the internal lock of the backend, dispatches to
  * {@link ezcWebdavSimpleBackend} to perform the operation and releases the
  * lock afterwards.
  *
  * @param ezcWebdavPropFindRequest $request
  * @return ezcWebdavResponse
  */
 public function propFind(ezcWebdavPropFindRequest $request)
 {
     $this->acquireLock(true);
     $return = parent::propFind($request);
     $this->freeLock();
     return $return;
 }
Beispiel #3
0
 public function propFind(ezcWebdavPropFindRequest $request)
 {
     print_debug("-- HTTP method: PROPFIND --\n");
     $return = parent::propFind($request);
     return $return;
 }