class http_client_adapter extends facade mixin http_client_adapter

Facade for local_middag\framework\support\http_client_adapter.

Properties

static protected array<string,object> $resolved_instances

The resolved object instances (cached roots).

from  abstract_facade
static protected bool $cached

Indicates if resolved instances should be cached.

from  abstract_facade

Methods

static mixed
__callStatic(string $method, array $args)

Dynamically handle static method calls on the facade proxy.

static string
get_facade_accessor()

Return the service accessor key for this facade.

static object
get_facade_root()

Get the root object behind the facade.

static void
swap(object $instance)

Swap a given instance for testing or runtime overriding.

static void
clear_resolved_instance(string $name)

Clear one cached facade instance.

static void
clearresolved_instances()

Clear all cached facade instances.

static void
disable_cache()

Disable instance caching (useful for testing).

static void
enable_cache()

Enable instance caching.

static void
reset()

Reset the facade: clear cache and re-enable caching.

static object
resolve_facade_instance(string $name)

Resolve the instance from the Kernel container.

set_header(string $key, string $value)

No description

set_authorization_bearer(string $token)

No description

set_content_type(string $content_type)

No description

static mixed
get(string $uri, array $query = [])

No description

static mixed
post(string $uri, array $data = [], bool $as_json = true)

No description

static mixed
put(string $uri, array $data = [])

No description

static mixed
patch(string $uri, array $data = [])

No description

static mixed
delete(string $uri, array $query = [])

No description

Details

in abstract_facade at line 62
static mixed __callStatic(string $method, array $args)

Dynamically handle static method calls on the facade proxy.

Parameters

string $method
array $args

Return Value

mixed

Exceptions

BadMethodCallException
RuntimeException

at line 44
static string get_facade_accessor()

Return the service accessor key for this facade.

Return Value

string

the service ID or class name

in abstract_facade at line 94
static object get_facade_root()

Get the root object behind the facade.

Return Value

object

in abstract_facade at line 104
static void swap(object $instance)

Swap a given instance for testing or runtime overriding.

Parameters

object $instance

Return Value

void

in abstract_facade at line 118
static void clear_resolved_instance(string $name)

Clear one cached facade instance.

Parameters

string $name

Return Value

void

in abstract_facade at line 126
static void clearresolved_instances()

Clear all cached facade instances.

Return Value

void

in abstract_facade at line 134
static void disable_cache()

Disable instance caching (useful for testing).

Return Value

void

in abstract_facade at line 143
static void enable_cache()

Enable instance caching.

Return Value

void

in abstract_facade at line 151
static void reset()

Reset the facade: clear cache and re-enable caching.

Return Value

void

in abstract_facade at line 168
static protected object resolve_facade_instance(string $name)

Resolve the instance from the Kernel container.

Parameters

string $name

service identifier or class name registered in the container

Return Value

object

Exceptions

RuntimeException

at line 39
static http_client_adapter set_header(string $key, string $value)

No description

Parameters

string $key
string $value

Return Value

http_client_adapter

at line 39
static http_client_adapter set_authorization_bearer(string $token)

No description

Parameters

string $token

Return Value

http_client_adapter

at line 39
static http_client_adapter set_content_type(string $content_type)

No description

Parameters

string $content_type

Return Value

http_client_adapter

at line 39
static mixed get(string $uri, array $query = [])

No description

Parameters

string $uri
array $query

Return Value

mixed

at line 39
static mixed post(string $uri, array $data = [], bool $as_json = true)

No description

Parameters

string $uri
array $data
bool $as_json

Return Value

mixed

at line 39
static mixed put(string $uri, array $data = [])

No description

Parameters

string $uri
array $data

Return Value

mixed

at line 39
static mixed patch(string $uri, array $data = [])

No description

Parameters

string $uri
array $data

Return Value

mixed

at line 39
static mixed delete(string $uri, array $query = [])

No description

Parameters

string $uri
array $query

Return Value

mixed