Saxon/C  1.1.2
Saxon Processor library for C/C++/PHP
 All Classes Functions Variables
php5_saxon.h
1 // Copyright (c) 2014 Saxonica Limited.
3 // This Source Code Form is subject to the terms of the Mozilla Public License, v. 2.0.
4 // If a copy of the MPL was not distributed with this file, You can obtain one at http://mozilla.org/MPL/2.0/.
5 // This Source Code Form is "Incompatible With Secondary Licenses", as defined by the Mozilla Public License, v. 2.0.
7 
8 #ifndef PHP_SAXON_H
9 #define PHP_SAXON_H
10 
11 #ifdef __cplusplus
12 extern "C" {
13 #endif
14 
15  #include "php.h"
16  //#include "php_ini.h"
17  #include "ext/standard/info.h"
18  #include "Zend/zend_exceptions.h"
19 
20 
21 
22 #ifdef PHP_WIN32
23  #define _ALLOW_KEYWORD_MACROS
24 #endif
25 
26 #ifdef PHP_WIN32
27  #define PHP_SAXON_API __declspec(dllexport)
28  #define PHP_SAXON __declspec(dllimport)
29 //#elif define(__GNUC__) && __GNUC__ >= 4
30 //#define PHP_SAXON __attribute__ ((visibility("default")))
31 //#else
32 //#define PHP_SAXON_API
33 #endif
34 
35 #ifdef ZTS
36 #include "TSRM.h"
37 #endif
38 #ifdef __cplusplus
39 }
40 #endif
41 #include "SaxonProcessor.h"
42 #include "XdmValue.h"
43 #include "XdmItem.h"
44 #include "XdmNode.h"
45 #include "XdmAtomicValue.h"
46 /*class SaxonProcessor;
47 class XQueryProcessor;
48 class XsltProcessor;
49 class XdmValue;*/
50 
51 extern zend_module_entry saxon_module_entry;
52 #define phpext_saxon_ptr &saxon_module_entry;
53 
54 struct zvalArr {
55  zval * _val;
56 };
57 
59  zend_object std;
60  SaxonProcessor * saxonProcessor;
61 };
62 
64  zend_object std;
65  XsltProcessor *xsltProcessor;
66 };
67 
69  zend_object std;
70  XQueryProcessor *xqueryProcessor;
71 };
72 
74  zend_object std;
75  XPathProcessor *xpathProcessor;
76 };
77 
79  zend_object std;
80  SchemaValidator * schemaValidator;
81 };
82 
84  zend_object std;
85  XdmValue * xdmValue;
86 };
87 
89  zend_object std;
90  XdmItem * xdmItem;
91 };
92 
94  zend_object std;
95  XdmNode * xdmNode;
96 };
97 
99  zend_object std;
100  XdmAtomicValue * xdmAtomicValue;
101 };
102 
103 
104 #define PHP_SAXON_EXTNAME "Saxon/C"
105 #define PHP_SAXON_EXTVER "1.1.0"
106 
107 /*
108  * Class: com_saxonica_functions_extfn_PhpCall_PhpFunctionCall
109  * Method: _phpCall
110  * Signature: ([Ljava/lang/String;[Ljava/lang/String;)Ljava/lang/Object;
111  */
112 
113 jobject JNICALL phpNativeCall
114  (JNIEnv *env, jobject object, jstring funcName, jobjectArray arguments, jobjectArray arrayTypes);
115 
116  PHP_MSHUTDOWN_FUNCTION(saxon);
117  PHP_MINFO_FUNCTION(saxon);
118  PHP_MINIT_FUNCTION(saxon);
119 
120  PHP_METHOD(SaxonProcessor, __construct);
121  PHP_METHOD(SaxonProcessor, __destruct);
122 
123  PHP_METHOD(SaxonProcessor, createAtomicValue);
124  PHP_METHOD(SaxonProcessor, parseXmlFromString);
125  PHP_METHOD(SaxonProcessor, parseXmlFromFile);
126  PHP_METHOD(SaxonProcessor, setcwd);
127 // PHP_METHOD(SaxonProcessor, importDocument);
128  PHP_METHOD(SaxonProcessor, setResourcesDirectory);
129  PHP_METHOD(SaxonProcessor, registerPHPFunction);
130  // PHP_METHOD(SaxonProcessor, getXslMessages);
131  PHP_METHOD(SaxonProcessor, setConfigurationProperty);
132  PHP_METHOD(SaxonProcessor, newXsltProcessor);
133  PHP_METHOD(SaxonProcessor, newXQueryProcessor);
134  PHP_METHOD(SaxonProcessor, newXPathProcessor);
135  PHP_METHOD(SaxonProcessor, newSchemaValidator);
136  PHP_METHOD(SaxonProcessor, version);
137 
138 
139 
140 
141  //PHP_METHOD(XsltProcessor, __construct);
142  PHP_METHOD(XsltProcessor, __destruct);
143  PHP_METHOD(XsltProcessor, transformFileToFile);
144  PHP_METHOD(XsltProcessor, transformFileToString);
145  PHP_METHOD(XsltProcessor, transformFileToValue);
146  PHP_METHOD(XsltProcessor, transformToString);
147  PHP_METHOD(XsltProcessor, transformToValue);
148  PHP_METHOD(XsltProcessor, transformToFile);
149  PHP_METHOD(XsltProcessor, compileFromFile);
150  PHP_METHOD(XsltProcessor, compileFromValue);
151  PHP_METHOD(XsltProcessor, compileFromString);
152  PHP_METHOD(XsltProcessor, setOutputFile);
153  PHP_METHOD(XsltProcessor, setSourceFromFile);
154  PHP_METHOD(XsltProcessor, setSourceFromXdmValue);
155  PHP_METHOD(XsltProcessor, setParameter);
156  PHP_METHOD(XsltProcessor, setProperty);
157  PHP_METHOD(XsltProcessor, clearParameters);
158  PHP_METHOD(XsltProcessor, clearProperties);
159  PHP_METHOD(XsltProcessor, exceptionClear);
160  PHP_METHOD(XsltProcessor, exceptionOccurred);
161  PHP_METHOD(XsltProcessor, getErrorCode);
162  PHP_METHOD(XsltProcessor, getErrorMessage);
163  PHP_METHOD(XsltProcessor, getExceptionCount);
164 
165  // PHP_METHOD(XQueryProcesor, __construct);
166  PHP_METHOD(XQueryProcesor, __destruct);
167  PHP_METHOD(XQueryProcessor, setQueryContent);
168  PHP_METHOD(XQueryProcessor, setContextItem);
169  PHP_METHOD(XQueryProcessor, setContextItemFromFile);
170  PHP_METHOD(XQueryProcessor, setParameter);
171  PHP_METHOD(XQueryProcessor, setProperty);
172  PHP_METHOD(XQueryProcessor, clearParameters);
173  PHP_METHOD(XQueryProcessor, clearProperties);
174  // PHP_METHOD(XQueryProcessor, setOutputFile);
175  PHP_METHOD(XQueryProcessor, runQueryToValue);
176  PHP_METHOD(XQueryProcessor, runQueryToString);
177  PHP_METHOD(XQueryProcessor, runQueryToFile);
178  PHP_METHOD(XQueryProcessor, setQueryFile);
179  PHP_METHOD(XQueryProcessor, setQueryBaseURI);
180  PHP_METHOD(XQueryProcessor, declareNamespace);
181  PHP_METHOD(XQueryProcessor, exceptionClear);
182  PHP_METHOD(XQueryProcessor, exceptionOccurred);
183  PHP_METHOD(XQueryProcessor, getErrorCode);
184  PHP_METHOD(XQueryProcessor, getErrorMessage);
185  PHP_METHOD(XQueryProcessor, getExceptionCount);
186 
187  // PHP_METHOD(XPathProcessor, __construct);
188  PHP_METHOD(XPathProcessor, __destruct);
189  PHP_METHOD(XPathProcessor, setContextItem);
190  PHP_METHOD(XPathProcessor, setContextFile);
191  PHP_METHOD(XQueryProcessor, setBaseURI);
192  PHP_METHOD(XPathProcessor, effectiveBooleanValue);
193  PHP_METHOD(XPathProcessor, evaluate);
194  PHP_METHOD(XPathProcessor, evaluateSingle);
195  PHP_METHOD(XPathProcessor, declareNamespace);
196  PHP_METHOD(XPathProcessor, setParameter);
197  PHP_METHOD(XPathProcessor, setProperty);
198  PHP_METHOD(XPathProcessor, clearParameters);
199  PHP_METHOD(XPathProcessor, clearProperties);
200  PHP_METHOD(XPathProcessor, exceptionClear);
201  PHP_METHOD(XPathProcessor, exceptionOccurred);
202  PHP_METHOD(XPathProcessor, getErrorCode);
203  PHP_METHOD(XPathProcessor, getErrorMessage);
204  PHP_METHOD(XPathProcessor, getExceptionCount);
205 
206 
207  // PHP_METHOD(SchemaValidator, __construct);
208  PHP_METHOD(SchemaValidator, __destruct);
209  PHP_METHOD(SchemaValidator, setSourceNode);
210  PHP_METHOD(SchemaValidator, setOutputFile);
211  PHP_METHOD(SchemaValidator, registerSchemaFromFile);
212  PHP_METHOD(SchemaValidator, registerSchemaFromString);
213  PHP_METHOD(SchemaValidator, validate);
214  PHP_METHOD(SchemaValidator, validateToNode);
215  PHP_METHOD(SchemaValidator, getValidationReport);
216  PHP_METHOD(SchemaValidator, setParameter);
217  PHP_METHOD(SchemaValidator, setProperty);
218  PHP_METHOD(SchemaValidator, clearParameters);
219  PHP_METHOD(SchemaValidator, clearProperties);
220  PHP_METHOD(SchemaValidator, exceptionClear);
221  PHP_METHOD(SchemaValidator, exceptionOccurred);
222  PHP_METHOD(SchemaValidator, getErrorCode);
223  PHP_METHOD(SchemaValidator, getErrorMessage);
224  PHP_METHOD(SchemaValidator, getExceptionCount);
225 
226 
227 /* ============== PHP Interface of XdmValue =============== */
228 
229  PHP_METHOD(XdmValue, __construct);
230  PHP_METHOD(XdmValue, __destruct);
231  PHP_METHOD(XdmValue, getHead);
232  PHP_METHOD(XdmValue, itemAt);
233  PHP_METHOD(XdmValue, size);
234  PHP_METHOD(XdmValue, addXdmItem);
235 
236 
237 /* ============== PHP Interface of XdmItem =============== */
238 
239  PHP_METHOD(XdmItem, __construct);
240  PHP_METHOD(XdmItem, __destruct);
241  PHP_METHOD(XdmItem, getStringValue);
242  PHP_METHOD(XdmItem, isAtomic);
243  PHP_METHOD(XdmItem, isNode);
244  PHP_METHOD(XdmItem, getAtomicValue);
245  PHP_METHOD(XdmItem, getNodeValue);
246 
247 /* ============== PHP Interface of XdmNode =============== */
248 
249  PHP_METHOD(XdmNode, __construct);
250  PHP_METHOD(XdmNode, __destruct);
251  PHP_METHOD(XdmNode, getStringValue);
252  PHP_METHOD(XdmNode, getNodeKind);
253  PHP_METHOD(XdmNode, getNodeName);
254  PHP_METHOD(XdmNode, isAtomic);
255  PHP_METHOD(XdmNode, getChildCount);
256  PHP_METHOD(XdmNode, getAttributeCount);
257  PHP_METHOD(XdmNode, getChildNode);
258  PHP_METHOD(XdmNode, getParent);
259  PHP_METHOD(XdmNode, getAttributeNode);
260  PHP_METHOD(XdmNode, getAttributeValue);
261 
262 
263 /* ============== PHP Interface of XdmAtomicValue =============== */
264 
265  PHP_METHOD(XdmAtomicValue, __construct);
266  PHP_METHOD(XdmAtomicValue, __destruct);
267  PHP_METHOD(XdmAtomicValue, getStringValue);
268  PHP_METHOD(XdmAtomicValue, getBooleanValue);
269  PHP_METHOD(XdmAtomicValue, getDoubleValue);
270  PHP_METHOD(XdmAtomicValue, getLongValue);
271  PHP_METHOD(XdmAtomicValue, isAtomic);
272 
273 
274 #endif /* PHP_SAXON_H */
275 
276 
277 
278 
279 
280 
281 
282 
283 
284 
285 
286 
287 
288 
289 
290 
291 
Definition: php5_saxon.h:73
Definition: XQueryProcessor.h:26
Definition: php5_saxon.h:93
Definition: XdmAtomicValue.h:21
Definition: php5_saxon.h:58
Definition: XdmNode.h:21
Definition: php5_saxon.h:68
Definition: SchemaValidator.h:26
Definition: XdmValue.h:44
Definition: XsltProcessor.h:24
Definition: php5_saxon.h:54
Definition: SaxonProcessor.h:290
Definition: XdmItem.h:15
Definition: php5_saxon.h:88
Definition: php5_saxon.h:78
Definition: XPathProcessor.h:26
Definition: php5_saxon.h:63
Definition: php5_saxon.h:83
Definition: php5_saxon.h:98