public function __construct($subject, array $arguments = array()) { parent::__construct($subject, $arguments); if (!$subject instanceof TeamMemberInterface) { throw new \InvalidArgumentException('This is not a valid TeamMemberInterface'); } }
/** * 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]); }
/** * 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]); }
public function __construct($subject = null, ProfileInterface $profile = null, BackupInterface $backup = null, WorkflowActivityInterface $activity = null) { parent::__construct($subject, array('profile' => $profile, 'backup' => $backup, 'activity' => $activity)); }
public function __construct(ContainerInterface $container, array $arguments = array()) { $this->container = $container; parent::__construct($container, $arguments); }
/** * @param mixed $subject * @param int $subjectId * @param array $arguments */ public function __construct($subject, $subjectId, array $arguments = []) { parent::__construct($subject, $arguments); $this->subjectId = $subjectId; }
/** * @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; }
/** * 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); }
/** * EventArgs constructor. * @param array $arguments * @param Request $request */ public function __construct(array $arguments = array(), Request $request = null) { parent::__construct(null, $arguments); $this->request = $request; }
public function __construct(ClassMetadataBuilder $classMetadataBuilder, array $arguments = []) { parent::__construct($classMetadataBuilder, $arguments); $this->classMetadataBuilder = $classMetadataBuilder; }
/** * 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); }
/** * Constructor. * * @param string $eventName * @param array $subject * @param mixed $data */ public function __construct($eventName, $subject, $data) { parent::__construct($subject, $data); $this->eventName = $eventName; }
public function __construct(Request $request, $resource) { parent::__construct($resource); $this->request = $request; }
public function __construct($result, array $arguments = []) { parent::__construct($result, $arguments); $this->result = $result; }
/** * 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); }
/** * Constructor. * * @param array $uriInfo * Information about all URIs found in a text, keyed by their offset. * * [ * 42 => [ * 'uri' => 'entity://node/1', * 'type' => 'node', * 'id' => 1, * ], ... * ] * * Alter a key (offset) or an original URI will have no effect. * * @param array $arguments */ public function __construct(array $uriInfo, array $arguments = []) { parent::__construct($uriInfo, $arguments); }