当前位置: 首页>>代码示例>>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;未经允许,请勿转载。