public function createEntity(array $data = [], EntityInterface $parent_entity = null, $apply_default_values = false)
    {
        $implementor = $this->getEntityImplementor();

        if (!class_exists($implementor, true)) {
            throw new InvalidTypeException(
                "Unable to resolve the given entity implementor '$implementor' upon entity creation request."
            );
        }

        return new $implementor($this, $data, $parent_entity, $apply_default_values);
    }
public function createEntity(array $data = [], EntityInterface $parent_entity = null, $apply_default_values = false)
    {
        $implementor = $this->getEntityImplementor();

        if (!class_exists($implementor, true)) {
            throw new InvalidTypeException(
                "Unable to resolve the given entity implementor '$implementor' upon entity creation request."
            );
        }

        return new $implementor($this, $data, $parent_entity, $apply_default_values);
    }
public function createEntity ( array $ data = [ ] , EntityInterface $ parent_entity = null , $ apply_default_values = false ) { $ implementor = $ this -> getEntityImplementor ( ) ; if ( ! class_exists ( $ implementor , true ) ) { throw new InvalidTypeException ( "Unable to resolve the given entity implementor '$implementor' upon entity creation request." ) ; } return new $ implementor ( $ this , $ data , $ parent_entity , $ apply_default_values ) ; }
Creates a new EntityInterface instance.

@param array $data Optional data for initial hydration.
@param EntityInterface $parent_entity
@param boolean $apply_default_values

@return EntityInterface

@throws InvalidTypeException
Creates a new EntityInterface instance .