Overview
  • Namespace
  • Class

Namespaces

  • Slim
    • Exception
    • Handlers
      • Strategies
    • Http
    • Interfaces
      • Http

Classes

  • AbstractError
  • AbstractHandler
  • Error
  • NotAllowed
  • NotFound
  • PhpError

Class NotAllowed

Default Slim application not allowed handler

It outputs a simple message in either JSON, XML or HTML based on the Accept header.

Slim\Handlers\AbstractHandler
Extended by Slim\Handlers\NotAllowed
Namespace: Slim\Handlers
Located at Handlers/NotAllowed.php

Methods summary

public Psr\Http\Message\ResponseInterface
# __invoke( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, array $methods )

Invoke error handler

Invoke error handler

Parameters

$request
The most recent Request object
$response
The most recent Response object
$methods
Allowed HTTP methods

Returns

Psr\Http\Message\ResponseInterface

Throws

UnexpectedValueException
protected string
# renderPlainOptionsMessage( array $methods )

Render PLAIN message for OPTIONS response

Render PLAIN message for OPTIONS response

Parameters

$methods

Returns

string
protected string
# renderJsonNotAllowedMessage( array $methods )

Render JSON not allowed message

Render JSON not allowed message

Parameters

$methods

Returns

string
protected string
# renderXmlNotAllowedMessage( array $methods )

Render XML not allowed message

Render XML not allowed message

Parameters

$methods

Returns

string
protected string
# renderHtmlNotAllowedMessage( array $methods )

Render HTML not allowed message

Render HTML not allowed message

Parameters

$methods

Returns

string

Methods inherited from Slim\Handlers\AbstractHandler

determineContentType()

Properties summary

Properties inherited from Slim\Handlers\AbstractHandler

$knownContentTypes

API documentation generated by ApiGen