本文整理汇总了PHP中Checker::argBool方法的典型用法代码示例。如果您正苦于以下问题:PHP Checker::argBool方法的具体用法?PHP Checker::argBool怎么用?PHP Checker::argBool使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Checker
的用法示例。
在下文中一共展示了Checker::argBool方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: searchFileNames
/**
* Returns metadata for all files and folders whose filename matches the query string.
*
* See <a href="https://www.dropbox.com/developers/core/docs#search">/search</a>.
*
* @param string $basePath
* The path to limit the search to (UTF-8). Pass in "/" to search everything.
*
* @param string $query
* A space-separated list of substrings to search for. A file matches only if it contains
* all the substrings.
*
* @param int|null $limit
* The maximum number of results to return.
*
* @param bool $includeDeleted
* Whether to include deleted files in the results.
*
* @return mixed
* A list of <a href="https://www.dropbox.com/developers/core/docs#metadata-details>metadata
* objects</a> of files that match the search query.
*
* @throws Exception
*/
function searchFileNames($basePath, $query, $limit = null, $includeDeleted = false)
{
Path::checkArg("basePath", $basePath);
Checker::argStringNonEmpty("query", $query);
Checker::argNatOrNull("limit", $limit);
Checker::argBool("includeDeleted", $includeDeleted);
$response = $this->doPost($this->apiHost, $this->appendFilePath("1/search", $basePath), array("query" => $query, "file_limit" => $limit, "include_deleted" => $includeDeleted));
if ($response->statusCode !== 200) {
throw RequestUtil::unexpectedStatus($response);
}
return RequestUtil::parseResponseJson($response->body);
}