pthreads\Promisable::getState PHP Method

getState() protected method

protected getState ( )
    protected function getState()
    {
        if ($this->isTerminated()) {
            return PROMISABLE::ERROR;
        }
        switch ($this->state) {
            case PROMISABLE::PENDING:
            case null:
                return PROMISABLE::PENDING;
            default:
                return $this->state;
        }
    }