当前位置: 首页>>代码示例>>PHP>>正文


PHP GenericEvent::__construct方法代码示例

本文整理汇总了PHP中Symfony\Component\EventDispatcher\GenericEvent::__construct方法的典型用法代码示例。如果您正苦于以下问题:PHP GenericEvent::__construct方法的具体用法?PHP GenericEvent::__construct怎么用?PHP GenericEvent::__construct使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Symfony\Component\EventDispatcher\GenericEvent的用法示例。


在下文中一共展示了GenericEvent::__construct方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: __construct

 public function __construct($subject, array $arguments = array())
 {
     parent::__construct($subject, $arguments);
     if (!$subject instanceof TeamMemberInterface) {
         throw new \InvalidArgumentException('This is not a valid TeamMemberInterface');
     }
 }
开发者ID:quef,项目名称:team-bundle,代码行数:7,代码来源:TeamMemberEvent.php

示例2: __construct

 /**
  * Constructor
  *
  * @param string $eventName
  * @param string $entityType
  * @param EntityInterface[] $entities
  * @param int $userId
  * @param array $arguments
  */
 public function __construct($eventName, $entityType, array $entities, $userId = null, array $arguments = [])
 {
     $this->setEventName($eventName);
     $this->setEntityType($entityType);
     $this->setUserId($userId);
     // Keeping the 'uid' in arguments allows compatibility with the
     // makinacorpus/apubsub API, using subject too
     parent::__construct($entities, $arguments + ['uid' => $userId]);
 }
开发者ID:makinacorpus,项目名称:drupal-sf-dic,代码行数:18,代码来源:EntityCollectionEvent.php

示例3: __construct

 /**
  * Constructor
  *
  * @param string $eventName
  * @param string $entityType
  * @param EntityInterface $entity
  * @param int $userId
  * @param array $arguments
  */
 public function __construct($eventName, $entityType, EntityInterface $entity, $userId = null, array $arguments = [])
 {
     $this->setEventName($eventName);
     $this->setEntityType($entityType);
     $this->setUserId($userId);
     list($id, , $bundle) = entity_extract_ids($entityType, $entity);
     // Keeping the 'uid' in arguments allows compatibility with the
     // makinacorpus/apubsub API, using subject too
     parent::__construct($entity, $arguments + ['uid' => $userId, 'id' => $id, 'bundle' => $bundle]);
 }
开发者ID:makinacorpus,项目名称:drupal-sf-dic,代码行数:19,代码来源:EntityEvent.php

示例4: __construct

 public function __construct($subject = null, ProfileInterface $profile = null, BackupInterface $backup = null, WorkflowActivityInterface $activity = null)
 {
     parent::__construct($subject, array('profile' => $profile, 'backup' => $backup, 'activity' => $activity));
 }
开发者ID:runopencode,项目名称:backup,代码行数:4,代码来源:BackupEvent.php

示例5: __construct

 public function __construct(ContainerInterface $container, array $arguments = array())
 {
     $this->container = $container;
     parent::__construct($container, $arguments);
 }
开发者ID:phpguard,项目名称:phpguard,代码行数:5,代码来源:GenericEvent.php

示例6: __construct

 /**
  * @param mixed $subject
  * @param int   $subjectId
  * @param array $arguments
  */
 public function __construct($subject, $subjectId, array $arguments = [])
 {
     parent::__construct($subject, $arguments);
     $this->subjectId = $subjectId;
 }
开发者ID:abdeldayem,项目名称:pim-community-dev,代码行数:10,代码来源:RemoveEvent.php

示例7: __construct

 /**
  * @param object     $subject
  * @param EventArgs  $parent
  * @param array|null $arguments
  */
 public function __construct($subject, EventArgs $parent, array $arguments = array())
 {
     parent::__construct($subject, $arguments);
     $this->parent = $parent;
 }
开发者ID:knplabs,项目名称:rad-doctrine-event,代码行数:10,代码来源:DoctrineEvent.php

示例8: __construct

 /**
  * Encapsulate an event with $subject, $args, and $data.
  *
  * @param mixed  $subject Usually an object or other PHP callable.
  * @param array  $args    Arguments to store in the event.
  * @param mixed  $data    Convenience argument of data for optional processing.
  */
 public function __construct($subject = null, array $args = array(), $data = null)
 {
     $this->data = $data;
     parent::__construct($subject, $args);
 }
开发者ID:rtznprmpftl,项目名称:Zikulacore,代码行数:12,代码来源:GenericEvent.php

示例9: __construct

 /**
  * EventArgs constructor.
  * @param array $arguments
  * @param Request $request
  */
 public function __construct(array $arguments = array(), Request $request = null)
 {
     parent::__construct(null, $arguments);
     $this->request = $request;
 }
开发者ID:ec-cube,项目名称:ec-cube,代码行数:10,代码来源:EventArgs.php

示例10: __construct

 public function __construct(ClassMetadataBuilder $classMetadataBuilder, array $arguments = [])
 {
     parent::__construct($classMetadataBuilder, $arguments);
     $this->classMetadataBuilder = $classMetadataBuilder;
 }
开发者ID:kassko,项目名称:data-mapper,代码行数:5,代码来源:ClassMetadataEvent.php

示例11: __construct

 /**
  * Construct GenericEvent object.
  *
  * @param Object $subject The subject of the event
  * @param array $arguments The arguments passed to event listener.
  */
 public function __construct($subject = null, array $arguments = array())
 {
     parent::__construct($subject, $arguments);
 }
开发者ID:sourcefabric,项目名称:newscoop,代码行数:10,代码来源:GenericEvent.php

示例12: __construct

 /**
  * Constructor.
  *
  * @param string $eventName
  * @param array  $subject
  * @param mixed  $data
  */
 public function __construct($eventName, $subject, $data)
 {
     parent::__construct($subject, $data);
     $this->eventName = $eventName;
 }
开发者ID:worldia,项目名称:textmaster-api,代码行数:12,代码来源:CallbackEvent.php

示例13: __construct

 public function __construct(Request $request, $resource)
 {
     parent::__construct($resource);
     $this->request = $request;
 }
开发者ID:tahoelimited,项目名称:crud-bundle,代码行数:5,代码来源:CrudEvent.php

示例14: __construct

 public function __construct($result, array $arguments = [])
 {
     parent::__construct($result, $arguments);
     $this->result = $result;
 }
开发者ID:kassko,项目名称:data-mapper,代码行数:5,代码来源:QueryEvent.php

示例15: __construct

 /**
  * Default constructor
  *
  * @param string $resourceType
  * @param scalar|scalar[] $resourceId
  * @param mixed $resource
  * @param scalar|scalar[] $userId
  * @param array $data
  */
 public function __construct($resourceType, $resourceIdList, $userId = null, array $data = [])
 {
     parent::__construct(null, $data + ['uid' => $userId]);
     $this->resourceType = $resourceType;
     $this->resourceIdList = Misc::toArray($resourceIdList);
 }
开发者ID:makinacorpus,项目名称:apubsub,代码行数:15,代码来源:ResourceEvent.php


注:本文中的Symfony\Component\EventDispatcher\GenericEvent::__construct方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。