Suppose I have this models
- User.class.php
- userTable.class.php
I want to create a method to update the user
Action
class userActions extends sfActions {
public function executeUpdateUser(sfWebRequest $request) {
$user_id = $request->getParameter('id');
// here i want to call function to update the user
// updateUser($id);
}
Where should I put this function updateUser($id)
?
ON user.class.php
--> And call it like that User::updateUser($id);
OR ON userTable.class.php
--> And call it like that Doctrine_Core::getTable('User')->updateUser($id);