當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。