public function getType (string $key) : ComponentType
    {
        if (!array_key_exists($key, $this->types))
        {
            throw new UnknownComponentTypeException($key, array_keys($this->types));
        }

        $type = $this->types[$key];

        return $type;
    }
public function getType (string $key) : ComponentType
    {
        if (!array_key_exists($key, $this->types))
        {
            throw new UnknownComponentTypeException($key, array_keys($this->types));
        }

        $type = $this->types[$key];

        return $type;
    }
public function getType ( string $ key ) : ComponentType { if ( ! array_key_exists ( $ key , $ this -> types ) ) { throw new UnknownComponentTypeException ( $ key , array_keys ( $ this -> types ) ) ; } $ type = $ this -> types [ $ key ] ; return $ type ; }
Returns the type by key

@param string $key

@return ComponentType
Returns the type by key