zendframework/zend-db

Adding the missing method to the interface

Opened this issue · 2 comments

<?php
/**
 * Zend Framework (http://framework.zend.com/)
 *
 * @link      http://github.com/zendframework/zf2 for the canonical source repository
 * @copyright Copyright (c) 2005-2016 Zend Technologies USA Inc. (http://www.zend.com)
 * @license   http://framework.zend.com/license/new-bsd New BSD License
 */

namespace Zend\Db\TableGateway;

interface TableGatewayInterface
{
    public function getTable();
    public function select($where = null);
    public function insert($set);
    public function update($set, $where = null);
    public function delete($where);
    public function getLastInsertValue();
}

Adding a method to an interface is a backwards compatibility break, as any implementations must update their code in order to be compatible. As such, I'm marking this for v3.0.

One thing we can do now is to add a new interface defining that method, and then have it composed into our own implementations; v3 would then wrap that functionality in the original interface and remove the new one (or extend the new one).

Feel free to submit one or more pull requests per my suggestions above.

This repository has been closed and moved to laminas/laminas-db; a new issue has been opened at laminas/laminas-db#102.