protected function delete($slaveObject) { $slaveGetter = 'get' . ucfirst($this->slaveKeyProperty); Assert::methodExists($slaveObject, $slaveGetter); if (!$this->dryRun && $this->reallyDelete) { $this->slave->dropById($slaveObject->{$slaveGetter}()); } return true; }
public function key() { $method = 'get' . ucfirst($this->keyProperty); Assert::methodExists($this->current(), $method); return $this->current()->{$method}(); }