function translateDeviceCommands($object_id, $crq, $vlan_names = NULL) { $breed = assertDeviceBreed($object_id); $funcname = assertBreedFunction($breed, 'xlatepushq'); require_once 'deviceconfig.php'; if (!is_callable($funcname)) { throw new RTGatewayError("undeclared function '{$funcname}'"); } return $funcname($object_id, $crq, $vlan_names); }
function translateDeviceCommands($object_id, $crq, $vlan_names = NULL) { $breed = assertDeviceBreed($object_id); $funcname = assertBreedFunction($breed, 'xlatepushq'); require_once 'deviceconfig.php'; if (!is_callable($funcname)) { throw new RTGatewayError("undeclared function '{$funcname}'"); } global $current_query_breed; $current_query_breed = $breed; // this global is used to auto-detect breed in shortenIfName try { $ret = $funcname($object_id, $crq, $vlan_names); } catch (Exception $e) { $current_query_breed = NULL; throw $e; } $current_query_breed = NULL; return $ret; }