Documentation

Http extends Facade
in package

Facade base class Adds the ability to define a fallback instance.

Tags
see
Http

Table of Contents

$app  : Application
The application instance being facaded.
$resolvedInstance  : array<string|int, mixed>
The resolved object instances.
__callStatic()  : mixed
Handle dynamic, static calls to the object.
auth()  :
clearResolvedInstance()  : void
Clear a resolved facade instance.
clearResolvedInstances()  : void
Clear all of the resolved instances.
data()  :
delete()  :
get()  :
getFacadeApplication()  : Application
Get the application instance behind the facade.
getFacadeRoot()  : mixed
Get the root object behind the facade.
getRequestData()  :
header()  :
make()  :
noRedirect()  :
options()  :
patch()  :
post()  :
proxy()  :
put()  :
send()  :
setFacadeApplication()  : void
Set the application instance.
setOption()  :
shouldReceive()  : Expectation
Initiate a mock expectation on the facade.
spy()  : void
Convert the facade into a Mockery spy.
swap()  : void
Hotswap the underlying instance behind the facade.
timeout()  :
toFile()  :
verifySSL()  :
createFreshMockInstance()  : Expectation
Create a fresh mock instance for the given class.
createMock()  : MockInterface
Create a fresh mock instance for the given class.
getFacadeAccessor()  : string
Get the registered name of the component.
getFacadeInstance()  : mixed
If the accessor is not found via getFacadeAccessor, use this instance as a fallback.
getMockableClass()  : string|null
Get the mockable class for the bound instance.
isMock()  : bool
Determines whether a mock is set as the instance of the facade.
resolveFacadeInstance()  : mixed
Resolve the facade root instance from the container.

Properties

$resolvedInstance

The resolved object instances.

protected static array<string|int, mixed> $resolvedInstance

Methods

__callStatic()

Handle dynamic, static calls to the object.

public static __callStatic(string $method, array<string|int, mixed> $args) : mixed
Parameters
$method : string
$args : array<string|int, mixed>
Tags
throws
RuntimeException
Return values
mixed

auth()

public static auth(string $user, string $pass = null) :
Parameters
$user : string
$pass = null : string
Return values

clearResolvedInstance()

Clear a resolved facade instance.

public static clearResolvedInstance(string $name) : void
Parameters
$name : string
Return values
void

clearResolvedInstances()

Clear all of the resolved instances.

public static clearResolvedInstances() : void
Return values
void

data()

public static data(string $key, string $value = null) :
Parameters
$key : string
$value = null : string
Return values

delete()

public static delete(string $url, array<string|int, mixed> $options = null) :
Parameters
$url : string
$options = null : array<string|int, mixed>
Return values

get()

public static get(string $url, array<string|int, mixed> $options = null) :
Parameters
$url : string
$options = null : array<string|int, mixed>
Return values

getFacadeApplication()

Get the application instance behind the facade.

public static getFacadeApplication() : Application
Return values
Application

getFacadeRoot()

Get the root object behind the facade.

public static getFacadeRoot() : mixed
Return values
mixed

getRequestData()

public static getRequestData() :
Return values

header()

public static header(string $key, string $value = null) :
Parameters
$key : string
$value = null : string
Return values

make()

public static make(string $url, string $method, callable $options = null) :
Parameters
$url : string
$method : string
$options = null : callable
Return values

noRedirect()

public static noRedirect() :
Return values

options()

public static options(string $url, array<string|int, mixed> $options = null) :
Parameters
$url : string
$options = null : array<string|int, mixed>
Return values

patch()

public static patch(string $url, array<string|int, mixed> $options = null) :
Parameters
$url : string
$options = null : array<string|int, mixed>
Return values

post()

public static post(string $url, array<string|int, mixed> $options = null) :
Parameters
$url : string
$options = null : array<string|int, mixed>
Return values

proxy()

public static proxy(string $type, string $host, int $port, string $username = null, string $password = null) :
Parameters
$type : string
$host : string
$port : int
$username = null : string
$password = null : string
Return values

put()

public static put(string $url, array<string|int, mixed> $options = null) :
Parameters
$url : string
$options = null : array<string|int, mixed>
Return values

send()

public static send() :
Return values

setFacadeApplication()

Set the application instance.

public static setFacadeApplication(Application $app) : void
Parameters
$app : Application
Return values
void

setOption()

public static setOption(string $option, string $value = null) :
Parameters
$option : string
$value = null : string
Return values

shouldReceive()

Initiate a mock expectation on the facade.

public static shouldReceive() : Expectation
Return values
Expectation

spy()

Convert the facade into a Mockery spy.

public static spy() : void
Return values
void

swap()

Hotswap the underlying instance behind the facade.

public static swap(mixed $instance) : void
Parameters
$instance : mixed
Return values
void

timeout()

public static timeout(int $timeout) :
Parameters
$timeout : int
Return values

toFile()

public static toFile(string $path, string $filter = null) :
Parameters
$path : string
$filter = null : string
Return values

verifySSL()

public static verifySSL() :
Return values

createFreshMockInstance()

Create a fresh mock instance for the given class.

protected static createFreshMockInstance() : Expectation
Return values
Expectation

createMock()

Create a fresh mock instance for the given class.

protected static createMock() : MockInterface
Return values
MockInterface

getFacadeAccessor()

Get the registered name of the component.

protected static getFacadeAccessor() : string
Return values
string

getFacadeInstance()

If the accessor is not found via getFacadeAccessor, use this instance as a fallback.

protected static getFacadeInstance() : mixed
Return values
mixed

getMockableClass()

Get the mockable class for the bound instance.

protected static getMockableClass() : string|null
Return values
string|null

isMock()

Determines whether a mock is set as the instance of the facade.

protected static isMock() : bool
Return values
bool

resolveFacadeInstance()

Resolve the facade root instance from the container.

protected static resolveFacadeInstance(string|object $name) : mixed
Parameters
$name : string|object
Return values
mixed

Search results