/** * Get a Job argument by name. * * Assumes that the job arguments are an array. * * @param string $name * @param mixed $default * @return mixed|null */ public function getArg($name, $default = null) { $args = $this->job->getArgs(); if (!is_array($args)) { return $default; } if (!array_key_exists($name, $args)) { return $default; } return $args[$name]; }
/** * {@inheritDoc} */ public function getArgs() { $this->__initializer__ && $this->__initializer__->__invoke($this, 'getArgs', array()); return parent::getArgs(); }