Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Add default param to setParam() method.

  • Loading branch information...
commit d697a37a890ebd028d0067466b5f7d804f8ad3ac 1 parent ab4c45c
@trq trq authored
View
4 lib/Proem/Signal/Event/Standard.php
@@ -101,11 +101,13 @@ public function setParam($index, $value)
*
* @return mixed
*/
- public function getParam($index)
+ public function getParam($index, $default = null)
{
if (isset($this->params[$index])) {
return $this->params[$index];
}
+
+ return $default;
}
/**
View
5 lib/Proem/Signal/Event/Template.php
@@ -60,12 +60,13 @@ public function isQueueHalted();
public function setParam($key, $param);
/**
- * Retrieve a parameter by key
+ * Retrieve a parameter (or some default value) by key
*
* @param string $key
+ * @param mixed $default Default value returned if $key does not exist
* @return mixed
*/
- public function getParam($key);
+ public function getParam($key, $default);
/**
* Set params
Please sign in to comment.
Something went wrong with that request. Please try again.