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


PHP Assertion::lessThan方法代码示例

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


在下文中一共展示了Assertion::lessThan方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: checkJWS

 /**
  * {@inheritdoc}
  */
 public function checkJWS(Object\JWSInterface $jws, $signature)
 {
     Assertion::integer($signature);
     Assertion::lessThan($signature, $jws->countSignatures());
     $checked_claims = $this->checkJWT($jws);
     $protected_headers = $jws->getSignature($signature)->getProtectedHeaders();
     $headers = $jws->getSignature($signature)->getHeaders();
     $this->checkHeaders($protected_headers, $headers, $checked_claims);
 }
开发者ID:spomky-labs,项目名称:jose,代码行数:12,代码来源:CheckerManager.php

示例2: testLessThanThrowsException

 /**
  * @dataProvider invalidLessProvider
  */
 public function testLessThanThrowsException($value, $limit)
 {
     $this->setExpectedException('Assert\\AssertionFailedException', null, Assertion::INVALID_LESS);
     Assertion::lessThan($value, $limit);
 }
开发者ID:GerDner,项目名称:luck-docker,代码行数:8,代码来源:AssertTest.php

示例3: setRefreshTokenMinLength

 /**
  * @param int $refresh_token_min_length
  */
 public function setRefreshTokenMinLength($refresh_token_min_length)
 {
     Assertion::integer($refresh_token_min_length);
     Assertion::greaterThan($refresh_token_min_length, 0);
     Assertion::lessThan($refresh_token_min_length, $this->getRefreshTokenMaxLength());
     $this->refresh_token_min_length = $refresh_token_min_length;
 }
开发者ID:spomky-labs,项目名称:oauth2-server-library,代码行数:10,代码来源:RefreshTokenManager.php

示例4: setAccessTokenMinLength

 /**
  * @param int $access_token_min_length
  */
 public function setAccessTokenMinLength($access_token_min_length)
 {
     Assertion::integer($access_token_min_length);
     Assertion::greaterThan($access_token_min_length, 0);
     Assertion::lessThan($access_token_min_length, $this->getAccessTokenMaxLength());
     $this->access_token_min_length = $access_token_min_length;
 }
开发者ID:spomky-labs,项目名称:oauth2-server-bundle,代码行数:10,代码来源:SimpleStringAccessTokenManager.php

示例5: price

 /**
  * Validate price:
  * 0 < $price < 10000
  * @param $price
  */
 public static function price($price)
 {
     Assert::digit($price);
     Assert::greaterThan($price, 0);
     Assert::lessThan($price, 10000);
 }
开发者ID:steefdw,项目名称:bol-sdk,代码行数:11,代码来源:OfferAssertion.php

示例6: withDuration

 /**
  * @param int $duration
  *
  * @throws \InvalidArgumentException
  *
  * @return static
  */
 public function withDuration($duration)
 {
     Assertion::integer($duration);
     Assertion::greaterThan($duration, VideoInterface::DURATION_LOWER_LIMIT);
     Assertion::lessThan($duration, VideoInterface::DURATION_UPPER_LIMIT);
     $instance = clone $this;
     $instance->duration = $duration;
     return $instance;
 }
开发者ID:refinery29,项目名称:sitemap,代码行数:16,代码来源:Video.php

示例7: setAuthorizationCodeMinLength

 /**
  * @param int $authorization_code_min_length
  */
 public function setAuthorizationCodeMinLength($authorization_code_min_length)
 {
     Assertion::integer($authorization_code_min_length);
     Assertion::greaterThan($authorization_code_min_length, 0);
     Assertion::lessThan($authorization_code_min_length, $this->getAuthorizationCodeMaxLength());
     $this->authorization_code_min_length = $authorization_code_min_length;
 }
开发者ID:spomky-labs,项目名称:oauth2-server-library,代码行数:10,代码来源:AuthCodeManager.php


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