name = $name; $this->params = $params; $this->status = $status ? $status : new Status(); $this->maintenanceMode = $maintenanceMode ? $maintenanceMode : new MaintenanceMode(); } /** * Get job name. * * @return string */ public function getName() { return $this->name; } /** * Get string representation of a job. * * @return string */ public function __toString() { return $this->name . ' ' . json_encode($this->params, JSON_UNESCAPED_SLASHES ); } /** * Execute job. * * @return $this * @throws \RuntimeException */ abstract public function execute(); }