-
Notifications
You must be signed in to change notification settings - Fork 234
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
21 changed files
with
422 additions
and
55 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
/** | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. | ||
* Licensed under the MIT License. See License in the project root | ||
* for license information. | ||
*/ | ||
|
||
|
||
namespace Microsoft\Kiota\Abstractions; | ||
|
||
/** | ||
* Class QueryParameter | ||
* | ||
* Attribute/annotation for query parameter class properties | ||
* | ||
* @Annotation | ||
* @Target("PROPERTY") | ||
* @NamedArgumentConstructor | ||
* @package Microsoft\Kiota\Abstractions | ||
* @copyright 2022 Microsoft Corporation | ||
* @license https://opensource.org/licenses/MIT MIT License | ||
*/ | ||
class QueryParameter | ||
{ | ||
/** | ||
* @var string | ||
*/ | ||
public string $name = ""; | ||
|
||
public function __construct(string $name) | ||
{ | ||
$this->name = $name; | ||
} | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
76 changes: 76 additions & 0 deletions
76
http/php/guzzle/src/Middleware/Options/ParametersDecodingOption.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<?php | ||
/** | ||
* Copyright (c) Microsoft Corporation. All Rights Reserved. | ||
* Licensed under the MIT License. See License in the project root | ||
* for license information. | ||
*/ | ||
|
||
|
||
namespace Microsoft\Kiota\Http\Middleware\Options; | ||
|
||
use Microsoft\Kiota\Abstractions\RequestOption; | ||
use Microsoft\Kiota\Http\Middleware\ParametersNameDecodingHandler; | ||
|
||
/** | ||
* Class ParametersDecodingOption | ||
* | ||
* Config options for the {@link ParametersNameDecodingHandler} | ||
* | ||
* @package Microsoft\Kiota\Http\Middleware\Options | ||
* @copyright 2022 Microsoft Corporation | ||
* @license https://opensource.org/licenses/MIT MIT License | ||
* @link https://developer.microsoft.com/graph | ||
*/ | ||
class ParametersDecodingOption implements RequestOption | ||
{ | ||
/** | ||
* @var bool Whether to decode characters in the request query parameter names | ||
*/ | ||
private bool $enabled; | ||
/** | ||
* @var array|string[] list of characters to decode in the request query parameter names before executing request | ||
*/ | ||
private array $parametersToDecode; | ||
|
||
/** | ||
* @param array|string[] $parametersToDecode {@link $parameterstoDecode} | ||
* @param bool $enabled {@link $enabled} | ||
*/ | ||
public function __construct(array $parametersToDecode = ['.', '-', '~', '$'], bool $enabled = true) | ||
{ | ||
$this->parametersToDecode = $parametersToDecode; | ||
$this->enabled = $enabled; | ||
} | ||
|
||
/** | ||
* @return bool | ||
*/ | ||
public function isEnabled(): bool | ||
{ | ||
return $this->enabled; | ||
} | ||
|
||
/** | ||
* @param bool $enabled | ||
*/ | ||
public function setEnabled(bool $enabled): void | ||
{ | ||
$this->enabled = $enabled; | ||
} | ||
|
||
/** | ||
* @return array|string[] | ||
*/ | ||
public function getParametersToDecode(): array | ||
{ | ||
return $this->parametersToDecode; | ||
} | ||
|
||
/** | ||
* @param array|string[] $parametersToDecode | ||
*/ | ||
public function setParametersToDecode(array $parametersToDecode): void | ||
{ | ||
$this->parametersToDecode = $parametersToDecode; | ||
} | ||
} |
Oops, something went wrong.