25 lines
470 B
PHP
25 lines
470 B
PHP
|
<?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;
|
||
|
}
|
||
|
|