class Intraface_TableGateway extends pdoext_TableGateway { private $user; function __construct($table, $conn, $user) { $this->user = $user; parent::__construct($table, $conn); } function insert($data) { $data['intranet_id'] = $this->user->getActiveIntranetId(); $data['user_id'] = $this->user->getId(); parent::insert($data); } function update($data, $condition) { $condition['intranet_id'] = $this->user->getActiveIntranetId(); $condition['user_id'] = $this->user->getId(); parent::update($data, $condition); } function delete($condition) { $condition['intranet_id'] = $this->user->getActiveIntranetId(); $condition['user_id'] = $this->user->getId(); parent::delete($condition); } }