original_string: public function getUrl($url)
      {
          if (is_array($url) && ! empty($url['route'])) {
              try {
                  $Comet = \CometPHP\Comet::getInstance();
              } catch (\CometPHP\Exceptions\CometNotBooted $e) {
                  return null;
              }
  
              $routeName = $url['route'];
              unset($url['route']);
  
              $generatedUrl = $Comet['routeGenerator']->generate(
                  $routeName,
                  $url
              );
  
              return $generatedUrl;
          }
  
          return $url;
      }
code: public function getUrl($url)
      {
          if (is_array($url) && ! empty($url['route'])) {
              try {
                  $Comet = \CometPHP\Comet::getInstance();
              } catch (\CometPHP\Exceptions\CometNotBooted $e) {
                  return null;
              }
  
              $routeName = $url['route'];
              unset($url['route']);
  
              $generatedUrl = $Comet['routeGenerator']->generate(
                  $routeName,
                  $url
              );
  
              return $generatedUrl;
          }
  
          return $url;
      }
code_tokens: public function getUrl ( $ url ) { if ( is_array ( $ url ) && ! empty ( $ url [ 'route' ] ) ) { try { $ Comet = \ CometPHP \ Comet :: getInstance ( ) ; } catch ( \ CometPHP \ Exceptions \ CometNotBooted $ e ) { return null ; } $ routeName = $ url [ 'route' ] ; unset ( $ url [ 'route' ] ) ; $ generatedUrl = $ Comet [ 'routeGenerator' ] -> generate ( $ routeName , $ url ) ; return $ generatedUrl ; } return $ url ; }
docstring: base function to return the url for the link method
  
  @param   mixed   url data received from the link method
  @return  string  url to pass to href
docstring_tokens: base function to return the url for the link method