$context
$context : array
Event class emitted with the operation.parse_class event
This class contains no event data. It is used by events that do not pass state information to an event handler when an event is raised.
You can call the method stopPropagation() to abort the execution of further listeners in your event listener.
$dispatcher : \Symfony\Component\EventDispatcher\EventDispatcherInterface
setDispatcher(\Symfony\Component\EventDispatcher\EventDispatcherInterface $dispatcher)
Stores the EventDispatcher that dispatches this Event.
\Symfony\Component\EventDispatcher\EventDispatcherInterface | $dispatcher |
getDispatcher() : \Symfony\Component\EventDispatcher\EventDispatcherInterface
Returns the EventDispatcher that dispatches this Event.
None found |
None found |
setName(string $name)
Sets the event's name property.
string | $name | The event name |
None found |
setResult(mixed $result)
Set the result of the object creation
mixed | $result | Result value to set |
None found |
None found |
<?php
namespace Guzzle\Service\Command;
use Guzzle\Common\Event;
/**
* Event class emitted with the operation.parse_class event
*/
class CreateResponseClassEvent extends Event
{
/**
* Set the result of the object creation
*
* @param mixed $result Result value to set
*/
public function setResult($result)
{
$this['result'] = $result;
$this->stopPropagation();
}
/**
* Get the created object
*
* @return mixed
*/
public function getResult()
{
return $this['result'];
}
}