Question::__construct PHP Method

__construct() public method

public __construct ( Strategy $strategy )
$strategy Strategy
    public function __construct(Strategy $strategy)
    {
        $this->_strategy = $strategy;
    }

Usage Example

Example #1
0
 /**
  * 构造方法
  * @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);
 }
All Usage Examples Of Question::__construct