public static function getServer($key = null, $default = null) { return RequestFactory::get($key, self::getInstance()->getServerParams(), $default); }
/** * Return identity if user agent is correct * @api * @return EntityInterface|null */ public function getIdentity() { if (!$this->identity) { // check user agent if (Session::get('auth:agent') == Request::getServer('HTTP_USER_AGENT')) { $this->identity = Session::get('auth:identity'); } else { $this->clearIdentity(); } } return $this->identity; }