private function entityFactory()
    {
        // this is a little tortuous but some constructor flows require the EntityManager
        // as this point in the refactor I'm unwilling to modify the constructor of the Entity
        // TODO. Fix this. Constructor injection
        $entity = $this->reflEntityClass->newInstanceWithoutConstructor();
        // add the entityManager
        if( $this->reflEntityManagerPropertyOfEntity ) {
            $this->reflEntityManagerPropertyOfEntity->setValue($entity, $this->entityManager);
        }
        // call the original constructor
        call_user_func_array( [$entity, '__construct'], func_get_args() );
        return $entity;
    }
private function entityFactory()
    {
        // this is a little tortuous but some constructor flows require the EntityManager
        // as this point in the refactor I'm unwilling to modify the constructor of the Entity
        // TODO. Fix this. Constructor injection
        $entity = $this->reflEntityClass->newInstanceWithoutConstructor();
        // add the entityManager
        if( $this->reflEntityManagerPropertyOfEntity ) {
            $this->reflEntityManagerPropertyOfEntity->setValue($entity, $this->entityManager);
        }
        // call the original constructor
        call_user_func_array( [$entity, '__construct'], func_get_args() );
        return $entity;
    }
private function entityFactory ( ) { // this is a little tortuous but some constructor flows require the EntityManager // as this point in the refactor I'm unwilling to modify the constructor of the Entity // TODO. Fix this. Constructor injection $ entity = $ this -> reflEntityClass -> newInstanceWithoutConstructor ( ) ; // add the entityManager if ( $ this -> reflEntityManagerPropertyOfEntity ) { $ this -> reflEntityManagerPropertyOfEntity -> setValue ( $ entity , $ this -> entityManager ) ; } // call the original constructor call_user_func_array ( [ $ entity , '__construct' ] , func_get_args ( ) ) ; return $ entity ; }
Temp helper method which actually does the instantiation work and ensure our Entity has a link to the EntityManager
@return Bond\Base
Temp helper method which actually does the instantiation work and ensure our Entity has a link to the EntityManager