set the status
@access public
@param string $name : name of the event
@param        $status int
@return bool
@since 3.0
@package Gcs\Framework\Core\Event
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;
        }
    }
70969
public function status($status = null)
    {
        if (null === $status) {
            return $this->status;
        }

        $this->status = $status;
        return $this;
    }
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;
    }
1272246
function setStatus( $status )
    {
        if ( $status instanceof eZOrderStatus )
            $this->StatusID = $status->attribute( 'id' );
        else
            $this->StatusID = $status;
        $this->setStatusModified( time() );
    }
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;
	}
391920
public function setStatus($status)
    {
        $result = \Eix\Services\Net\Http::isStatusCodeValid($status);
        if ($result) {
            $this->status = $status;
        }

        return $result;
    }
637592
public function setStatus($status=null)
    {

        $presence = new \sb\XMPP\Presence();
        $presence->setStatus(is_string($status) ? $status : $this->status);

        $this->sendPresence($presence);
    }
1313368
public function status($status = null)
        {
            if (is_null($status)) {
                return $this->foundation->getStatusCode();
            } else {
                $this->foundation->setStatusCode($status);

                return $this;
            }
        }
721833
public function setStatus(int $status) : Response
    {
        if (in_array($status, static::RESPONSE_STATUSES)) {
            $this->status = $status;

            return $this;
        }

        throw new \LogicException("Status code must be a valid status code, but {$status} is not.");
    }
1110450
public function setStatus(\Flowcode\ShopBundle\Entity\ProductOrderStatus $status = null)
    {
        $this->status = $status;

        return $this;
    }
1133740
public function setStatus($status)
    {
        if (!in_array(
            $status,
            [
                self::STATUS_OPEN,
                self::STATUS_PAUSED,
                self::STATUS_CLOSED,
                self::STATUS_INTERACTION_REQUIRED,
                self::STATUS_BACKGROUND_PROCESS,
            ]
        )
        ) {
            throw new \InvalidArgumentException('Invalid status in '.get_class($this).'.');
        }

        // If end date is in the past, status is automatically "closed" if status is not "paused".
        if (
            ($status != self::STATUS_BACKGROUND_PROCESS && $status != self::STATUS_CLOSED && $status != self::STATUS_PAUSED && $this->endDate && $this->endDate < new \DateTime(
                    'now'
                ))
            ||
            ($status != self::STATUS_BACKGROUND_PROCESS && $status != self::STATUS_CLOSED && $status != self::STATUS_PAUSED && !$this->endDate && $this->startDate && $this->startDate < new \DateTime(
                    'now'
                ))
        ) {
            // TODO: Warning that status is different from what has been provided.
            $status = self::STATUS_CLOSED;
        }

        $this->status = $status;

        return $this;
    }
1353925
public function setStatus($status, $calledFromOperation = false)
    {
        parent::setStatus($status);

        // Change the Operation as well only if this method has not been called by an Operation instance to avoid recursion.
        if (!$calledFromOperation && $this->getEqualsOperation() && count($this->getOperations())) {
            $this->getOperations()[0]->setStatus($this->status, true);
        }

        return $this;
    }
1292407
public function setStatus($status)
    {
        if (!in_array($status, [static::STATUS_STARTED, static::STATUS_STOPPED], true)) {
            throw new InvalidArgumentException('Invalid status value.');
        }

        $this->status = $status;

        return $this;
    }
976578
public function withStatus(string $status): self
    {
        $this->status = JobEventStatusEnum::ensureValid($status);
        return $this;
    }
402159
public function setStatus($status)
    {
        $allowedValues = $this->getStatusAllowableValues();
        if (!in_array($status, $allowedValues, true)) {
            throw new \InvalidArgumentException(
                sprintf(
                    "Invalid value for 'status', must be one of '%s'",
                    implode("', '", $allowedValues)
                )
            );
        }
        $this->container['status'] = $status;

        return $this;
    }
767073
public function enableOrDisable($name, $status)
    {
        $file = route()->com.$name.'/component.json';
        if (file_exists($file)) {
            $fileHandling = new FileHandling();
            $c = $fileHandling->open($file, 'readOnly')->read();
            $config = json_decode($c, true);
            $config['status'] = $status;
            $config = json_encode($config, JSON_PRETTY_PRINT);
            $fileHandling->open($file, 'writeOnly')->write($config);
            $fileHandling->close();

            return true;
        }

        return false;
    }
1065508
public function setStatus($status)
    {
        if (!empty($status) && ctype_print($status)) {
            $this->status = trim($status);
        }

        return $this;
    }