public function setId($id)
    {
        if ($this->status != self::STATUS_NEW) {
            throw new \RuntimeException('Cannot set worker id after worker has started working');
        }

        $this->id = $id;
    }
public function setId($id)
    {
        if ($this->status != self::STATUS_NEW) {
            throw new \RuntimeException('Cannot set worker id after worker has started working');
        }

        $this->id = $id;
    }
public function setId ( $ id ) { if ( $ this -> status != self :: STATUS_NEW ) { throw new \ RuntimeException ( 'Cannot set worker id after worker has started working' ) ; } $ this -> id = $ id ; }
Set the worker id

@param string $id Id to set to
Set the worker id