#5 open
Kris Jordan

Add Helper Methods to Controller

Reported by Kris Jordan | November 9th, 2008 @ 11:38 PM | in 0.30

Commonly used return behaviors should be factored out into helper methods which can be called, like:

function edit($id) { $model = Make::a('Model'); $model->id = $id; return $this->findOr404($model); }

Other interesting ones would be: return $this->ok(); return $this->insertOrSendBackTo($model, 'fail-view'); return $this->redirect('another/url');

Comments and changes to this ticket

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.

New-ticket Create new ticket

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile ยป

The Recess PHP Framework is an open source, full stack, RESTful PHP framework.

http://www.recessframework.org/

People watching this ticket

Tags

Pages