taskman_bhl/bhl_flt.inc.php

27 lines
545 B
PHP

<?php
namespace metagen_php;
use Exception;
function flt_bhl_ref($val, $name, $struct, $str_args)
{
if(!$val)
return $val;
if(!isset($val['module']))
throw new Exception("Missing 'module'");
$module_file = \taskman\bhl_map_module_to_file($val['module']);
if(!$module_file)
throw new Exception("Module not found '{$val['module']}");
if(!isset($val['fn']))
throw new Exception("Missing 'fn'");
$args = explode(",", $str_args);
\taskman\bhl_validate_func_ref($module_file, $val['fn'], $args);
return $val;
}