@@ 17-28 (lines=12) @@ | ||
14 | * @param array|object $jobData |
|
15 | * @throws \InvalidArgumentException |
|
16 | */ |
|
17 | public function __construct($jobData = []) |
|
18 | { |
|
19 | if (is_array($jobData) || is_object($jobData)) { |
|
20 | foreach ($jobData as $key => $value) { |
|
21 | if (property_exists($this, $key)) { |
|
22 | $this->{$key} = $value; |
|
23 | } |
|
24 | } |
|
25 | } else { |
|
26 | throw new \InvalidArgumentException(sprintf('Argument 1 passed to "%s" must be an array or object', __METHOD__)); |
|
27 | } |
|
28 | } |
|
29 | ||
30 | /** @var string */ |
|
31 | public $containerPath = ''; |
@@ 17-28 (lines=12) @@ | ||
14 | * @param array|object $jobData |
|
15 | * @throws \InvalidArgumentException |
|
16 | */ |
|
17 | public function __construct($jobData = []) |
|
18 | { |
|
19 | if (is_array($jobData) || is_object($jobData)) { |
|
20 | foreach ($jobData as $key => $value) { |
|
21 | if (property_exists($this, $key)) { |
|
22 | $this->{$key} = $value; |
|
23 | } |
|
24 | } |
|
25 | } else { |
|
26 | throw new \InvalidArgumentException(sprintf('Argument 1 passed to "%s" must be an array or object', __METHOD__)); |
|
27 | } |
|
28 | } |
|
29 | ||
30 | /** @var string */ |
|
31 | public $uri = ""; |