taskman_bhl/bhl_flt.inc.php

27 lines
545 B
PHP
Raw Permalink Normal View History

2023-05-18 15:09:35 +03:00
<?php
namespace metagen_php;
use Exception;
2023-08-16 14:10:53 +03:00
function flt_bhl_ref($val, $name, $struct, $str_args)
2023-05-18 15:09:35 +03:00
{
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']}");
2023-05-18 15:09:35 +03:00
if(!isset($val['fn']))
throw new Exception("Missing 'fn'");
2023-08-16 14:10:53 +03:00
$args = explode(",", $str_args);
2023-05-18 15:09:35 +03:00
2023-08-16 14:10:53 +03:00
\taskman\bhl_validate_func_ref($module_file, $val['fn'], $args);
2023-05-18 15:09:35 +03:00
return $val;
}