Oihana PHP System

HttpMethodRoutesTrait uses trait:short

Table of Contents

Properties

$delete  : string|null
$flags  : int
Bitmask representing enabled routes
$get  : string|null
$list  : string|null
$patch  : string|null
$post  : string|null
$put  : string|null

Methods

count()  : void
Generates a special GET count route reference.
delete()  : void
Generates a new DELETE route reference.
describeFlags()  : string
Get a human-readable description of enabled routes
disableFlags()  : static
Disable specific route flags
enableFlags()  : static
Enable specific route flags
get()  : void
Generates a new GET route reference.
hasCount()  : bool
Check if COUNT route is enabled
hasDelete()  : bool
Check if DELETE route is enabled
hasDeleteMultiple()  : bool
Check if DELETE_MULTIPLE is enabled
hasGet()  : bool
Check if GET route is enabled
hasList()  : bool
Check if LIST route is enabled
hasPatch()  : bool
Check if PATCH route is enabled
hasPost()  : bool
Check if POST route is enabled
hasPut()  : bool
Check if PUT route is enabled
initializeFlags()  : static
Initialize the internal flags.
initializeMethods()  : static
Initializes or overrides HTTP method handlers based on the given init array.
list()  : void
Generates a new GET (LIST) route reference.
method()  : void
options()  : void
Generates a new OPTIONS route reference.
patch()  : void
Generates a new PATCH route reference.
post()  : void
Generates a new POST route reference.
put()  : void
Generates a new PUT route reference.

Properties

$flags

Bitmask representing enabled routes

public int $flags = \oihana\routes\enums\RouteFlag::DEFAULT

Methods

count()

Generates a special GET count route reference.

public count(array<string|int, mixed> &$routes, string $route[, string|null $method = HttpMethod::count ]) : void
Parameters
$routes : array<string|int, mixed>
$route : string
$method : string|null = HttpMethod::count

delete()

Generates a new DELETE route reference.

public delete(array<string|int, mixed> &$routes, string $route[, string|null $method = null ]) : void
Parameters
$routes : array<string|int, mixed>
$route : string
$method : string|null = null

describeFlags()

Get a human-readable description of enabled routes

public describeFlags() : string
Return values
string

Description of enabled routes

disableFlags()

Disable specific route flags

public disableFlags(int $flags) : static
Parameters
$flags : int

Flags to disable

Return values
static

enableFlags()

Enable specific route flags

public enableFlags(int $flags) : static
Parameters
$flags : int

Flags to enable

Return values
static

get()

Generates a new GET route reference.

public get(array<string|int, mixed> &$routes, string $route[, string|null $method = null ]) : void
Parameters
$routes : array<string|int, mixed>
$route : string
$method : string|null = null

hasCount()

Check if COUNT route is enabled

public hasCount() : bool
Return values
bool

hasDelete()

Check if DELETE route is enabled

public hasDelete() : bool
Return values
bool

hasDeleteMultiple()

Check if DELETE_MULTIPLE is enabled

public hasDeleteMultiple() : bool
Return values
bool

hasGet()

Check if GET route is enabled

public hasGet() : bool
Return values
bool

hasList()

Check if LIST route is enabled

public hasList() : bool
Return values
bool

hasPatch()

Check if PATCH route is enabled

public hasPatch() : bool
Return values
bool

hasPost()

Check if POST route is enabled

public hasPost() : bool
Return values
bool

hasPut()

Check if PUT route is enabled

public hasPut() : bool
Return values
bool

initializeFlags()

Initialize the internal flags.

public initializeFlags([array<string|int, mixed>|int $init = [] ]) : static
Parameters
$init : array<string|int, mixed>|int = []
Return values
static

initializeMethods()

Initializes or overrides HTTP method handlers based on the given init array.

public initializeMethods([array<string|int, mixed> $init = [] ]) : static
Parameters
$init : array<string|int, mixed> = []

Initialization or override parameters.

Return values
static

list()

Generates a new GET (LIST) route reference.

public list(array<string|int, mixed> &$routes, string $route[, string|null $method = HttpMethod::list ]) : void
Parameters
$routes : array<string|int, mixed>
$route : string
$method : string|null = HttpMethod::list

method()

public method(string $clazz, array<string|int, mixed> &$routes, string $route[, string|null $method = null ]) : void
Parameters
$clazz : string
$routes : array<string|int, mixed>
$route : string
$method : string|null = null
Tags
protected

options()

Generates a new OPTIONS route reference.

public options(array<string|int, mixed> &$routes, string $route[, bool $flag = true ]) : void
Parameters
$routes : array<string|int, mixed>
$route : string
$flag : bool = true
Tags
throws
DependencyException
throws
NotFoundException
throws
ContainerExceptionInterface
throws
NotFoundExceptionInterface

patch()

Generates a new PATCH route reference.

public patch(array<string|int, mixed> &$routes, string $route[, string|null $method = null ]) : void
Parameters
$routes : array<string|int, mixed>
$route : string
$method : string|null = null

post()

Generates a new POST route reference.

public post(array<string|int, mixed> &$routes, string $route[, string|null $method = null ]) : void
Parameters
$routes : array<string|int, mixed>
$route : string
$method : string|null = null

put()

Generates a new PUT route reference.

public put(array<string|int, mixed> &$routes, string $route[, string|null $method = null ]) : void
Parameters
$routes : array<string|int, mixed>
$route : string
$method : string|null = null

        
On this page

Search results