taskman_bhl/bhl_flt.inc.php

25 lines
470 B
PHP
Raw Normal View History

2023-05-18 15:09:35 +03:00
<?php
namespace metagen_php;
use Exception;
function flt_bhl_ref($val, $name, $struct, $args)
{
if(!$val)
return $val;
if(!isset($val['module']))
throw new Exception("Missing 'module'");
if(!isset($val['fn']))
throw new Exception("Missing 'fn'");
$signature = explode(",", $args);
if(!$signature)
throw new Exception("Invalid signature: $args");
\taskman\bhl_validate_func_ref($val['module'], $val['fn'], $signature);
return $val;
}