for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author Flipbox Factory
* @copyright Copyright (c) 2017, Flipbox Digital
* @link https://github.com/flipbox/queue/releases/latest
* @license https://github.com/flipbox/queue/blob/master/LICENSE
*/
namespace flipbox\queue\jobs\traits;
use yii\helpers\ArrayHelper;
* @author Flipbox Factory <[email protected]>
* @since 1.0.0
trait JobTrait
{
* The ID of the message. This should be set on the job receive.
* @var integer
protected $id;
* Stores the header.
* This can be different for each queue provider.
*
* @var mixed
protected $header = [];
* @inheritdoc
public function getId()
return $this->id;
}
public function setId($id)
$this->id = $id;
return $this;
public function getHeader($item, $default = null)
return ArrayHelper::getValue($this->header, $item, $default);
public function setHeader($item, $value)
$this->header[$item] = $value;