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;
 }
Example #2
0
 public function key()
 {
     $method = 'get' . ucfirst($this->keyProperty);
     Assert::methodExists($this->current(), $method);
     return $this->current()->{$method}();
 }