updated plugin WP-WebAuthn
version 1.3.1
This commit is contained in:
wp-content/plugins/wp-webauthn
css
js
languages
template.potwp-webauthn-ca_ES.mowp-webauthn-ca_ES.powp-webauthn-es_ES.mowp-webauthn-es_ES.powp-webauthn-it_IT.mowp-webauthn-it_IT.po
readme.txtvendor
autoload.php
composer
fgrosse
phpasn1
league
php-http
message-factory
psr
http-factory
ramsey
collection
symfony
polyfill-php80
polyfill-php81
Resources
wp-webauthn-vendor
autoload.php
wp-webauthn.phpwwa-admin-content.phpwwa-ajax.phpwwa-functions.phpwwa-profile-content.phpwwa-shortcodes.phpwwa-version.phpbeberlei
assert
brick
math
composer
ClassLoader.phpInstalledVersions.phpLICENSEautoload_classmap.phpautoload_files.phpautoload_namespaces.phpautoload_psr4.phpautoload_real.phpautoload_static.phpinstalled.jsoninstalled.php
fgrosse
phpasn1
CHANGELOG.mdLICENSEREADME.mdcomposer.json
lib
ASN1
ASNObject.phpAbstractString.phpAbstractTime.phpBase128.php
Composite
Construct.phpException
ExplicitlyTaggedObject.phpIdentifier.phpOID.phpParsable.phpTemplateParser.phpUniversal
BMPString.phpBitString.phpBoolean.phpCharacterString.phpEnumerated.phpGeneralString.phpGeneralizedTime.phpGraphicString.phpIA5String.phpInteger.phpNullObject.phpNumericString.phpObjectDescriptor.phpObjectIdentifier.phpOctetString.phpPrintableString.phpRelativeObjectIdentifier.phpSequence.phpSet.phpT61String.phpUTCTime.phpUTF8String.phpUniversalString.phpVisibleString.php
UnknownConstructedObject.phpUnknownObject.phpUtility
X509
league
uri-interfaces
LICENSEcomposer.json
src
Contracts
AuthorityInterface.phpDataPathInterface.phpDomainHostInterface.phpFragmentInterface.phpHostInterface.phpIpHostInterface.phpPathInterface.phpPortInterface.phpQueryInterface.phpSegmentedPathInterface.phpUriComponentInterface.phpUriException.phpUriInterface.phpUserInfoInterface.php
Exceptions
Idna
uri
nyholm
psr
http-client
http-factory
http-message
log
ramsey
collection
LICENSEREADME.mdSECURITY.mdcomposer.jsonconventional-commits.json
src
AbstractArray.phpAbstractCollection.phpAbstractSet.phpArrayInterface.phpCollection.phpCollectionInterface.phpDoubleEndedQueue.phpDoubleEndedQueueInterface.php
Exception
CollectionMismatchException.phpInvalidArgumentException.phpInvalidSortOrderException.phpNoSuchElementException.phpOutOfBoundsException.phpUnsupportedOperationException.phpValueExtractionException.php
GenericArray.phpMap
AbstractMap.phpAbstractTypedMap.phpAssociativeArrayMap.phpMapInterface.phpNamedParameterMap.phpTypedMap.phpTypedMapInterface.php
Queue.phpQueueInterface.phpSet.phpTool
uuid
LICENSEREADME.mdcomposer.json
src
BinaryUtils.php
Builder
BuilderCollection.phpDefaultUuidBuilder.phpDegradedUuidBuilder.phpFallbackBuilder.phpUuidBuilderInterface.php
Codec
CodecInterface.phpGuidStringCodec.phpOrderedTimeCodec.phpStringCodec.phpTimestampFirstCombCodec.phpTimestampLastCombCodec.php
Converter
DegradedUuid.phpDeprecatedUuidInterface.phpDeprecatedUuidMethodsTrait.phpException
BuilderNotFoundException.phpDateTimeException.phpDceSecurityException.phpInvalidArgumentException.phpInvalidBytesException.phpInvalidUuidStringException.phpNameException.phpNodeException.phpRandomSourceException.phpTimeSourceException.phpUnableToBuildUuidException.phpUnsupportedOperationException.phpUuidExceptionInterface.php
FeatureSet.phpFields
Generator
CombGenerator.phpDceSecurityGenerator.phpDceSecurityGeneratorInterface.phpDefaultNameGenerator.phpDefaultTimeGenerator.phpNameGeneratorFactory.phpNameGeneratorInterface.phpPeclUuidNameGenerator.phpPeclUuidRandomGenerator.phpPeclUuidTimeGenerator.phpRandomBytesGenerator.phpRandomGeneratorFactory.phpRandomGeneratorInterface.phpRandomLibAdapter.phpTimeGeneratorFactory.phpTimeGeneratorInterface.php
Guid
Lazy
Math
Nonstandard
Provider
Dce
DceSecurityProviderInterface.phpNode
FallbackNodeProvider.phpNodeProviderCollection.phpRandomNodeProvider.phpStaticNodeProvider.phpSystemNodeProvider.php
NodeProviderInterface.phpTime
TimeProviderInterface.phpRfc4122
Fields.phpFieldsInterface.phpNilTrait.phpNilUuid.phpUuidBuilder.phpUuidInterface.phpUuidV1.phpUuidV2.phpUuidV3.phpUuidV4.phpUuidV5.phpValidator.phpVariantTrait.phpVersionTrait.php
Type
Uuid.phpUuidFactory.phpUuidFactoryInterface.phpUuidInterface.phpValidator
functions.phpspomky-labs
base64url
cbor-php
LICENSEcomposer.json
src
AbstractCBORObject.phpByteStringObject.phpByteStringWithChunkObject.phpCBORObject.phpDecoder.phpDecoderInterface.phpIndefiniteLengthByteStringObject.phpIndefiniteLengthListObject.phpIndefiniteLengthMapObject.phpIndefiniteLengthTextStringObject.phpInfiniteListObject.phpInfiniteMapObject.phpLengthCalculator.phpListObject.phpMapItem.phpMapObject.phpNegativeIntegerObject.phpNormalizable.phpOtherObject.php
OtherObject
BreakObject.phpDoublePrecisionFloatObject.phpFalseObject.phpGenericObject.phpHalfPrecisionFloatObject.phpNullObject.phpOtherObjectManager.phpOtherObjectManagerInterface.phpSimpleObject.phpSinglePrecisionFloatObject.phpTrueObject.phpUndefinedObject.php
SignedIntegerObject.phpStream.phpStringStream.phpTag.phpTag
Base16EncodingTag.phpBase64EncodingTag.phpBase64Tag.phpBase64UrlEncodingTag.phpBase64UrlTag.phpBigFloatTag.phpCBOREncodingTag.phpCBORTag.phpDatetimeTag.phpDecimalFractionTag.phpEpochTag.phpGenericTag.phpMimeTag.phpNegativeBigIntegerTag.phpPositiveBigIntegerTag.phpTagManager.phpTagManagerInterface.phpTagObjectManager.phpTimestampTag.phpUnsignedBigIntegerTag.phpUriTag.php
TagObject.phpTextStringObject.phpTextStringWithChunkObject.phpUnsignedIntegerObject.phpUtils.phpsymfony
polyfill-ctype
polyfill-php80
polyfill-php81
process
CHANGELOG.md
Exception
ExceptionInterface.phpInvalidArgumentException.phpLogicException.phpProcessFailedException.phpProcessSignaledException.phpProcessTimedOutException.phpRuntimeException.php
ExecutableFinder.phpInputStream.phpLICENSEPhpExecutableFinder.phpPhpProcess.phpPipes
Process.phpProcessUtils.phpREADME.mdcomposer.jsonthecodingmachine
safe
LICENSEREADME.mdcomposer.json
deprecated
generated
Exceptions
.gitkeepApacheException.phpApcuException.phpArrayException.phpBzip2Exception.phpCalendarException.phpClassobjException.phpComException.phpCubridException.phpDatetimeException.phpDirException.phpEioException.phpErrorfuncException.phpExecException.phpFileinfoException.phpFilesystemException.phpFilterException.phpFpmException.phpFtpException.phpFunchandException.phpGmpException.phpGnupgException.phpHashException.phpIbaseException.phpIbmDb2Exception.phpIconvException.phpImageException.phpImapException.phpInfoException.phpIngresiiException.phpInotifyException.phpLdapException.phpLibxmlException.phpLzfException.phpMailparseException.phpMbstringException.phpMiscException.phpMsqlException.phpMysqlException.phpMysqliException.phpMysqlndMsException.phpMysqlndQcException.phpNetworkException.phpOci8Exception.phpOpcacheException.phpOutcontrolException.phpPasswordException.phpPcntlException.phpPdfException.phpPgsqlException.phpPosixException.phpPsException.phpPspellException.phpReadlineException.phpRpminfoException.phpRrdException.phpSemException.phpSessionException.phpShmopException.phpSimplexmlException.phpSocketsException.phpSodiumException.phpSolrException.phpSplException.phpSqlsrvException.phpSsdeepException.phpSsh2Exception.phpStreamException.phpStringsException.phpSwooleException.phpUodbcException.phpUopzException.phpUrlException.phpVarException.phpXdiffException.phpXmlException.phpXmlrpcException.phpYamlException.phpYazException.phpZipException.phpZlibException.php
apache.phpapcu.phparray.phpbzip2.phpcalendar.phpclassobj.phpcom.phpcubrid.phpcurl.phpdatetime.phpdir.phpeio.phperrorfunc.phpexec.phpfileinfo.phpfilesystem.phpfilter.phpfpm.phpftp.phpfunchand.phpfunctionsList.phpgmp.phpgnupg.phphash.phpibase.phpibmDb2.phpiconv.phpimage.phpimap.phpinfo.phpingres-ii.phpinotify.phpjson.phpldap.phplibxml.phplzf.phpmailparse.phpmbstring.phpmisc.phpmsql.phpmysql.phpmysqli.phpmysqlndMs.phpmysqlndQc.phpnetwork.phpoci8.phpopcache.phpopenssl.phpoutcontrol.phppassword.phppcntl.phppcre.phppdf.phppgsql.phpposix.phpps.phppspell.phpreadline.phprpminfo.phprrd.phpsem.phpsession.phpshmop.phpsimplexml.phpsockets.phpsodium.phpsolr.phpspl.phpsqlsrv.phpssdeep.phpssh2.phpstream.phpstrings.phpswoole.phpuodbc.phpuopz.phpurl.phpvar.phpxdiff.phpxml.phpxmlrpc.phpyaml.phpyaz.phpzip.phpzlib.phplib
rector-migrate-0.7.phpweb-auth
cose-lib
LICENSEcomposer.json
src
Algorithm
Algorithms.phpBigInteger.phpHash.phpKey
Verifier.phpmetadata-service
LICENSEcomposer.json
src
AbstractDescriptor.phpAuthenticatorStatus.phpBiometricAccuracyDescriptor.phpBiometricStatusReport.phpCodeAccuracyDescriptor.phpDisplayPNGCharacteristicsDescriptor.phpDistantSingleMetadata.phpEcdaaTrustAnchor.phpExtensionDescriptor.phpMetadataService.phpMetadataStatement.phpMetadataStatementFetcher.phpMetadataStatementRepository.phpMetadataTOCPayload.phpMetadataTOCPayloadEntry.phpPatternAccuracyDescriptor.phpRgbPaletteEntry.phpRogueListEntry.phpSingleMetadata.phpStatusReport.phpUtils.phpVerificationMethodANDCombinations.phpVerificationMethodDescriptor.phpVersion.php
webauthn-lib
LICENSEcomposer.json
src
AttestationStatement
AndroidKeyAttestationStatementSupport.phpAndroidSafetyNetAttestationStatementSupport.phpAppleAttestationStatementSupport.phpAttestationObject.phpAttestationObjectLoader.phpAttestationStatement.phpAttestationStatementSupport.phpAttestationStatementSupportManager.phpFidoU2FAttestationStatementSupport.phpNoneAttestationStatementSupport.phpPackedAttestationStatementSupport.phpTPMAttestationStatementSupport.php
AttestedCredentialData.phpAuthenticationExtensions
AuthenticationExtension.phpAuthenticationExtensionsClientInputs.phpAuthenticationExtensionsClientOutputs.phpAuthenticationExtensionsClientOutputsLoader.phpExtensionOutputChecker.phpExtensionOutputCheckerHandler.phpExtensionOutputError.php
AuthenticatorAssertionResponse.phpAuthenticatorAssertionResponseValidator.phpAuthenticatorAttestationResponse.phpAuthenticatorAttestationResponseValidator.phpAuthenticatorData.phpAuthenticatorResponse.phpAuthenticatorSelectionCriteria.phpCertificateChainChecker
CertificateToolbox.phpCollectedClientData.phpCounter
Credential.phpPublicKeyCredential.phpPublicKeyCredentialCreationOptions.phpPublicKeyCredentialDescriptor.phpPublicKeyCredentialDescriptorCollection.phpPublicKeyCredentialEntity.phpPublicKeyCredentialLoader.phpPublicKeyCredentialOptions.phpPublicKeyCredentialParameters.phpPublicKeyCredentialRequestOptions.phpPublicKeyCredentialRpEntity.phpPublicKeyCredentialSource.phpPublicKeyCredentialSourceRepository.phpPublicKeyCredentialUserEntity.phpServer.phpStringStream.phpTokenBinding
IgnoreTokenBindingHandler.phpSecTokenBindingHandler.phpTokenBinding.phpTokenBindingHandler.phpTokenBindingNotSupportedHandler.php
TrustPath
U2FPublicKey.phpUtil
web-token
jwt-core
.github
Algorithm.phpAlgorithmManager.phpAlgorithmManagerFactory.phpJWK.phpJWKSet.phpJWT.phpLICENSEREADME.mdUtil
composer.jsonjwt-key-mgmt
.github
Analyzer
AlgorithmAnalyzer.phpES256KeyAnalyzer.phpES384KeyAnalyzer.phpES512KeyAnalyzer.phpHS256KeyAnalyzer.phpHS384KeyAnalyzer.phpHS512KeyAnalyzer.phpKeyAnalyzer.phpKeyAnalyzerManager.phpKeyIdentifierAnalyzer.phpKeysetAnalyzer.phpKeysetAnalyzerManager.phpMessage.phpMessageBag.phpMixedKeyTypes.phpMixedPublicAndPrivateKeys.phpNoneAnalyzer.phpOctAnalyzer.phpRsaAnalyzer.phpUsageAnalyzer.phpZxcvbnKeyAnalyzer.php
JKUFactory.phpJWKFactory.phpKeyConverter
LICENSEREADME.mdUrlKeySetFactory.phpX5UFactory.phpcomposer.jsonjwt-signature-algorithm-ecdsa
jwt-signature-algorithm-eddsa
jwt-signature-algorithm-rsa
.github
LICENSEPS256.phpPS384.phpPS512.phpREADME.mdRS256.phpRS384.phpRS512.phpRSA.phpRSAPKCS1.phpRSAPSS.phpUtil
composer.jsonjwt-signature
.github
Algorithm
JWS.phpJWSBuilder.phpJWSBuilderFactory.phpJWSLoader.phpJWSLoaderFactory.phpJWSTokenSupport.phpJWSVerifier.phpJWSVerifierFactory.phpLICENSEREADME.mdSerializer
CompactSerializer.phpJSONFlattenedSerializer.phpJSONGeneralSerializer.phpJWSSerializer.phpJWSSerializerManager.phpJWSSerializerManagerFactory.phpSerializer.php
Signature.phpcomposer.json
429
wp-content/plugins/wp-webauthn/wp-webauthn-vendor/thecodingmachine/safe/generated/sqlsrv.php
Normal file
429
wp-content/plugins/wp-webauthn/wp-webauthn-vendor/thecodingmachine/safe/generated/sqlsrv.php
Normal file
@ -0,0 +1,429 @@
|
||||
<?php
|
||||
|
||||
namespace Safe;
|
||||
|
||||
use Safe\Exceptions\SqlsrvException;
|
||||
|
||||
/**
|
||||
* The transaction begun by sqlsrv_begin_transaction includes
|
||||
* all statements that were executed after the call to
|
||||
* sqlsrv_begin_transaction and before calls to
|
||||
* sqlsrv_rollback or sqlsrv_commit.
|
||||
* Explicit transactions should be started and committed or rolled back using
|
||||
* these functions instead of executing SQL statements that begin and commit/roll
|
||||
* back transactions. For more information, see
|
||||
* SQLSRV Transactions.
|
||||
*
|
||||
* @param resource $conn The connection resource returned by a call to sqlsrv_connect.
|
||||
* @throws SqlsrvException
|
||||
*
|
||||
*/
|
||||
function sqlsrv_begin_transaction($conn): void
|
||||
{
|
||||
error_clear_last();
|
||||
$result = \sqlsrv_begin_transaction($conn);
|
||||
if ($result === false) {
|
||||
throw SqlsrvException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Cancels a statement. Any results associated with the statement that have not
|
||||
* been consumed are deleted. After sqlsrv_cancel has been
|
||||
* called, the specified statement can be re-executed if it was created with
|
||||
* sqlsrv_prepare. Calling sqlsrv_cancel
|
||||
* is not necessary if all the results associated with the statement have been
|
||||
* consumed.
|
||||
*
|
||||
* @param resource $stmt The statement resource to be cancelled.
|
||||
* @throws SqlsrvException
|
||||
*
|
||||
*/
|
||||
function sqlsrv_cancel($stmt): void
|
||||
{
|
||||
error_clear_last();
|
||||
$result = \sqlsrv_cancel($stmt);
|
||||
if ($result === false) {
|
||||
throw SqlsrvException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns information about the client and specified connection
|
||||
*
|
||||
* @param resource $conn The connection about which information is returned.
|
||||
* @return array Returns an associative array with keys described in the table below.
|
||||
*
|
||||
* Array returned by sqlsrv_client_info
|
||||
*
|
||||
*
|
||||
*
|
||||
* Key
|
||||
* Description
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* DriverDllName
|
||||
* SQLNCLI10.DLL
|
||||
*
|
||||
*
|
||||
* DriverODBCVer
|
||||
* ODBC version (xx.yy)
|
||||
*
|
||||
*
|
||||
* DriverVer
|
||||
* SQL Server Native Client DLL version (10.5.xxx)
|
||||
*
|
||||
*
|
||||
* ExtensionVer
|
||||
* php_sqlsrv.dll version (2.0.xxx.x)
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws SqlsrvException
|
||||
*
|
||||
*/
|
||||
function sqlsrv_client_info($conn): array
|
||||
{
|
||||
error_clear_last();
|
||||
$result = \sqlsrv_client_info($conn);
|
||||
if ($result === false) {
|
||||
throw SqlsrvException::createFromPhpError();
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Closes an open connection and releases resourses associated with the connection.
|
||||
*
|
||||
* @param resource $conn The connection to be closed.
|
||||
* @throws SqlsrvException
|
||||
*
|
||||
*/
|
||||
function sqlsrv_close($conn): void
|
||||
{
|
||||
error_clear_last();
|
||||
$result = \sqlsrv_close($conn);
|
||||
if ($result === false) {
|
||||
throw SqlsrvException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Commits a transaction that was begun with sqlsrv_begin_transaction.
|
||||
* The connection is returned to auto-commit mode after sqlsrv_commit
|
||||
* is called. The transaction that is committed includes all statements that were
|
||||
* executed after the call to sqlsrv_begin_transaction.
|
||||
* Explicit transactions should be started and committed or rolled back using these
|
||||
* functions instead of executing SQL statements that begin and commit/roll back
|
||||
* transactions. For more information, see
|
||||
* SQLSRV Transactions.
|
||||
*
|
||||
* @param resource $conn The connection on which the transaction is to be committed.
|
||||
* @throws SqlsrvException
|
||||
*
|
||||
*/
|
||||
function sqlsrv_commit($conn): void
|
||||
{
|
||||
error_clear_last();
|
||||
$result = \sqlsrv_commit($conn);
|
||||
if ($result === false) {
|
||||
throw SqlsrvException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Changes the driver error handling and logging configurations.
|
||||
*
|
||||
* @param string $setting The name of the setting to set. The possible values are
|
||||
* "WarningsReturnAsErrors", "LogSubsystems", and "LogSeverity".
|
||||
* @param mixed $value The value of the specified setting. The following table shows possible values:
|
||||
*
|
||||
* Error and Logging Setting Options
|
||||
*
|
||||
*
|
||||
*
|
||||
* Setting
|
||||
* Options
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* WarningsReturnAsErrors
|
||||
* 1 (TRUE) or 0 (FALSE)
|
||||
*
|
||||
*
|
||||
* LogSubsystems
|
||||
* SQLSRV_LOG_SYSTEM_ALL (-1)
|
||||
* SQLSRV_LOG_SYSTEM_CONN (2)
|
||||
* SQLSRV_LOG_SYSTEM_INIT (1)
|
||||
* SQLSRV_LOG_SYSTEM_OFF (0)
|
||||
* SQLSRV_LOG_SYSTEM_STMT (4)
|
||||
* SQLSRV_LOG_SYSTEM_UTIL (8)
|
||||
*
|
||||
*
|
||||
* LogSeverity
|
||||
* SQLSRV_LOG_SEVERITY_ALL (-1)
|
||||
* SQLSRV_LOG_SEVERITY_ERROR (1)
|
||||
* SQLSRV_LOG_SEVERITY_NOTICE (4)
|
||||
* SQLSRV_LOG_SEVERITY_WARNING (2)
|
||||
*
|
||||
*
|
||||
*
|
||||
*
|
||||
* @throws SqlsrvException
|
||||
*
|
||||
*/
|
||||
function sqlsrv_configure(string $setting, $value): void
|
||||
{
|
||||
error_clear_last();
|
||||
$result = \sqlsrv_configure($setting, $value);
|
||||
if ($result === false) {
|
||||
throw SqlsrvException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Executes a statement prepared with sqlsrv_prepare. This
|
||||
* function is ideal for executing a prepared statement multiple times with
|
||||
* different parameter values.
|
||||
*
|
||||
* @param resource $stmt A statement resource returned by sqlsrv_prepare.
|
||||
* @throws SqlsrvException
|
||||
*
|
||||
*/
|
||||
function sqlsrv_execute($stmt): void
|
||||
{
|
||||
error_clear_last();
|
||||
$result = \sqlsrv_execute($stmt);
|
||||
if ($result === false) {
|
||||
throw SqlsrvException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Frees all resources for the specified statement. The statement cannot be used
|
||||
* after sqlsrv_free_stmt has been called on it. If
|
||||
* sqlsrv_free_stmt is called on an in-progress statement
|
||||
* that alters server state, statement execution is terminated and the statement
|
||||
* is rolled back.
|
||||
*
|
||||
* @param resource $stmt The statement for which resources are freed.
|
||||
* Note that NULL is a valid parameter value. This allows the function to be
|
||||
* called multiple times in a script.
|
||||
* @throws SqlsrvException
|
||||
*
|
||||
*/
|
||||
function sqlsrv_free_stmt($stmt): void
|
||||
{
|
||||
error_clear_last();
|
||||
$result = \sqlsrv_free_stmt($stmt);
|
||||
if ($result === false) {
|
||||
throw SqlsrvException::createFromPhpError();
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Gets field data from the currently selected row. Fields must be accessed in
|
||||
* order. Field indices start at 0.
|
||||
*
|
||||
* @param resource $stmt A statement resource returned by sqlsrv_query or
|
||||
* sqlsrv_execute.
|
||||
* @param int $fieldIndex The index of the field to be retrieved. Field indices start at 0. Fields
|
||||
* must be accessed in order. i.e. If you access field index 1, then field
|
||||
* index 0 will not be available.
|
||||
* @param int $getAsType The PHP data type for the returned field data. If this parameter is not
|
||||
* set, the field data will be returned as its default PHP data type.
|
||||
* For information about default PHP data types, see
|
||||
* Default PHP Data Types
|
||||
* in the Microsoft SQLSRV documentation.
|
||||
* @return mixed Returns data from the specified field on success.
|
||||
* @throws SqlsrvException
|
||||
*
|
||||
*/
|
||||
function sqlsrv_get_field($stmt, int $fieldIndex, int $getAsType = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($getAsType !== null) {
|
||||
$result = \sqlsrv_get_field($stmt, $fieldIndex, $getAsType);
|
||||
} else {
|
||||
$result = \sqlsrv_get_field($stmt, $fieldIndex);
|
||||
}
|
||||
if ($result === false) {
|
||||
throw SqlsrvException::createFromPhpError();
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Makes the next result of the specified statement active. Results include result
|
||||
* sets, row counts, and output parameters.
|
||||
*
|
||||
* @param resource $stmt The statement on which the next result is being called.
|
||||
* @return bool|null Returns TRUE if the next result was successfully retrieved, FALSE if an error
|
||||
* occurred, and NULL if there are no more results to retrieve.
|
||||
* @throws SqlsrvException
|
||||
*
|
||||
*/
|
||||
function sqlsrv_next_result($stmt): ?bool
|
||||
{
|
||||
error_clear_last();
|
||||
$result = \sqlsrv_next_result($stmt);
|
||||
if ($result === false) {
|
||||
throw SqlsrvException::createFromPhpError();
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the number of fields (columns) on a statement.
|
||||
*
|
||||
* @param resource $stmt The statement for which the number of fields is returned.
|
||||
* sqlsrv_num_fields can be called on a statement before
|
||||
* or after statement execution.
|
||||
* @return int Returns the number of fields on success.
|
||||
* @throws SqlsrvException
|
||||
*
|
||||
*/
|
||||
function sqlsrv_num_fields($stmt): int
|
||||
{
|
||||
error_clear_last();
|
||||
$result = \sqlsrv_num_fields($stmt);
|
||||
if ($result === false) {
|
||||
throw SqlsrvException::createFromPhpError();
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Retrieves the number of rows in a result set. This function requires that the
|
||||
* statement resource be created with a static or keyset cursor. For more information,
|
||||
* see sqlsrv_query, sqlsrv_prepare,
|
||||
* or Specifying a Cursor Type and Selecting Rows
|
||||
* in the Microsoft SQLSRV documentation.
|
||||
*
|
||||
* @param resource $stmt The statement for which the row count is returned. The statement resource
|
||||
* must be created with a static or keyset cursor. For more information, see
|
||||
* sqlsrv_query, sqlsrv_prepare, or
|
||||
* Specifying a Cursor Type and Selecting Rows
|
||||
* in the Microsoft SQLSRV documentation.
|
||||
* @return int Returns the number of rows retrieved on success.
|
||||
* If a forward cursor (the default) or dynamic cursor is used, FALSE is returned.
|
||||
* @throws SqlsrvException
|
||||
*
|
||||
*/
|
||||
function sqlsrv_num_rows($stmt): int
|
||||
{
|
||||
error_clear_last();
|
||||
$result = \sqlsrv_num_rows($stmt);
|
||||
if ($result === false) {
|
||||
throw SqlsrvException::createFromPhpError();
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prepares a query for execution. This function is ideal for preparing a query
|
||||
* that will be executed multiple times with different parameter values.
|
||||
*
|
||||
* @param resource $conn A connection resource returned by sqlsrv_connect.
|
||||
* @param string $sql The string that defines the query to be prepared and executed.
|
||||
* @param array $params An array specifying parameter information when executing a parameterized
|
||||
* query. Array elements can be any of the following:
|
||||
*
|
||||
* A literal value
|
||||
* A PHP variable
|
||||
* An array with this structure:
|
||||
* array($value [, $direction [, $phpType [, $sqlType]]])
|
||||
*
|
||||
* The following table describes the elements in the array structure above:
|
||||
* @param array $options An array specifying query property options. The supported keys are described
|
||||
* in the following table:
|
||||
* @return resource Returns a statement resource on success.
|
||||
* @throws SqlsrvException
|
||||
*
|
||||
*/
|
||||
function sqlsrv_prepare($conn, string $sql, array $params = null, array $options = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($options !== null) {
|
||||
$result = \sqlsrv_prepare($conn, $sql, $params, $options);
|
||||
} elseif ($params !== null) {
|
||||
$result = \sqlsrv_prepare($conn, $sql, $params);
|
||||
} else {
|
||||
$result = \sqlsrv_prepare($conn, $sql);
|
||||
}
|
||||
if ($result === false) {
|
||||
throw SqlsrvException::createFromPhpError();
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Prepares and executes a query.
|
||||
*
|
||||
* @param resource $conn A connection resource returned by sqlsrv_connect.
|
||||
* @param string $sql The string that defines the query to be prepared and executed.
|
||||
* @param array $params An array specifying parameter information when executing a parameterized query.
|
||||
* Array elements can be any of the following:
|
||||
*
|
||||
* A literal value
|
||||
* A PHP variable
|
||||
* An array with this structure:
|
||||
* array($value [, $direction [, $phpType [, $sqlType]]])
|
||||
*
|
||||
* The following table describes the elements in the array structure above:
|
||||
* @param array $options An array specifying query property options. The supported keys are described
|
||||
* in the following table:
|
||||
* @return resource Returns a statement resource on success.
|
||||
* @throws SqlsrvException
|
||||
*
|
||||
*/
|
||||
function sqlsrv_query($conn, string $sql, array $params = null, array $options = null)
|
||||
{
|
||||
error_clear_last();
|
||||
if ($options !== null) {
|
||||
$result = \sqlsrv_query($conn, $sql, $params, $options);
|
||||
} elseif ($params !== null) {
|
||||
$result = \sqlsrv_query($conn, $sql, $params);
|
||||
} else {
|
||||
$result = \sqlsrv_query($conn, $sql);
|
||||
}
|
||||
if ($result === false) {
|
||||
throw SqlsrvException::createFromPhpError();
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Rolls back a transaction that was begun with sqlsrv_begin_transaction
|
||||
* and returns the connection to auto-commit mode.
|
||||
*
|
||||
* @param resource $conn The connection resource returned by a call to sqlsrv_connect.
|
||||
* @throws SqlsrvException
|
||||
*
|
||||
*/
|
||||
function sqlsrv_rollback($conn): void
|
||||
{
|
||||
error_clear_last();
|
||||
$result = \sqlsrv_rollback($conn);
|
||||
if ($result === false) {
|
||||
throw SqlsrvException::createFromPhpError();
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user