1 <!DOCTYPE html PUBLIC
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
2 <html xmlns=
"http://www.w3.org/1999/xhtml">
4 <meta http-equiv=
"Content-Type" content=
"text/xhtml;charset=UTF-8"/>
5 <meta http-equiv=
"X-UA-Compatible" content=
"IE=9"/>
6 <meta name=
"generator" content=
"Doxygen 1.8.9.1"/>
7 <title>Resource and persistent handle factory API: php_raphf.h File Reference
</title>
8 <link href=
"tabs.css" rel=
"stylesheet" type=
"text/css"/>
9 <script type=
"text/javascript" src=
"jquery.js"></script>
10 <script type=
"text/javascript" src=
"dynsections.js"></script>
11 <link href=
"navtree.css" rel=
"stylesheet" type=
"text/css"/>
12 <script type=
"text/javascript" src=
"resize.js"></script>
13 <script type=
"text/javascript" src=
"navtreedata.js"></script>
14 <script type=
"text/javascript" src=
"navtree.js"></script>
15 <script type=
"text/javascript">
16 $(document).ready(initResizable);
17 $(window).load(resizeHeight);
19 <link href=
"search/search.css" rel=
"stylesheet" type=
"text/css"/>
20 <script type=
"text/javascript" src=
"search/searchdata.js"></script>
21 <script type=
"text/javascript" src=
"search/search.js"></script>
22 <script type=
"text/javascript">
23 $(document).ready(function() { init_search(); });
25 <link href=
"doxygen.css" rel=
"stylesheet" type=
"text/css" />
28 <div id=
"top"><!-- do not remove this div, it is closed by doxygen! -->
30 <table cellspacing=
"0" cellpadding=
"0">
32 <tr style=
"height: 56px;">
33 <td id=
"projectlogo"><img alt=
"Logo" src=
"raphf.png"/></td>
34 <td style=
"padding-left: 0.5em;">
35 <div id=
"projectname">Resource and persistent handle factory API
37 <div id=
"projectbrief">A facility to manage possibly persistent resources with a comprehensible API. Provides simliar functionality like the zend_list API, but with more flexiblity and freedom.
</div>
43 <!-- end header part -->
44 <!-- Generated by Doxygen 1.8.9.1 -->
45 <script type=
"text/javascript">
46 var searchBox = new SearchBox(
"searchBox",
"search",false,'Search');
48 <div id=
"navrow1" class=
"tabs">
50 <li><a href=
"index.html"><span>Main
 Page
</span></a></li>
51 <li><a href=
"annotated.html"><span>Data
 Structures
</span></a></li>
52 <li class=
"current"><a href=
"files.html"><span>Files
</span></a></li>
54 <div id=
"MSearchBox" class=
"MSearchBoxInactive">
56 <img id=
"MSearchSelect" src=
"search/mag_sel.png"
57 onmouseover=
"return searchBox.OnSearchSelectShow()"
58 onmouseout=
"return searchBox.OnSearchSelectHide()"
60 <input type=
"text" id=
"MSearchField" value=
"Search" accesskey=
"S"
61 onfocus=
"searchBox.OnSearchFieldFocus(true)"
62 onblur=
"searchBox.OnSearchFieldFocus(false)"
63 onkeyup=
"searchBox.OnSearchFieldChange(event)"/>
64 </span><span class=
"right">
65 <a id=
"MSearchClose" href=
"javascript:searchBox.CloseResultsWindow()"><img id=
"MSearchCloseImg" border=
"0" src=
"search/close.png" alt=
""/></a>
71 <div id=
"navrow2" class=
"tabs2">
73 <li><a href=
"files.html"><span>File
 List
</span></a></li>
74 <li><a href=
"globals.html"><span>Globals
</span></a></li>
78 <div id=
"side-nav" class=
"ui-resizable side-nav-resizable">
80 <div id=
"nav-tree-contents">
81 <div id=
"nav-sync" class=
"sync"></div>
84 <div id=
"splitbar" style=
"-moz-user-select:none;"
85 class=
"ui-resizable-handle">
88 <script type=
"text/javascript">
89 $(document).ready(function(){initNavTree('php__raphf_8h.html','');});
91 <div id=
"doc-content">
92 <!-- window showing the filter options -->
93 <div id=
"MSearchSelectWindow"
94 onmouseover=
"return searchBox.OnSearchSelectShow()"
95 onmouseout=
"return searchBox.OnSearchSelectHide()"
96 onkeydown=
"return searchBox.OnSearchSelectKey(event)">
99 <!-- iframe showing the search results (closed by default) -->
100 <div id=
"MSearchResultsWindow">
101 <iframe src=
"javascript:void(0)" frameborder=
"0"
102 name=
"MSearchResults" id=
"MSearchResults">
107 <div class=
"summary">
108 <a href=
"#nested-classes">Data Structures
</a> |
109 <a href=
"#typedef-members">Typedefs
</a> |
110 <a href=
"#func-members">Functions
</a> </div>
111 <div class=
"headertitle">
112 <div class=
"title">php_raphf.h File Reference
</div> </div>
114 <div class=
"contents">
116 <p><a href=
"php__raphf_8h_source.html">Go to the source code of this file.
</a></p>
117 <table class=
"memberdecls">
118 <tr class=
"heading"><td colspan=
"2"><h2 class=
"groupheader"><a name=
"nested-classes"></a>
119 Data Structures
</h2></td></tr>
120 <tr class=
"memitem:structphp__resource__factory__ops"><td class=
"memItemLeft" align=
"right" valign=
"top">struct
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#structphp__resource__factory__ops">php_resource_factory_ops
</a></td></tr>
121 <tr class=
"memdesc:structphp__resource__factory__ops"><td class=
"mdescLeft"> </td><td class=
"mdescRight">The resource ops consisting of a ctor, a copy ctor and a dtor.
<a href=
"php__raphf_8h.html#structphp__resource__factory__ops">More...
</a><br /></td></tr>
122 <tr class=
"separator:structphp__resource__factory__ops"><td class=
"memSeparator" colspan=
"2"> </td></tr>
123 <tr class=
"memitem:"><td class=
"memItemLeft" align=
"right" valign=
"top">struct
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"structphp__resource__factory.html">php_resource_factory
</a></td></tr>
124 <tr class=
"memdesc:"><td class=
"mdescLeft"> </td><td class=
"mdescRight">The resource factory.
<a href=
"structphp__resource__factory.html#details">More...
</a><br /></td></tr>
125 <tr class=
"separator:"><td class=
"memSeparator" colspan=
"2"> </td></tr>
126 <tr class=
"memitem:structphp__persistent__handle__list"><td class=
"memItemLeft" align=
"right" valign=
"top">struct
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#structphp__persistent__handle__list">php_persistent_handle_list
</a></td></tr>
127 <tr class=
"memdesc:structphp__persistent__handle__list"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Persistent handles storage.
<a href=
"php__raphf_8h.html#structphp__persistent__handle__list">More...
</a><br /></td></tr>
128 <tr class=
"separator:structphp__persistent__handle__list"><td class=
"memSeparator" colspan=
"2"> </td></tr>
129 <tr class=
"memitem:structphp__persistent__handle__provider"><td class=
"memItemLeft" align=
"right" valign=
"top">struct
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#structphp__persistent__handle__provider">php_persistent_handle_provider
</a></td></tr>
130 <tr class=
"memdesc:structphp__persistent__handle__provider"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Definition of a persistent handle provider.
<a href=
"php__raphf_8h.html#structphp__persistent__handle__provider">More...
</a><br /></td></tr>
131 <tr class=
"separator:structphp__persistent__handle__provider"><td class=
"memSeparator" colspan=
"2"> </td></tr>
132 <tr class=
"memitem:structphp__persistent__handle__factory"><td class=
"memItemLeft" align=
"right" valign=
"top">struct
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#structphp__persistent__handle__factory">php_persistent_handle_factory
</a></td></tr>
133 <tr class=
"memdesc:structphp__persistent__handle__factory"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Definition of a persistent handle factory.
<a href=
"php__raphf_8h.html#structphp__persistent__handle__factory">More...
</a><br /></td></tr>
134 <tr class=
"separator:structphp__persistent__handle__factory"><td class=
"memSeparator" colspan=
"2"> </td></tr>
135 <tr class=
"memitem:structphp__persistent__handle__factory_8ident"><td class=
"memItemLeft" align=
"right" valign=
"top">struct
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#structphp__persistent__handle__factory_8ident">php_persistent_handle_factory.ident
</a></td></tr>
136 <tr class=
"memdesc:structphp__persistent__handle__factory_8ident"><td class=
"mdescLeft"> </td><td class=
"mdescRight">The ident for which this factory manages resources.
<a href=
"php__raphf_8h.html#structphp__persistent__handle__factory_8ident">More...
</a><br /></td></tr>
137 <tr class=
"separator:structphp__persistent__handle__factory_8ident"><td class=
"memSeparator" colspan=
"2"> </td></tr>
138 </table><table class=
"memberdecls">
139 <tr class=
"heading"><td colspan=
"2"><h2 class=
"groupheader"><a name=
"typedef-members"></a>
140 Typedefs
</h2></td></tr>
141 <tr class=
"memitem:abadff49d810f7ce220bd3537bdaecef7"><td class=
"memItemLeft" align=
"right" valign=
"top">typedef void *(*
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#abadff49d810f7ce220bd3537bdaecef7">php_resource_factory_handle_ctor_t
</a>) (void *opaque, void *init_arg)
</td></tr>
142 <tr class=
"memdesc:abadff49d810f7ce220bd3537bdaecef7"><td class=
"mdescLeft"> </td><td class=
"mdescRight">A resource constructor.
<a href=
"#abadff49d810f7ce220bd3537bdaecef7">More...
</a><br /></td></tr>
143 <tr class=
"separator:abadff49d810f7ce220bd3537bdaecef7"><td class=
"memSeparator" colspan=
"2"> </td></tr>
144 <tr class=
"memitem:a23b073aa7b8b7dd182b336b07494288f"><td class=
"memItemLeft" align=
"right" valign=
"top">typedef void *(*
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#a23b073aa7b8b7dd182b336b07494288f">php_resource_factory_handle_copy_t
</a>) (void *opaque, void *handle)
</td></tr>
145 <tr class=
"memdesc:a23b073aa7b8b7dd182b336b07494288f"><td class=
"mdescLeft"> </td><td class=
"mdescRight">The copy constructor of a resource.
<a href=
"#a23b073aa7b8b7dd182b336b07494288f">More...
</a><br /></td></tr>
146 <tr class=
"separator:a23b073aa7b8b7dd182b336b07494288f"><td class=
"memSeparator" colspan=
"2"> </td></tr>
147 <tr class=
"memitem:a1b826c765392c93336db79bd6697e33d"><td class=
"memItemLeft" align=
"right" valign=
"top">typedef void(*
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#a1b826c765392c93336db79bd6697e33d">php_resource_factory_handle_dtor_t
</a>) (void *opaque, void *handle)
</td></tr>
148 <tr class=
"memdesc:a1b826c765392c93336db79bd6697e33d"><td class=
"mdescLeft"> </td><td class=
"mdescRight">The destructor of a resource.
<a href=
"#a1b826c765392c93336db79bd6697e33d">More...
</a><br /></td></tr>
149 <tr class=
"separator:a1b826c765392c93336db79bd6697e33d"><td class=
"memSeparator" colspan=
"2"> </td></tr>
150 <tr class=
"memitem:a29e0d7a66e441a5265ddf2f0adbbb3af"><td class=
"memItemLeft" align=
"right" valign=
"top">typedef struct
<a class=
"el" href=
"php__raphf_8h.html#structphp__resource__factory__ops">php_resource_factory_ops
</a> </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#a29e0d7a66e441a5265ddf2f0adbbb3af">php_resource_factory_ops_t
</a></td></tr>
151 <tr class=
"memdesc:a29e0d7a66e441a5265ddf2f0adbbb3af"><td class=
"mdescLeft"> </td><td class=
"mdescRight">The resource ops consisting of a ctor, a copy ctor and a dtor.
<a href=
"#a29e0d7a66e441a5265ddf2f0adbbb3af">More...
</a><br /></td></tr>
152 <tr class=
"separator:a29e0d7a66e441a5265ddf2f0adbbb3af"><td class=
"memSeparator" colspan=
"2"> </td></tr>
153 <tr class=
"memitem:a4817c4b3d4077c48dff36376487ba8d4"><td class=
"memItemLeft" align=
"right" valign=
"top">typedef struct
<a class=
"el" href=
"structphp__resource__factory.html">php_resource_factory
</a> </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a></td></tr>
154 <tr class=
"memdesc:a4817c4b3d4077c48dff36376487ba8d4"><td class=
"mdescLeft"> </td><td class=
"mdescRight">The resource factory.
<a href=
"#a4817c4b3d4077c48dff36376487ba8d4">More...
</a><br /></td></tr>
155 <tr class=
"separator:a4817c4b3d4077c48dff36376487ba8d4"><td class=
"memSeparator" colspan=
"2"> </td></tr>
156 <tr class=
"memitem:a07f599598d2b87b188f39871d026c177"><td class=
"memItemLeft" align=
"right" valign=
"top">typedef struct
<a class=
"el" href=
"php__raphf_8h.html#structphp__persistent__handle__list">php_persistent_handle_list
</a> </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#a07f599598d2b87b188f39871d026c177">php_persistent_handle_list_t
</a></td></tr>
157 <tr class=
"memdesc:a07f599598d2b87b188f39871d026c177"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Persistent handles storage.
<a href=
"#a07f599598d2b87b188f39871d026c177">More...
</a><br /></td></tr>
158 <tr class=
"separator:a07f599598d2b87b188f39871d026c177"><td class=
"memSeparator" colspan=
"2"> </td></tr>
159 <tr class=
"memitem:a31f0595f4f726f762790cef844568fc4"><td class=
"memItemLeft" align=
"right" valign=
"top">typedef struct
<a class=
"el" href=
"php__raphf_8h.html#structphp__persistent__handle__provider">php_persistent_handle_provider
</a> </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#a31f0595f4f726f762790cef844568fc4">php_persistent_handle_provider_t
</a></td></tr>
160 <tr class=
"memdesc:a31f0595f4f726f762790cef844568fc4"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Definition of a persistent handle provider.
<a href=
"#a31f0595f4f726f762790cef844568fc4">More...
</a><br /></td></tr>
161 <tr class=
"separator:a31f0595f4f726f762790cef844568fc4"><td class=
"memSeparator" colspan=
"2"> </td></tr>
162 <tr class=
"memitem:a833eaa62ffcc217e5749c26c18885b17"><td class=
"memItemLeft" align=
"right" valign=
"top">typedef struct
<a class=
"el" href=
"php__raphf_8h.html#structphp__persistent__handle__factory">php_persistent_handle_factory
</a> </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#a833eaa62ffcc217e5749c26c18885b17">php_persistent_handle_factory_t
</a></td></tr>
163 <tr class=
"separator:a833eaa62ffcc217e5749c26c18885b17"><td class=
"memSeparator" colspan=
"2"> </td></tr>
164 <tr class=
"memitem:a59f5566ecc4c76e048ad53469eb20142"><td class=
"memItemLeft" align=
"right" valign=
"top">typedef void(*
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#a59f5566ecc4c76e048ad53469eb20142">php_persistent_handle_wakeup_t
</a>) (
<a class=
"el" href=
"php__raphf_8h.html#a833eaa62ffcc217e5749c26c18885b17">php_persistent_handle_factory_t
</a> *f, void **handle)
</td></tr>
165 <tr class=
"memdesc:a59f5566ecc4c76e048ad53469eb20142"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Wakeup the persistent handle on re-acquisition.
<a href=
"#a59f5566ecc4c76e048ad53469eb20142">More...
</a><br /></td></tr>
166 <tr class=
"separator:a59f5566ecc4c76e048ad53469eb20142"><td class=
"memSeparator" colspan=
"2"> </td></tr>
167 <tr class=
"memitem:a85e9e715d308dc5d98b980c9c57d02bf"><td class=
"memItemLeft" align=
"right" valign=
"top">typedef void(*
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#a85e9e715d308dc5d98b980c9c57d02bf">php_persistent_handle_retire_t
</a>) (
<a class=
"el" href=
"php__raphf_8h.html#a833eaa62ffcc217e5749c26c18885b17">php_persistent_handle_factory_t
</a> *f, void **handle)
</td></tr>
168 <tr class=
"memdesc:a85e9e715d308dc5d98b980c9c57d02bf"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Retire the persistent handle on release.
<a href=
"#a85e9e715d308dc5d98b980c9c57d02bf">More...
</a><br /></td></tr>
169 <tr class=
"separator:a85e9e715d308dc5d98b980c9c57d02bf"><td class=
"memSeparator" colspan=
"2"> </td></tr>
170 </table><table class=
"memberdecls">
171 <tr class=
"heading"><td colspan=
"2"><h2 class=
"groupheader"><a name=
"func-members"></a>
172 Functions
</h2></td></tr>
173 <tr class=
"memitem:ad20f10c53e3f33756638da98819367f0"><td class=
"memItemLeft" align=
"right" valign=
"top"><a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a> *
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#ad20f10c53e3f33756638da98819367f0">php_resource_factory_init
</a> (
<a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a> *f,
<a class=
"el" href=
"php__raphf_8h.html#a29e0d7a66e441a5265ddf2f0adbbb3af">php_resource_factory_ops_t
</a> *fops, void *data, void(*dtor)(void *data))
</td></tr>
174 <tr class=
"memdesc:ad20f10c53e3f33756638da98819367f0"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Initialize a resource factory.
<a href=
"#ad20f10c53e3f33756638da98819367f0">More...
</a><br /></td></tr>
175 <tr class=
"separator:ad20f10c53e3f33756638da98819367f0"><td class=
"memSeparator" colspan=
"2"> </td></tr>
176 <tr class=
"memitem:ae8be369197905047ffbd05c0ca80f245"><td class=
"memItemLeft" align=
"right" valign=
"top">unsigned
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#ae8be369197905047ffbd05c0ca80f245">php_resource_factory_addref
</a> (
<a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a> *rf)
</td></tr>
177 <tr class=
"memdesc:ae8be369197905047ffbd05c0ca80f245"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Increase the refcount of the resource factory.
<a href=
"#ae8be369197905047ffbd05c0ca80f245">More...
</a><br /></td></tr>
178 <tr class=
"separator:ae8be369197905047ffbd05c0ca80f245"><td class=
"memSeparator" colspan=
"2"> </td></tr>
179 <tr class=
"memitem:a016b8a4159e698f915ab967711696847"><td class=
"memItemLeft" align=
"right" valign=
"top">void
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#a016b8a4159e698f915ab967711696847">php_resource_factory_dtor
</a> (
<a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a> *f)
</td></tr>
180 <tr class=
"memdesc:a016b8a4159e698f915ab967711696847"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Destroy the resource factory.
<a href=
"#a016b8a4159e698f915ab967711696847">More...
</a><br /></td></tr>
181 <tr class=
"separator:a016b8a4159e698f915ab967711696847"><td class=
"memSeparator" colspan=
"2"> </td></tr>
182 <tr class=
"memitem:a7f012d685f5f7c08f50288b61232e689"><td class=
"memItemLeft" align=
"right" valign=
"top">void
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#a7f012d685f5f7c08f50288b61232e689">php_resource_factory_free
</a> (
<a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a> **f)
</td></tr>
183 <tr class=
"memdesc:a7f012d685f5f7c08f50288b61232e689"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Destroy and free the resource factory.
<a href=
"#a7f012d685f5f7c08f50288b61232e689">More...
</a><br /></td></tr>
184 <tr class=
"separator:a7f012d685f5f7c08f50288b61232e689"><td class=
"memSeparator" colspan=
"2"> </td></tr>
185 <tr class=
"memitem:a98d02dc80dd83095b8f901954350840c"><td class=
"memItemLeft" align=
"right" valign=
"top">void *
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#a98d02dc80dd83095b8f901954350840c">php_resource_factory_handle_ctor
</a> (
<a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a> *f, void *init_arg)
</td></tr>
186 <tr class=
"memdesc:a98d02dc80dd83095b8f901954350840c"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Construct a resource by the resource factory
<em>f
</em>.
<a href=
"#a98d02dc80dd83095b8f901954350840c">More...
</a><br /></td></tr>
187 <tr class=
"separator:a98d02dc80dd83095b8f901954350840c"><td class=
"memSeparator" colspan=
"2"> </td></tr>
188 <tr class=
"memitem:a08db5f3698f2d0bf3d2f20dcf4e7b2b4"><td class=
"memItemLeft" align=
"right" valign=
"top">void *
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#a08db5f3698f2d0bf3d2f20dcf4e7b2b4">php_resource_factory_handle_copy
</a> (
<a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a> *f, void *handle)
</td></tr>
189 <tr class=
"memdesc:a08db5f3698f2d0bf3d2f20dcf4e7b2b4"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Create a copy of the resource
<em>handle
</em>.
<a href=
"#a08db5f3698f2d0bf3d2f20dcf4e7b2b4">More...
</a><br /></td></tr>
190 <tr class=
"separator:a08db5f3698f2d0bf3d2f20dcf4e7b2b4"><td class=
"memSeparator" colspan=
"2"> </td></tr>
191 <tr class=
"memitem:a97dbb9d342f33205b92374c586676bc6"><td class=
"memItemLeft" align=
"right" valign=
"top">void
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#a97dbb9d342f33205b92374c586676bc6">php_resource_factory_handle_dtor
</a> (
<a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a> *f, void *handle)
</td></tr>
192 <tr class=
"memdesc:a97dbb9d342f33205b92374c586676bc6"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Destroy (and free) the resource.
<a href=
"#a97dbb9d342f33205b92374c586676bc6">More...
</a><br /></td></tr>
193 <tr class=
"separator:a97dbb9d342f33205b92374c586676bc6"><td class=
"memSeparator" colspan=
"2"> </td></tr>
194 <tr class=
"memitem:a3cbbe29c8a4ed9858c921c8ee539de59"><td class=
"memItemLeft" align=
"right" valign=
"top">int
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#a3cbbe29c8a4ed9858c921c8ee539de59">php_persistent_handle_provide
</a> (const char *name_str, size_t name_len,
<a class=
"el" href=
"php__raphf_8h.html#a29e0d7a66e441a5265ddf2f0adbbb3af">php_resource_factory_ops_t
</a> *fops, void *data, void(*dtor)(void *))
</td></tr>
195 <tr class=
"memdesc:a3cbbe29c8a4ed9858c921c8ee539de59"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Register a persistent handle provider in MINIT.
<a href=
"#a3cbbe29c8a4ed9858c921c8ee539de59">More...
</a><br /></td></tr>
196 <tr class=
"separator:a3cbbe29c8a4ed9858c921c8ee539de59"><td class=
"memSeparator" colspan=
"2"> </td></tr>
197 <tr class=
"memitem:a0a266874dafb69cf2b040378d4033901"><td class=
"memItemLeft" align=
"right" valign=
"top"><a class=
"el" href=
"php__raphf_8h.html#a833eaa62ffcc217e5749c26c18885b17">php_persistent_handle_factory_t
</a> *
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#a0a266874dafb69cf2b040378d4033901">php_persistent_handle_concede
</a> (
<a class=
"el" href=
"php__raphf_8h.html#a833eaa62ffcc217e5749c26c18885b17">php_persistent_handle_factory_t
</a> *a, const char *name_str, size_t name_len, const char *ident_str, size_t ident_len,
<a class=
"el" href=
"php__raphf_8h.html#a59f5566ecc4c76e048ad53469eb20142">php_persistent_handle_wakeup_t
</a> wakeup,
<a class=
"el" href=
"php__raphf_8h.html#a85e9e715d308dc5d98b980c9c57d02bf">php_persistent_handle_retire_t
</a> retire)
</td></tr>
198 <tr class=
"memdesc:a0a266874dafb69cf2b040378d4033901"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Retrieve a persistent handle factory at runtime.
<a href=
"#a0a266874dafb69cf2b040378d4033901">More...
</a><br /></td></tr>
199 <tr class=
"separator:a0a266874dafb69cf2b040378d4033901"><td class=
"memSeparator" colspan=
"2"> </td></tr>
200 <tr class=
"memitem:ab12ec2da7189e16fbed40a3b73bc9ee2"><td class=
"memItemLeft" align=
"right" valign=
"top">void
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#ab12ec2da7189e16fbed40a3b73bc9ee2">php_persistent_handle_abandon
</a> (
<a class=
"el" href=
"php__raphf_8h.html#a833eaa62ffcc217e5749c26c18885b17">php_persistent_handle_factory_t
</a> *a)
</td></tr>
201 <tr class=
"memdesc:ab12ec2da7189e16fbed40a3b73bc9ee2"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Abandon the persistent handle factory.
<a href=
"#ab12ec2da7189e16fbed40a3b73bc9ee2">More...
</a><br /></td></tr>
202 <tr class=
"separator:ab12ec2da7189e16fbed40a3b73bc9ee2"><td class=
"memSeparator" colspan=
"2"> </td></tr>
203 <tr class=
"memitem:af6636e870497be0699d2781e5fc8a2a9"><td class=
"memItemLeft" align=
"right" valign=
"top">void *
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#af6636e870497be0699d2781e5fc8a2a9">php_persistent_handle_acquire
</a> (
<a class=
"el" href=
"php__raphf_8h.html#a833eaa62ffcc217e5749c26c18885b17">php_persistent_handle_factory_t
</a> *a, void *init_arg)
</td></tr>
204 <tr class=
"memdesc:af6636e870497be0699d2781e5fc8a2a9"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Acquire a persistent handle.
<a href=
"#af6636e870497be0699d2781e5fc8a2a9">More...
</a><br /></td></tr>
205 <tr class=
"separator:af6636e870497be0699d2781e5fc8a2a9"><td class=
"memSeparator" colspan=
"2"> </td></tr>
206 <tr class=
"memitem:af08ee05c51d52200755d24f6f52df144"><td class=
"memItemLeft" align=
"right" valign=
"top">void
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#af08ee05c51d52200755d24f6f52df144">php_persistent_handle_release
</a> (
<a class=
"el" href=
"php__raphf_8h.html#a833eaa62ffcc217e5749c26c18885b17">php_persistent_handle_factory_t
</a> *a, void *handle)
</td></tr>
207 <tr class=
"memdesc:af08ee05c51d52200755d24f6f52df144"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Release a persistent handle.
<a href=
"#af08ee05c51d52200755d24f6f52df144">More...
</a><br /></td></tr>
208 <tr class=
"separator:af08ee05c51d52200755d24f6f52df144"><td class=
"memSeparator" colspan=
"2"> </td></tr>
209 <tr class=
"memitem:ae8124f3f73e96e2193ae03c5519d2763"><td class=
"memItemLeft" align=
"right" valign=
"top">void *
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#ae8124f3f73e96e2193ae03c5519d2763">php_persistent_handle_accrete
</a> (
<a class=
"el" href=
"php__raphf_8h.html#a833eaa62ffcc217e5749c26c18885b17">php_persistent_handle_factory_t
</a> *a, void *handle)
</td></tr>
210 <tr class=
"memdesc:ae8124f3f73e96e2193ae03c5519d2763"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Copy a persistent handle.
<a href=
"#ae8124f3f73e96e2193ae03c5519d2763">More...
</a><br /></td></tr>
211 <tr class=
"separator:ae8124f3f73e96e2193ae03c5519d2763"><td class=
"memSeparator" colspan=
"2"> </td></tr>
212 <tr class=
"memitem:a93458ab12d810f0fd545fb1464ba9eca"><td class=
"memItemLeft" align=
"right" valign=
"top"><a class=
"el" href=
"php__raphf_8h.html#a29e0d7a66e441a5265ddf2f0adbbb3af">php_resource_factory_ops_t
</a> *
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#a93458ab12d810f0fd545fb1464ba9eca">php_persistent_handle_get_resource_factory_ops
</a> (void)
</td></tr>
213 <tr class=
"memdesc:a93458ab12d810f0fd545fb1464ba9eca"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Retrieve persistent handle resource factory ops.
<a href=
"#a93458ab12d810f0fd545fb1464ba9eca">More...
</a><br /></td></tr>
214 <tr class=
"separator:a93458ab12d810f0fd545fb1464ba9eca"><td class=
"memSeparator" colspan=
"2"> </td></tr>
215 <tr class=
"memitem:ab754f4d59dab5de0edf702a9ab2f4e03"><td class=
"memItemLeft" align=
"right" valign=
"top"><a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a> *
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#ab754f4d59dab5de0edf702a9ab2f4e03">php_persistent_handle_resource_factory_init
</a> (
<a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a> *a,
<a class=
"el" href=
"php__raphf_8h.html#a833eaa62ffcc217e5749c26c18885b17">php_persistent_handle_factory_t
</a> *pf)
</td></tr>
216 <tr class=
"memdesc:ab754f4d59dab5de0edf702a9ab2f4e03"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Create a resource factory for persistent handles.
<a href=
"#ab754f4d59dab5de0edf702a9ab2f4e03">More...
</a><br /></td></tr>
217 <tr class=
"separator:ab754f4d59dab5de0edf702a9ab2f4e03"><td class=
"memSeparator" colspan=
"2"> </td></tr>
218 <tr class=
"memitem:a617d2cc656ab6427388b938597194ebb"><td class=
"memItemLeft" align=
"right" valign=
"top">zend_bool
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#a617d2cc656ab6427388b938597194ebb">php_resource_factory_is_persistent
</a> (
<a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a> *a)
</td></tr>
219 <tr class=
"memdesc:a617d2cc656ab6427388b938597194ebb"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Check whether a resource factory is a persistent handle resource factory.
<a href=
"#a617d2cc656ab6427388b938597194ebb">More...
</a><br /></td></tr>
220 <tr class=
"separator:a617d2cc656ab6427388b938597194ebb"><td class=
"memSeparator" colspan=
"2"> </td></tr>
221 <tr class=
"memitem:a0d661d1f880270146012eb8781e5343e"><td class=
"memItemLeft" align=
"right" valign=
"top">void
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#a0d661d1f880270146012eb8781e5343e">php_persistent_handle_cleanup
</a> (const char *name_str, size_t name_len, const char *ident_str, size_t ident_len)
</td></tr>
222 <tr class=
"memdesc:a0d661d1f880270146012eb8781e5343e"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Clean persistent handles up.
<a href=
"#a0d661d1f880270146012eb8781e5343e">More...
</a><br /></td></tr>
223 <tr class=
"separator:a0d661d1f880270146012eb8781e5343e"><td class=
"memSeparator" colspan=
"2"> </td></tr>
224 <tr class=
"memitem:ae174fbe124d4cb6010e218a68379bd18"><td class=
"memItemLeft" align=
"right" valign=
"top">HashTable *
 </td><td class=
"memItemRight" valign=
"bottom"><a class=
"el" href=
"php__raphf_8h.html#ae174fbe124d4cb6010e218a68379bd18">php_persistent_handle_statall
</a> (HashTable *ht)
</td></tr>
225 <tr class=
"memdesc:ae174fbe124d4cb6010e218a68379bd18"><td class=
"mdescLeft"> </td><td class=
"mdescRight">Retrieve statistics about the current process/thread's persistent handles.
<a href=
"#ae174fbe124d4cb6010e218a68379bd18">More...
</a><br /></td></tr>
226 <tr class=
"separator:ae174fbe124d4cb6010e218a68379bd18"><td class=
"memSeparator" colspan=
"2"> </td></tr>
228 <hr/><h2 class=
"groupheader">Data Structure Documentation
</h2>
229 <a name=
"structphp__resource__factory__ops" id=
"structphp__resource__factory__ops"></a>
230 <div class=
"memitem">
231 <div class=
"memproto">
232 <table class=
"memname">
234 <td class=
"memname">struct php_resource_factory_ops
</td>
237 </div><div class=
"memdoc">
238 <div class=
"textblock"><p>The resource ops consisting of a ctor, a copy ctor and a dtor.
</p>
239 <p>Define this ops and register them with
<a class=
"el" href=
"php__raphf_8h.html#a3cbbe29c8a4ed9858c921c8ee539de59" title=
"Register a persistent handle provider in MINIT. ">php_persistent_handle_provide()
</a> in MINIT.
</p>
240 </div><table class=
"fieldtable">
241 <tr><th colspan=
"3">Data Fields
</th></tr>
242 <tr><td class=
"fieldtype">
243 <a class=
"anchor" id=
"a8094f85df976aff73148bc579ae72e38"></a><a class=
"el" href=
"php__raphf_8h.html#a23b073aa7b8b7dd182b336b07494288f">php_resource_factory_handle_copy_t
</a></td>
244 <td class=
"fieldname">
246 <td class=
"fielddoc">
247 The resource's copy constructor.
</td></tr>
248 <tr><td class=
"fieldtype">
249 <a class=
"anchor" id=
"a044b07071758dbc53f87bfd212400ac0"></a><a class=
"el" href=
"php__raphf_8h.html#abadff49d810f7ce220bd3537bdaecef7">php_resource_factory_handle_ctor_t
</a></td>
250 <td class=
"fieldname">
252 <td class=
"fielddoc">
253 The resource constructor.
</td></tr>
254 <tr><td class=
"fieldtype">
255 <a class=
"anchor" id=
"acb8a7a04b86f08db41a2d6232676c65c"></a><a class=
"el" href=
"php__raphf_8h.html#a1b826c765392c93336db79bd6697e33d">php_resource_factory_handle_dtor_t
</a></td>
256 <td class=
"fieldname">
258 <td class=
"fielddoc">
259 The resource's destructor.
</td></tr>
264 <a name=
"structphp__persistent__handle__list" id=
"structphp__persistent__handle__list"></a>
265 <div class=
"memitem">
266 <div class=
"memproto">
267 <table class=
"memname">
269 <td class=
"memname">struct php_persistent_handle_list
</td>
272 </div><div class=
"memdoc">
273 <div class=
"textblock"><p>Persistent handles storage.
</p>
274 </div><table class=
"fieldtable">
275 <tr><th colspan=
"3">Data Fields
</th></tr>
276 <tr><td class=
"fieldtype">
277 <a class=
"anchor" id=
"a653a4a0e9c39ad942e9573e197f62974"></a>HashTable
</td>
278 <td class=
"fieldname">
280 <td class=
"fielddoc">
281 Storage of free resources.
</td></tr>
282 <tr><td class=
"fieldtype">
283 <a class=
"anchor" id=
"a119a44fd9f5ae066b6d77e7a35a25cd0"></a>ulong
</td>
284 <td class=
"fieldname">
286 <td class=
"fielddoc">
287 Count of acquired resources.
</td></tr>
292 <a name=
"structphp__persistent__handle__provider" id=
"structphp__persistent__handle__provider"></a>
293 <div class=
"memitem">
294 <div class=
"memproto">
295 <table class=
"memname">
297 <td class=
"memname">struct php_persistent_handle_provider
</td>
300 </div><div class=
"memdoc">
301 <div class=
"textblock"><p>Definition of a persistent handle provider.
</p>
302 <p>Holds a resource factory an a persistent handle list.
</p>
303 </div><div class=
"dynheader">
304 Collaboration diagram for php_persistent_handle_provider:
</div>
305 <div class=
"dyncontent">
306 <div class=
"center"><img src=
"structphp__persistent__handle__provider__coll__graph.png" border=
"0" usemap=
"#php__persistent__handle__provider_coll__map" alt=
"Collaboration graph"/></div>
307 <map name=
"php__persistent__handle__provider_coll__map" id=
"php__persistent__handle__provider_coll__map">
308 <area shape=
"rect" id=
"node2" href=
"php__raphf_8h.html#structphp__persistent__handle__list" title=
"Persistent handles storage. " alt=
"" coords=
"5,95,197,121"/><area shape=
"rect" id=
"node3" href=
"structphp__resource__factory.html" title=
"The resource factory. " alt=
"" coords=
"221,95,381,121"/><area shape=
"rect" id=
"node4" href=
"php__raphf_8h.html#structphp__resource__factory__ops" title=
"The resource ops consisting of a ctor, a copy ctor and a dtor. " alt=
"" coords=
"206,5,397,32"/></map>
309 <center><span class=
"legend">[
<a target=
"top" href=
"graph_legend.html">legend
</a>]
</span></center></div>
310 <table class=
"fieldtable">
311 <tr><th colspan=
"3">Data Fields
</th></tr>
312 <tr><td class=
"fieldtype">
313 <a class=
"anchor" id=
"a4935f6446b1d4a2feb7a22dfc4e5d6d0"></a><a class=
"el" href=
"php__raphf_8h.html#a07f599598d2b87b188f39871d026c177">php_persistent_handle_list_t
</a></td>
314 <td class=
"fieldname">
316 <td class=
"fielddoc">
317 The list of free handles.
<p>Hash of
"ident" =
> array(handles) entries. Persistent handles are acquired out of this list.
</p>
319 <tr><td class=
"fieldtype">
320 <a class=
"anchor" id=
"a8204714f100b74b028652951ca40abd3"></a><a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a></td>
321 <td class=
"fieldname">
323 <td class=
"fielddoc">
324 The resource factory.
<p>New handles are created by this factory.
</p>
330 <a name=
"structphp__persistent__handle__factory" id=
"structphp__persistent__handle__factory"></a>
331 <div class=
"memitem">
332 <div class=
"memproto">
333 <table class=
"memname">
335 <td class=
"memname">struct php_persistent_handle_factory
</td>
338 </div><div class=
"memdoc">
339 <div class=
"textblock"><p>Definition of a persistent handle factory.
</p>
340 <p><a class=
"el" href=
"php__raphf_8h.html#a0a266874dafb69cf2b040378d4033901" title=
"Retrieve a persistent handle factory at runtime. ">php_persistent_handle_concede()
</a> will return a pointer to a
<a class=
"el" href=
"php__raphf_8h.html#structphp__persistent__handle__factory" title=
"Definition of a persistent handle factory. ">php_persistent_handle_factory
</a> if a provider for the
<em>name_str
</em> has been registered with
<a class=
"el" href=
"php__raphf_8h.html#a3cbbe29c8a4ed9858c921c8ee539de59" title=
"Register a persistent handle provider in MINIT. ">php_persistent_handle_provide()
</a>.
</p>
341 </div><div class=
"dynheader">
342 Collaboration diagram for php_persistent_handle_factory:
</div>
343 <div class=
"dyncontent">
344 <div class=
"center"><img src=
"structphp__persistent__handle__factory__coll__graph.png" border=
"0" usemap=
"#php__persistent__handle__factory_coll__map" alt=
"Collaboration graph"/></div>
345 <map name=
"php__persistent__handle__factory_coll__map" id=
"php__persistent__handle__factory_coll__map">
346 <area shape=
"rect" id=
"node2" href=
"php__raphf_8h.html#structphp__persistent__handle__provider" title=
"Definition of a persistent handle provider. " alt=
"" coords=
"81,184,247,225"/><area shape=
"rect" id=
"node3" href=
"php__raphf_8h.html#structphp__persistent__handle__list" title=
"Persistent handles storage. " alt=
"" coords=
"5,95,197,121"/><area shape=
"rect" id=
"node4" href=
"structphp__resource__factory.html" title=
"The resource factory. " alt=
"" coords=
"221,95,381,121"/><area shape=
"rect" id=
"node5" href=
"php__raphf_8h.html#structphp__resource__factory__ops" title=
"The resource ops consisting of a ctor, a copy ctor and a dtor. " alt=
"" coords=
"206,5,397,32"/></map>
347 <center><span class=
"legend">[
<a target=
"top" href=
"graph_legend.html">legend
</a>]
</span></center></div>
348 <table class=
"fieldtable">
349 <tr><th colspan=
"3">Data Fields
</th></tr>
350 <tr><td class=
"fieldtype">
351 <a class=
"anchor" id=
"a84ffa94401b9869e14c190be4bb1b6be"></a>unsigned
</td>
352 <td class=
"fieldname">
353 free_on_abandon:
1</td>
354 <td class=
"fielddoc">
355 Whether it has to be free'd on
<a class=
"el" href=
"php__raphf_8h.html#ab12ec2da7189e16fbed40a3b73bc9ee2" title=
"Abandon the persistent handle factory. ">php_persistent_handle_abandon()
</a> </td></tr>
356 <tr><td class=
"fieldtype">
357 <a class=
"anchor" id=
"ae874c03caffa8eaa265dd52ebf593c02"></a>struct
<a class=
"el" href=
"php__raphf_8h.html#structphp__persistent__handle__factory_8ident">php_persistent_handle_factory
</a></td>
358 <td class=
"fieldname">
360 <td class=
"fielddoc">
361 The ident for which this factory manages resources.
</td></tr>
362 <tr><td class=
"fieldtype">
363 <a class=
"anchor" id=
"a43aabcbe7ec4b5ff463f74cfcf788f51"></a><a class=
"el" href=
"php__raphf_8h.html#a31f0595f4f726f762790cef844568fc4">php_persistent_handle_provider_t
</a> *
</td>
364 <td class=
"fieldname">
366 <td class=
"fielddoc">
367 The persistent handle provider.
</td></tr>
368 <tr><td class=
"fieldtype">
369 <a class=
"anchor" id=
"a9299f3f0821061ad93d15c10cf735b6b"></a><a class=
"el" href=
"php__raphf_8h.html#a85e9e715d308dc5d98b980c9c57d02bf">php_persistent_handle_retire_t
</a></td>
370 <td class=
"fieldname">
372 <td class=
"fielddoc">
373 The persistent handle retire routine; may be NULL.
</td></tr>
374 <tr><td class=
"fieldtype">
375 <a class=
"anchor" id=
"a6633b7c860e4538942e0367d64ed5af7"></a><a class=
"el" href=
"php__raphf_8h.html#a59f5566ecc4c76e048ad53469eb20142">php_persistent_handle_wakeup_t
</a></td>
376 <td class=
"fieldname">
378 <td class=
"fielddoc">
379 The persistent handle wakeup routine; may be NULL.
</td></tr>
384 <a name=
"structphp__persistent__handle__factory_8ident" id=
"structphp__persistent__handle__factory_8ident"></a>
385 <div class=
"memitem">
386 <div class=
"memproto">
387 <table class=
"memname">
389 <td class=
"memname">struct php_persistent_handle_factory.ident
</td>
392 </div><div class=
"memdoc">
393 <div class=
"textblock"><p>The ident for which this factory manages resources.
</p>
394 </div><table class=
"fieldtable">
395 <tr><th colspan=
"3">Data Fields
</th></tr>
396 <tr><td class=
"fieldtype">
397 <a class=
"anchor" id=
"af5a8e923f8cd24b56b3bab32358cc58a"></a>size_t
</td>
398 <td class=
"fieldname">
400 <td class=
"fielddoc">
401 ident length
</td></tr>
402 <tr><td class=
"fieldtype">
403 <a class=
"anchor" id=
"a341be97d9aff90c9978347f66f945b77"></a>char *
</td>
404 <td class=
"fieldname">
406 <td class=
"fielddoc">
407 ident string
</td></tr>
412 <h2 class=
"groupheader">Typedef Documentation
</h2>
413 <a class=
"anchor" id=
"a833eaa62ffcc217e5749c26c18885b17"></a>
414 <div class=
"memitem">
415 <div class=
"memproto">
416 <table class=
"memname">
418 <td class=
"memname">typedef struct
<a class=
"el" href=
"php__raphf_8h.html#structphp__persistent__handle__factory">php_persistent_handle_factory
</a> <a class=
"el" href=
"php__raphf_8h.html#a833eaa62ffcc217e5749c26c18885b17">php_persistent_handle_factory_t
</a></td>
421 </div><div class=
"memdoc">
425 <a class=
"anchor" id=
"a07f599598d2b87b188f39871d026c177"></a>
426 <div class=
"memitem">
427 <div class=
"memproto">
428 <table class=
"memname">
430 <td class=
"memname">typedef struct
<a class=
"el" href=
"php__raphf_8h.html#structphp__persistent__handle__list">php_persistent_handle_list
</a> <a class=
"el" href=
"php__raphf_8h.html#a07f599598d2b87b188f39871d026c177">php_persistent_handle_list_t
</a></td>
433 </div><div class=
"memdoc">
435 <p>Persistent handles storage.
</p>
439 <a class=
"anchor" id=
"a31f0595f4f726f762790cef844568fc4"></a>
440 <div class=
"memitem">
441 <div class=
"memproto">
442 <table class=
"memname">
444 <td class=
"memname">typedef struct
<a class=
"el" href=
"php__raphf_8h.html#structphp__persistent__handle__provider">php_persistent_handle_provider
</a> <a class=
"el" href=
"php__raphf_8h.html#a31f0595f4f726f762790cef844568fc4">php_persistent_handle_provider_t
</a></td>
447 </div><div class=
"memdoc">
449 <p>Definition of a persistent handle provider.
</p>
450 <p>Holds a resource factory an a persistent handle list.
</p>
454 <a class=
"anchor" id=
"a85e9e715d308dc5d98b980c9c57d02bf"></a>
455 <div class=
"memitem">
456 <div class=
"memproto">
457 <table class=
"memname">
459 <td class=
"memname">typedef void(* php_persistent_handle_retire_t) (
<a class=
"el" href=
"php__raphf_8h.html#a833eaa62ffcc217e5749c26c18885b17">php_persistent_handle_factory_t
</a> *f, void **handle)
</td>
462 </div><div class=
"memdoc">
464 <p>Retire the persistent handle on release.
</p>
468 <a class=
"anchor" id=
"a59f5566ecc4c76e048ad53469eb20142"></a>
469 <div class=
"memitem">
470 <div class=
"memproto">
471 <table class=
"memname">
473 <td class=
"memname">typedef void(* php_persistent_handle_wakeup_t) (
<a class=
"el" href=
"php__raphf_8h.html#a833eaa62ffcc217e5749c26c18885b17">php_persistent_handle_factory_t
</a> *f, void **handle)
</td>
476 </div><div class=
"memdoc">
478 <p>Wakeup the persistent handle on re-acquisition.
</p>
482 <a class=
"anchor" id=
"a23b073aa7b8b7dd182b336b07494288f"></a>
483 <div class=
"memitem">
484 <div class=
"memproto">
485 <table class=
"memname">
487 <td class=
"memname">typedef void*(* php_resource_factory_handle_copy_t) (void *opaque, void *handle)
</td>
490 </div><div class=
"memdoc">
492 <p>The copy constructor of a resource.
</p>
493 <dl class=
"params"><dt>Parameters
</dt><dd>
494 <table class=
"params">
495 <tr><td class=
"paramname">opaque
</td><td>the factory's data
</td></tr>
496 <tr><td class=
"paramname">handle
</td><td>the (persistent) handle to copy
</td></tr>
503 <a class=
"anchor" id=
"abadff49d810f7ce220bd3537bdaecef7"></a>
504 <div class=
"memitem">
505 <div class=
"memproto">
506 <table class=
"memname">
508 <td class=
"memname">typedef void*(* php_resource_factory_handle_ctor_t) (void *opaque, void *init_arg)
</td>
511 </div><div class=
"memdoc">
513 <p>A resource constructor.
</p>
514 <dl class=
"params"><dt>Parameters
</dt><dd>
515 <table class=
"params">
516 <tr><td class=
"paramname">opaque
</td><td>is the
<em>data
</em> from
<a class=
"el" href=
"php__raphf_8h.html#a3cbbe29c8a4ed9858c921c8ee539de59" title=
"Register a persistent handle provider in MINIT. ">php_persistent_handle_provide()
</a> </td></tr>
517 <tr><td class=
"paramname">init_arg
</td><td>is the
<em>init_arg
</em> from
<a class=
"el" href=
"php__raphf_8h.html#ad20f10c53e3f33756638da98819367f0" title=
"Initialize a resource factory. ">php_resource_factory_init()
</a> </td></tr>
521 <dl class=
"section return"><dt>Returns
</dt><dd>the created (persistent) handle
</dd></dl>
525 <a class=
"anchor" id=
"a1b826c765392c93336db79bd6697e33d"></a>
526 <div class=
"memitem">
527 <div class=
"memproto">
528 <table class=
"memname">
530 <td class=
"memname">typedef void(* php_resource_factory_handle_dtor_t) (void *opaque, void *handle)
</td>
533 </div><div class=
"memdoc">
535 <p>The destructor of a resource.
</p>
536 <dl class=
"params"><dt>Parameters
</dt><dd>
537 <table class=
"params">
538 <tr><td class=
"paramname">opaque
</td><td>the factory's data
</td></tr>
539 <tr><td class=
"paramname">handle
</td><td>the handle to destroy
</td></tr>
546 <a class=
"anchor" id=
"a29e0d7a66e441a5265ddf2f0adbbb3af"></a>
547 <div class=
"memitem">
548 <div class=
"memproto">
549 <table class=
"memname">
551 <td class=
"memname">typedef struct
<a class=
"el" href=
"php__raphf_8h.html#structphp__resource__factory__ops">php_resource_factory_ops
</a> <a class=
"el" href=
"php__raphf_8h.html#a29e0d7a66e441a5265ddf2f0adbbb3af">php_resource_factory_ops_t
</a></td>
554 </div><div class=
"memdoc">
556 <p>The resource ops consisting of a ctor, a copy ctor and a dtor.
</p>
557 <p>Define this ops and register them with
<a class=
"el" href=
"php__raphf_8h.html#a3cbbe29c8a4ed9858c921c8ee539de59" title=
"Register a persistent handle provider in MINIT. ">php_persistent_handle_provide()
</a> in MINIT.
</p>
561 <a class=
"anchor" id=
"a4817c4b3d4077c48dff36376487ba8d4"></a>
562 <div class=
"memitem">
563 <div class=
"memproto">
564 <table class=
"memname">
566 <td class=
"memname">typedef struct
<a class=
"el" href=
"structphp__resource__factory.html">php_resource_factory
</a> <a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a></td>
569 </div><div class=
"memdoc">
571 <p>The resource factory.
</p>
575 <h2 class=
"groupheader">Function Documentation
</h2>
576 <a class=
"anchor" id=
"ab12ec2da7189e16fbed40a3b73bc9ee2"></a>
577 <div class=
"memitem">
578 <div class=
"memproto">
579 <table class=
"memname">
581 <td class=
"memname">void php_persistent_handle_abandon
</td>
583 <td class=
"paramtype"><a class=
"el" href=
"php__raphf_8h.html#a833eaa62ffcc217e5749c26c18885b17">php_persistent_handle_factory_t
</a> *
 </td>
584 <td class=
"paramname"><em>a
</em></td><td>)
</td>
588 </div><div class=
"memdoc">
590 <p>Abandon the persistent handle factory.
</p>
591 <p>Destroy a
<a class=
"el" href=
"php__raphf_8h.html#structphp__persistent__handle__factory" title=
"Definition of a persistent handle factory. ">php_persistent_handle_factory
</a> created by
<a class=
"el" href=
"php__raphf_8h.html#a0a266874dafb69cf2b040378d4033901" title=
"Retrieve a persistent handle factory at runtime. ">php_persistent_handle_concede()
</a>. If the memory for the factory was allocated, it will automatically be free'd.
</p>
592 <dl class=
"params"><dt>Parameters
</dt><dd>
593 <table class=
"params">
594 <tr><td class=
"paramname">a
</td><td>the persistent handle factory to destroy
</td></tr>
601 <a class=
"anchor" id=
"ae8124f3f73e96e2193ae03c5519d2763"></a>
602 <div class=
"memitem">
603 <div class=
"memproto">
604 <table class=
"memname">
606 <td class=
"memname">void* php_persistent_handle_accrete
</td>
608 <td class=
"paramtype"><a class=
"el" href=
"php__raphf_8h.html#a833eaa62ffcc217e5749c26c18885b17">php_persistent_handle_factory_t
</a> *
 </td>
609 <td class=
"paramname"><em>a
</em>,
</td>
612 <td class=
"paramkey"></td>
614 <td class=
"paramtype">void *
 </td>
615 <td class=
"paramname"><em>handle
</em> </td>
623 </div><div class=
"memdoc">
625 <p>Copy a persistent handle.
</p>
626 <p>Let the underlying resource factory copy the
<em>handle
</em>.
</p>
627 <dl class=
"params"><dt>Parameters
</dt><dd>
628 <table class=
"params">
629 <tr><td class=
"paramname">a
</td><td>the persistent handle factory
</td></tr>
630 <tr><td class=
"paramname">handle
</td><td>the resource to accrete
</td></tr>
637 <a class=
"anchor" id=
"af6636e870497be0699d2781e5fc8a2a9"></a>
638 <div class=
"memitem">
639 <div class=
"memproto">
640 <table class=
"memname">
642 <td class=
"memname">void* php_persistent_handle_acquire
</td>
644 <td class=
"paramtype"><a class=
"el" href=
"php__raphf_8h.html#a833eaa62ffcc217e5749c26c18885b17">php_persistent_handle_factory_t
</a> *
 </td>
645 <td class=
"paramname"><em>a
</em>,
</td>
648 <td class=
"paramkey"></td>
650 <td class=
"paramtype">void *
 </td>
651 <td class=
"paramname"><em>init_arg
</em> </td>
659 </div><div class=
"memdoc">
661 <p>Acquire a persistent handle.
</p>
662 <p>That is, either re-use a resource from the free list or create a new handle.
</p>
663 <p>If a handle is acquired from the free list, the
<a class=
"el" href=
"php__raphf_8h.html#a6633b7c860e4538942e0367d64ed5af7" title=
"The persistent handle wakeup routine; may be NULL. ">php_persistent_handle_factory::wakeup
</a> callback will be executed for that handle.
</p>
664 <dl class=
"params"><dt>Parameters
</dt><dd>
665 <table class=
"params">
666 <tr><td class=
"paramname">a
</td><td>the persistent handle factory
</td></tr>
667 <tr><td class=
"paramname">init_arg
</td><td>the
<em>init_arg
</em> for
<a class=
"el" href=
"php__raphf_8h.html#a98d02dc80dd83095b8f901954350840c" title=
"Construct a resource by the resource factory f. ">php_resource_factory_handle_ctor()
</a> </td></tr>
671 <dl class=
"section return"><dt>Returns
</dt><dd>the acquired resource
</dd></dl>
675 <a class=
"anchor" id=
"a0d661d1f880270146012eb8781e5343e"></a>
676 <div class=
"memitem">
677 <div class=
"memproto">
678 <table class=
"memname">
680 <td class=
"memname">void php_persistent_handle_cleanup
</td>
682 <td class=
"paramtype">const char *
 </td>
683 <td class=
"paramname"><em>name_str
</em>,
</td>
686 <td class=
"paramkey"></td>
688 <td class=
"paramtype">size_t
 </td>
689 <td class=
"paramname"><em>name_len
</em>,
</td>
692 <td class=
"paramkey"></td>
694 <td class=
"paramtype">const char *
 </td>
695 <td class=
"paramname"><em>ident_str
</em>,
</td>
698 <td class=
"paramkey"></td>
700 <td class=
"paramtype">size_t
 </td>
701 <td class=
"paramname"><em>ident_len
</em> </td>
709 </div><div class=
"memdoc">
711 <p>Clean persistent handles up.
</p>
712 <p>Destroy persistent handles of provider
<em>name_str
</em> and in subsidiary namespace
<em>ident_str
</em>.
</p>
713 <p>If
<em>name_str
</em> is NULL, all persistent handles of all providers with a matching
<em>ident_str
</em> will be cleaned up.
</p>
714 <p>If
<em>ident_str
</em> is NULL all persistent handles of the provider will be cleaned up.
</p>
715 <p>Ergo, if both,
<em>name_str
</em> and
<em>ident_str
</em> are NULL, then all persistent handles will be cleaned up.
</p>
716 <p>You must call this in MSHUTDOWN, if your resource factory ops hold a registered
<a class=
"el" href=
"structphp__resource__factory.html#a7d6c89f9c6035be8a5e166a6a86cd1c7" title=
"User data destructor. ">php_resource_factory::dtor
</a>, else the dtor will point to memory not any more available if the extension has already been unloaded.
</p>
717 <dl class=
"params"><dt>Parameters
</dt><dd>
718 <table class=
"params">
719 <tr><td class=
"paramname">name_str
</td><td>the provider name; may be NULL
</td></tr>
720 <tr><td class=
"paramname">name_len
</td><td>the provider name length
</td></tr>
721 <tr><td class=
"paramname">ident_str
</td><td>the subsidiary namespace name; may be NULL
</td></tr>
722 <tr><td class=
"paramname">ident_len
</td><td>the subsidiary namespace name length
</td></tr>
729 <a class=
"anchor" id=
"a0a266874dafb69cf2b040378d4033901"></a>
730 <div class=
"memitem">
731 <div class=
"memproto">
732 <table class=
"memname">
734 <td class=
"memname"><a class=
"el" href=
"php__raphf_8h.html#a833eaa62ffcc217e5749c26c18885b17">php_persistent_handle_factory_t
</a>* php_persistent_handle_concede
</td>
736 <td class=
"paramtype"><a class=
"el" href=
"php__raphf_8h.html#a833eaa62ffcc217e5749c26c18885b17">php_persistent_handle_factory_t
</a> *
 </td>
737 <td class=
"paramname"><em>a
</em>,
</td>
740 <td class=
"paramkey"></td>
742 <td class=
"paramtype">const char *
 </td>
743 <td class=
"paramname"><em>name_str
</em>,
</td>
746 <td class=
"paramkey"></td>
748 <td class=
"paramtype">size_t
 </td>
749 <td class=
"paramname"><em>name_len
</em>,
</td>
752 <td class=
"paramkey"></td>
754 <td class=
"paramtype">const char *
 </td>
755 <td class=
"paramname"><em>ident_str
</em>,
</td>
758 <td class=
"paramkey"></td>
760 <td class=
"paramtype">size_t
 </td>
761 <td class=
"paramname"><em>ident_len
</em>,
</td>
764 <td class=
"paramkey"></td>
766 <td class=
"paramtype"><a class=
"el" href=
"php__raphf_8h.html#a59f5566ecc4c76e048ad53469eb20142">php_persistent_handle_wakeup_t
</a> </td>
767 <td class=
"paramname"><em>wakeup
</em>,
</td>
770 <td class=
"paramkey"></td>
772 <td class=
"paramtype"><a class=
"el" href=
"php__raphf_8h.html#a85e9e715d308dc5d98b980c9c57d02bf">php_persistent_handle_retire_t
</a> </td>
773 <td class=
"paramname"><em>retire
</em> </td>
781 </div><div class=
"memdoc">
783 <p>Retrieve a persistent handle factory at runtime.
</p>
784 <p>If a persistent handle provider has been registered for
<em>name_str
</em>, a new
<a class=
"el" href=
"php__raphf_8h.html#structphp__persistent__handle__factory" title=
"Definition of a persistent handle factory. ">php_persistent_handle_factory
</a> creating resources in the
<em>ident_str
</em> namespace will be constructed.
</p>
785 <p>The wakeup routine
<em>wakeup
</em> and the retire routine
<em>retire
</em> will be assigned to the new
<a class=
"el" href=
"php__raphf_8h.html#structphp__persistent__handle__factory" title=
"Definition of a persistent handle factory. ">php_persistent_handle_factory
</a>.
</p>
786 <dl class=
"params"><dt>Parameters
</dt><dd>
787 <table class=
"params">
788 <tr><td class=
"paramname">a
</td><td>pointer to a factory; allocated on the heap if NULL
</td></tr>
789 <tr><td class=
"paramname">name_str
</td><td>the provider name, e.g.
"http\Client\Curl" </td></tr>
790 <tr><td class=
"paramname">name_len
</td><td>the provider name length, e.g. strlen(
"http\Client\Curl")
</td></tr>
791 <tr><td class=
"paramname">ident_str
</td><td>the subsidiary namespace, e.g.
"php.net:80" </td></tr>
792 <tr><td class=
"paramname">ident_len
</td><td>the subsidiary namespace lenght, e.g. strlen(
"php.net:80")
</td></tr>
793 <tr><td class=
"paramname">wakeup
</td><td>any persistent handle wakeup routine
</td></tr>
794 <tr><td class=
"paramname">retire
</td><td>any persistent handle retire routine
</td></tr>
798 <dl class=
"section return"><dt>Returns
</dt><dd><em>a
</em> or an allocated persistent handle factory
</dd></dl>
802 <a class=
"anchor" id=
"a93458ab12d810f0fd545fb1464ba9eca"></a>
803 <div class=
"memitem">
804 <div class=
"memproto">
805 <table class=
"memname">
807 <td class=
"memname"><a class=
"el" href=
"php__raphf_8h.html#a29e0d7a66e441a5265ddf2f0adbbb3af">php_resource_factory_ops_t
</a>* php_persistent_handle_get_resource_factory_ops
</td>
809 <td class=
"paramtype">void
 </td>
810 <td class=
"paramname"></td><td>)
</td>
814 </div><div class=
"memdoc">
816 <p>Retrieve persistent handle resource factory ops.
</p>
817 <p>These ops can be used to mask a persistent handle factory as resource factory itself, so you can transparently use the resource factory API, both for persistent and non-persistent ressources.
</p>
818 <p>Example:
</p><div class=
"fragment"><div class=
"line"><a class=
"code" href=
"structphp__resource__factory.html">php_resource_factory_t
</a> *create_my_rf(
<span class=
"keyword">const
</span> <span class=
"keywordtype">char
</span> *persistent_id_str,
</div>
819 <div class=
"line"> <span class=
"keywordtype">size_t
</span> persistent_id_len TSRMLS_DC)
</div>
820 <div class=
"line">{
</div>
821 <div class=
"line"> <a class=
"code" href=
"structphp__resource__factory.html">php_resource_factory_t
</a> *rf;
</div>
822 <div class=
"line"></div>
823 <div class=
"line"> <span class=
"keywordflow">if
</span> (persistent_id_str) {
</div>
824 <div class=
"line"> <a class=
"code" href=
"php__raphf_8h.html#structphp__persistent__handle__factory">php_persistent_handle_factory_t
</a> *pf;
</div>
825 <div class=
"line"> <a class=
"code" href=
"php__raphf_8h.html#structphp__resource__factory__ops">php_resource_factory_ops_t
</a> *ops;
</div>
826 <div class=
"line"></div>
827 <div class=
"line"> ops =
<a class=
"code" href=
"php__raphf_8h.html#a93458ab12d810f0fd545fb1464ba9eca">php_persistent_handle_get_resource_factory_ops
</a>();
</div>
828 <div class=
"line"></div>
829 <div class=
"line"> pf =
<a class=
"code" href=
"php__raphf_8h.html#a0a266874dafb69cf2b040378d4033901">php_persistent_handle_concede
</a>(NULL,
<span class=
"stringliteral">"my
"</span>,
2,
</div>
830 <div class=
"line"> persistent_id_str, persistent_id_len, NULL, NULL TSRMLS_CC);
</div>
831 <div class=
"line"></div>
832 <div class=
"line"> rf =
<a class=
"code" href=
"php__raphf_8h.html#ab754f4d59dab5de0edf702a9ab2f4e03">php_persistent_handle_resource_factory_init
</a>(NULL, pf);
</div>
833 <div class=
"line"> }
<span class=
"keywordflow">else
</span> {
</div>
834 <div class=
"line"> rf =
<a class=
"code" href=
"php__raphf_8h.html#ad20f10c53e3f33756638da98819367f0">php_resource_factory_init
</a>(NULL,
&myops, NULL, NULL);
</div>
835 <div class=
"line"> }
</div>
836 <div class=
"line"> <span class=
"keywordflow">return
</span> rf;
</div>
837 <div class=
"line">}
</div>
838 </div><!-- fragment -->
841 <a class=
"anchor" id=
"a3cbbe29c8a4ed9858c921c8ee539de59"></a>
842 <div class=
"memitem">
843 <div class=
"memproto">
844 <table class=
"memname">
846 <td class=
"memname">int php_persistent_handle_provide
</td>
848 <td class=
"paramtype">const char *
 </td>
849 <td class=
"paramname"><em>name_str
</em>,
</td>
852 <td class=
"paramkey"></td>
854 <td class=
"paramtype">size_t
 </td>
855 <td class=
"paramname"><em>name_len
</em>,
</td>
858 <td class=
"paramkey"></td>
860 <td class=
"paramtype"><a class=
"el" href=
"php__raphf_8h.html#a29e0d7a66e441a5265ddf2f0adbbb3af">php_resource_factory_ops_t
</a> *
 </td>
861 <td class=
"paramname"><em>fops
</em>,
</td>
864 <td class=
"paramkey"></td>
866 <td class=
"paramtype">void *
 </td>
867 <td class=
"paramname"><em>data
</em>,
</td>
870 <td class=
"paramkey"></td>
872 <td class=
"paramtype">void(*)(void *)
 </td>
873 <td class=
"paramname"><em>dtor
</em> </td>
881 </div><div class=
"memdoc">
883 <p>Register a persistent handle provider in MINIT.
</p>
884 <p>Registers a factory provider for
<em>name_str
</em> with
<em>fops
</em> resource factory ops. Call this in your MINIT.
</p>
885 <p>A
<a class=
"el" href=
"structphp__resource__factory.html" title=
"The resource factory. ">php_resource_factory
</a> will be created with
<em>fops
</em>,
<em>data
</em> and
<em>dtor
</em> and will be stored together with a
<a class=
"el" href=
"php__raphf_8h.html#structphp__persistent__handle__list" title=
"Persistent handles storage. ">php_persistent_handle_list
</a> in the global raphf hash.
</p>
886 <p>A
<a class=
"el" href=
"php__raphf_8h.html#structphp__persistent__handle__factory" title=
"Definition of a persistent handle factory. ">php_persistent_handle_factory
</a> can then be retrieved by
<a class=
"el" href=
"php__raphf_8h.html#a0a266874dafb69cf2b040378d4033901" title=
"Retrieve a persistent handle factory at runtime. ">php_persistent_handle_concede()
</a> at runtime.
</p>
887 <dl class=
"params"><dt>Parameters
</dt><dd>
888 <table class=
"params">
889 <tr><td class=
"paramname">name_str
</td><td>the provider name, e.g.
"http\Client\Curl" </td></tr>
890 <tr><td class=
"paramname">name_len
</td><td>the provider name length, e.g. strlen(
"http\Client\Curl")
</td></tr>
891 <tr><td class=
"paramname">fops
</td><td>the resource factory ops
</td></tr>
892 <tr><td class=
"paramname">data
</td><td>opaque user data
</td></tr>
893 <tr><td class=
"paramname">dtor
</td><td><em>data
</em> destructor
</td></tr>
897 <dl class=
"section return"><dt>Returns
</dt><dd>SUCCESS/FAILURE
</dd></dl>
901 <a class=
"anchor" id=
"af08ee05c51d52200755d24f6f52df144"></a>
902 <div class=
"memitem">
903 <div class=
"memproto">
904 <table class=
"memname">
906 <td class=
"memname">void php_persistent_handle_release
</td>
908 <td class=
"paramtype"><a class=
"el" href=
"php__raphf_8h.html#a833eaa62ffcc217e5749c26c18885b17">php_persistent_handle_factory_t
</a> *
 </td>
909 <td class=
"paramname"><em>a
</em>,
</td>
912 <td class=
"paramkey"></td>
914 <td class=
"paramtype">void *
 </td>
915 <td class=
"paramname"><em>handle
</em> </td>
923 </div><div class=
"memdoc">
925 <p>Release a persistent handle.
</p>
926 <p>That is, either put it back into the free list for later re-use or clean it up with
<a class=
"el" href=
"php__raphf_8h.html#a97dbb9d342f33205b92374c586676bc6" title=
"Destroy (and free) the resource. ">php_resource_factory_handle_dtor()
</a>.
</p>
927 <p>If a handle is put back into the free list, the
<a class=
"el" href=
"php__raphf_8h.html#a9299f3f0821061ad93d15c10cf735b6b" title=
"The persistent handle retire routine; may be NULL. ">php_persistent_handle_factory::retire
</a> callback will be executed for that handle.
</p>
928 <dl class=
"params"><dt>Parameters
</dt><dd>
929 <table class=
"params">
930 <tr><td class=
"paramname">a
</td><td>the persistent handle factory
</td></tr>
931 <tr><td class=
"paramname">handle
</td><td>the handle to release
</td></tr>
938 <a class=
"anchor" id=
"ab754f4d59dab5de0edf702a9ab2f4e03"></a>
939 <div class=
"memitem">
940 <div class=
"memproto">
941 <table class=
"memname">
943 <td class=
"memname"><a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a>* php_persistent_handle_resource_factory_init
</td>
945 <td class=
"paramtype"><a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a> *
 </td>
946 <td class=
"paramname"><em>a
</em>,
</td>
949 <td class=
"paramkey"></td>
951 <td class=
"paramtype"><a class=
"el" href=
"php__raphf_8h.html#a833eaa62ffcc217e5749c26c18885b17">php_persistent_handle_factory_t
</a> *
 </td>
952 <td class=
"paramname"><em>pf
</em> </td>
960 </div><div class=
"memdoc">
962 <p>Create a resource factory for persistent handles.
</p>
963 <p>This will create a resource factory with persistent handle ops, which wraps the provided reource factory
<em>pf
</em>.
</p>
964 <dl class=
"params"><dt>Parameters
</dt><dd>
965 <table class=
"params">
966 <tr><td class=
"paramname">a
</td><td>the persistent handle resource factory to initialize
</td></tr>
967 <tr><td class=
"paramname">pf
</td><td>the resource factory to wrap
</td></tr>
974 <a class=
"anchor" id=
"ae174fbe124d4cb6010e218a68379bd18"></a>
975 <div class=
"memitem">
976 <div class=
"memproto">
977 <table class=
"memname">
979 <td class=
"memname">HashTable* php_persistent_handle_statall
</td>
981 <td class=
"paramtype">HashTable *
 </td>
982 <td class=
"paramname"><em>ht
</em></td><td>)
</td>
986 </div><div class=
"memdoc">
988 <p>Retrieve statistics about the current process/thread's persistent handles.
</p>
989 <dl class=
"section return"><dt>Returns
</dt><dd>a HashTable like:
<div class=
"fragment"><div class=
"line"><a name=
"l00001"></a><span class=
"lineno"> 1</span> [
</div>
990 <div class=
"line"><a name=
"l00002"></a><span class=
"lineno"> 2</span>  "name
" =
> [
</div>
991 <div class=
"line"><a name=
"l00003"></a><span class=
"lineno"> 3</span>  "ident
" =
> [
</div>
992 <div class=
"line"><a name=
"l00004"></a><span class=
"lineno"> 4</span>  "used
" =
> 1,
</div>
993 <div class=
"line"><a name=
"l00005"></a><span class=
"lineno"> 5</span>  "free
" =
> 0,
</div>
994 <div class=
"line"><a name=
"l00006"></a><span class=
"lineno"> 6</span>  ]
</div>
995 <div class=
"line"><a name=
"l00007"></a><span class=
"lineno"> 7</span>  ]
</div>
996 <div class=
"line"><a name=
"l00008"></a><span class=
"lineno"> 8</span> ]
</div>
997 </div><!-- fragment --> </dd></dl>
1001 <a class=
"anchor" id=
"ae8be369197905047ffbd05c0ca80f245"></a>
1002 <div class=
"memitem">
1003 <div class=
"memproto">
1004 <table class=
"memname">
1006 <td class=
"memname">unsigned php_resource_factory_addref
</td>
1008 <td class=
"paramtype"><a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a> *
 </td>
1009 <td class=
"paramname"><em>rf
</em></td><td>)
</td>
1013 </div><div class=
"memdoc">
1015 <p>Increase the refcount of the resource factory.
</p>
1016 <dl class=
"params"><dt>Parameters
</dt><dd>
1017 <table class=
"params">
1018 <tr><td class=
"paramname">rf
</td><td>the resource factory
</td></tr>
1022 <dl class=
"section return"><dt>Returns
</dt><dd>the new refcount
</dd></dl>
1026 <a class=
"anchor" id=
"a016b8a4159e698f915ab967711696847"></a>
1027 <div class=
"memitem">
1028 <div class=
"memproto">
1029 <table class=
"memname">
1031 <td class=
"memname">void php_resource_factory_dtor
</td>
1033 <td class=
"paramtype"><a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a> *
 </td>
1034 <td class=
"paramname"><em>f
</em></td><td>)
</td>
1038 </div><div class=
"memdoc">
1040 <p>Destroy the resource factory.
</p>
1041 <p>If the factory's refcount reaches
0, the
<em>dtor
</em> for
<em>data
</em> is called.
</p>
1042 <dl class=
"params"><dt>Parameters
</dt><dd>
1043 <table class=
"params">
1044 <tr><td class=
"paramname">f
</td><td>the resource factory
</td></tr>
1051 <a class=
"anchor" id=
"a7f012d685f5f7c08f50288b61232e689"></a>
1052 <div class=
"memitem">
1053 <div class=
"memproto">
1054 <table class=
"memname">
1056 <td class=
"memname">void php_resource_factory_free
</td>
1058 <td class=
"paramtype"><a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a> **
 </td>
1059 <td class=
"paramname"><em>f
</em></td><td>)
</td>
1063 </div><div class=
"memdoc">
1065 <p>Destroy and free the resource factory.
</p>
1066 <p>Calls
<a class=
"el" href=
"php__raphf_8h.html#a016b8a4159e698f915ab967711696847" title=
"Destroy the resource factory. ">php_resource_factory_dtor()
</a> and frees \æ f if the factory's refcount reached
0.
</p>
1067 <dl class=
"params"><dt>Parameters
</dt><dd>
1068 <table class=
"params">
1069 <tr><td class=
"paramname">f
</td><td>the resource factory
</td></tr>
1076 <a class=
"anchor" id=
"a08db5f3698f2d0bf3d2f20dcf4e7b2b4"></a>
1077 <div class=
"memitem">
1078 <div class=
"memproto">
1079 <table class=
"memname">
1081 <td class=
"memname">void* php_resource_factory_handle_copy
</td>
1083 <td class=
"paramtype"><a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a> *
 </td>
1084 <td class=
"paramname"><em>f
</em>,
</td>
1087 <td class=
"paramkey"></td>
1089 <td class=
"paramtype">void *
 </td>
1090 <td class=
"paramname"><em>handle
</em> </td>
1098 </div><div class=
"memdoc">
1100 <p>Create a copy of the resource
<em>handle
</em>.
</p>
1101 <dl class=
"params"><dt>Parameters
</dt><dd>
1102 <table class=
"params">
1103 <tr><td class=
"paramname">f
</td><td>the resource factory
</td></tr>
1104 <tr><td class=
"paramname">handle
</td><td>the resource to copy
</td></tr>
1108 <dl class=
"section return"><dt>Returns
</dt><dd>the copy
</dd></dl>
1112 <a class=
"anchor" id=
"a98d02dc80dd83095b8f901954350840c"></a>
1113 <div class=
"memitem">
1114 <div class=
"memproto">
1115 <table class=
"memname">
1117 <td class=
"memname">void* php_resource_factory_handle_ctor
</td>
1119 <td class=
"paramtype"><a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a> *
 </td>
1120 <td class=
"paramname"><em>f
</em>,
</td>
1123 <td class=
"paramkey"></td>
1125 <td class=
"paramtype">void *
 </td>
1126 <td class=
"paramname"><em>init_arg
</em> </td>
1134 </div><div class=
"memdoc">
1136 <p>Construct a resource by the resource factory
<em>f
</em>.
</p>
1137 <dl class=
"params"><dt>Parameters
</dt><dd>
1138 <table class=
"params">
1139 <tr><td class=
"paramname">f
</td><td>the resource factory
</td></tr>
1140 <tr><td class=
"paramname">init_arg
</td><td>for the resource constructor
</td></tr>
1144 <dl class=
"section return"><dt>Returns
</dt><dd>the new resource
</dd></dl>
1148 <a class=
"anchor" id=
"a97dbb9d342f33205b92374c586676bc6"></a>
1149 <div class=
"memitem">
1150 <div class=
"memproto">
1151 <table class=
"memname">
1153 <td class=
"memname">void php_resource_factory_handle_dtor
</td>
1155 <td class=
"paramtype"><a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a> *
 </td>
1156 <td class=
"paramname"><em>f
</em>,
</td>
1159 <td class=
"paramkey"></td>
1161 <td class=
"paramtype">void *
 </td>
1162 <td class=
"paramname"><em>handle
</em> </td>
1170 </div><div class=
"memdoc">
1172 <p>Destroy (and free) the resource.
</p>
1173 <dl class=
"params"><dt>Parameters
</dt><dd>
1174 <table class=
"params">
1175 <tr><td class=
"paramname">f
</td><td>the resource factory
</td></tr>
1176 <tr><td class=
"paramname">handle
</td><td>the resource to destroy
</td></tr>
1183 <a class=
"anchor" id=
"ad20f10c53e3f33756638da98819367f0"></a>
1184 <div class=
"memitem">
1185 <div class=
"memproto">
1186 <table class=
"memname">
1188 <td class=
"memname"><a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a>* php_resource_factory_init
</td>
1190 <td class=
"paramtype"><a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a> *
 </td>
1191 <td class=
"paramname"><em>f
</em>,
</td>
1194 <td class=
"paramkey"></td>
1196 <td class=
"paramtype"><a class=
"el" href=
"php__raphf_8h.html#a29e0d7a66e441a5265ddf2f0adbbb3af">php_resource_factory_ops_t
</a> *
 </td>
1197 <td class=
"paramname"><em>fops
</em>,
</td>
1200 <td class=
"paramkey"></td>
1202 <td class=
"paramtype">void *
 </td>
1203 <td class=
"paramname"><em>data
</em>,
</td>
1206 <td class=
"paramkey"></td>
1208 <td class=
"paramtype">void(*)(void *data)
 </td>
1209 <td class=
"paramname"><em>dtor
</em> </td>
1217 </div><div class=
"memdoc">
1219 <p>Initialize a resource factory.
</p>
1220 <p>If you register a
<em>dtor
</em> for a resource factory used with a persistent handle provider, be sure to call
<a class=
"el" href=
"php__raphf_8h.html#a0d661d1f880270146012eb8781e5343e" title=
"Clean persistent handles up. ">php_persistent_handle_cleanup()
</a> for your registered provider in MSHUTDOWN, else the dtor will point to no longer available memory if the extension has already been unloaded.
</p>
1221 <dl class=
"params"><dt>Parameters
</dt><dd>
1222 <table class=
"params">
1223 <tr><td class=
"paramname">f
</td><td>the factory to initialize; if NULL allocated on the heap
</td></tr>
1224 <tr><td class=
"paramname">fops
</td><td>the resource ops to assign to the factory
</td></tr>
1225 <tr><td class=
"paramname">data
</td><td>opaque user data; may be NULL
</td></tr>
1226 <tr><td class=
"paramname">dtor
</td><td>a destructor for the data; may be NULL
</td></tr>
1230 <dl class=
"section return"><dt>Returns
</dt><dd><em>f
</em> or an allocated resource factory
</dd></dl>
1234 <a class=
"anchor" id=
"a617d2cc656ab6427388b938597194ebb"></a>
1235 <div class=
"memitem">
1236 <div class=
"memproto">
1237 <table class=
"memname">
1239 <td class=
"memname">zend_bool php_resource_factory_is_persistent
</td>
1241 <td class=
"paramtype"><a class=
"el" href=
"php__raphf_8h.html#a4817c4b3d4077c48dff36376487ba8d4">php_resource_factory_t
</a> *
 </td>
1242 <td class=
"paramname"><em>a
</em></td><td>)
</td>
1246 </div><div class=
"memdoc">
1248 <p>Check whether a resource factory is a persistent handle resource factory.
</p>
1249 <dl class=
"params"><dt>Parameters
</dt><dd>
1250 <table class=
"params">
1251 <tr><td class=
"paramname">a
</td><td>the resource factory to check
</td></tr>
1258 </div><!-- contents -->
1259 </div><!-- doc-content -->
1260 <!-- start footer part -->
1261 <div id=
"nav-path" class=
"navpath"><!-- id is needed for treeview function! -->
1263 <li class=
"navelem"><a class=
"el" href=
"php__raphf_8h.html">php_raphf.h
</a></li>
1264 <li class=
"footer">Generated by
1265 <a href=
"http://www.doxygen.org/index.html">
1266 <img class=
"footer" src=
"doxygen.png" alt=
"doxygen"/></a> 1.8.9.1 </li>