public function __construct($defaults = [], $flags = 0)
{
if (is_string($defaults)) {
list($presenter, $action) = Helpers::splitName($defaults);
if (!$presenter) {
throw new Nette\InvalidArgumentException("Argument must be array or string in format Presenter:action, '{$defaults}' given.");
}
$defaults = ['presenter' => $presenter, 'action' => $action === '' ? 'default' : $action];
}
$this->defaults = $defaults;
$this->flags = $flags;
if ($flags & self::SECURED) {
trigger_error('IRouter::SECURED is deprecated, router by default keeps the used protocol.', E_USER_DEPRECATED);
}
}