update
This commit is contained in:
@@ -8,6 +8,7 @@
|
||||
* @license http://www.opensource.org/licenses/mit-license.html MIT License
|
||||
* @version Build @@version@@
|
||||
*/
|
||||
|
||||
/**
|
||||
* The interface that all hash implementations must implement
|
||||
*
|
||||
@@ -34,18 +35,22 @@ namespace RandomLibtest\Mocks;
|
||||
class AbstractMock
|
||||
{
|
||||
protected $callbacks = array();
|
||||
|
||||
public static function init()
|
||||
{
|
||||
}
|
||||
|
||||
public function __construct(array $callbacks = array())
|
||||
{
|
||||
$this->callbacks = $callbacks;
|
||||
}
|
||||
|
||||
public function __call($name, array $args = array())
|
||||
{
|
||||
if (isset($this->callbacks[$name])) {
|
||||
return call_user_func_array($this->callbacks[$name], $args);
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user