private static function initialize() { if (self::$initialized == true) { return; } require_once PLATO_ROOT . 'class.bin.php'; require_once PLATO_ROOT . 'class.compiler.php'; require_once PLATO_ROOT . 'class.memory.php'; require_once PLATO_ROOT . 'class.cpu.php'; require_once PLATO_ROOT . 'class.register.php'; require_once PLATO_ROOT . 'class.alu.php'; require_once PLATO_ROOT . 'class.decoder.php'; self::$initialized = true; }
function plato_include($file, $args = array(), $type = PLATO_TYPE_INTEGER, $debug = null) { $object = plato_class_loader::create($file); /* 初始化 */ if (is_callable($debug)) { call_user_func($debug, null, null); } try { $object->load($debug); $object->call(0, $args); $return = $object->destroy($type); } catch (Exception $ex) { if ($ex instanceof plato_exception == false) { $return = new plato_exception($ex); } else { $return = $ex; } } if (is_callable($debug)) { call_user_func($debug, $object, null); } return $return; }