public function inject($obj, $fieldName)
 {
     $mapping = $this->getMapping($obj, $fieldName);
     $this->dispatch(Events::PRE_INJECT, new Event($obj, $mapping));
     $this->injector->injectFile($obj, $mapping);
     $this->dispatch(Events::POST_INJECT, new Event($obj, $mapping));
 }
Beispiel #2
0
 public function inject($obj, $mapping)
 {
     $mapping = $this->factory->fromName($obj, $mapping);
     $this->dispatch(Events::PRE_INJECT, new Event($obj, $mapping));
     $this->injector->injectFile($obj, $mapping);
     $this->dispatch(Events::POST_INJECT, new Event($obj, $mapping));
 }