/** * Abstract constructor * * @param mixed $identity */ public function __construct(array $config) { parent::__construct($config); // Get identity $primary = $this->getTable()->info(Zend_Db_Table_Abstract::PRIMARY); if (count($primary) !== 1) { throw new Core_Model_Item_Exception(sprintf('Item tables must have only a single primary column, given: %s', join(', ', $primary))); } $prop = array_shift($primary); if (!isset($this->{$prop})) { //throw new Core_Model_Item_Exception(sprintf('Primary column "%s" not defined', $prop)); } else { if (isset($this->{$prop})) { $this->_identity = $this->{$prop}; } } // Get store $this->_store = new stdClass(); // Backwards compatibility if (isset($this->_searchColumns) && is_array($this->_searchColumns)) { $this->_searchTriggers = $this->_searchColumns; unset($this->_searchColumns); } }