add limit and offset

This commit is contained in:
Robin Appelman 2017-03-10 15:53:28 +01:00
commit 0924fa90e0
8 changed files with 132 additions and 2 deletions

View file

@ -25,6 +25,7 @@ use Sabre\Xml\Element;
use Sabre\Xml\Reader;
use Sabre\Xml\Service;
use SearchDAV\XML\BasicSearch;
use SearchDAV\XML\Limit;
use SearchDAV\XML\Literal;
use SearchDAV\XML\Operator;
use SearchDAV\XML\Order;
@ -34,7 +35,8 @@ class QueryParser extends Service {
public $namespaceMap = [
'DAV:' => 'd',
'http://sabredav.org/ns' => 's',
'http://www.w3.org/2001/XMLSchema' => 'xs'
'http://www.w3.org/2001/XMLSchema' => 'xs',
SearchPlugin::SEARCHDAV_NS => 'sd'
];
public function __construct() {
@ -72,6 +74,7 @@ class QueryParser extends Service {
'{DAV:}contains' => Operator::class,
'{DAV:}not' => Operator::class,
'{DAV:}is-collection' => Operator::class,
'{DAV:}limit' => Limit::class,
];
}
}

View file

@ -45,6 +45,8 @@ use SearchDAV\XML\Scope;
use SearchDAV\XML\SupportedQueryGrammar;
class SearchPlugin extends ServerPlugin {
const SEARCHDAV_NS = 'https://github.com/icewind1991/SearchDAV/ns';
/** @var Server */
private $server;