-PHP_RAPHF_API int /* SUCCESS|FAILURE */ php_persistent_handle_provide(const char *name_str, size_t name_len, php_resource_factory_ops_t *fops, void *data, void (*dtor)(void *));
-PHP_RAPHF_API php_persistent_handle_factory_t *php_persistent_handle_concede(php_persistent_handle_factory_t *a, const char *name_str, size_t name_len, const char *ident_str, size_t ident_len TSRMLS_DC);
-PHP_RAPHF_API void php_persistent_handle_abandon(php_persistent_handle_factory_t *a);
-PHP_RAPHF_API void *php_persistent_handle_acquire(php_persistent_handle_factory_t *a, void *init_arg TSRMLS_DC);
-PHP_RAPHF_API void php_persistent_handle_release(php_persistent_handle_factory_t *a, void *handle TSRMLS_DC);
-PHP_RAPHF_API void *php_persistent_handle_accrete(php_persistent_handle_factory_t *a, void *handle TSRMLS_DC);
+/**
+ * Register a persistent handle provider in MINIT.
+ *
+ * Registers a factory provider for \a name_str with \a fops resource factory
+ * ops. Call this in your MINIT.
+ *
+ * A php_resource_factory will be created with \a fops, \a data and \a dtor
+ * and will be stored together with a php_persistent_handle_list in the global
+ * raphf hash.
+ *
+ * A php_persistent_handle_factory can then be retrieved by
+ * php_persistent_handle_concede() at runtime.
+ *
+ * @param name_str the provider name, e.g. "http\Client\Curl"
+ * @param name_len the provider name length, e.g. strlen("http\Client\Curl")
+ * @param fops the resource factory ops
+ * @param data opaque user data
+ * @param dtor \a data destructor
+ * @return SUCCESS/FAILURE
+ */
+PHP_RAPHF_API ZEND_RESULT_CODE php_persistent_handle_provide(
+ const char *name_str, size_t name_len, php_resource_factory_ops_t *fops,
+ void *data, void (*dtor)(void *));
+
+/**
+ * Retrieve a persistent handle factory at runtime.
+ *
+ * If a persistent handle provider has been registered for \a name_str, a new
+ * php_persistent_handle_factory creating resources in the \a ident_str
+ * namespace will be constructed.
+ *
+ * The wakeup routine \a wakeup and the retire routine \a retire will be
+ * assigned to the new php_persistent_handle_factory.
+ *
+ * @param a pointer to a factory; allocated on the heap if NULL
+ * @param name_str the provider name, e.g. "http\Client\Curl"
+ * @param name_len the provider name length, e.g. strlen("http\Client\Curl")
+ * @param ident_str the subsidiary namespace, e.g. "php.net:80"
+ * @param ident_len the subsidiary namespace lenght, e.g. strlen("php.net:80")
+ * @param wakeup any persistent handle wakeup routine
+ * @param retire any persistent handle retire routine
+ * @return \a a or an allocated persistent handle factory
+ */
+PHP_RAPHF_API php_persistent_handle_factory_t *php_persistent_handle_concede(
+ php_persistent_handle_factory_t *a, const char *name_str,
+ size_t name_len, const char *ident_str, size_t ident_len,
+ php_persistent_handle_wakeup_t wakeup,
+ php_persistent_handle_retire_t retire);
+
+/**
+ * Abandon the persistent handle factory.
+ *
+ * Destroy a php_persistent_handle_factory created by
+ * php_persistent_handle_concede(). If the memory for the factory was allocated,
+ * it will automatically be free'd.
+ *
+ * @param a the persistent handle factory to destroy
+ */
+PHP_RAPHF_API void php_persistent_handle_abandon(
+ php_persistent_handle_factory_t *a);