Example #1
0
 public function remove($obj, $mapping)
 {
     $mapping = $this->factory->fromName($obj, $mapping);
     $this->dispatch(Events::PRE_REMOVE, new Event($obj, $mapping));
     $this->storage->remove($obj, $mapping);
     $mapping->setFileName($obj, null);
     $this->dispatch(Events::POST_REMOVE, new Event($obj, $mapping));
 }
Example #2
0
 /**
  *  note: extension point.
  */
 protected function getFilename($obj, $mappingName, $className = null)
 {
     $mapping = $this->factory->fromName($obj, $mappingName, $className);
     $filename = $mapping->getFileName($obj);
     return array($mapping, $filename);
 }