UNPKG

node-ffi-php-bindings

Version:

Generated node-ffi bindings for PHP source code. Embed PHP from node.js w/o creating your own node extension.

42 lines (35 loc) 1.73 kB
var ffi = require('ffi'), ref = require('ref'), RefArray = require('ref-array'), Struct = require('ref-struct'), Union = require('ref-union'), _library = require('./../'); loadDependentSymbols(); _library._preload['php_register_variable'] = ['zval', function () { _library.php_register_variable = ['void', [ref.refType('char'), ref.refType('char'), ref.refType(_library.zval)]]; _library._functions['php_register_variable'] = _library.php_register_variable; }]; _library._preload['php_register_variable_safe'] = ['zval', function () { _library.php_register_variable_safe = ['void', [ref.refType('char'), ref.refType('char'), 'int', ref.refType(_library.zval)]]; _library._functions['php_register_variable_safe'] = _library.php_register_variable_safe; }]; _library._preload['php_register_variable_ex'] = ['zval', 'zval', function () { _library.php_register_variable_ex = ['void', [ref.refType('char'), ref.refType(_library.zval), ref.refType(_library.zval)]]; _library._functions['php_register_variable_ex'] = _library.php_register_variable_ex; }]; _library._preload['php_hash_environment'] = [function () { _library.php_hash_environment = ['int', []]; _library._functions['php_hash_environment'] = _library.php_hash_environment; }]; function loadDependentSymbols() { require('./../Zend/zend.js'); require('./../Zend/zend_API.js'); require('./../Zend/zend_ast.js'); require('./../Zend/zend_compile.js'); require('./../Zend/zend_hash.js'); require('./../Zend/zend_ini.js'); require('./../Zend/zend_iterators.js'); require('./../Zend/zend_modules.js'); require('./../Zend/zend_object_handlers.js'); require('./../Zend/zend_types.js'); }