本文整理汇总了PHP中Zend\EventManager\Event::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP Event::__construct方法的具体用法?PHP Event::__construct怎么用?PHP Event::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Zend\EventManager\Event
的用法示例。
在下文中一共展示了Event::__construct方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: __construct
/**
* AbstractTransactionEvent constructor.
*
* @param string $managerName
* @param string $actionName
*/
public function __construct($managerName, $actionName)
{
$this->managerName = $managerName;
$this->actionName = $actionName;
$this->commandUuid = Uuid::uuid4()->toString();
parent::__construct();
}
示例2: __construct
/**
*
* @param object $target
* @param string $message
* @param int $priority
* @param array $extras
*/
public function __construct($target, $message, $priority, array $extras = [])
{
$this->message = $message;
$this->priority = $priority;
$this->extras = $extras;
parent::__construct(__CLASS__, $target);
}
示例3: __construct
/**
* @param null|string|object $subject
* @param array $data
* @param SerializerInterface $serializer
*/
public function __construct($subject, &$data, SerializerInterface $serializer)
{
$this->subject = $subject;
$this->data =& $data;
$this->serializer = $serializer;
parent::__construct();
}
示例4: __construct
/**
* Конструктор
*
* @param object $object
* @param string $previous
* @param string $next
* @param string $event
* @param string $machine
* @param string $signal
* @param array $parameters
*/
public function __construct(object $object, string $previous, string $next, string $event, string $machine, string $signal, array $parameters)
{
parent::__construct($event, $machine, $parameters);
$this->object = $object;
$this->previous = $previous;
$this->next = $next;
$this->signal = $signal;
}
示例5: __construct
public function __construct(array $params)
{
parent::__construct('rest-error-event', null, []);
// Set params manually, so we can validate and stuff.
$setParamUsing = function ($methodName, $value) use($params) {
if (isset($params[$value])) {
call_user_func([$this, $methodName], $params[$value]);
}
};
$setParamUsing('setError', 'error');
$setParamUsing('setErrorConfig', 'errorConfig');
$setParamUsing('setViewModel', 'viewModel');
}
示例6: __construct
/**
* Constructor
*
* Accept a storage adapter and its parameters.
*
* @param string $name Event name
* @param StorageInterface $storage
* @param ArrayObject $params
*/
public function __construct($name, StorageInterface $storage, ArrayObject $params)
{
parent::__construct($name, $storage, $params);
}
示例7: __construct
/**
* Constructor
*
* Accept a target and its parameters.
*
* @param string $name Event name
* @param string|object $target
* @param array|\ArrayAccess $params
*/
public function __construct($name = null, $target = null, $params = null)
{
parent::__construct(self::EVENT_JOB_ENDED, $target, $params);
}
示例8: __construct
/**
* OAuthConnectEvent constructor.
*
* @param \Sta\OAuthConnect\OAuthService\AuthorizationResult $authorizationResult
* @param \Sta\OAuthConnect\OAuthService\OAuthServiceInterface $oAuthService
*/
public function __construct(\Sta\OAuthConnect\OAuthService\AuthorizationResult $authorizationResult, \Sta\OAuthConnect\OAuthService\OAuthServiceInterface $oAuthService)
{
$this->authorizationResult = $authorizationResult;
$this->oAuthService = $oAuthService;
parent::__construct();
}
示例9: __construct
/**
* Constructor
*
* Accept a storage adapter and its parameters.
*
* @param string $name Event name
* @param Adapter $storage
* @param ArrayObject $params
* @return void
*/
public function __construct($name, Adapter $storage, ArrayObject $params)
{
parent::__construct($name, $storage, $params);
}
示例10: __construct
/**
* Creates an instance.
*
* Instantiates a new PriorityList for the view models.
*
* @param string|null $name
* @param string|null $target
* @param array|null $params
*/
public function __construct($name = null, $target = null, $params = null)
{
parent::__construct($name, $target, $params);
$this->models = new PriorityList();
}
示例11: __construct
/**
* @param string $eventName
* @param ServiceLocatorInterface $serviceLocator
* @param mixed $instance
* @param string $requestedName
* @param $canonicalName
*/
public function __construct($eventName, ServiceLocatorInterface $serviceLocator, $instance, $requestedName, $canonicalName)
{
parent::__construct($eventName, $this->serviceLocator = $serviceLocator, array('instance' => $this->instance = $instance, 'requested_name' => $this->requestedName = $requestedName, 'canonical_name' => $this->canonicalName = $canonicalName, 'trace' => $this->trace = debug_backtrace(true)));
}
示例12: __construct
public function __construct(MailServiceInterface $mailService, $name = self::EVENT_MAIL_PRE_SEND)
{
parent::__construct($name);
$this->mailService = $mailService;
}