Sets the value of a single argument for the request.
public setArgument ( mixed $argument, string $value ) : Phergie_Event_Request | ||
$argument | mixed | Integer position (starting from 0) or the equivalent string name of the argument from self::$map |
$value | string | Value to assign to the argument |
Результат | Phergie_Event_Request | Provides a fluent interface |
/** * Tests that event argument values can be removed using array syntax. * * @return void * @depends testSetArgumentWithValidArgument */ public function testImplementsOffsetUnset() { $this->event->setType('privmsg'); $this->event->setArgument('receiver', '#channel'); unset($this->event['receiver']); $this->assertNull($this->event->getArgument('receiver')); }