function reachable($url) {
        $params = Router::parse($url);

        if (!empty($params['controller'])) {
                $ctrlName = Inflector::camelize($params['controller']);

                if (!loadController($ctrlName)) {
                        $pluginName =
Inflector::camelize($params['action']);
                        if (loadController($ctrlName . '.' . $pluginName)) {
                                return true;
                        }
                } else {
                        return true;
                }
        }

        return false;
}

-MI

---------------------------------------------------------------------------

Remember, smart coders answer ten questions for every question they ask. 
So be smart, be cool, and share your knowledge. 

BAKE ON!

blog: http://www.MarianoIglesias.com.ar


-----Mensaje original-----
De: [email protected] [mailto:[EMAIL PROTECTED] En nombre
de phpjoy
Enviado el: Lunes, 18 de Junio de 2007 11:06 a.m.
Para: Cake PHP
Asunto: Re: checking if a controller exists

you gave an intresting idea.. maybe i'll simply loadcontroller and
then run the action and then call the view render myself from the
function.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to