Amp\Mysql\ResultProxy::updateState PHP Method

updateState() public method

public updateState ( $state )
    public function updateState($state)
    {
        $this->state = $state;
        if ($state == ResultProxy::ROWS_FETCHED) {
            $this->rowFetched(null);
        }
        if (empty($this->deferreds[$state])) {
            return;
        }
        foreach ($this->deferreds[$state] as list($deferred, $rows, $cb)) {
            $deferred->succeed($cb ? $cb($rows) : $rows);
        }
        $this->deferreds[$state] = [];
    }