Esempio n. 1
0
 /**
  *
  */
 private function dispatchAnnotations()
 {
     $bean = new Bean(get_class($this));
     $bean->setObject($this);
     $annotationDispatcher = new AnnotationsDispatcher($bean, get_class($this), $this->sphring->getSphringEventDispatcher());
     $annotationDispatcher->dispatchAnnotations();
 }
Esempio n. 2
0
 /**
  *
  */
 protected function instanciate()
 {
     $annotationDispatcher = new AnnotationsDispatcher($this, $this->getClass(), $this->getSphringEventDispatcher());
     $classReflector = new \ReflectionClass($this->class);
     if (empty($this->constructor)) {
         $this->object = $classReflector->newInstance();
         $annotationDispatcher->dispatchAnnotationClassInstantiate();
         return;
     }
     $constructor = $this->constructor;
     if (!empty($this->extend)) {
         $constructor = array_merge($this->extend->getConstructor(), $constructor);
     }
     $this->object = $classReflector->newInstanceArgs($constructor);
     $annotationDispatcher->setMethodArgs($constructor);
     $annotationDispatcher->dispatchAnnotationClassInstantiate();
 }
Esempio n. 3
0
 /**
  * @return bool
  */
 protected function isInSphringRunner()
 {
     return $this->bean->getObject() instanceof SphringRunner;
 }