Zend_Db_Table_Abstract::_fetch PHP Method

_fetch() protected method

Support method for fetching rows.
protected _fetch ( Zend_Db_Table_Select $select ) : array
$select Zend_Db_Table_Select query options.
return array An array containing the row results in FETCH_ASSOC mode.
    protected function _fetch(Zend_Db_Table_Select $select)
    {
        $stmt = $this->_db->query($select);
        $data = $stmt->fetchAll(Zend_Db::FETCH_ASSOC);
        return $data;
    }

Usage Example

Exemplo n.º 1
0
 protected function _fetch(Zend_Db_Table_Select $select)
 {
     // Global plugins
     $plugins = Zend_Registry::isRegistered(Pro_Resource_DbPlugin::REGISTRY_ALIAS) ? Zend_Registry::get(Pro_Resource_DbPlugin::REGISTRY_ALIAS) : array();
     if (!empty($plugins)) {
         foreach ($plugins as $alias => $className) {
             $this->logger->log("applying DbPlugin \"{$alias}\"", Zend_Log::DEBUG);
             /** @var $plugin Pro_Db_Plugin_PluginAbstract */
             $plugin = new $className();
             $plugin->beforeFetch($this->_name, $select);
         }
     }
     // Local plugins
     if (!empty($this->_plugins)) {
         foreach ($this->_plugins as $plugin) {
             $plugin->beforeFetch($this->_name, $select);
         }
     }
     return parent::_fetch($select);
 }
All Usage Examples Of Zend_Db_Table_Abstract::_fetch