當前位置: 首頁>>代碼示例>>PHP>>正文


PHP Format::isString256方法代碼示例

本文整理匯總了PHP中qtism\common\utils\Format::isString256方法的典型用法代碼示例。如果您正苦於以下問題:PHP Format::isString256方法的具體用法?PHP Format::isString256怎麽用?PHP Format::isString256使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在qtism\common\utils\Format的用法示例。


在下文中一共展示了Format::isString256方法的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。

示例1: setMappingIndicator

 /**
  * Set the mapping indicator to use between field name and field value when
  * displaying variables of record cardinality.
  * 
  * @param string $mappingIndicator A non-empty string with at most 256 characters.
  * @throws InvalidArgumentException If $mappingIndicator is not a non-empty string with at most 256 characters.
  */
 public function setMappingIndicator($mappingIndicator)
 {
     if (empty($mappingIndicator) === false && Format::isString256($mappingIndicator) === true) {
         $this->mappingIndicator = $mappingIndicator;
     } else {
         $msg = "The 'mappingIndicator' argument must be a non-empty string with at most 256 characters, '" . gettype($mappingIndicator) . "' given.";
         throw new InvalidArgumentException($msg);
     }
 }
開發者ID:swapnilaptara,項目名稱:tao-aptara-assess,代碼行數:16,代碼來源:PrintedVariable.php

示例2: setLabel

 /**
  * Set the label of the body element.
  *
  * @param string $label A string of 256 characters maximum.
  * @throws \InvalidArgumentException If $label is not or a string or contains more than 256 characters.
  */
 public function setLabel($label = '')
 {
     if (Format::isString256($label) === true) {
         $this->label = $label;
     } else {
         $msg = "The 'label' argument must be a string that does not exceed 256 characters.";
         throw new InvalidArgumentException($msg);
     }
 }
開發者ID:nagyist,項目名稱:qti-sdk,代碼行數:15,代碼來源:BodyElement.php

示例3: testInvalidString256Provider

 /**
  * @dataProvider invalidString256FormatProvider
  */
 public function testInvalidString256Provider($string)
 {
     $this->assertFalse(Format::isString256($string));
 }
開發者ID:swapnilaptara,項目名稱:tao-aptara-assess,代碼行數:7,代碼來源:FormatTest.php

示例4: setHotspotLabel

 /**
  * Set the hotspotLabel of the associableHotspot.
  *
  * @param string $hotspotLabel A string with at most 256 characters.
  * @throws \InvalidArgumentException If $hotspotLabel has more than 256 characters.
  */
 public function setHotspotLabel($hotspotLabel)
 {
     if (Format::isString256($hotspotLabel) === true) {
         $this->hotspotLabel = $hotspotLabel;
     } else {
         $msg = "The 'hotspotLabel' argument must be a string value with at most 256 characters.";
         throw new InvalidArgumentException($msg);
     }
 }
開發者ID:nagyist,項目名稱:qti-sdk,代碼行數:15,代碼來源:HotspotChoice.php

示例5: setToolVersion

 /**
  * Set the version of the tool with which the item was created.
  * 
  * @param string $toolVersion A tool version with at most 256 characters.
  * @throws InvalidArgumentException If $toolVersion is not a string value with at most 256 characters.
  */
 public function setToolVersion($toolVersion)
 {
     if (Format::isString256($toolVersion) === true) {
         $this->toolVersion = $toolVersion;
     } else {
         $msg = "The toolVersion argument must be a string with at most 256 characters.";
         throw new InvalidArgumentException($msg);
     }
 }
開發者ID:swapnilaptara,項目名稱:tao-aptara-assess,代碼行數:15,代碼來源:AssessmentItem.php


注:本文中的qtism\common\utils\Format::isString256方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。