Extends
lithium\core\Object
A helper method used by `match()` to verify that options required to match this route are
present in a URL array.
Parameters
- array $options An array of URL parameters.
Returns
mixed On success, returns an updated array of options, merged with defaults. On failure, returns `false`.Source
protected function _matchKeys($options) {
$args = array('args' => 'args');
if (array_intersect_key($options, $this->_match) != $this->_match) {
return false;
}
if ($this->_config['continue']) {
if (array_intersect_key($this->_keys, $options + $args) != $this->_keys) {
return false;
}
} else {
if (array_diff_key(array_diff_key($options, $this->_match), $this->_keys) !== array()) {
return false;
}
}
$options += $this->_defaults;
$base = $this->_keys + $args;
$match = array_intersect_key($this->_keys, $options) + $args;
sort($base);
sort($match);
if ($base !== $match) {
return false;
}
return $options;
}