Adding BHL_REF macro

This commit is contained in:
Pavel Shevaev 2023-05-26 12:00:22 +03:00
parent 9a7a68499a
commit 09c71a0469
1 changed files with 19 additions and 0 deletions

19
bhl_macro.inc.php Normal file
View File

@ -0,0 +1,19 @@
<?php
/**
* @global
*/
function macro_BHL_REF($proc, $mod_name, $func, $signature_json = '')
{
//validate signature only if it's explicitely passed
if($signature_json)
{
$signature = json_decode($signature_json, false);
if(!is_array($signature))
throw new Exception("Signature is invalid '$mod_name'");
\taskman\bhl_validate_func_ref($mod_name, $func, $signature);
}
return array('module' => ltrim($mod_name, '/'), 'fn' => $func);
}