fkooman\OAuth\Client\PdoStorage::storeState PHP Method

storeState() public method

public storeState ( State $state )
$state State
    public function storeState(State $state)
    {
        $stmt = $this->db->prepare(sprintf('INSERT INTO %s (client_config_id, user_id, scope, issue_time, state) VALUES(:client_config_id, :user_id, :scope, :issue_time, :state)', $this->prefix . 'states'));
        $stmt->bindValue(':client_config_id', $state->getClientConfigId(), PDO::PARAM_STR);
        $stmt->bindValue(':user_id', $state->getUserId(), PDO::PARAM_STR);
        $stmt->bindValue(':scope', $state->getScope()->toString(), PDO::PARAM_STR);
        $stmt->bindValue(':issue_time', $state->getIssueTime(), PDO::PARAM_INT);
        $stmt->bindValue(':state', $state->getState(), PDO::PARAM_STR);
        $stmt->execute();
        return 1 === $stmt->rowCount();
    }