public function __construct($options)
{
$this->validate($options);
$version = null;
if (isset($options['since']) && isset($options['until'])) {
$version = $this->getSinceUntilRegExp($options['since'], $options['until']);
} elseif (isset($options['since'])) {
$version = $this->getSinceRegExp($options['since']);
} elseif (isset($options['until'])) {
$version = $this->getUntilRegExp($options['until']);
}
$this->method = $options['method'];
$this->path = $options['path'];
$this->version = !is_null($version) ? '{version:' . $version . '}' : '{version:any}';
}