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


PHP Question::__construct方法代码示例

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


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

示例1: __construct

 /**
  * 构造方法
  * @param string $question 问题
  * @param array  $choices  选项
  * @param mixed  $default  默认答案
  */
 public function __construct($question, array $choices, $default = null)
 {
     parent::__construct($question, $default);
     $this->choices = $choices;
     $this->setValidator($this->getDefaultValidator());
     $this->setAutocompleterValues($choices);
 }
开发者ID:Lofanmi,项目名称:think,代码行数:13,代码来源:Choice.php

示例2: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     //this is highly important
     parent::__construct();
     $this->type = UNIQUE_ANSWER_NO_OPTION;
     $this->isContent = $this->getIsContent();
 }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:10,代码来源:unique_answer_no_option.class.php

示例3: __construct

public function __construct($question, $default = true, $trueAnswerRegex = '/^y/i')
{
parent::__construct($question, (bool) $default);

$this->trueAnswerRegex = $trueAnswerRegex;
$this->setNormalizer($this->getDefaultNormalizer());
}
开发者ID:Ryu0621,项目名称:SaNaVi,代码行数:7,代码来源:ConfirmationQuestion.php

示例4:

 function __construct($question, array $choices, $default = null, $multiSelect = false)
 {
     parent::__construct($question, $default);
     $this->choices = $choices;
     $this->multiSelect = $multiSelect;
     $this->setValidator([$this, 'validate']);
 }
开发者ID:slince,项目名称:console,代码行数:7,代码来源:ChoiceQuestion.php

示例5: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->type = MULTIPLE_ANSWER_TRUE_FALSE;
     $this->isContent = $this->getIsContent();
     $this->options = array(1 => 'True', 2 => 'False', 3 => 'DoubtScore');
 }
开发者ID:KRCM13,项目名称:chamilo-lms,代码行数:10,代码来源:multiple_answer_true_false.class.php

示例6:

 function __construct($question, $default = null, $trueRegex = null)
 {
     parent::__construct($question, $default);
     if (!is_null($trueRegex)) {
         $this->trueRegex = $trueRegex;
     }
     $this->setNormalizer([$this, 'normalize']);
 }
开发者ID:slince,项目名称:console,代码行数:8,代码来源:ConfirmQuestion.php

示例7: __construct

 public function __construct(Registry $Registry, array $a = null)
 {
     /**
      * 3 Lines below to change the database
      * that's going to be used to the test database
      *
      * This in theory is not necessary because boostrap.php
      * is used in all tests and it defines MONGO_DBNAME as LAMPCMS_TEST
      * but this is just an extra precaution
      */
     $aMongo = $Registry->Ini->getSection('MONGO');
     $aMongo['db'] = 'LAMPCMS_TEST';
     $Registry->Ini->setSection('MONGO', $aMongo);
     $a = \json_decode($this->JSON_ENCODED, true);
     parent::__construct($Registry, $a);
 }
开发者ID:codigoirreverente,项目名称:LampCMS,代码行数:16,代码来源:MockQuestion.php

示例8: __construct

 public function __construct($question, $default = true)
 {
     parent::__construct($question, (bool) $default);
     $this->setNormalizer($this->getDefaultNormalizer());
 }
开发者ID:mawaha,项目名称:tracker,代码行数:5,代码来源:ConfirmationQuestion.php

示例9: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->type = CALCULATED_ANSWER;
     $this->isContent = $this->getIsContent();
 }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:9,代码来源:calculated_answer.class.php

示例10: __construct

 /**
  * Constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->type = MATCHING;
     $this->isContent = $this->getIsContent();
 }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:9,代码来源:matching.class.php

示例11: __construct

 /**
  * Class constructor
  */
 public function __construct()
 {
     parent::__construct();
     $this->type = DRAGGABLE;
     $this->isContent = $this->getIsContent();
 }
开发者ID:omaoibrahim,项目名称:chamilo-lms,代码行数:9,代码来源:Draggable.php

示例12: __construct

 public function __construct()
 {
     parent::__construct();
     $this->type = HOT_SPOT;
 }
开发者ID:jloguercio,项目名称:chamilo-lms,代码行数:5,代码来源:hotspot.class.php

示例13: __construct

 /**
  * @param string $question The question text
  * @param bool $defaultAnswer The default answer to the question
  */
 public function __construct($question, $defaultAnswer = true)
 {
     parent::__construct($question, $defaultAnswer);
 }
开发者ID:scaleddynamics,项目名称:Opulence,代码行数:8,代码来源:Confirmation.php

示例14: __construct

 public function __construct($xml)
 {
     parent::__construct($xml);
     $attrs = $xml->attributes();
     $this->min = $attrs['min'];
     $this->max = $attrs['max'];
 }
开发者ID:haibaer76,项目名称:volksvermessung,代码行数:7,代码来源:questions.php

示例15: __construct

 /**
  * Constructor
  */
 public function __construct($course_id = null)
 {
     $this->rank = self::$_rank++;
     parent::__construct($course_id);
 }
开发者ID:rhertzog,项目名称:lcs,代码行数:8,代码来源:qti2_classes.php


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