init() public method

public init ( )
Beispiel #1
0
 public function init()
 {
     if (!is_string($this->enumClass)) {
         throw new InvalidConfigException('The "enumClass" property must be set.');
     }
     $consts = (new ReflectionClass($this->enumClass))->getConstants();
     $this->range = array_values($consts);
     parent::init();
 }
Beispiel #2
0
 public function init()
 {
     if (!is_string($this->enum)) {
         throw new InvalidConfigException('The "enum" property must be set.');
     }
     /* @var $class BaseEnum */
     $class = $this->enum;
     $this->range = $class::items();
     parent::init();
 }
 /**
  * @inheritdoc
  */
 public function init()
 {
     parent::init();
     $this->allowArray = true;
 }