Zend_Db_Table_Abstract::info PHP Method

info() public method

You can elect to return only a part of this information by supplying its key name, otherwise all information is returned as an array.
public info ( string $key = null ) : mixed
$key string The specific info part to return OPTIONAL
return mixed
    public function info($key = null)
    {
        $this->_setupPrimaryKey();
        $info = array(self::SCHEMA => $this->_schema, self::NAME => $this->_name, self::COLS => $this->_getCols(), self::PRIMARY => (array) $this->_primary, self::METADATA => $this->_metadata, self::ROW_CLASS => $this->getRowClass(), self::ROWSET_CLASS => $this->getRowsetClass(), self::REFERENCE_MAP => $this->_referenceMap, self::DEPENDENT_TABLES => $this->_dependentTables, self::SEQUENCE => $this->_sequence);
        if ($key === null) {
            return $info;
        }
        if (!array_key_exists($key, $info)) {
            require_once 'Zend/Db/Table/Exception.php';
            throw new Zend_Db_Table_Exception('There is no table information for the key "' . $key . '"');
        }
        return $info[$key];
    }

Usage Example

Example #1
0
 /**
  * Construct Dataset Table from Zend_Db_Table object
  *
  * @param Zend_Db_Table_Abstract        $table
  * @param string|Zend_Db_Select|null    $where
  * @param string|null                   $order
  * @param int                           $count
  * @param int                           $offset
  */
 public function __construct(Zend_Db_Table_Abstract $table, $where = null, $order = null, $count = null, $offset = null)
 {
     $this->tableName = $table->info('name');
     $this->_columns = $table->info('cols');
     $this->_table = $table;
     $this->_where = $where;
     $this->_order = $order;
     $this->_count = $count;
     $this->_offset = $offset;
 }
All Usage Examples Of Zend_Db_Table_Abstract::info