Cloudinary::userAgent PHP 메소드

userAgent() 공개 정적인 메소드

Prepends {@link $USER_PLATFORM} if it is defined.
public static userAgent ( ) : string
리턴 string
    public static function userAgent()
    {
        if (self::$USER_PLATFORM == "") {
            return self::USER_AGENT;
        } else {
            return self::$USER_PLATFORM . " " . self::USER_AGENT;
        }
    }

Usage Example

예제 #1
0
 public function test_user_agent()
 {
     $tmp = \Cloudinary::$USER_PLATFORM;
     $platform_information = 'TestPlatformInformation (From \\"CloudinaryTest.php\\")';
     \Cloudinary::$USER_PLATFORM = $platform_information;
     $userAgent = \Cloudinary::userAgent();
     \Cloudinary::$USER_PLATFORM = $tmp;
     // reset value
     $this->assertRegExp("/CloudinaryPHP\\/\\d+\\.\\d+\\.\\d+/", $userAgent);
     $this->assertContains($platform_information, $userAgent, "USER_AGENT should include platform information if set");
 }
All Usage Examples Of Cloudinary::userAgent