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 #include <php.h>
18 
19 #ifdef HAVE_CONFIG_H
20 #include "config.h"
21 #endif
22 
23 #include "phongo_compat.h"
24 #include "php_phongo.h"
25 
26 zend_class_entry* php_phongo_objectid_interface_ce;
27 
28 /* {{{ MongoDB\BSON\ObjectIdInterface function entries */
29 ZEND_BEGIN_ARG_INFO_EX(ai_ObjectIdInterface_void, 0, 0, 0)
30 ZEND_END_ARG_INFO()
31 
32 static zend_function_entry php_phongo_objectid_interface_me[] = {
33 	/* clang-format off */
34 	ZEND_ABSTRACT_ME(ObjectIdInterface, getTimestamp, ai_ObjectIdInterface_void)
35 	ZEND_ABSTRACT_ME(ObjectIdInterface, __toString, ai_ObjectIdInterface_void)
36 	PHP_FE_END
37 	/* clang-format on */
38 };
39 /* }}} */
40 
php_phongo_objectid_interface_init_ce(INIT_FUNC_ARGS)41 void php_phongo_objectid_interface_init_ce(INIT_FUNC_ARGS) /* {{{ */
42 {
43 	zend_class_entry ce;
44 
45 	INIT_NS_CLASS_ENTRY(ce, "MongoDB\\BSON", "ObjectIdInterface", php_phongo_objectid_interface_me);
46 	php_phongo_objectid_interface_ce = zend_register_internal_interface(&ce);
47 } /* }}} */
48 
49 /*
50  * Local variables:
51  * tab-width: 4
52  * c-basic-offset: 4
53  * End:
54  * vim600: noet sw=4 ts=4 fdm=marker
55  * vim<600: noet sw=4 ts=4
56  */
57