PATH:
home
/
bkunreyz
/
bcmuslimgolfers.com
/
wp-content
/
plugins
/
backup
/
com
/
lib
/
Dropbox
<?php namespace Dropbox; /** * Helper functions to validate arguments. * * @internal */ class Checker { static function throwError($argName, $argValue, $expectedTypeName) { if ($argValue === null) throw new \InvalidArgumentException("'$argName' must not be null"); if (is_object($argValue)) { // Class type. $argTypeName = get_class($argValue); } else { // Built-in type. $argTypeName = gettype($argValue); } throw new \InvalidArgumentException("'$argName' has bad type; expecting $expectedTypeName, got $argTypeName"); } static function argResource($argName, $argValue) { if (!is_resource($argValue)) self::throwError($argName, $argValue, "resource"); } static function argCallable($argName, $argValue) { if (!is_callable($argValue)) self::throwError($argName, $argValue, "callable"); } static function argBool($argName, $argValue) { if (!is_bool($argValue)) self::throwError($argName, $argValue, "boolean"); } static function argArray($argName, $argValue) { if (!is_array($argValue)) self::throwError($argName, $argValue, "array"); } static function argString($argName, $argValue) { if (!is_string($argValue)) self::throwError($argName, $argValue, "string"); } static function argStringOrNull($argName, $argValue) { if ($argValue === null) return; if (!is_string($argValue)) self::throwError($argName, $argValue, "string"); } static function argStringNonEmpty($argName, $argValue) { if (!is_string($argValue)) self::throwError($argName, $argValue, "string"); if (strlen($argValue) === 0) throw new \InvalidArgumentException("'$argName' must be non-empty"); } static function argStringNonEmptyOrNull($argName, $argValue) { if ($argValue === null) return; if (!is_string($argValue)) self::throwError($argName, $argValue, "string"); if (strlen($argValue) === 0) throw new \InvalidArgumentException("'$argName' must be non-empty"); } static function argNat($argName, $argValue) { if (!is_int($argValue)) self::throwError($argName, $argValue, "int"); if ($argValue < 0) throw new \InvalidArgumentException("'$argName' must be non-negative (you passed in $argValue)"); } static function argNatOrNull($argName, $argValue) { if ($argValue === null) return; if (!is_int($argValue)) self::throwError($argName, $argValue, "int"); if ($argValue < 0) throw new \InvalidArgumentException("'$argName' must be non-negative (you passed in $argValue)"); } static function argIntPositive($argName, $argValue) { if (!is_int($argValue)) self::throwError($argName, $argValue, "int"); if ($argValue < 1) throw new \InvalidArgumentException("'$argName' must be positive (you passed in $argValue)"); } static function argIntPositiveOrNull($argName, $argValue) { if ($argValue === null) return; if (!is_int($argValue)) self::throwError($argName, $argValue, "int"); if ($argValue < 1) throw new \InvalidArgumentException("'$argName' must be positive (you passed in $argValue)"); } }
[-] StreamReadException.php
[edit]
[-] ArrayEntryStore.php
[edit]
[-] WriteMode.php
[edit]
[-] AuthBase.php
[edit]
[-] WebAuthBase.php
[edit]
[-] CurlStreamRelay.php
[edit]
[-] WebAuthNoRedirect.php
[edit]
[-] autoload.php
[edit]
[-] OAuth1AccessToken.php
[edit]
[-] SSLTester.php
[edit]
[-] strict.php
[edit]
[-] DeserializeException.php
[edit]
[-] DropboxMetadataHeaderCatcher.php
[edit]
[-] RequestUtil.php
[edit]
[-] AppInfoLoadException.php
[edit]
[-] Curl.php
[edit]
[+]
WebAuthException
[+]
..
[-] Security.php
[edit]
[-] AppInfo.php
[edit]
[-] AuthInfoLoadException.php
[edit]
[+]
Exception
[-] HttpResponse.php
[edit]
[-] RootCertificates.php
[edit]
[-] OAuth1Upgrader.php
[edit]
[-] ValueStore.php
[edit]
[-] AuthInfo.php
[edit]
[-] Client.php
[edit]
[-] WebAuth.php
[edit]
[-] Host.php
[edit]
[-] Checker.php
[edit]
[-] Path.php
[edit]
[-] Util.php
[edit]
[+]
certs
[-] Exception.php
[edit]