original_string: public function parse($url, $method = '')
      {
          $params = parent::parse($url, $method);
          if (!$params) {
              return false;
          }
          $redirect = $this->redirect;
          if (count($this->redirect) === 1 && !isset($this->redirect['controller'])) {
              $redirect = $this->redirect[0];
          }
          if (isset($this->options['persist']) && is_array($redirect)) {
              $redirect += ['pass' => $params['pass'], 'url' => []];
              if (is_array($this->options['persist'])) {
                  foreach ($this->options['persist'] as $elem) {
                      if (isset($params[$elem])) {
                          $redirect[$elem] = $params[$elem];
                      }
                  }
              }
              $redirect = Router::reverseToArray($redirect);
          }
          $status = 301;
          if (isset($this->options['status']) && ($this->options['status'] >= 300 && $this->options['status'] < 400)) {
              $status = $this->options['status'];
          }
          throw new RedirectException(Router::url($redirect, true), $status);
      }
code: public function parse($url, $method = '')
      {
          $params = parent::parse($url, $method);
          if (!$params) {
              return false;
          }
          $redirect = $this->redirect;
          if (count($this->redirect) === 1 && !isset($this->redirect['controller'])) {
              $redirect = $this->redirect[0];
          }
          if (isset($this->options['persist']) && is_array($redirect)) {
              $redirect += ['pass' => $params['pass'], 'url' => []];
              if (is_array($this->options['persist'])) {
                  foreach ($this->options['persist'] as $elem) {
                      if (isset($params[$elem])) {
                          $redirect[$elem] = $params[$elem];
                      }
                  }
              }
              $redirect = Router::reverseToArray($redirect);
          }
          $status = 301;
          if (isset($this->options['status']) && ($this->options['status'] >= 300 && $this->options['status'] < 400)) {
              $status = $this->options['status'];
          }
          throw new RedirectException(Router::url($redirect, true), $status);
      }
code_tokens: public function parse ( $ url , $ method = '' ) { $ params = parent :: parse ( $ url , $ method ) ; if ( ! $ params ) { return false ; } $ redirect = $ this -> redirect ; if ( count ( $ this -> redirect ) === 1 && ! isset ( $ this -> redirect [ 'controller' ] ) ) { $ redirect = $ this -> redirect [ 0 ] ; } if ( isset ( $ this -> options [ 'persist' ] ) && is_array ( $ redirect ) ) { $ redirect += [ 'pass' => $ params [ 'pass' ] , 'url' => [ ] ] ; if ( is_array ( $ this -> options [ 'persist' ] ) ) { foreach ( $ this -> options [ 'persist' ] as $ elem ) { if ( isset ( $ params [ $ elem ] ) ) { $ redirect [ $ elem ] = $ params [ $ elem ] ; } } } $ redirect = Router :: reverseToArray ( $ redirect ) ; } $ status = 301 ; if ( isset ( $ this -> options [ 'status' ] ) && ( $ this -> options [ 'status' ] >= 300 && $ this -> options [ 'status' ] < 400 ) ) { $ status = $ this -> options [ 'status' ] ; } throw new RedirectException ( Router :: url ( $ redirect , true ) , $ status ) ; }
docstring: Parses a string URL into an array. Parsed URLs will result in an automatic
  redirection.
  
  @param string $url The URL to parse.
  @param string $method The HTTP method being used.
  @return bool|null False on failure. An exception is raised on a successful match.
  @throws \Cake\Routing\Exception\RedirectException An exception is raised on successful match.
  This is used to halt route matching and signal to the middleware that a redirect should happen.
docstring_tokens: Parses a string URL into an array . Parsed URLs will result in an automatic redirection .