Determines whether a request is active or not based on its status.

@param int $status The request status.
@return bool
496165
public static function is_active($status) {
        // List of statuses which doesn't require any further processing.
        $finalstatuses = [
            self::DATAREQUEST_STATUS_COMPLETE,
            self::DATAREQUEST_STATUS_CANCELLED,
            self::DATAREQUEST_STATUS_REJECTED,
            self::DATAREQUEST_STATUS_DOWNLOAD_READY,
            self::DATAREQUEST_STATUS_EXPIRED,
            self::DATAREQUEST_STATUS_DELETED,
        ];

        return !in_array($status, $finalstatuses);
    }
572816
public function getByStatus($status)
    {
        return array_filter($this->slaves, function ($slave) use ($status) {
            return $status === Slave::ANY || $status === $slave->getStatus();
        });
    }
376828
public function updateStatus($status)
    {
        if(empty($this->payload['id'])) {
            return;
        }

        $statusInstance = new Status($this->payload['id']);
        $statusInstance->update($status);
    }
1269035
private function mapStatusToVersionInfoStatus($status)
    {
        if (array_key_exists($status, self::VERSION_STATUS)) {
            return self::VERSION_STATUS[$status];
        }

        throw new InvalidArgumentException(
            'status',
            sprintf(
                "Status %s can't be mapped to VersionInfo status.",
                $status
            )
        );
    }
810231
protected function check_read_permission( $status ) {
		if ( true === $status->public ) {
			return true;
		}
		if ( false === $status->internal || 'trash' === $status->name ) {
			$types = get_post_types( array( 'show_in_rest' => true ), 'objects' );
			foreach ( $types as $type ) {
				if ( current_user_can( $type->cap->edit_posts ) ) {
					return true;
				}
			}
		}
		return false;
	}
603904
public function isActive(): bool
    {
        if (is_callable($activeWhen = $this->activeWhen)) {
            return call_user_func($activeWhen);
        }

        if ($this->route) {
            return $this->hasActiveStateFromRoute();
        }

        return $this->hasActiveStateFromUrl();
    }
900366
protected function ApiStatus2InternalStatus($status)
    {
        switch ($status) {
            case Api::Success:
                return self::Status_Success;
            case Api::Errors:
                return self::Status_Errors;
            case Api::Warnings:
                return self::Status_Warnings;
            case Api::Exception:
            default:
                return self::Status_Exception;
        }
    }
343046
public function getStatusAsString($status)
    {
        $options = self::getStatusOptions();
        return isset($options[$status]) ? $options[$status] : '';
    }
884676
public function inGroup(bool $status = null) : bool
    {
        if (!is_null($status)) {
            $this->inGroup = $status;
        }
        return $this->inGroup;
    }
1328062
public function setStatus($status = null)
    {
        switch ($status) {
            //TODO implement all status codes
            case '500':
                $this->setStatusCode('HTTP/1.0 500 Internal Server Error');
                break;
            case '404':
                $this->setStatusCode('HTTP/1.0 404 Not Found');
                break;
            case '403':
                $this->setStatusCode('HTTP/1.0 403 Forbidden');
                break;
            case '402':
                $this->setStatusCode('HTTP/1.0 402 Payment Required');
                break;
            case '401':
                $this->setStatusCode('HTTP/1.0 401 Unauthorized');
                break;
            case '400':
                $this->setStatusCode('HTTP/1.0 400 Bad Request');
                break;
            case '200':
                $this->setStatusCode(Template::STATUS_OK);
                break;
            default:
                $this->setStatusCode('HTTP/1.0 ' .($status ?: 200));
                break;
        }
        return $this;
    }
546634
public function setStatus($status) {
        if (!in_array($status, array(self::STATUS_INACTIVE, self::STATUS_PUBLISHED))) {
            throw new \InvalidArgumentException("Invalid status");
        }
        $this->status = $status;
    }
1050454
public function status($status = null)
    {
        if ($status === null) {
            return $this->subscription_status;
        } else {
            $this->subscription_status = $status;
            return $this;
        }
    }
742981
public function theServerShouldReturnStatusCode($status)
    {
        Assertions::assertNotNull($this->response, 'Missing response. Can you not send request?');
        Assertions::assertEquals($status, $this->response->getStatusCode(), 'Invalid HTTP status code.');
    }
548786
public function setStatus($status) {
        if($this->setModified('status', $status)->isModified()) {
            $this->status = $status;
        }

        return $this;
    }
246293
public function changeStatusActivity(string $status)
    {
        if ("enabled" === $status) {
            if (Locale::enableLocale()) {
                return ((new Renderer())->jsonRenderer(array("code" => 200, "msg" => "OK")));
            } else {
                return ((new Renderer())->jsonRenderer(array("code" => 500,
                    "results" => "Locale is already enabled")));
            }
        } elseif ("disabled" === $status) {
            if (Locale::disableLocale()) {
                return ((new Renderer())->jsonRenderer(array("code" => 200, "msg" => "OK")));
            } else {
                return ((new Renderer())->jsonRenderer(array("code" => 500,
                    "results" => "Locale is already disabled")));
            }
        }
        return ((new Renderer())->jsonRenderer(array("code" => 500,
            "results" => "Undefined locale status $status")));
    }
600552
static public function isLogedIn ($request)
    {
        if (! isset($request->user) or $request->user->isAnonymous()) {
            return false;
        }
        if (! $request->user->isActive()) {
            return false;
        }
        return true;
    }
933903
public function setStatus($status) {

        $this->checkInArray($status, GDAXConstants::$fundingStatusValues);
        $this->status = $status;
        return $this;

    }