static function _addWatch($controller, $memberObj, $prodObj, $notifyEmail) { $watch = new Watch(); $watch->setItemId($prodObj->getId()); if ($memberObj) { $memberId = $memberObj->getId(); } if ($notifyEmail) { $memberId = $notifyEmail; } $watch->setMemberId($memberId); $controller->dbAddObject('watches', 'addWatch', array($watch)); }