public function create()
    {
        $entityClass = $this->getEntityName();

        $reflection = new \ReflectionClass($entityClass);

        if ($reflection->isAbstract()) {
            throw RuntimeException::createAbstract($entityClass);
        }

        return new $entityClass();
    }
public function create()
    {
        $entityClass = $this->getEntityName();

        $reflection = new \ReflectionClass($entityClass);

        if ($reflection->isAbstract()) {
            throw RuntimeException::createAbstract($entityClass);
        }

        return new $entityClass();
    }
public function create ( ) { $ entityClass = $ this -> getEntityName ( ) ; $ reflection = new \ ReflectionClass ( $ entityClass ) ; if ( $ reflection -> isAbstract ( ) ) { throw RuntimeException :: createAbstract ( $ entityClass ) ; } return new $ entityClass ( ) ; }
Creates an instance of the entity.

@return object

@throws RuntimeException If prototype has not yet been set.
Creates an instance of the entity .