Added a PHP Yate::GetLocal cleaner shortcut to retrieve a local parameter.
Added libyate.php tests for GetLocal. git-svn-id: http://voip.null.ro/svn/yate@4652 acf43c95-373e-0410-b603-e72c3f656dc1
This commit is contained in:
parent
4919f6b40f
commit
53d36427e3
|
@ -223,6 +223,15 @@ class Yate
|
|||
_yate_print("%%>setlocal:$name:$value\n");
|
||||
}
|
||||
|
||||
/**
|
||||
* Asynchronously retrieve a local module parameter
|
||||
* @param $name Name of the parameter to read
|
||||
*/
|
||||
static function GetLocal($name)
|
||||
{
|
||||
Yate::SetLocal($name, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* Constructor. Creates a new outgoing message
|
||||
* @param $name Name of the new message
|
||||
|
|
|
@ -20,10 +20,14 @@ $m->params["param1"]="val1";
|
|||
$m->retval="ret_value";
|
||||
$m->Dispatch();
|
||||
|
||||
Yate::SetLocal("engine.version","");
|
||||
Yate::SetLocal("engine.nodename","");
|
||||
Yate::SetLocal("engine.nosuch","");
|
||||
Yate::GetLocal("engine.version");
|
||||
Yate::GetLocal("engine.nodename");
|
||||
Yate::GetLocal("engine.nosuch");
|
||||
Yate::SetLocal("engine.nodename","error because is readonly");
|
||||
Yate::GetLocal("config.nosuch");
|
||||
Yate::GetLocal("config.localsym");
|
||||
Yate::GetLocal("config.localsym.h323chan.yate");
|
||||
Yate::SetLocal("config.localsym.h323chan.yate","r/o error too");
|
||||
|
||||
/* The main loop. We pick events and handle them */
|
||||
for (;;) {
|
||||
|
|
Loading…
Reference in New Issue