Ejemplo n.º 1
0
 /**
  * Create a new command instance.
  *
  * @param int         $ownerId   The id of the entity
  * @param int         $ownerType The type of owner (implied from entity type if null)
  * @param string|null $tag       Optional string to describe your job
  */
 public function __construct($ownerId, $ownerType, $tag = null)
 {
     parent::__construct($tag);
     //  Make sure we have a good types
     $this->ownerInfo = OwnerTypes::getOwner($ownerId, $ownerType);
     $this->ownerId = $ownerId;
     $this->ownerType = is_numeric($ownerType) && OwnerTypes::contains($ownerType) ? $ownerType : OwnerTypes::defines($ownerType, true);
 }
Ejemplo n.º 2
0
 /**
  * @param string|int|null $clusterId
  * @param string|int|null $serverId
  * @param string|null     $tag Optional string to have added to the job id
  */
 public function __construct($clusterId = null, $serverId = null, $tag = null)
 {
     parent::__construct($tag);
     $this->setClusterId($clusterId ?: config('provisioning.default-cluster-id'));
     $this->setServerId($serverId ?: config('provisioning.default-db-server-id'));
 }