Overview

Namespaces

  • Racoon
    • Api
      • Auth
      • Exception
      • Response
        • Format
        • Generate
      • Schema

Classes

  • App
  • Controller
  • Request
  • Overview
  • Namespace
  • Class

Class Request

Namespace: Racoon\Api
Located at Request.php
Methods summary
public
# __construct( )
public mixed|null
# getOptionalRequestData( string $name, null|mixed $default = null )

Returns a piece of optional data from the input data.

Returns a piece of optional data from the input data.

Parameters

$name
$default

Returns

mixed|null
public mixed|null
# getRequiredRequestData( string $name, string $errorMessage = 'Missing required parameter: [parameter]' )

Returns a piece of required data from the input data.

Returns a piece of required data from the input data.

Parameters

$name
$errorMessage
The error message to be shown to the user. [parameter] will be replaced with the missing parameter name.

Returns

mixed|null

Throws

Racoon\Api\Exception\Exception
public null|object
# getRequestData( boolean $fullRequest = false )

Parameters

$fullRequest

Returns

null|object
public null|object
# getFullRequestData( )

Returns

null|object
public
# setRequest( null|object $request )

Parameters

$request

Returns


$this
public
# setRequestJson( string|null $json )

Parameters

$json

Returns


$this

Throws

Racoon\Api\Exception\InvalidJsonException
public null|string
# getJsonString( )

Returns

null|string
public
# setJsonString( null|string $jsonString )

Parameters

$jsonString

Returns


$this
public string
# getHttpMethod( )

Returns

string
public
# setHttpMethod( string $httpMethod )

Parameters

$httpMethod

Returns


$this
public string
# getUri( )

Returns

string
public
# setUri( string $uri )

Parameters

$uri

Returns


$this
public mixed
# process( Racoon\Router\Router $router, boolean $requiresSchema = false )

Process the current request.

Process the current request.

Parameters

$router
$requiresSchema

Returns

mixed

Throws

Racoon\Api\Exception\Exception
public float
# getStartTime( )

Returns

float
public
# setStartTime( float $startTime )

Parameters

$startTime
public float
# getEndTime( )

Returns

float
public
# setEndTime( float $endTime )

Parameters

$endTime
public
# getElapsedTime( $convertToMs = false )

null|float

null|float

public Racoon\Api\Schema\Schema
# getSchema( )

Returns

Racoon\Api\Schema\Schema
public
# setSchema( Racoon\Api\Schema\Schema $schema )

Parameters

$schema
public Racoon\Router\DispatcherResult
# getDispatcherResult( )

Returns

Racoon\Router\DispatcherResult
public
# setDispatcherResult( Racoon\Router\DispatcherResult $dispatcherResult )

Parameters

$dispatcherResult
public null|string
# getResponseMessage( )

Returns

null|string
public
# setResponseMessage( null|string $responseMessage )

Parameters

$responseMessage
public mixed
# getControllerResponse( )

Returns

mixed
protected
# setControllerResponse( mixed $controllerResponse )

Parameters

$controllerResponse
public Exception
# getDisplayException( )

Returns

Exception
public
# setDisplayException( Exception $displayException )

Parameters

$displayException
Properties summary
protected float $startTime
#
protected float $endTime
#
protected null|object $request
#
protected string|null $jsonString
#
protected string $httpMethod
#
protected string $uri
#
protected Racoon\Api\Schema\Schema $schema
#
protected Racoon\Router\DispatcherResult $dispatcherResult
#
protected string|null $responseMessage
#
protected mixed $controllerResponse
#
protected Exception $displayException

An exception to be displayed to the user.

An exception to be displayed to the user.

#
API documentation generated by ApiGen