WireMail::set() method

Set property

Example

// Set a value for a property
$item->set('foo', 'bar');

// Set a property value directly
$item->foo = 'bar';

// Set a property using array access
$item['foo'] = 'bar';

Usage

$m->set(string $key, mixed $value);

Arguments

NameType(s)Description
keystring

Name of property you want to set

valuemixed

Value of property

Return value

this WireData

Object instance it was called from (method supports fluent interface).

See Also


$m methods and properties

API reference based on ProcessWire core version 3.0.244

“…building with ProcessWire was a breeze, I really love all the flexibility the system provides. I can’t imagine using any other CMS in the future.” —Thomas Aull