src/main/php/routing/Routing.php
public function supportsMimeType(string $mimeType, $mimeTypeClass = null): RoutingConfigurator
    {
        if (null === $mimeTypeClass && !SupportedMimeTypes::provideDefaultClassFor($mimeType)) {
            throw new \InvalidArgumentException(
                    'No default class known for mime type ' . $mimeType
                    . ', please provide a class'
            );
        }

        $this->mimeTypes[] = $mimeType;
        if (null !== $mimeTypeClass) {
            $this->mimeTypeClasses[$mimeType] = $mimeTypeClass;
        }

        return $this;
    }
public function supportsMimeType(string $mimeType, $mimeTypeClass = null): RoutingConfigurator
    {
        if (null === $mimeTypeClass && !SupportedMimeTypes::provideDefaultClassFor($mimeType)) {
            throw new \InvalidArgumentException(
                    'No default class known for mime type ' . $mimeType
                    . ', please provide a class'
            );
        }

        $this->mimeTypes[] = $mimeType;
        if (null !== $mimeTypeClass) {
            $this->mimeTypeClasses[$mimeType] = $mimeTypeClass;
        }

        return $this;
    }
public function supportsMimeType ( string $ mimeType , $ mimeTypeClass = null ) : RoutingConfigurator { if ( null === $ mimeTypeClass && ! SupportedMimeTypes :: provideDefaultClassFor ( $ mimeType ) ) { throw new \ InvalidArgumentException ( 'No default class known for mime type ' . $ mimeType . ', please provide a class' ) ; } $ this -> mimeTypes [ ] = $ mimeType ; if ( null !== $ mimeTypeClass ) { $ this -> mimeTypeClasses [ $ mimeType ] = $ mimeTypeClass ; } return $ this ; }
add a supported mime type

@param   string  $mimeType
@param   string  $mimeTypeClass  optional  special class to be used for given mime type on this route
@return  \stubbles\webapp\routing\Routing
@throws  \InvalidArgumentException
add a supported mime type