protected function getNewInstance()
    {
        $className = $this->entityMetadata->getName();

        if (class_exists($className) === false) {
            throw new \Exception('Unable to create new instance of ' . $className);
        }

        return new $className;
    }
protected function getNewInstance()
    {
        $className = $this->entityMetadata->getName();

        if (class_exists($className) === false) {
            throw new \Exception('Unable to create new instance of ' . $className);
        }

        return new $className;
    }
protected function getNewInstance ( ) { $ className = $ this -> entityMetadata -> getName ( ) ; if ( class_exists ( $ className ) === false ) { throw new \ Exception ( 'Unable to create new instance of ' . $ className ) ; } return new $ className ; }
Return a new instance of the entity

@return object
Return a new instance of the entity