Bluz\Proxy\Request::getServer PHP 메소드

getServer() 공개 정적인 메소드

If no $key is passed, returns the entire $_SERVER array.
public static getServer ( string $key = null, string $default = null ) : string
$key string
$default string Default value to use if key not found
리턴 string Returns null if key does not exist
    public static function getServer($key = null, $default = null)
    {
        return RequestFactory::get($key, self::getInstance()->getServerParams(), $default);
    }

Usage Example

예제 #1
0
파일: Auth.php 프로젝트: 9618211/framework
 /**
  * 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;
 }
All Usage Examples Of Bluz\Proxy\Request::getServer