PHP Interface
You can use PHP libraries from your THT app via the Php Module.
The PHP files should be located in code/php
.
They can be executed via Php.require
, which uses PHP's require_once
function.
// Load 'code/php/myPhpLibrary.php' Php.require('myPhpLibrary.php') // Call a global function $val = Php.call('a_php_function', 'arg1', 'arg2') // Construct a PHP object // Namespaces can use '/' instead of '\' $obj = Php.new('Abc/MyClass') $obj.someMethod()