src/POData/Providers/Metadata/SimpleMetadataProvider.php
/**
     * Add an entity type
     * 
     * @param \ReflectionClass $refClass  reflection class of the entity
     * @param string $name name of the entity
     * @param string $namespace namespace of the data source
     * 
     * @return ResourceType
     *
     * @throws InvalidOperationException when the name is already in use
     */
Add an entity type

@param \ReflectionClass $refClass  reflection class of the entity
@param string $name name of the entity
@param string $namespace namespace of the data source



@throws InvalidOperationException when the name is already in use
Add an entity type @param \ ReflectionClass $refClass reflection class of the entity @param string $name name of the entity @param string $namespace namespace of the data source @throws InvalidOperationException when the name is already in use
public function addEntityType(\ReflectionClass $refClass, $name, $namespace = null)
    {
        if (array_key_exists($name, $this->resourceTypes)) {
            throw new InvalidOperationException('Type with same name already added');
        }
        $entityType = new ResourceType($refClass, ResourceTypeKind::ENTITY, $name, $namespace);
        $this->resourceTypes[$name] = $entityType;
        return $entityType;
    }
public function addEntityType ( \ ReflectionClass $ refClass , $ name , $ namespace = null ) { if ( array_key_exists ( $ name , $ this -> resourceTypes ) ) { throw new InvalidOperationException ( 'Type with same name already added' ) ; } $ entityType = new ResourceType ( $ refClass , ResourceTypeKind :: ENTITY , $ name , $ namespace ) ; $ this -> resourceTypes [ $ name ] = $ entityType ; return $ entityType ; }
Add an entity type
Add an entity type