original_string: public function callbackFunction($route = null, $parameters = [])
      {
          if ($route === null || ! is_string($route)) {
              // Gets URI from current request
              $uri = $this->request->getUri();
          } else {
              // Generates URI from '_route'
              $uri = $this->router->generate(
                  $route,
                  $parameters,
                  Router::ABSOLUTE_URL
              );
          }
  
          $result = parse_url($uri);
  
          // When uri contains query string
          if (isset($result['query'])) {
  
              parse_str($result['query'], $query);
  
              // Remove callback from query
              $query = array_diff_key($query, ['callback' => null]);
          } else {
              // Return unchanged uri
              return $uri;
          }
  
          return $result['scheme'].'://'.
                 (isset($result['user']) ? $result['user'] : '').
                 (isset($result['pass']) ? ':'.$result['pass'].'@' : '').
                 $result['host'].
                 (isset($result['port']) ? ':'.$result['port'] : '').
                 (isset($result['path']) ? $result['path'] : '').
                 ($query != [] ? '?'.http_build_query($query) : '').
                 (isset($result['fragment']) ? '#'.$result['fragment'] : '');
      }
code: public function callbackFunction($route = null, $parameters = [])
      {
          if ($route === null || ! is_string($route)) {
              // Gets URI from current request
              $uri = $this->request->getUri();
          } else {
              // Generates URI from '_route'
              $uri = $this->router->generate(
                  $route,
                  $parameters,
                  Router::ABSOLUTE_URL
              );
          }
  
          $result = parse_url($uri);
  
          // When uri contains query string
          if (isset($result['query'])) {
  
              parse_str($result['query'], $query);
  
              // Remove callback from query
              $query = array_diff_key($query, ['callback' => null]);
          } else {
              // Return unchanged uri
              return $uri;
          }
  
          return $result['scheme'].'://'.
                 (isset($result['user']) ? $result['user'] : '').
                 (isset($result['pass']) ? ':'.$result['pass'].'@' : '').
                 $result['host'].
                 (isset($result['port']) ? ':'.$result['port'] : '').
                 (isset($result['path']) ? $result['path'] : '').
                 ($query != [] ? '?'.http_build_query($query) : '').
                 (isset($result['fragment']) ? '#'.$result['fragment'] : '');
      }
code_tokens: public function callbackFunction ( $ route = null , $ parameters = [ ] ) { if ( $ route === null || ! is_string ( $ route ) ) { // Gets URI from current request $ uri = $ this -> request -> getUri ( ) ; } else { // Generates URI from '_route' $ uri = $ this -> router -> generate ( $ route , $ parameters , Router :: ABSOLUTE_URL ) ; } $ result = parse_url ( $ uri ) ; // When uri contains query string if ( isset ( $ result [ 'query' ] ) ) { parse_str ( $ result [ 'query' ] , $ query ) ; // Remove callback from query $ query = array_diff_key ( $ query , [ 'callback' => null ] ) ; } else { // Return unchanged uri return $ uri ; } return $ result [ 'scheme' ] . '://' . ( isset ( $ result [ 'user' ] ) ? $ result [ 'user' ] : '' ) . ( isset ( $ result [ 'pass' ] ) ? ':' . $ result [ 'pass' ] . '@' : '' ) . $ result [ 'host' ] . ( isset ( $ result [ 'port' ] ) ? ':' . $ result [ 'port' ] : '' ) . ( isset ( $ result [ 'path' ] ) ? $ result [ 'path' ] : '' ) . ( $ query != [ ] ? '?' . http_build_query ( $ query ) : '' ) . ( isset ( $ result [ 'fragment' ] ) ? '#' . $ result [ 'fragment' ] : '' ) ; }
docstring: Removes callbacks from query
  
  @param string $route
  @param array  $parameters
  
  @return string
docstring_tokens: Removes callbacks from query