Skip to content

Commit 3108687

Browse files
authored
chore: Merge pull request #84 from WebFiori/feat-attriputes
feat: Add Support for Attributes
2 parents a09ecd8 + 30da6a9 commit 3108687

99 files changed

Lines changed: 8532 additions & 1196 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,5 @@ php-cs-fixer.phar
1515
*.Identifier
1616
/tests/.phpunit.cache
1717
/.vscode
18+
tests/WebFiori/Tests/Http/output-stream.txt
19+
/OpenAPI_files

WebFiori/Http/APIFilter.php

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
*
2222
*/
2323
class APIFilter {
24+
private $requestParameters = [];
2425
/**
2526
* A constant that indicates a given value is invalid.
2627
*
@@ -103,6 +104,10 @@ public function addRequestParameter(RequestParameter $reqParam) {
103104
$attribute[$filterIdx][] = FILTER_DEFAULT;
104105
}
105106
$this->paramDefs[] = $attribute;
107+
$this->requestParameters[] = $reqParam;
108+
}
109+
public function getParameters() : array {
110+
return $this->requestParameters;
106111
}
107112
/**
108113
* Clears the arrays that are used to store filtered and not-filtered variables.
@@ -118,6 +123,7 @@ public function clearInputs() {
118123
*/
119124
public function clearParametersDef() {
120125
$this->paramDefs = [];
126+
$this->requestParameters = [];
121127
}
122128
/**
123129
* Filter the values of an associative array.

WebFiori/Http/APITestCase.php

Lines changed: 207 additions & 76 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)