Get status info for the current session and API env

@return Response
342085
public function getTokens()
    {
        $response = $this->client->post($this->uri());

        return $this->handleResponse($response);
    }
434248
public function check()
    {
        $response = $this->client->get($this->getURL());
        $cookie = $this->getCookie($response);
        $fullURL = $this->getURL();

        if ($cookie) {
            return [
                EnvironmentCheck::ERROR,
                "Sessions are being set for {$fullURL} : Set-Cookie => " . $cookie,
            ];
        }
        return [
            EnvironmentCheck::OK,
            "Sessions are not being created for {$fullURL} 👍",
        ];
    }
616961
public function getStatus()
    {
        $status = $this->real_call->getStatus();
        $this->_rpcPostProcess($status, $this->response);
        return $status;
    }
534775
public function getStatus()
    {
        if ($this->_getField(self::STORAGE_ID)) {
            return ( $this->_getField(self::$PAYMENT_INFORMATION) ) ? self::STATE_NOT_EMPTY : self::STATE_EXISTING;
        } else {
            return ( $this->_getField(self::$ERRORS) ) ? self::STATE_FAILURE : self::STATE_NOT_EXISTING;
        }
    }
862788
public function getStatuses()
	{
		// Fetch statuses when the method is called for the first time.
		if ( $this->statuses === null ) {
			$statuses = array();
			$result = $this->api(self::REQUEST_GET, '/rest/api/2/status', array(), true);

			/* set hash key as custom field id */
			foreach ( $result as $status ) {
				$statuses[$status['id']] = $status;
			}

			$this->statuses = $statuses;
		}

		return $this->statuses;
	}
819563
public function getStatus()
    {
        $status = null;

        if($entity = $this->getIterator()->current()) {
            $status = $entity->getStatus();
        }

        return $status;
    }
466880
public function status()
	{
		// Use 'porcelain' argument for consistent formatting of output
		$arguments = array('--porcelain');
		$status    = $this->call('status', $arguments);
		$response  = '';

		if (!empty($status))
		{
			$status = trim($status);
			$lines  = explode("\n", $status);

			$response = array(
				'added'     => array(),
				'modified'  => array(),
				'deleted'   => array(),
				'renamed'   => array(),
				'copied'    => array(),
				'untracked' => array(),
				'unmerged'  => array(),
				'merged'    => array()
			);
			foreach ($lines as $line)
			{
				$line  = trim($line);
				preg_match('/([A|D|M|U|R|C|?]{1,2})[ ]{1,2}([[:alnum:]_\-\.\/]*)/', $line, $parts);

				if (strlen($parts[1]) == 2 && $parts[1] != '??' && $parts[1] != 'UU')
				{
					$parts[1] = 'merged';
				}

				switch ($parts[1])
				{
					case 'A':
						$response['added'][] = $parts[2];
						break;
					case 'D':
						$response['deleted'][] = $parts[2];
						break;
					case 'M':
						$response['modified'][] = $parts[2];
						break;
					case 'R':
						$response['renamed'][] = $parts[2];
						break;
					case 'C':
						$response['copied'][] = $parts[2];
						break;
					case 'UU':
						$response['unmerged'][] = $parts[2];
						break;
					case '??':
						$response['untracked'][] = $parts[2];
						break;
					case 'merged':
						$response['merged'][] = $parts[2];
						break;
				}
			}
		}

		return $response;
	}
728764
public function stat_sysinfo()
    {
        if (!$this->is_loggedin) {
            return false;
        }

        $response = $this->exec_curl('/api/s/' . $this->site . '/stat/sysinfo');

        return $this->process_response($response);
    }
1196347
public function getStatus()
    {
        if (   !strlen($this->getValue('status'))
            && !in_array($this->getType(), array('validation-error', 'error')))
        {
            $this->offsetSet('status', 'processing');
        }

        return strtolower($this->getValue('status'));
    }
53315
function statusObject()
    {
        if ( $this->Status === null )
        {
            $this->Status = eZOrderStatus::fetchByStatus( $this->StatusID );
        }
        return $this->Status;
    }
100722
public function getStatus()
    {
        if ($this->status === null) {
            $this->setStatus($this->nodeService->getNodeStatus($this->getName()));
        }
        return $this->status;
    }
1323051
public function checkActivationStatus()
    {
        if (true == $this->builder->conf['restful']) {
            $path = ltrim(parse_url($this->url(), PHP_URL_PATH), '/');
            $rpath = ltrim(parse_url(Request::path(), PHP_URL_PATH), '/');

            if ($this->builder->conf['rest_base']) {
                $base = (is_array($this->builder->conf['rest_base'])) ? implode('|', $this->builder->conf['rest_base']) : $this->builder->conf['rest_base'];

                list($path, $rpath) = preg_replace('@^('.$base.')/@', '', [$path, $rpath], 1);
            }

            if (preg_match("@^{$path}(/.+)?\z@", $rpath)) {
                $this->activate();
            }
        } else {
            // We should consider a $strict config. If $strict then only match against fullURL.
            if ($this->url() == Request::url() || $this->url() == Request::fullUrl()) {
                $this->activate();
            }
        }
    }
94671
public function getStatusDescription()
    {
        static $list = null;
        if ($list === null) {
            $list = static::getStatuses();
        }
        return (isset($list[$this->status])) ? $list[$this->status] : $this->status;
    }
391823
def _get_status(self):
        """"""
        if self._state in ["processed", "error"]:
            return self._state
        
        get_resp = requests.get(self.location, cookies={"session": self.session})

        self._state = get_resp.json()["status"]
        self.slice_time = get_resp.json()["slice_time"]
        
        return self._state
115640
public function getStatus()
    {
        $includePrivate = $this->auth->check();

        $totalComponents = Component::enabled()->authenticated($includePrivate)->count();
        $majorOutages = Component::enabled()->authenticated($includePrivate)->status(4)->count();
        $majorOutageRate = (int) $this->config->get('setting.major_outage_rate', '50');
        $isMajorOutage = $totalComponents ? ($majorOutages / $totalComponents) * 100 >= $majorOutageRate : false;

        // Default data
        $status = [
            'system_status'  => 'info',
            'system_message' => trans_choice('cachet.service.bad', $totalComponents),
            'favicon'        => 'favicon-high-alert',
        ];

        if ($isMajorOutage) {
            $status = [
                'system_status'  => 'danger',
                'system_message' => trans_choice('cachet.service.major', $totalComponents),
                'favicon'        => 'favicon-high-alert',
            ];
        } elseif (Component::enabled()->authenticated($includePrivate)->notStatus(1)->count() === 0) {
            // If all our components are ok, do we have any non-fixed incidents?
            $incidents = Incident::orderBy('occurred_at', 'desc')->get()->filter(function ($incident) {
                return $incident->status !== Incident::FIXED;
            });
            $incidentCount = $incidents->count();
            $unresolvedCount = $incidents->filter(function ($incident) {
                return !$incident->is_resolved;
            })->count();

            if ($incidentCount === 0 || ($incidentCount >= 1 && $unresolvedCount === 0)) {
                $status = [
                    'system_status'  => 'success',
                    'system_message' => trans_choice('cachet.service.good', $totalComponents),
                    'favicon'        => 'favicon',
                ];
            }
        } elseif (Component::enabled()->authenticated($includePrivate)->whereIn('status', [2, 3])->count() > 0) {
            $status['favicon'] = 'favicon-medium-alert';
        }

        return $status;
    }
371936
public function getStatus()
    {
        if (!$this->entity->getStatus()) {
            return null;
        }

        return new ApiShippingStatus($this->entity->getStatus(), $this->locale);
    }
1197079
public function status(){
        switch(session_status()){
            case PHP_SESSION_NONE:
                return self::NONE;
                
            case PHP_SESSION_ACTIVE:
                return self::ACTIVE;
                
            case PHP_SESSION_DISABLED:
            default:
                return self::DISABLED;
        }
    }