/**
  * @inheritdoc
  */
 public function init()
 {
     if (empty($this->host)) {
         throw new InvalidConfigException('`host` property must be set.');
     }
     parent::init();
 }
 public function init()
 {
     parent::init();
     if (!isset($this->slugClass)) {
         throw new InvalidConfigException('Please set the slugClass to a model that implements \\supplyhog\\SlugParser\\SlugInterface');
     }
 }
Exemple #3
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     if ($this->routePrefix === null) {
         $this->routePrefix = $this->prefix;
     }
     $this->prefix = trim($this->prefix, '/');
     $this->routePrefix = trim($this->routePrefix, '/');
     parent::init();
 }
Exemple #4
0
 /**
  * @inheritdoc
  */
 public function init()
 {
     if ($this->routePrefix === null) {
         $this->routePrefix = $this->prefix;
     }
     $this->prefix = trim($this->prefix, '/');
     $this->routePrefix = trim($this->routePrefix, '/');
     if ($this->suffix !== null) {
         $this->ruleConfig['suffix'] = $this->suffix;
     }
     parent::init();
 }
 /**
  * @inheritdoc
  */
 public function init()
 {
     if (empty($this->controller)) {
         throw new InvalidConfigException('"controller" must be set.');
     }
     $controllers = [];
     foreach ((array) $this->controller as $urlName => $controller) {
         if (is_integer($urlName)) {
             $urlName = $this->pluralize ? Inflector::pluralize($controller) : $controller;
         }
         $controllers[$urlName] = $controller;
     }
     $this->controller = $controllers;
     $this->prefix = trim($this->prefix, '/');
     parent::init();
 }