From 0ea81b8f6951252090f702974e1fb576f7658807 Mon Sep 17 00:00:00 2001 From: Marcin Kurczewski Date: Tue, 6 May 2014 18:09:53 +0200 Subject: [PATCH] Added single argument setter to jobs --- src/Api/AbstractJob.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/Api/AbstractJob.php b/src/Api/AbstractJob.php index a4a683f8..127e1377 100644 --- a/src/Api/AbstractJob.php +++ b/src/Api/AbstractJob.php @@ -20,7 +20,7 @@ abstract class AbstractJob const QUERY = 'query'; const STATE = 'state'; - protected $arguments; + protected $arguments = []; public function prepare() { @@ -61,7 +61,12 @@ abstract class AbstractJob return isset($this->arguments[$key]); } - public function setArguments($arguments) + public function setArgument($key, $value) + { + $this->arguments[$key] = $value; + } + + public function setArguments(array $arguments) { $this->arguments = $arguments; }