code: public function init()
      {
          if ($this->pattern === null) {
              throw new InvalidConfigException('UrlRule::pattern must be set.');
          }
          if ($this->route === null) {
              throw new InvalidConfigException('UrlRule::route must be set.');
          }
          if (is_array($this->normalizer)) {
              $normalizerConfig = array_merge(['class' => UrlNormalizer::className()], $this->normalizer);
              $this->normalizer = Yii::createObject($normalizerConfig);
          }
          if ($this->normalizer !== null && $this->normalizer !== false && !$this->normalizer instanceof UrlNormalizer) {
              throw new InvalidConfigException('Invalid config for UrlRule::normalizer.');
          }
          if ($this->verb !== null) {
              if (is_array($this->verb)) {
                  foreach ($this->verb as $i => $verb) {
                      $this->verb[$i] = strtoupper($verb);
                  }
              } else {
                  $this->verb = [strtoupper($this->verb)];
              }
          }
          if ($this->name === null) {
              $this->name = $this->pattern;
          }
  
          $this->preparePattern();
      }
docs: Initializes this rule.