本文整理汇总了PHP中Checker::argStringNonEmptyOrNull方法的典型用法代码示例。如果您正苦于以下问题:PHP Checker::argStringNonEmptyOrNull方法的具体用法?PHP Checker::argStringNonEmptyOrNull怎么用?PHP Checker::argStringNonEmptyOrNull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Checker
的用法示例。
在下文中一共展示了Checker::argStringNonEmptyOrNull方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* Constructor.
*
* @param AppInfo $appInfo
* See {@link getAppInfo()}
* @param string $clientIdentifier
* See {@link getClientIdentifier()}
* @param null|string $userLocale
* See {@link getUserLocale()}
*/
function __construct($appInfo, $clientIdentifier, $userLocale = null)
{
AppInfo::checkArg("appInfo", $appInfo);
Checker::argStringNonEmpty("clientIdentifier", $clientIdentifier);
Checker::argStringNonEmptyOrNull("userLocale", $userLocale);
$this->appInfo = $appInfo;
$this->clientIdentifier = $clientIdentifier;
$this->userLocale = $userLocale;
}
示例2: getDelta
/**
* A way of letting you keep up with changes to files and folders in a user's Dropbox.
*
* @param string|null $cursor
* If this is the first time you're calling this, pass in <code>null</code>. Otherwise,
* pass in whatever cursor was returned by the previous call.
*
* @param string|null $pathPrefix
* If <code>null</code>, you'll get results for the entire folder (either the user's
* entire Dropbox or your App Folder). If you set <code>$path_prefix</code> to
* "/Photos/Vacation", you'll only get results for that path and any files and folders
* under it.
*
* @return array
* A <a href="https://www.dropbox.com/developers/core/docs#delta">delta page</a>, which
* contains a list of changes to apply along with a new "cursor" that should be passed into
* future <code>getDelta</code> calls. If the "reset" field is <code>true</code>, you
* should clear your local state before applying the changes. If the "has_more" field is
* <code>true</code>, call <code>getDelta</code> immediately to get more results, otherwise
* wait a while (at least 5 minutes) before calling <code>getDelta</code> again.
*
* @throws Exception
*/
function getDelta($cursor = null, $pathPrefix = null)
{
Checker::argStringNonEmptyOrNull("cursor", $cursor);
Path::checkArgOrNull("pathPrefix", $pathPrefix);
$response = $this->doPost($this->apiHost, "1/delta", array("cursor" => $cursor, "path_prefix" => $pathPrefix));
if ($response->statusCode !== 200) {
throw RequestUtil::unexpectedStatus($response);
}
return RequestUtil::parseResponseJson($response->body);
}