Property proxy API
A facility to manage extension object properties tied to C-struct members
php_propro_api.h
Go to the documentation of this file.
1 /*
2  +--------------------------------------------------------------------+
3  | PECL :: propro |
4  +--------------------------------------------------------------------+
5  | Redistribution and use in source and binary forms, with or without |
6  | modification, are permitted provided that the conditions mentioned |
7  | in the accompanying LICENSE file are met. |
8  +--------------------------------------------------------------------+
9  | Copyright (c) 2013 Michael Wallner <mike@php.net> |
10  +--------------------------------------------------------------------+
11 */
12 
13 #ifndef PHP_PROPRO_API_H
14 #define PHP_PROPRO_API_H
15 
16 #include "php_propro.h"
17 
25  zval *container;
27  char *member_str;
29  size_t member_len;
30 };
32 
80  zend_object zo;
82  zend_object_value zv;
87 };
89 
102  const char *member_str, size_t member_len TSRMLS_DC);
103 
112 
117 PHP_PROPRO_API zend_class_entry *php_property_proxy_get_class_entry(void);
118 
125  zend_class_entry *ce TSRMLS_DC);
126 
135  zend_class_entry *ce, php_property_proxy_t *proxy,
136  php_property_proxy_object_t **ptr TSRMLS_DC);
137 
138 #endif /* PHP_PROPRO_API_H */
139 
140 
141 /*
142  * Local variables:
143  * tab-width: 4
144  * c-basic-offset: 4
145  * End:
146  * vim600: noet sw=4 ts=4 fdm=marker
147  * vim<600: noet sw=4 ts=4
148  */
php_property_proxy_t * php_property_proxy_init(zval *container, const char *member_str, size_t member_len)
Create a property proxy.
Definition: php_propro_api.c:40
zend_object_value php_property_proxy_object_new_ex(zend_class_entry *ce, php_property_proxy_t *proxy, php_property_proxy_object_t **ptr)
Instantiate a new php\PropertyProxy with proxy.
Definition: php_propro_api.c:96
zend_class_entry * php_property_proxy_get_class_entry(void)
Get the zend_class_entry of php\PropertyProxy.
Definition: php_propro_api.c:66
zval * container
The container holding the property.
Definition: php_propro_api.h:25
void php_property_proxy_free(php_property_proxy_t **proxy)
Destroy and free a property proxy.
Definition: php_propro_api.c:53
The internal property proxy.
Definition: php_propro_api.h:23
zend_object_value zv
The object value for easy zval creation.
Definition: php_propro_api.h:82
char * member_str
The name of the proxied property.
Definition: php_propro_api.h:27
size_t member_len
The length of the name.
Definition: php_propro_api.h:29
php_property_proxy_t * proxy
The actual property proxy.
Definition: php_propro_api.h:84
zend_object_value php_property_proxy_object_new(zend_class_entry *ce)
Instantiate a new php\PropertyProxy.
Definition: php_propro_api.c:71
The userland object.
Definition: php_propro_api.h:78
zend_object zo
The std zend_object.
Definition: php_propro_api.h:80
#define PHP_PROPRO_API
Definition: php_propro.h:26
struct php_property_proxy_object * parent
A reference to any parent property proxy object.
Definition: php_propro_api.h:86