Thanks.
I now understand fat controllers divide into classes.
And I also understand the way I said is wrong.
I get one more question. Where do I put my classes?
I know put them as I want, But where is CakePHP's standard?
Are app/vendors/foo.php and app/vendors/bar.php?
And include them 'vendor(fo
In OOP theory you can have classes with loads of methods, as long as
it makes sense.
Controller methods can be collpsed by almost all editors.
Dont divide that controller that way. Dont worry with 500 lines of
PHP, as long as all methods are part of Users.
On Feb 14, 7:05 pm, sanemat <[EMAIL PRO
Thank you for your reply.
Yes, I try to thin controllers, and most of business logics move to
model.
But my UsersController has register(), activate(), resign(), edit(),
etc...
It has over 500 lines PHP Code.
So I want to divide it into small files which have less than 50-100
lines code.
On 2/14
Hi,
Why do yopu want to devide the controller methods ? the whole purpose
of a controller is to _group_ them. You should think about "fat model,
thin controllers" - do a search on that , also you might take a look
at editors wich support code folding - vim, eclipse and *many* others.
On 2/13/08,
Controllers which have many method (like users_controller) are liable
to large.
example:
app/controllers/examples_controller.php
class ExamplesController extends AppController {
function index(){}
function edit(){}
function add(){}
etc...
}
I want divide this into small file