trait DelegatesToResource (View source)

Traits

Methods

mixed
forwardCallTo(mixed $object, string $method, array $parameters)

Forward a method call to the given object.

static void
throwBadMethodCallException(string $method)

Throw a bad method call exception for the given method.

mixed
getRouteKey()

Get the value of the resource's route key.

string
getRouteKeyName()

Get the route key for the resource.

void
resolveRouteBinding(mixed $value)

Retrieve the model for a bound value.

bool
offsetExists(mixed $offset)

Determine if the given attribute exists.

mixed
offsetGet(mixed $offset)

Get the value for a given offset.

void
offsetSet(mixed $offset, mixed $value)

Set the value for a given offset.

void
offsetUnset(mixed $offset)

Unset the value for a given offset.

bool
__isset(string $key)

Determine if an attribute exists on the resource.

void
__unset(string $key)

Unset an attribute on the resource.

mixed
__get(string $key)

Dynamically get properties from the underlying resource.

mixed
__call(string $method, array $parameters)

Dynamically pass method calls to the underlying resource.

Details

protected mixed forwardCallTo(mixed $object, string $method, array $parameters)

Forward a method call to the given object.

Parameters

mixed $object
string $method
array $parameters

Return Value

mixed

Exceptions

BadMethodCallException

static protected void throwBadMethodCallException(string $method)

Throw a bad method call exception for the given method.

Parameters

string $method

Return Value

void

Exceptions

BadMethodCallException

mixed getRouteKey()

Get the value of the resource's route key.

Return Value

mixed

string getRouteKeyName()

Get the route key for the resource.

Return Value

string

void resolveRouteBinding(mixed $value)

Retrieve the model for a bound value.

Parameters

mixed $value

Return Value

void

Exceptions

Exception

bool offsetExists(mixed $offset)

Determine if the given attribute exists.

Parameters

mixed $offset

Return Value

bool

mixed offsetGet(mixed $offset)

Get the value for a given offset.

Parameters

mixed $offset

Return Value

mixed

void offsetSet(mixed $offset, mixed $value)

Set the value for a given offset.

Parameters

mixed $offset
mixed $value

Return Value

void

void offsetUnset(mixed $offset)

Unset the value for a given offset.

Parameters

mixed $offset

Return Value

void

bool __isset(string $key)

Determine if an attribute exists on the resource.

Parameters

string $key

Return Value

bool

void __unset(string $key)

Unset an attribute on the resource.

Parameters

string $key

Return Value

void

mixed __get(string $key)

Dynamically get properties from the underlying resource.

Parameters

string $key

Return Value

mixed

mixed __call(string $method, array $parameters)

Dynamically pass method calls to the underlying resource.

Parameters

string $method
array $parameters

Return Value

mixed