Phprest\Annotation\Route::__construct PHP Метод

__construct() публичный Метод

public __construct ( mixed $options )
$options mixed
    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}';
    }