Ejemplo n.º 1
0
 /**
  * Retrieves an associative array of primary keys.
  *
  * @param bool $useDirty
  * @return array
  */
 protected function _getPrimaryKeyValues($useDirty = true)
 {
     $primary = array_flip($this->_table->getPrimaryKey());
     if ($useDirty) {
         $array = array_intersect_key($this->_data, $primary);
     } else {
         $array = array_intersect_key($this->_cleanData, $primary);
     }
     if (count($primary) != count($array)) {
         throw new Kwf_Exception("The specified Table does not have the same primary key as the Row");
     }
     return $array;
 }