Or you can do one of the following:
1) If the redundant code is only used in one controller/model, then
extract the redundant code as a new private function in the controller/
model and call it where you need it from the other functions.
2) If the redundant code is used in more than one controller/model,
then extract the redundant code as a new function in the
app_controller/app_model and call it where you need it from the other
functions in each controller/model.
3) If the redundant code can be defined as an independent
functionality, then go with Edinei Luis Cipriani solution.
Enjoy,
   John

On Apr 20, 12:13 pm, Edinei Luis Cipriani <phpedi...@gmail.com> wrote:
> You can make a Componenthttp://book.cakephp.org/view/64/Creating-Components
>
> Best regards
[snip]

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to