/** * Matches implementation * * @param var value * @return bool */ public function matches($value) { if (null === $value && $this->matchNull) { return true; } return \xp::typeof($value) == \lang\XPClass::forName($this->type)->getName(); }
/** * Matches implementation * * @param var value * @return bool */ public function matches($value) { if (NULL === $value && $this->matchNull) { return TRUE; } return xp::typeof($value) == XPClass::forName($this->type)->getName(); }
/** * Sets request's URL * * @param scriptlet.xml.XMLScriptletURL url */ public function setURL(HttpScriptletURL $url) { if (!$url instanceof XMLScriptletURL) { throw new IllegalArgumentException(__METHOD__ . ' expects instanceof scriptlet.xml.XMLScriptletURL, ' . xp::typeof($url) . ' given.'); } with($this->url = $url); $this->url->setDefaultProduct($this->getDefaultProduct()); $this->url->setDefaultLanguage($this->getDefaultLanguage()); $this->url->setDefaultStateName($this->getDefaultStateName()); $this->url->setDefaultPage($this->getDefaultPage()); // Check cookies for session id $this->setSessionId($this->hasCookie('psessionid') ? $this->getCookie('psessionid')->getValue() : $this->url->getSessionId()); // Overwrite page with __page parameter if given if ($this->hasParam('__page')) { $this->url->setPage($this->getParam('__page')); } $this->setProduct($this->url->getProduct()); $this->setLanguage($this->url->getLanguage()); $this->setStateName($this->url->getStateName()); $this->setPage($this->url->getPage()); }