# RouteEndpointInterface

Chevere\Interfaces\Router\Route\RouteEndpointInterface

view source (opens new window)

# Extends

# Description

Describes the component in charge of defining a route endpoint.

Note: Parameters must be automatically determined from known $controller parameters.

# Constants

# KNOWN_METHODS

Type array

array (
  'CONNECT' => 'Chevere\\Components\\Http\\Methods\\ConnectMethod',
  'DELETE' => 'Chevere\\Components\\Http\\Methods\\DeleteMethod',
  'GET' => 'Chevere\\Components\\Http\\Methods\\GetMethod',
  'HEAD' => 'Chevere\\Components\\Http\\Methods\\HeadMethod',
  'OPTIONS' => 'Chevere\\Components\\Http\\Methods\\OptionsMethod',
  'PATCH' => 'Chevere\\Components\\Http\\Methods\\PatchMethod',
  'POST' => 'Chevere\\Components\\Http\\Methods\\PostMethod',
  'PUT' => 'Chevere\\Components\\Http\\Methods\\PutMethod',
  'TRACE' => 'Chevere\\Components\\Http\\Methods\\TraceMethod',
)

# Methods

# __construct

Parameters


# method

Provides access to the $method instance.


# controller

Provides access to the $controller instance.


# withDescription

Return an instance with the specified $description.

Parameters

  • description: string

Return

self

This method MUST retain the state of the current instance, and return an instance that contains the specified $description.


# withoutParameter

Return an instance with the specified $parameter removed.

Parameters

  • parameter: string

Return

self

This method MUST retain the state of the current instance, and return an instance that contains the specified $parameter removed.


# parameters

Provides access to the parameters.

Return

array

return [
    'name' => [
        'name' => 'name',
        'regex' => '/^\w+$/',
        'description' => 'User name',
        'isRequired' => true,
    ],
];

# description

Provides access to the description.

Return

string


# getDescription

Defines the description.

Return

string


Last Updated: 5/1/2021, 2:31:10 PM