yii\mongodb\Connection::getIsActive PHP Method

getIsActive() public method

Returns a value indicating whether the Mongo connection is established.
public getIsActive ( ) : boolean
return boolean whether the Mongo connection is established
    public function getIsActive()
    {
        return is_object($this->manager) && $this->manager->getServers() !== [];
    }