Mayby you have to use the try.. catch also
http://mark-story.com/posts/view/simplifying-controller-logic-with-exceptions
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"CakePHP" group.
To post to this group, send em
You can try App::import() (http://api.cakephp.org/class/app#method-
Appimport) to check for a model availablity.
You can also have a look at ClassRegistry::keys() and
ClassRegistry::init()
On Jul 10, 9:27 am, "Dr. Loboto" wrote:
> What do you mean under "model exists", where do you check it and
What do you mean under "model exists", where do you check it and for
what purpose do you need it?
Btw, method_exists won't work as loaded models in controllers and
models are their properties, not methods.
On Jul 10, 12:31 pm, eli_sier wrote:
> I'd like to be able to check to see if a model exi
I'd like to be able to check to see if a model exists.
I've tried:
method_exists($this, 'ModelName')
but it does not seem to work.
Any way of doing this?
Cheers,
Eli
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups