Trait RequestMethodTrait
Provides a simple means for representing a request method as an object.
Traits provide extended method support to classes without requiring a direct, linear chain of inheritance. This allows functions to inherit subsets of related methods without declaring a parent class.
In Oroboros core, ALL methods are granted to classes via traits, and the classes themselves are just containers that correlate their methods to an interface they are expected to honor. This approach maximizes interoperability, by entirely removing class inheritance as a requirement for extension of any class in this system.
3rd parties using this package are not expected to follow this approach,
but ALL of our internal class and logic structure does.
Direct Known Users
oroboros\core\abstracts\utilities\http\AbstractRequestMethod
Indirect Known Users
Package: oroboros\core\utilities
Category: contract-interfaces
License: The MIT License (MIT)
Author: Brian Dayhoff mopsyd@me.com
Version: 0.2.4
Since: 0.2.4-alpha
Link: bitbucket.org/oroborosframework/oroboros-core/wiki/development/api/contract_interface.md
Link: Specifies the standard HTTP request methods
Link: Specifies the HTTP PATCH request method
Located at core/traits/utilities/http/RequestMethodTrait.php
Methods summary
public
|
#
__construct( string $method = 'GET' )
|
public
string
|
#
__toString( )
Hooks into native PHP string language constructs, and provides a string value to represent this object. |
public static
array
|
|
public static
boolean
|
|
protected
|
#
_initializeRequestMethod( string $method )
|
private
|
|
private
|
Properties summary
private static
array
|
$_request_methods_valid
Represents the valid http request methods. |
#
array(
'GET',
'POST',
'PUT',
'DELETE',
'OPTIONS',
'TRACE',
'HEAD',
'CONNECT',
'PATCH'
)
|
private
string
|
$_request_method
Represents the current request method. |
|
private
boolean
|
$_request_method_is_initialized
Represents whether the request method has been correctly initialized. |
#
false
|