protected function addClassToMap($type, $className)
    {
        if (!is_string($type)) {
            throw new InvalidArgumentException(
                'Type (class key) must be a string'
            );
        }

        $this->map[$type] = $className;
        return $this;
    }
protected function addClassToMap($type, $className)
    {
        if (!is_string($type)) {
            throw new InvalidArgumentException(
                'Type (class key) must be a string'
            );
        }

        $this->map[$type] = $className;
        return $this;
    }
protected function addClassToMap ( $ type , $ className ) { if ( ! is_string ( $ type ) ) { throw new InvalidArgumentException ( 'Type (class key) must be a string' ) ; } $ this -> map [ $ type ] = $ className ; return $ this ; }
Add a class name to the available types _map_.

@param string $type      The type (class ident).
@param string $className The FQN of the class.
@throws InvalidArgumentException If the $type parameter is not a striing or the $className class does not exist.
@return self
Add a class name to the available types _map_ .