Overview

Namespaces

  • Charcoal
    • App
      • Action
      • Config
      • Handler
      • Middleware
      • Module
      • Route
      • Script
      • ServiceProvider
      • Template

Classes

  • AbstractHandler
  • Error
  • HandlerConfig
  • NotAllowed
  • NotFound
  • PhpError
  • Shutdown

Interfaces

  • HandlerInterface
  • Overview
  • Namespace
  • Class

Class NotAllowed

Not Allowed Handler

Enhanced version of \Slim\Handlers\NotAllowed.

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

Charcoal\App\Handler\AbstractHandler implements Charcoal\Config\ConfigurableInterface, Charcoal\App\Handler\HandlerInterface, Psr\Log\LoggerAwareInterface, Charcoal\View\ViewableInterface uses Charcoal\Config\ConfigurableTrait (not available) Psr\Log\LoggerAwareTrait (not available) Charcoal\Translator\TranslatorAwareTrait (not available) Charcoal\View\ViewableTrait (not available)
Extended by Charcoal\App\Handler\NotAllowed
Namespace: Charcoal\App\Handler
Located at Charcoal/App/Handler/NotAllowed.php
Methods summary
public Psr\Http\Message\ResponseInterface
# __invoke( Psr\Http\Message\ServerRequestInterface $request, Psr\Http\Message\ResponseInterface $response, array $methods )

Invoke "Not Allowed" Handler

Invoke "Not Allowed" Handler

Parameters

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

Returns

Psr\Http\Message\ResponseInterface
protected Charcoal\App\Handler\NotAllowed
# setMethods( array $methods )

Set the HTTP methods allowed by the current request.

Set the HTTP methods allowed by the current request.

Parameters

$methods
Case-sensitive array of methods.

Returns

Charcoal\App\Handler\NotAllowed
Chainable
public string
# methods( )

Retrieves the HTTP methods allowed by the current request.

Retrieves the HTTP methods allowed by the current request.

Returns

string
Returns the allowed request methods.
protected string
# renderPlainOutput( )

Render Plain/Text Error

Render Plain/Text Error

Returns

string
protected string
# renderJsonOutput( )

Render JSON Error

Render JSON Error

Returns

string
protected string
# renderXmlOutput( )

Render XML Error

Render XML Error

Returns

string
public string
# messageTitle( )

Render title of error

Render title of error

Returns

string

Overrides

Charcoal\App\Handler\AbstractHandler::messageTitle()
public string
# renderHtmlMessage( )

Render body of HTML error

Render body of HTML error

Returns

string
Methods inherited from Charcoal\App\Handler\AbstractHandler
__construct(), baseUrl(), createConfig(), determineContentType(), init(), renderHtmlOutput(), renderHtmlTemplate(), setBaseUrl(), setContainer(), setDependencies()
Properties summary
protected string $methods

HTTP methods allowed by the current request.

HTTP methods allowed by the current request.

#
Properties inherited from Charcoal\App\Handler\AbstractHandler
$baseUrl, $container, $knownContentTypes
API documentation generated by ApiGen