From 2047955f06dfcebb2effe39f24d60704fde4ef6e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pierre=20Mazi=C3=A8re?= Date: Sun, 28 Aug 2016 00:17:20 +0200 Subject: [PATCH] [core] rename $param to $inputs MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Pierre Mazière --- lib/Bridge.php | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/Bridge.php b/lib/Bridge.php index a13442bc..94d22089 100644 --- a/lib/Bridge.php +++ b/lib/Bridge.php @@ -246,9 +246,9 @@ abstract class BridgeAbstract implements BridgeInterface { * Note : you can define a cache with "setCache" * @param array array with expected bridge paramters */ - public function setDatas(array $param){ + public function setDatas(array $inputs){ if(!is_null($this->cache)){ - $this->cache->prepare($param); + $this->cache->prepare($inputs); $time = $this->cache->getTime(); } else { $time = false; @@ -259,16 +259,16 @@ abstract class BridgeAbstract implements BridgeInterface { return; } - if(empty($this->parameters) && !empty($param)){ + if(empty($this->parameters) && !empty($inputs)){ $this->returnClientError('Invalid parameters value(s)'); }; - if(!$this->validateData($param)){ + if(!$this->validateData($inputs)){ $this->returnClientError('Invalid parameters value(s)'); } // Populate BridgeAbstract::parameters with sanitized data - foreach($param as $name=>$value){ + foreach($inputs as $name=>$value){ foreach($this->parameters as $context=>$set){ if(isset($this->parameters[$context][$name])){ $this->parameters[$context][$name]['value']=$value; @@ -313,8 +313,8 @@ abstract class BridgeAbstract implements BridgeInterface { // Copy global parameter values to the guessed context foreach($this->parameters['global'] as $name=>$properties){ - if(isset($param[$name])){ - $value=$param[$name]; + if(isset($inputs[$name])){ + $value=$inputs[$name]; }else if(isset($properties['value'])){ $value=$properties['value']; }else{