Set status

@param boolean $status
546634
public function setStatus($status) {
        if (!in_array($status, array(self::STATUS_INACTIVE, self::STATUS_PUBLISHED))) {
            throw new \InvalidArgumentException("Invalid status");
        }
        $this->status = $status;
    }
171109
public function isSMTP(bool $status = false)
    {
        if ($status === true) {
            $this->smtp['status'] = $status;
        } else {
            $this->smtp['status'] = $status;
        }
    }
921950
public function setStatus($status)
    {
        if($row = $this->getIterator()->current()) {
            $row->setStatus($status);
        }

        return $this;
    }
1252316
public function set_status($status = 0) {
        $this->status = $status;
        $this->save();
        if ($status == BADGE_STATUS_ACTIVE) {
            // Trigger event, badge enabled.
            $eventparams = array('objectid' => $this->id, 'context' => $this->get_context());
            $event = \core\event\badge_enabled::create($eventparams);
            $event->trigger();
        } else if ($status == BADGE_STATUS_INACTIVE) {
            // Trigger event, badge disabled.
            $eventparams = array('objectid' => $this->id, 'context' => $this->get_context());
            $event = \core\event\badge_disabled::create($eventparams);
            $event->trigger();
        }
    }
845969
public function setStatus($status)
    {
        $allowedStatuses = array(
            Job::STATUS_ERROR,
            Job::STATUS_SUCCESS,
            Job::STATUS_WARNING,
            Job::STATUS_TERMINATED
        );

        if (!in_array($status, $allowedStatuses)) {
            throw new \InvalidArgumentException(sprintf('Status "%s" is not allowed in JobException', $status));
        }

        $this->status = (string) $status;
        return $this;
    }
1319416
public function setIssueStatus($id, $status)
    {
        $api = $this->client->issue_status;
        $statusId = $api->getIdByName($status);

        return $this->update($id, [
            'status_id' => $statusId,
        ]);
    }
976578
public function withStatus(string $status): self
    {
        $this->status = JobEventStatusEnum::ensureValid($status);
        return $this;
    }
1060178
public function setStatus($status)
    {
        if (!in_array($status, [self::STATUS_DRAFT, self::STATUS_PUBLISHED, self::STATUS_REVIEW, self::STATUS_OFFLINE])) {
            throw new \InvalidArgumentException('Invalid status');
        }
        $this->status = $status;

        return $this;
    }
1025825
public function setFlagStatus($flag, $status)
    {
        if (is_array($flag)) {
            foreach ($flag as $singleFeature) {
                $this->flags[$singleFeature] = $status;
            }
        } else {
            $this->flags[$flag] = $status;
        }
    }
1342840
public function setStatus($status)
    {
        $title = $this->gameStorage->getTitle();
        $mode = $this->gameStorage->getGameModeCode();
        $script = $this->gameStorage->getGameInfos()->scriptName;

        foreach ($this->plugins as $pluginId => $plugin) {
            if (isset($this->widgetPositions[$pluginId])) {
                $options = $this->compatibleFetcher->getCompatibleData($this->widgetPositions[$pluginId], $title, $mode, $script);

                if (!is_null($options)) {
                    /** @var WidgetFactory $plugin */
                    $plugin->updateOptions($options['posX'], $options['posY'], AssociativeArray::getFromKey($options, 'options', []));
                }
            }
        }
    }
1287023
public function setStatus($status)
    {
        $this->status = $status;
        if (OrderInterface::STATUS_VALIDATED === $this->getStatus()) {
            $this->setValidatedAt(new \DateTime());
        }
    }
1095680
public function setStatus($status)
    {
        if($entity = $this->getIterator()->current()) {
            $entity->setStatusMessage($status);
        }

        return $this;
    }
730082
public function setStatus($status, $message = '')
    {
        $status = (int)$status;
        if ($status < 100 || $status > 505) {
            return;
        }
        $this->status = (int) $status;
    }
1253455
public function setStatus($status)
    {
        if (!in_array($status, $this->statusList)) {
            throw new \InvalidArgumentException(sprintf('Invalid status for %s.', __CLASS__));
        }
        $this->status = $status;

        return $this;
    }
686073
protected function setStatusReview($status)
    {
        $id = $this->getParam(0);
        $all = $this->getParam('all');

        if (!isset($id) && empty($all)) {
            $this->errorAndExit($this->text('Invalid command'));
        }

        if (isset($id) && (empty($id) || !is_numeric($id))) {
            $this->errorAndExit($this->text('Invalid argument'));
        }

        $options = null;

        if (isset($id)) {

            if ($this->getParam('user')) {
                $options = array('user_id' => $id);
            } else if ($this->getParam('product')) {
                $options = array('product_id' => $id);
            }

        } else if (!empty($all)) {
            $options = array();
        }

        if (isset($options)) {

            $deleted = $count = 0;
            foreach ($this->review->getList($options) as $item) {
                $count++;
                $deleted += (int) $this->review->update($item['review_id'], array('status' => $status));
            }

            $result = $count && $count == $deleted;

        } else if (!empty($id)) {
            $result = $this->review->update($id, array('status' => $status));
        }

        if (empty($result)) {
            $this->errorAndExit($this->text('Unexpected result'));
        }
    }
1000126
public function setStatus($status)
	{
		$status = (int)$status;

		if($status < 100)
		{
			throw new \InvalidArgumentException(sprintf('Invalid HTTP status code: %u', $status));
		}
		
		if($status >= 600)
		{
			throw new \InvalidArgumentException(sprintf('Invalid HTTP status code: %u', $status));
		}
		
		$this->status = $status;
		
		return $this;
	}
1060991
public function processWaitStatus($status)
    {
        if ($this->isExited()) {
            throw new \LogicException('Cannot set status on an exited fork');
        }

        $this->status = $status;

        if ($this->isExited()) {
            $this->receive();

            $this->isSuccessful() ? $this->resolve() : $this->reject();

            if ($this->debug && (!$this->isSuccessful() || $this->getError())) {
                throw new ForkException($this->name, $this->pid, $this->getError());
            }
        }
    }