yo can always try class_exists() ;)
http://php.net/class_exists
greets,
On Jun 19, 11:22 am, phpjoy <[EMAIL PROTECTED]> wrote:
> thanks a lot, that pretty much sums it up..
> i see the right way is to loadController. i might send a suggestion
> about that.. there should be existsController or something like
> that :)
>
> On Jun 18, 4:56 pm, "Mariano Iglesias" <[EMAIL PROTECTED]>
> wrote:
>
> > 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
-~----------~----~----~----~------~----~------~--~---