TijsVerkoyen\Dropbox\Dropbox::setUserAgent PHP Method

setUserAgent() public method

Our version will be prepended to yours. It will look like: "PHP Dropbox/ "
public setUserAgent ( string $userAgent )
$userAgent string The user-agent, it should look like /.
    public function setUserAgent($userAgent)
    {
        $this->userAgent = (string) $userAgent;
    }

Usage Example

コード例 #1
0
ファイル: DropboxTest.php プロジェクト: tijsverkoyen/dropbox
 /**
  * Tests Dropbox->getUserAgent()
  */
 public function testGetUserAgent()
 {
     $this->dropbox->setUserAgent('testing/1.0.0');
     $this->assertEquals('PHP Dropbox/' . Dropbox::VERSION . ' testing/1.0.0', $this->dropbox->getUserAgent());
 }