ZF-3235: Get $_info data from Zend_Db_Table_Select instance


At the moment it's not possible to get $_info data from a Zend_Db_Table_Select instance. A possible solution could be a getInfo() method, which is a slightly modified copy of the getPart() method:

 * Get part of the structured information for the currect query.
 * @param string $part
 * @return mixed
 * @throws Zend_Db_Select_Exception
public function getInfo($info = null)
    if ($info === null) {
        return $this->_info;

    $info = strtolower($info);
    if (!array_key_exists($info, $this->_info)) {
        require_once 'Zend/Db/Select/Exception.php';
        throw new Zend_Db_Select_Exception("Invalid Select part '$info'");

    return $this->_info[$info];

The idea of fusion getInfo() and getPart() together crossed my mind as well, but the data in $_info is too different. However, there is some info in $_info that does/could belong to $_parts, such as the source table name. Something like getTableName() method for both Db_Select and Db_Table_Select would be nice in this case, because this would provide a generic interface to this data.


Please evaluate and fix/categorize as necessary.

This issue has gone unaddressed for too long. I'm re-assigning to Ralph for re-evaluation and categorization.

Assigned this one to myself, since I'll try and resolve the related ZF-3239 soon. I'll see if this is still a relevant improvement after ZF-3239 has been resolved.

This patch won't be applied. It's already possible to grab the table from the select object using getTable(). The same info can be retrieved from that table object.