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

getState() public method

public getState ( $clientConfigId, $state )
    public function getState($clientConfigId, $state)
    {
        $stmt = $this->db->prepare(sprintf('SELECT * FROM %s WHERE client_config_id = :client_config_id AND state = :state', $this->prefix . 'states'));
        $stmt->bindValue(':client_config_id', $clientConfigId, PDO::PARAM_STR);
        $stmt->bindValue(':state', $state, PDO::PARAM_STR);
        $stmt->execute();
        $result = $stmt->fetch(PDO::FETCH_ASSOC);
        if (false !== $result) {
            $result['scope'] = Scope::fromString($result['scope']);
            return new State($result);
        }
        return false;
    }