public function validate() { parent::validate(); $step = $this->getOption('step'); $set = $this->getOption('set'); $this->current = new PositionManager($set); $this->currentStep = new PositionManager($step); return true; }
public function validate() { parent::validate(); $repeat_min = $this->getOption(self::REPEAT_MIN); $repeat_max = $this->getOption(self::REPEAT_MAX); if ($repeat_min > $repeat_max) { throw new EngineException('AlphaNumeric::Repeat range is not valid minimum is > maximum'); } return true; }
public function validate() { if ($this->hasOption('probability') === true) { $probability = $this->getOption('probability'); if ($probability > 1) { $probability = $probability / 100; } $this->setOption('probability', $probability); } return parent::validate(); }
public function validate() { parent::validate(); try { $lexer = new Lexer($this->getOption(self::FORMAT)); $parser = new Parser($lexer, new Scope(), new Scope()); $this->result = $parser->parse()->getResult(); } catch (ReverseRegexException $e) { throw new EngineException($e->getMessage()); } return true; }
public function validate() { parent::validate(); $template = $this->getOption('file'); $temp_string = $this->getOption('template'); if ($template === false && $temp_string === false) { throw new EngineException('Template Type:: must set either a file or a template string'); } if ($template !== false) { $loader = $this->templateLoader; if ($loader->getIo()->exists($template) === false) { throw new EngineException('Template Type::File Does not Exists at ' . $template); } } return true; }
public function validate() { parent::validate(); $this->current = new PositionManager(count($this->swaps)); }
public function validate() { parent::validate(); $random = $this->getOption('random'); $window_step = $this->getOption('windowStep') + 0; if ($window_step > 0 && $random === true) { throw new EngineException('Range:: Cannot use windowStep and RandomStep at same time'); } # set the iteration state. $this->first_iteration = true; return true; }