public function getLink($controller, $params = array(), $fullPath = false)
    {
        if ($controller instanceof Controller) {
            $controller = get_class($controller);
        }
        $controller = (string)$controller;
        if(substr($controller, 0, 1) === "\\") {
            $controller = substr($controller, 1);
        }
        try {

            $url = Bootstrap::getSingleton()->getManager()->getRouter()->generate($controller, $params);
            if ($fullPath) {
                $protocol = 'http';
                if (strpos($_SERVER['SCRIPT_URI'], 'https') !== false) {
                    $protocol = 'https';
                }
                return $protocol . '://' . $_SERVER['HTTP_HOST'] . $url;
            }
            return $url;
        } catch (\Exception $ex) {

        }
        return "";
    }
public function getLink($controller, $params = array(), $fullPath = false)
    {
        if ($controller instanceof Controller) {
            $controller = get_class($controller);
        }
        $controller = (string)$controller;
        if(substr($controller, 0, 1) === "\\") {
            $controller = substr($controller, 1);
        }
        try {

            $url = Bootstrap::getSingleton()->getManager()->getRouter()->generate($controller, $params);
            if ($fullPath) {
                $protocol = 'http';
                if (strpos($_SERVER['SCRIPT_URI'], 'https') !== false) {
                    $protocol = 'https';
                }
                return $protocol . '://' . $_SERVER['HTTP_HOST'] . $url;
            }
            return $url;
        } catch (\Exception $ex) {

        }
        return "";
    }
public function getLink ( $ controller , $ params = array ( ) , $ fullPath = false ) { if ( $ controller instanceof Controller ) { $ controller = get_class ( $ controller ) ; } $ controller = ( string ) $ controller ; if ( substr ( $ controller , 0 , 1 ) === "\\" ) { $ controller = substr ( $ controller , 1 ) ; } try { $ url = Bootstrap :: getSingleton ( ) -> getManager ( ) -> getRouter ( ) -> generate ( $ controller , $ params ) ; if ( $ fullPath ) { $ protocol = 'http' ; if ( strpos ( $ _SERVER [ 'SCRIPT_URI' ] , 'https' ) !== false ) { $ protocol = 'https' ; } return $ protocol . '://' . $ _SERVER [ 'HTTP_HOST' ] . $ url ; } return $ url ; } catch ( \ Exception $ ex ) { } return "" ; }
Genera un enlace al controlador indicado, puede ser un objeto un un string

@param string|Controller $controller
@param array $params
@param bool $fullPath
@return string
@throws \Exception
Genera un enlace al controlador indicado puede ser un objeto un un string