Updates the status of this command. This method should be called by execute() when the status of the command
changes.

@param int $newStatus
767372
protected function updateStatus($newStatus)
    {
        if ($newStatus < CommandInterface::STATUS_PENDING || $newStatus > CommandInterface::STATUS_FAILED) {
            throw new \InvalidArgumentException('Command status updated to invalid value ' . $newStatus . '. $newStatus must be one of CommandInterface::STATUS_* constants',
                1457113082);
        }

        $oldStatus = $this->status;
        $this->status = $newStatus;

        foreach ($this->statusUpdateObservers as $observer) {
            $observer->update($this, $oldStatus);
        }
    }
247719
public function update_status($instance, $newstatus) {
        global $DB;

        $instance->status = $newstatus;
        $DB->update_record('enrol', $instance);

        $context = context_course::instance($instance->courseid);
        \core\event\enrol_instance_updated::create_from_record($instance)->trigger();

        // Invalidate all enrol caches.
        $context->mark_dirty();
    }
163684
public synchronized void setStatusAndNotify(final LauncherStatus newStatus) {
    LOG.log(Level.FINEST, "Set status: {0} -> {1}", new Object[] {this.status, newStatus});
    this.status = newStatus;
    this.notify();
  }
606794
public function setStatus(StatusInterface $status = null)
    {
        $this->status = null;
        $this->statusChanged = true;
        if ($status instanceof StatusInterface) {
            $this->status = EmbedStatus::createFromStatus($status);
        }
    }
16339
public function setStatus($name = '', $status = self::START) {
        if ($name != '') {
            if (isset($this->_events[$name])) {
                $this->_events[$name]->setStatus($status);

                return true;
            }
            else {
                return false;
            }
        }
        else {
            return false;
        }
    }
80673
public function setStatusFrom(\Sulu\Bundle\Sales\ShippingBundle\Entity\ShippingStatus $statusFrom = null)
    {
        $this->statusFrom = $statusFrom;
    
        return $this;
    }
660911
public function withoutTimestamps($newStatus = false)
    {
        $oldStatus = $this->withoutTimestamps;

        if (func_num_args()) {
            $this->withoutTimestamps = $newStatus;
        } // if

        return $oldStatus;
    }
590030
public function updateStatus(OpportunityStatus $opportunityStatus): OpportunityStatus
    {
        @trigger_error(sprintf('The %s() method is deprecated since version 0.8. Use update() instead.', __METHOD__), E_USER_DEPRECATED);

        return $this->update($opportunityStatus);
    }
829600
public function isSource($newStatus = true)
    {
        $oldStatus = $this->isSource;

        if (func_num_args()) {
            $this->isSource = $newStatus;
        } // if

        return $oldStatus;
    }
1369694
public function setStatus($status)
    {
        $statusAttribute = $this->statusAttribute;
        return (is_string($statusAttribute) && !empty($statusAttribute)) ? $this->$statusAttribute = $status : null;
    }
730264
def update_status(self, value, value_set):
        """"""
        self._status = value
        self._status_set = value_set
        self.repaint()
        self.update()
497761
public function setStatus($status)
    {
        if ($status) {
            $this->widget->create($this->players);
            $this->updater->create($this->allPlayers);
        } else {
            $this->widget->destroy($this->players);
            $this->updater->destroy($this->allPlayers);
        }
    }
557229
protected function updateProcLine(string $status): void
    {
        if (function_exists('cli_set_process_title')) {
            cli_set_process_title(sprintf('qjitsu-%s: %s', $this->getWorkerType(), $status));
        }
    }
618679
public function isForPivotTable($newStatus = false)
    {
        $oldStatus = $this->isForPivot;

        if (func_num_args()) {
            $this->isForPivot = $newStatus;
        } // if

        return $oldStatus;
    }
1812
public function isPivotTable($newStatus = false)
    {
        $oldStatus = $this->isPivotTable;

        if (func_num_args()) {
            $this->isPivotTable = $newStatus;
        } // if

        return $oldStatus;
    }
1350076
public function setStatus(array $status) : void
    {
        Assert::keyExists($status, "Code", 'Cannot set status without a Code key in the array.');

        $this->status = $status;
        if (!array_key_exists('SubCode', $status)) {
            $this->status['SubCode'] = null;
        }
        if (!array_key_exists('Message', $status)) {
            $this->status['Message'] = null;
        }
    }
220128
public function setStatus($status)
    {
        if (!in_array($status, MessageStatus::getValidStatus())) {
            throw new \InvalidArgumentException('短信状态非法');
        }
        $this->status = $status;
    }