Get the current Connection status
@return models\Connection\Status
337738
public function getStatus(){
        $rest = $this->getService( self::API_CONNECTION_FTTH);
        $rest->GET();

        return $rest->getResult( models\Connection\Ftth\Status::class);
    }
819563
public function getStatus()
    {
        $status = null;

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

        return $status;
    }
554781
public function getDefaultConnection()
    {
        if (!$this->defaultConnection && empty($this->connections)) {
            throw new InvalidConnectionException('There are no connections configured');
        }

        if (!$this->defaultConnection) {
            reset($this->connections);

            return current($this->connections);
        }

        return $this->getConnection($this->defaultConnection);
    }
1303470
public function getStatus()
    {
        $status = self::HTTP_INTERNAL_SERVER_ERROR;

        if ($this->getCode() >= 400 && $this->getCode() < 600) {
            $status = $this->getCode();
        }

        return $status;
    }
534418
protected function getStatus()
    {
        if ($this->detail instanceof \Throwable) {
            $this->status = $this->createStatusFromException();
        }

        return $this->status;
    }
26204
public function isConnected()
    {
        return $this->synchronized(function ($self) {
            return $self->applicationState->equals(ApplicationStateKeys::get(ApplicationStateKeys::INITIALIZATION_SUCCESSFUL));
        }, $this);
    }
1079302
public static function current()
    {
        $protocol = (!empty($_SERVER['HTTPS'])
            && $_SERVER['HTTPS'] !== 'off'
            || $_SERVER['SERVER_PORT'] === 443) ? 'https://' : 'http://';

        if (isset($_SERVER['HTTP_X_FORWARDED_HOST'])) {
            $host = $_SERVER['HTTP_X_FORWARDED_HOST'];
        } else {
            $host = $_SERVER['HTTP_HOST'];
        }

        return $protocol . $host . $_SERVER['REQUEST_URI'];
    }
788673
public function getStatusString()
    {
        if (!empty(TicketMessageInterface::STATUSES[$this->status])) {
            return TicketMessageInterface::STATUSES[$this->status];
        }

        return TicketMessageInterface::STATUSES[0];
    }
99741
public function getConn()
    {
        if ($this->conn === null) {
            $this->conn = Connection::connect($this->req->getUrlParam('conn'), $this);
            if ($this->conn === false) {
                $this->res->error = Connection::getLastError();
                $this->finish();
            } else {
                if ($this->conn !== null) {
                    $this->conn->addWriteData($this->getRequestBuf());
                }
            }
        }
        return $this->conn;
    }
1037856
private function getConnection() {
        if ($this->connection === null) {
            $this->connection = DriverManager::getConnection($this->params, new Configuration());
        }

        return $this->connection;
    }
1198402
public function getStatus()
    {
        $reports = [];
        $this->connectionManager = GeneralUtility::makeInstance(ConnectionManager::class);

        $solrConnections = $this->connectionManager->getAllConfigurations();

        foreach ($solrConnections as $solrConnection) {
            $reports[] = $this->getConnectionStatus($solrConnection);
        }

        return $reports;
    }
571030
public function status()
    {
        $auth       = $this->getAuthenticationService();
        $loggedIn   = $auth->hasIdentity();
        $identity   = $loggedIn ? $auth->getIdentity() : null;

        return (object) array(
            'loggedIn'      => $loggedIn,
            'id'            => $loggedIn ? $identity->id            : null,
            'email'         => $loggedIn ? $identity->email         : null,
            'displayName'   => $loggedIn ? $identity->displayName   : null,
        );
    }
393661
public String connectionsStatus() {
    StringBuilder connStatus = new StringBuilder();
    connStatus.append("Connection Status {");
    for (MemcachedNode node : locator.getAll()) {
      connStatus
        .append(" ")
        .append(node.getSocketAddress())
        .append(" active: ")
        .append(node.isActive())
        .append(", authed: ")
        .append(node.isAuthenticated())
        .append(MessageFormat.format(", last read: {0} ms ago",
          node.lastReadDelta()));
    }
    connStatus.append(" }");
    return connStatus.toString();
  }
573816
public function getConnection() {
		if ($this->connection->count() === 0) {
			//是否需要建立新的连接
			if ($this->getMaxClient() > $this->connection_count) {
				$this->last_run_out_time = time();
				return $this->connect();
			}
			//wait
			$uid = co::getUid();
			$this->wait->push($uid);
			co::suspend();
			return $this->connection->pop();
		}
		if ($this->connection->count() === 1) {
			$this->last_run_out_time = time();
		}
		return $this->connection->pop();
	}
843282
public function get_status() {

        $pluginman = $this->pluginman;

        if (is_null($this->versiondb) and is_null($this->versiondisk)) {
            return core_plugin_manager::PLUGIN_STATUS_NODB;

        } else if (is_null($this->versiondb) and !is_null($this->versiondisk)) {
            return core_plugin_manager::PLUGIN_STATUS_NEW;

        } else if (!is_null($this->versiondb) and is_null($this->versiondisk)) {
            if ($pluginman::is_deleted_standard_plugin($this->type, $this->name)) {
                return core_plugin_manager::PLUGIN_STATUS_DELETE;
            } else {
                return core_plugin_manager::PLUGIN_STATUS_MISSING;
            }

        } else if ((float)$this->versiondb === (float)$this->versiondisk) {
            // Note: the float comparison should work fine here
            //       because there are no arithmetic operations with the numbers.
            return core_plugin_manager::PLUGIN_STATUS_UPTODATE;

        } else if ($this->versiondb < $this->versiondisk) {
            return core_plugin_manager::PLUGIN_STATUS_UPGRADE;

        } else if ($this->versiondb > $this->versiondisk) {
            return core_plugin_manager::PLUGIN_STATUS_DOWNGRADE;

        } else {
            // $version = pi(); and similar funny jokes - hopefully Donald E. Knuth will never contribute to Moodle ;-)
            throw new coding_exception('Unable to determine plugin state, check the plugin versions');
        }
    }
920429
protected function currentStatus()
    {
        if (! $masters = app(MasterSupervisorRepository::class)->all()) {
            return 'inactive';
        }

        return collect($masters)->contains(function ($master) {
            return $master->status === 'paused';
        }) ? 'paused' : 'running';
    }
723226
public function getStatus()
    {
        $status = self::STATUS_OK;

        foreach ($this->getItems() as $item) {
            if ($item->getStatus() === self::STATUS_ERROR) {
                return self::STATUS_ERROR;
            }

            if ($item->getStatus() === self::STATUS_WARNING) {
                $status = self::STATUS_WARNING;
            }
        }

        return $status;
    }