src/Routing/Route.php
public function generateUrl(array $tokens = [])
    {
        $path = $this->path;

        foreach ($tokens as $key => $value) {
            $path = str_replace(":{$key}", $value, $path);
        }

        return $path;
    }
public function generateUrl(array $tokens = [])
    {
        $path = $this->path;

        foreach ($tokens as $key => $value) {
            $path = str_replace(":{$key}", $value, $path);
        }

        return $path;
    }
public function generateUrl ( array $ tokens = [ ] ) { $ path = $ this -> path ; foreach ( $ tokens as $ key => $ value ) { $ path = str_replace ( ":{$key}" , $ value , $ path ) ; } return $ path ; }
Generates the path, replacing tokens with specified values.

@param array $tokens

@return string
Generates the path replacing tokens with specified values .