public function insertItem(array $data) { $this->OrderItemTableGateway->insert($data); return $this->OrderItemTableGateway->getLastInsertValue(); }
public function updateItem(array $data) { $this->orderItemTableGateway->insert($data); $id = $this->orderItemTableGateway->getLastInsertValue(); return $id; }
/** * @covers Zend\Db\TableGateway\AbstractTableGateway::getLastInsertValue */ public function testGetLastInsertValue() { $this->table->insert(array('foo' => 'bar')); $this->assertEquals(10, $this->table->getLastInsertValue()); }
public function insert($client) { $this->tableGateway->insert((array) $client); return $this->tableGateway->getLastInsertValue(); }