Overview

Namespaces

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

Classes

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

Class App

The main Racoon API class, through which the entire application should accessed and processed.

Namespace: Racoon\Api
Package: Racoon\Api
Located at App.php
Methods summary
public
# __construct( )

App constructor. Set some default options.

App constructor. Set some default options.

public
# createRequest( )

Creates the Request for Racoon to use.

Creates the Request for Racoon to use.

protected
# setupRequest( )

Throws

Racoon\Api\Exception\InvalidJsonException
protected string|null
# getJsonStringFromRequest( )

Returns

string|null
public
# run( )

Runs the Application.

Runs the Application.

Throws

Racoon\Api\Exception\Exception
Exception
public string
# getJsonKeyName( )

Returns where Racoon should look in the GET / POST array for the JSON request string.

Returns where Racoon should look in the GET / POST array for the JSON request string.

Returns

string
public
# setJsonKeyName( string $jsonKeyName )

Sets where Racoon should look in the GET / POST array for the JSON request string.

Sets where Racoon should look in the GET / POST array for the JSON request string.

Parameters

$jsonKeyName
public Racoon\Api\Auth\AuthInterface
# getAuthenticator( )

Returns the Authenticator that should be used by the application.

Returns the Authenticator that should be used by the application.

Returns

Racoon\Api\Auth\AuthInterface
public
# setAuthenticator( Racoon\Api\Auth\AuthInterface $authenticator )

Sets the Authenticator that should be used by the application.

Sets the Authenticator that should be used by the application.

Parameters

$authenticator
public Racoon\Router\Router
# getRouter( )

Returns the Router being used by the Application.

Returns the Router being used by the Application.

Returns

Racoon\Router\Router
public Racoon\Api\Response\Format\FormatterInterface
# getResponseFormatter( )

Returns the Formatter to be used by Racoon when formatting the request response.

Returns the Formatter to be used by Racoon when formatting the request response.

Returns

Racoon\Api\Response\Format\FormatterInterface
public
# setResponseFormatter( Racoon\Api\Response\Format\FormatterInterface $responseFormatter )

Sets the Formatter to be used by Racoon when formatting the request response.

Sets the Formatter to be used by Racoon when formatting the request response.

Parameters

$responseFormatter
public Racoon\Api\Response\Generate\GeneratorInterface
# getResponseGenerator( )

Returns the Generator to be used by Racoon when putting the request response together.

Returns the Generator to be used by Racoon when putting the request response together.

Returns

Racoon\Api\Response\Generate\GeneratorInterface
public
# setResponseGenerator( Racoon\Api\Response\Generate\GeneratorInterface $responseGenerator )

Sets the Generator to be used by Racoon when putting the request response together.

Sets the Generator to be used by Racoon when putting the request response together.

Parameters

$responseGenerator
public string
# getRequestClass( )

Returns the name of the Request class Racoon should use.

Returns the name of the Request class Racoon should use.

Returns

string
public
# setRequestClass( string $requestClass )

Sets the name of the Request class Racoon should use.

Sets the name of the Request class Racoon should use.

Parameters

$requestClass
public Racoon\Api\Request
# getRequest( )

Returns the current Request being used by Racoon.

Returns the current Request being used by Racoon.

Returns

Racoon\Api\Request
public boolean
# getRequiresSchema( )

Returns whether or not a Schema is required for the current Request.

Returns whether or not a Schema is required for the current Request.

Returns

boolean
public
# setRequiresSchema( boolean $requiresSchema )

Sets whether or not a Schema is required for the current Request.

Sets whether or not a Schema is required for the current Request.

Parameters

$requiresSchema
public string
# getJsonInputMethod( )

Returns where Racoon is going to look for the json input data.

Returns where Racoon is going to look for the json input data.

Returns

string
public
# setJsonInputMethod( string $jsonInputMethod )

Sets where Racoon is going to look for the json input data.

Sets where Racoon is going to look for the json input data.

Parameters

$jsonInputMethod

Throws

Racoon\Api\Exception\InvalidJsonException
Properties summary
protected string $jsonKeyName

Where Racoon should look in the GET / POST array for the JSON request string.

Where Racoon should look in the GET / POST array for the JSON request string.

# 'json'
protected string $jsonInputMethod

Where Racoon is going to look for the json input data. Available values: request, body

Where Racoon is going to look for the json input data. Available values: request, body

# 'request'
protected Racoon\Api\Auth\AuthInterface $authenticator

The Authenticator that should be used by the application.

The Authenticator that should be used by the application.

#
protected Racoon\Api\Request $request

The current Request in the Racoon Application.

The current Request in the Racoon Application.

#
protected string $requestClass

The name of the Request class Racoon should use. This allows you to add additional functionality to the Request.

The name of the Request class Racoon should use. This allows you to add additional functionality to the Request.

#
protected Racoon\Router\Router $router

The current Router object being used by the Application.

The current Router object being used by the Application.

#
protected Racoon\Api\Response\Format\FormatterInterface $responseFormatter

The Formatter to be used by Racoon when formatting the request response.

The Formatter to be used by Racoon when formatting the request response.

#
protected Racoon\Api\Response\Generate\GeneratorInterface $responseGenerator

The Generator to be used by Racoon when putting the request response together.

The Generator to be used by Racoon when putting the request response together.

#
protected boolean $requiresSchema

Defines whether or not the Controller requires a Schema to be set.

Defines whether or not the Controller requires a Schema to be set.

#
API documentation generated by ApiGen