protected function isPk($key) { $pk = $this->getPk(); if (is_string($pk) && $pk == $key) { return true; } elseif (is_array($pk) && in_array($key, $pk)) { return true; } return false; }