Ejemplo n.º 1
0
 /**
  * @param string               $eventFqcn
  * @param SubscribeOptions     $options
  * @param PipelineStageContext $parentContext
  */
 public function __construct($eventFqcn, SubscribeOptions $options, PipelineStageContext $parentContext)
 {
     Guard::againstNullAndEmpty('eventFqcn', $eventFqcn);
     parent::__construct($parentContext);
     $this->eventFqcn = $eventFqcn;
     $this->subscribeOptions = $options;
 }
 /**
  * @param string            $name
  * @param string            $dsn
  * @param \Doctrine_Manager $manager
  */
 public function __construct($name = null, $dsn, \Doctrine_Manager $manager)
 {
     Guard::againstNullAndEmpty('dns', $dsn);
     $this->name = $name === '' ? null : $name;
     $this->dsn = $dsn;
     $this->manager = $manager;
 }
 /**
  * @param object $message
  */
 public function updateMessage($message)
 {
     Guard::againstNull('message', $message);
     Guard::againstNonObject('message', $message);
     $this->message = $message;
     $this->hasMessageChanged = true;
 }
Ejemplo n.º 4
0
 /**
  * @param string $inputQueue
  * @param string $errorQueue
  * @param bool   $purgeOnStartup
  */
 public function __construct($inputQueue, $errorQueue, $purgeOnStartup)
 {
     Guard::againstNullAndEmpty('inputQueue', $inputQueue);
     Guard::againstNullAndEmpty('errorQueue', $errorQueue);
     $this->inputQueue = $inputQueue;
     $this->errorQueue = $errorQueue;
     $this->purgeOnStartup = $purgeOnStartup;
 }
Ejemplo n.º 5
0
 /**
  * @param string $newBody
  */
 public function replaceBody($newBody)
 {
     Guard::againstNull('body', $newBody);
     if ($this->originalBody === null) {
         $this->originalBody = $this->body;
     }
     $this->body = $newBody;
 }
 /**
  * @param string $dependantId
  * @param string $dependsOnId
  * @param bool   $isEnforced
  */
 public function __construct($dependantId, $dependsOnId, $isEnforced)
 {
     Guard::againstNullAndEmpty('dependantId', $dependantId);
     Guard::againstNullAndEmpty('dependsOnId', $dependsOnId);
     $this->dependantId = $dependantId;
     $this->dependsOnId = $dependsOnId;
     $this->isEnforced = $isEnforced;
 }
 /**
  * @param string $messageId
  * @param array  $options
  * @param string $body
  * @param array  $headers
  */
 public function __construct($messageId, array $options, $body, array $headers)
 {
     Guard::againstNullAndEmpty('messageId', $messageId);
     $this->messageId = $messageId;
     $this->options = $options;
     $this->body = $body;
     $this->headers = $headers;
 }
Ejemplo n.º 8
0
 /**
  * StepReplacement constructor.
  *
  * @param string        $idToReplace
  * @param string        $stepFqcn
  * @param callable|null $factory
  * @param string|null   $description
  */
 public function __construct($idToReplace, $stepFqcn, callable $factory = null, $description = null)
 {
     Guard::againstNullAndEmpty('idToReplace', $idToReplace);
     Guard::againstNullAndEmpty('stepClass', $stepFqcn);
     $this->idToReplace = $idToReplace;
     $this->stepFqcn = $stepFqcn;
     $this->factory = $factory;
     $this->description = $description;
 }
Ejemplo n.º 9
0
 /**
  * @param int    $jsonEncodeOptions
  * @param string $encodingAnnotation
  */
 public function __construct($jsonEncodeOptions = JSON_UNESCAPED_UNICODE, $encodingAnnotation = '@utf8encoded')
 {
     Guard::againstNullAndEmpty('encodingAnnotation', $encodingAnnotation);
     if (PHP_VERSION_ID >= 50606) {
         $jsonEncodeOptions |= JSON_PRESERVE_ZERO_FRACTION;
     }
     $this->jsonEncodeOptions = $jsonEncodeOptions;
     $this->encodingAnnotation = $encodingAnnotation;
 }
Ejemplo n.º 10
0
 /**
  * @param string                   $messageId
  * @param array                    $headers
  * @param string                   $body
  * @param ReceiveCancellationToken $cancellationToken
  * @param EndpointControlToken     $endpointControlToken
  */
 public function __construct($messageId, array $headers, $body, ReceiveCancellationToken $cancellationToken, EndpointControlToken $endpointControlToken)
 {
     Guard::againstNullAndEmpty('messageId', $messageId);
     Guard::againstNullAndEmpty('headers', $headers);
     Guard::againstNull('body', $body);
     $this->messageId = $messageId;
     $this->headers = $headers;
     $this->body = $body;
     $this->cancellationToken = $cancellationToken;
     $this->endpointControlToken = $endpointControlToken;
 }
Ejemplo n.º 11
0
 /**
  * @param int $maxRetries
  */
 public function setMaxFirstLevelRetries($maxRetries)
 {
     Guard::againstNullAndNonInt('maxRetries', $maxRetries);
     $this->settings->set(KnownSettingsEnum::MAX_FLR_RETRIES, (int) $maxRetries);
 }
 /**
  * @param string $newBody
  */
 public function replaceBody($newBody)
 {
     Guard::againstNull('body', $newBody);
     $this->body = $newBody;
 }
Ejemplo n.º 13
0
 /**
  * @param string                     $messageId
  * @param OutboxTransportOperation[] $transportOperations
  */
 public function __construct($messageId, array $transportOperations)
 {
     Guard::againstNullAndEmpty('messageId', $messageId);
     $this->messageId = $messageId;
     $this->transportOperations = $transportOperations;
 }
Ejemplo n.º 14
0
 /**
  * @param string $classAnnotation
  */
 public function __construct($classAnnotation = '@type')
 {
     Guard::againstNullAndEmpty('classAnnotation', $classAnnotation);
     $this->classAnnotation = $classAnnotation;
 }
Ejemplo n.º 15
0
 /**
  * @param string $destination
  */
 public function setExplicitDestination($destination)
 {
     Guard::againstNullAndEmpty('destination', $destination);
     $this->destination = $destination;
 }
Ejemplo n.º 16
0
 /**
  * @param callable $prerequisiteSpecification
  * @param string   $description
  */
 protected function registerPrerequisite(callable $prerequisiteSpecification, $description)
 {
     Guard::againstNullAndEmpty('description', $description);
     $this->registeredPrerequisites[] = new Prerequisite($prerequisiteSpecification, $description);
 }
Ejemplo n.º 17
0
 /**
  * @param string $id
  */
 public function insertAfter($id)
 {
     Guard::againstNullAndEmpty('id', $id);
     $this->afters[] = new StepRegistrationDependency($this->stepId, $id, true);
 }
Ejemplo n.º 18
0
 /**
  * @param string $destination
  */
 public function overrideReplyToAddressOfIncomingMessage($destination)
 {
     Guard::againstNullAndEmpty('destination', $destination);
     $this->destination = $destination;
 }