Skip to content

Commit

Permalink
URI strategy implementation MAY update the requestParameters
Browse files Browse the repository at this point in the history
  • Loading branch information
nohponex committed Jan 6, 2016
1 parent 62b3be5 commit 379e9ec
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 10 deletions.
7 changes: 2 additions & 5 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,10 @@
"ext-json": "*",
"phramework/exceptions": "0.*",
"phramework/validate": "^0.3",
"phramework/database": "dev-master"
"phramework/database": "0.*"
},
"suggest": {
"ext-curl": "*",
"ext-pdo": "Required when database is used",
"ext-pdo_pgsql": "Required when postgreSQL database is used",
"ext-pdo_mysql": "Required when MySQL or MariaDB database is used"
"ext-curl": "*"
},
"require-dev": {
"phpunit/phpunit": "5.*",
Expand Down
2 changes: 1 addition & 1 deletion src/URIStrategy/ClassBased.php
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ public function __construct(
* @return string[2] This method should return `[$class, $method]` on success
*/
public function invoke(
$requestParameters,
&$requestParameters,
$requestMethod,
$requestHeaders,
$requestUser
Expand Down
2 changes: 1 addition & 1 deletion src/URIStrategy/IURIStrategy.php
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ interface IURIStrategy
* @throws Phramework\Exceptions\UnauthorizedException
*/
public function invoke(
$requestParameters,
&$requestParameters,
$requestMethod,
$requestHeaders,
$requestUser
Expand Down
6 changes: 3 additions & 3 deletions src/URIStrategy/URITemplate.php
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ public static function URI()
* @return string[2] This method should return `[$class, $method]` on success
*/
public function invoke(
$requestParameters,
&$requestParameters,
$requestMethod,
$requestHeaders,
$requestUser
Expand Down Expand Up @@ -194,7 +194,7 @@ public function invoke(
list($URI_parameters) = $test;

//Merge all available parameters
$parameters = (object)array_merge(
$requestParameters = (object)array_merge(
(array)$requestParameters,
$URI_parameters,
$test[0]
Expand All @@ -215,7 +215,7 @@ public function invoke(
[$class, $method],
array_merge(
[
$parameters,
$requestParameters,
$requestMethod,
$requestHeaders
],
Expand Down

0 comments on commit 379e9ec

Please sign in to comment.