|
| 1 | +/* |
| 2 | + * Copyright 2017 MongoDB, Inc. |
| 3 | + * |
| 4 | + * Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | + * you may not use this file except in compliance with the License. |
| 6 | + * You may obtain a copy of the License at |
| 7 | + * |
| 8 | + * http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | + * |
| 10 | + * Unless required by applicable law or agreed to in writing, software |
| 11 | + * distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | + * See the License for the specific language governing permissions and |
| 14 | + * limitations under the License. |
| 15 | + */ |
| 16 | + |
| 17 | +#ifdef HAVE_CONFIG_H |
| 18 | +# include "config.h" |
| 19 | +#endif |
| 20 | + |
| 21 | +#include <php.h> |
| 22 | + |
| 23 | +#include "phongo_compat.h" |
| 24 | +#include "php_phongo.h" |
| 25 | + |
| 26 | +zend_class_entry *php_phongo_typewrapper_ce; |
| 27 | + |
| 28 | +/* {{{ MongoDB\BSON\TypeWrapper function entries */ |
| 29 | +ZEND_BEGIN_ARG_INFO_EX(ai_TypeWrapper_createFromBSONType, 0, 0, 1) |
| 30 | + ZEND_ARG_OBJ_INFO(0, type, MongoDB\\BSON\\Type, 0) |
| 31 | +ZEND_END_ARG_INFO() |
| 32 | + |
| 33 | +ZEND_BEGIN_ARG_INFO_EX(ai_TypeWrapper_void, 0, 0, 0) |
| 34 | +ZEND_END_ARG_INFO() |
| 35 | + |
| 36 | +static zend_function_entry php_phongo_typewrapper_me[] = { |
| 37 | + ZEND_FENTRY(createFromBSONType, NULL, ai_TypeWrapper_createFromBSONType, ZEND_ACC_PUBLIC|ZEND_ACC_ABSTRACT|ZEND_ACC_STATIC) |
| 38 | + ZEND_ABSTRACT_ME(TypeWrapper, toBSONType, ai_TypeWrapper_void) |
| 39 | + PHP_FE_END |
| 40 | +}; |
| 41 | +/* }}} */ |
| 42 | + |
| 43 | +void php_phongo_typewrapper_init_ce(INIT_FUNC_ARGS) /* {{{ */ |
| 44 | +{ |
| 45 | + zend_class_entry ce; |
| 46 | + |
| 47 | + INIT_NS_CLASS_ENTRY(ce, "MongoDB\\BSON", "TypeWrapper", php_phongo_typewrapper_me); |
| 48 | + php_phongo_typewrapper_ce = zend_register_internal_interface(&ce TSRMLS_CC); |
| 49 | +} /* }}} */ |
| 50 | + |
| 51 | +/* |
| 52 | + * Local variables: |
| 53 | + * tab-width: 4 |
| 54 | + * c-basic-offset: 4 |
| 55 | + * End: |
| 56 | + * vim600: noet sw=4 ts=4 fdm=marker |
| 57 | + * vim<600: noet sw=4 ts=4 |
| 58 | + */ |
0 commit comments