PageAccess::wire()

Get or inject a ProcessWire API variable or fuel a new object instance

See Wire::wire() for explanation of all options.

Usage

// basic usage
$mixed = $pageAccess->wire();

// usage with all arguments
$mixed = $pageAccess->wire($name = '', $value = null, bool $lock = false);

Arguments

NameType(s)Description
$name (optional)string WireFuelable

Name of API variable to retrieve, set, or omit to retrieve entire Fuel object.

$value (optional)null mixed

Value to set if using this as a setter, otherwise omit.

$lock (optional)bool

When using as a setter, specify true if you want to lock the value from future changes Default:false

Return value

mixed Fuel

Exceptions

Method can throw exceptions on error:

  • WireException


PageAccess methods and properties

API reference based on ProcessWire core version 3.0.255