當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。