当前位置: 首页>>代码示例>>PHP>>正文


PHP Checker::argNatOrNull方法代码示例

本文整理汇总了PHP中Checker::argNatOrNull方法的典型用法代码示例。如果您正苦于以下问题:PHP Checker::argNatOrNull方法的具体用法?PHP Checker::argNatOrNull怎么用?PHP Checker::argNatOrNull使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Checker的用法示例。


在下文中一共展示了Checker::argNatOrNull方法的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);
 }
开发者ID:themexpand,项目名称:xpand-buddy,代码行数:36,代码来源:Client.php


注:本文中的Checker::argNatOrNull方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。