Imbo\Http\Request\Request::getPublicKey PHP 메소드

getPublicKey() 공개 메소드

Get the public key found in the request
public getPublicKey ( ) : string
리턴 string
    public function getPublicKey()
    {
        return $this->headers->get('X-Imbo-PublicKey', null) ?: $this->query->get('publicKey', null) ?: ($this->route ? $this->route->get('user') : null);
    }

Usage Example

예제 #1
0
파일: RequestTest.php 프로젝트: imbo/imbo
 /**
  * @covers Imbo\Http\Request\Request::getPublicKey
  */
 public function testSetGetPublicKeyThroughHeader()
 {
     $pubkey = 'pubkey';
     $this->assertNull($this->request->getPublicKey());
     $this->request->headers->set('X-Imbo-PublicKey', $pubkey);
     $this->assertSame($pubkey, $this->request->getPublicKey());
 }
All Usage Examples Of Imbo\Http\Request\Request::getPublicKey