Skip to content

Commit

Permalink
Clean up defining arginfo
Browse files Browse the repository at this point in the history
  • Loading branch information
jbboehr committed Apr 22, 2021
1 parent 1802929 commit 920e4dd
Show file tree
Hide file tree
Showing 24 changed files with 277 additions and 275 deletions.
13 changes: 6 additions & 7 deletions php_psr.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,8 @@
#define PHP_PSR_RELEASE "2021-04-10"
#define PHP_PSR_AUTHORS "John Boehr <[email protected]> (lead)"

#define PHP_PSR_ABSTRACT_ME(c, f) PHP_ABSTRACT_ME(c, f, arginfo_ ## c ## _ ## f)
#define PHP_PSR_ABSTRACT_ME_WITH_FLAGS(c, f, fl) ZEND_FENTRY(f, NULL, arginfo_ ## c ## _ ## f, fl)
#define PHP_PSR_BEGIN_ARG_INFO(c, f, n) ZEND_BEGIN_ARG_INFO_EX(arginfo_ ## c ## _ ## f, ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, n)
#define PHP_PSR_ARGINFO(p, c, f) (arginfo_Psr ## p ## c ## _ ## f)
#define PHP_PSR_BEGIN_ARG_INFO(p, c, f, n) ZEND_BEGIN_ARG_INFO_EX(PHP_PSR_ARGINFO(p, c, f), ZEND_SEND_BY_VAL, ZEND_RETURN_VALUE, n)
#define PHP_PSR_END_ARG_INFO ZEND_END_ARG_INFO
#define REGISTER_PSR_CLASS_CONST_STRING(ce, const_name, value) \
zend_declare_class_constant_stringl(ce, const_name, sizeof(const_name)-1, value, sizeof(value)-1);
Expand All @@ -39,11 +38,11 @@
#define PHP_PSR_ALIAS_NAMESPACE "Psr"

#ifdef ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX
#define PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(c, f, n, cn, an) ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(arginfo_ ## c ## _ ## f, ZEND_RETURN_VALUE, n, cn, an)
#define PHP_PSR_BEGIN_ARG_WITH_RETURN_TYPE_INFO(c, f, n, t, an) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ ## c ## _ ## f, ZEND_RETURN_VALUE, n, t, an)
#define PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(p, c, f, n, cn, an) ZEND_BEGIN_ARG_WITH_RETURN_OBJ_INFO_EX(PHP_PSR_ARGINFO(p, c, f), ZEND_RETURN_VALUE, n, cn, an)
#define PHP_PSR_BEGIN_ARG_WITH_RETURN_TYPE_INFO(p, c, f, n, t, an) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(PHP_PSR_ARGINFO(p, c, f), ZEND_RETURN_VALUE, n, t, an)
#else
#define PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(c, f, n, cn, an) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ ## c ## _ ## f, ZEND_RETURN_VALUE, n, IS_OBJECT, #cn, an)
#define PHP_PSR_BEGIN_ARG_WITH_RETURN_TYPE_INFO(c, f, n, t, an) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(arginfo_ ## c ## _ ## f, ZEND_RETURN_VALUE, n, t, NULL, an)
#define PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(p, c, f, n, cn, an) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(PHP_PSR_ARGINFO(p, c, f), ZEND_RETURN_VALUE, n, IS_OBJECT, #cn, an)
#define PHP_PSR_BEGIN_ARG_WITH_RETURN_TYPE_INFO(p, c, f, n, t, an) ZEND_BEGIN_ARG_WITH_RETURN_TYPE_INFO_EX(PHP_PSR_ARGINFO(p, c, f), ZEND_RETURN_VALUE, n, t, NULL, an)
#endif

extern zend_module_entry psr_module_entry;
Expand Down
30 changes: 15 additions & 15 deletions psr_cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,12 +30,12 @@ static zend_always_inline void php_psr_register_CacheException(INIT_FUNC_ARGS)
PHP_PSR_API zend_class_entry * PsrCacheCacheItemInterface_ce_ptr;

static zend_function_entry PsrCacheCacheItemInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemInterface, getKey)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemInterface, get)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemInterface, isHit)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemInterface, set)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemInterface, expiresAt)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemInterface, expiresAfter)
PHP_PSR_ABSTRACT_ME(Cache, CacheItemInterface, getKey)
PHP_PSR_ABSTRACT_ME(Cache, CacheItemInterface, get)
PHP_PSR_ABSTRACT_ME(Cache, CacheItemInterface, isHit)
PHP_PSR_ABSTRACT_ME(Cache, CacheItemInterface, set)
PHP_PSR_ABSTRACT_ME(Cache, CacheItemInterface, expiresAt)
PHP_PSR_ABSTRACT_ME(Cache, CacheItemInterface, expiresAfter)
PHP_FE_END
};

Expand All @@ -50,15 +50,15 @@ static zend_always_inline void php_psr_register_CacheItemInterface(INIT_FUNC_ARG
PHP_PSR_API zend_class_entry * PsrCacheCacheItemPoolInterface_ce_ptr;

static zend_function_entry PsrCacheCacheItemPoolInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemPoolInterface, getItem)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemPoolInterface, getItems)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemPoolInterface, hasItem)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemPoolInterface, clear)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemPoolInterface, deleteItem)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemPoolInterface, deleteItems)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemPoolInterface, save)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemPoolInterface, saveDeferred)
PHP_PSR_ABSTRACT_ME(PsrCacheCacheItemPoolInterface, commit)
PHP_PSR_ABSTRACT_ME(Cache, CacheItemPoolInterface, getItem)
PHP_PSR_ABSTRACT_ME(Cache, CacheItemPoolInterface, getItems)
PHP_PSR_ABSTRACT_ME(Cache, CacheItemPoolInterface, hasItem)
PHP_PSR_ABSTRACT_ME(Cache, CacheItemPoolInterface, clear)
PHP_PSR_ABSTRACT_ME(Cache, CacheItemPoolInterface, deleteItem)
PHP_PSR_ABSTRACT_ME(Cache, CacheItemPoolInterface, deleteItems)
PHP_PSR_ABSTRACT_ME(Cache, CacheItemPoolInterface, save)
PHP_PSR_ABSTRACT_ME(Cache, CacheItemPoolInterface, saveDeferred)
PHP_PSR_ABSTRACT_ME(Cache, CacheItemPoolInterface, commit)
PHP_FE_END
};

Expand Down
30 changes: 15 additions & 15 deletions psr_cache.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,59 +15,59 @@ extern PHP_PSR_API zend_class_entry * PsrCacheCacheException_ce_ptr;

extern PHP_MINIT_FUNCTION(psr_cache);

PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemInterface, getKey, 0)
PHP_PSR_BEGIN_ARG_INFO(Cache, CacheItemInterface, getKey, 0)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemInterface, get, 0)
PHP_PSR_BEGIN_ARG_INFO(Cache, CacheItemInterface, get, 0)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemInterface, isHit, 0)
PHP_PSR_BEGIN_ARG_INFO(Cache, CacheItemInterface, isHit, 0)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemInterface, set, 1)
PHP_PSR_BEGIN_ARG_INFO(Cache, CacheItemInterface, set, 1)
ZEND_ARG_INFO(0, value)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemInterface, expiresAt, 1)
PHP_PSR_BEGIN_ARG_INFO(Cache, CacheItemInterface, expiresAt, 1)
ZEND_ARG_INFO(0, expiration)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemInterface, expiresAfter, 1)
PHP_PSR_BEGIN_ARG_INFO(Cache, CacheItemInterface, expiresAfter, 1)
ZEND_ARG_INFO(0, time)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemPoolInterface, getItem, 1)
PHP_PSR_BEGIN_ARG_INFO(Cache, CacheItemPoolInterface, getItem, 1)
ZEND_ARG_INFO(0, key)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemPoolInterface, getItems, 0)
PHP_PSR_BEGIN_ARG_INFO(Cache, CacheItemPoolInterface, getItems, 0)
ZEND_ARG_ARRAY_INFO(0, keys, 0)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemPoolInterface, hasItem, 1)
PHP_PSR_BEGIN_ARG_INFO(Cache, CacheItemPoolInterface, hasItem, 1)
ZEND_ARG_INFO(0, key)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemPoolInterface, clear, 0)
PHP_PSR_BEGIN_ARG_INFO(Cache, CacheItemPoolInterface, clear, 0)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemPoolInterface, deleteItem, 1)
PHP_PSR_BEGIN_ARG_INFO(Cache, CacheItemPoolInterface, deleteItem, 1)
ZEND_ARG_INFO(0, key)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemPoolInterface, deleteItems, 1)
PHP_PSR_BEGIN_ARG_INFO(Cache, CacheItemPoolInterface, deleteItems, 1)
ZEND_ARG_ARRAY_INFO(0, keys, 0)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemPoolInterface, save, 1)
PHP_PSR_BEGIN_ARG_INFO(Cache, CacheItemPoolInterface, save, 1)
ZEND_ARG_OBJ_INFO(0, logger, Psr\\Cache\\CacheItemInterface, 0)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemPoolInterface, saveDeferred, 1)
PHP_PSR_BEGIN_ARG_INFO(Cache, CacheItemPoolInterface, saveDeferred, 1)
ZEND_ARG_OBJ_INFO(0, logger, Psr\\Cache\\CacheItemInterface, 0)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_INFO(PsrCacheCacheItemPoolInterface, commit, 0)
PHP_PSR_BEGIN_ARG_INFO(Cache, CacheItemPoolInterface, commit, 0)
PHP_PSR_END_ARG_INFO()

#endif /* PSR_CACHE_H */
Expand Down
4 changes: 2 additions & 2 deletions psr_container.c
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@ static zend_always_inline void php_psr_register_PsrContainerContainerExceptionIn
PHP_PSR_API zend_class_entry * PsrContainerContainerInterface_ce_ptr;

static zend_function_entry PsrContainerContainerInterface_methods[] = {
PHP_PSR_ABSTRACT_ME_WITH_FLAGS(PsrContainerContainerInterface, get, ZEND_ACC_PUBLIC | ZEND_ACC_ABSTRACT | ZEND_ACC_STRICT_TYPES)
PHP_PSR_ABSTRACT_ME_WITH_FLAGS(PsrContainerContainerInterface, has, ZEND_ACC_PUBLIC | ZEND_ACC_ABSTRACT | ZEND_ACC_STRICT_TYPES)
PHP_PSR_ABSTRACT_ME_WITH_FLAGS(Container, ContainerInterface, get, ZEND_ACC_PUBLIC | ZEND_ACC_ABSTRACT | ZEND_ACC_STRICT_TYPES)
PHP_PSR_ABSTRACT_ME_WITH_FLAGS(Container, ContainerInterface, has, ZEND_ACC_PUBLIC | ZEND_ACC_ABSTRACT | ZEND_ACC_STRICT_TYPES)
PHP_FE_END
};

Expand Down
4 changes: 2 additions & 2 deletions psr_container.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,11 @@ extern PHP_PSR_API zend_class_entry * PsrContainerNotFoundExceptionInterface_ce_

extern PHP_MINIT_FUNCTION(psr_container);

PHP_PSR_BEGIN_ARG_INFO(PsrContainerContainerInterface, get, 1)
PHP_PSR_BEGIN_ARG_INFO(Container, ContainerInterface, get, 1)
ZEND_ARG_TYPE_INFO(0, id, IS_STRING, 0)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_INFO(PsrContainerContainerInterface, has, 1)
PHP_PSR_BEGIN_ARG_INFO(Container, ContainerInterface, has, 1)
ZEND_ARG_TYPE_INFO(0, id, IS_STRING, 0)
PHP_PSR_END_ARG_INFO()

Expand Down
6 changes: 3 additions & 3 deletions psr_event_dispatcher.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
PHP_PSR_API zend_class_entry * PsrEventDispatcherEventDispatcherInterface_ce_ptr;

static zend_function_entry PsrEventDispatcherEventDispatcherInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrEventDispatcherEventDispatcherInterface, dispatch)
PHP_PSR_ABSTRACT_ME(EventDispatcher, EventDispatcherInterface, dispatch)
PHP_FE_END
};

Expand All @@ -29,7 +29,7 @@ static zend_always_inline void php_psr_register_PsrEventDispatcherEventDispatche
PHP_PSR_API zend_class_entry * PsrEventDispatcherListenerProviderInterface_ce_ptr;

static zend_function_entry PsrEventDispatcherListenerProviderInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrEventDispatcherListenerProviderInterface, getListenersForEvent)
PHP_PSR_ABSTRACT_ME(EventDispatcher, ListenerProviderInterface, getListenersForEvent)
PHP_FE_END
};

Expand All @@ -44,7 +44,7 @@ static zend_always_inline void php_psr_register_PsrEventDispatcherListenerProvid
PHP_PSR_API zend_class_entry * PsrEventDispatcherStoppableEventInterface_ce_ptr;

static zend_function_entry PsrEventDispatcherStoppableEventInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrEventDispatcherStoppableEventInterface, isPropagationStopped)
PHP_PSR_ABSTRACT_ME(EventDispatcher, StoppableEventInterface, isPropagationStopped)
PHP_FE_END
};

Expand Down
6 changes: 3 additions & 3 deletions psr_event_dispatcher.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ extern PHP_PSR_API zend_class_entry * PsrEventDispatcherStoppableEventInterface_

extern PHP_MINIT_FUNCTION(psr_event_dispatcher);

PHP_PSR_BEGIN_ARG_INFO(PsrEventDispatcherEventDispatcherInterface, dispatch, 1)
PHP_PSR_BEGIN_ARG_INFO(EventDispatcher, EventDispatcherInterface, dispatch, 1)
ZEND_ARG_TYPE_INFO(0, event, IS_OBJECT, 0)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_WITH_RETURN_TYPE_INFO(PsrEventDispatcherListenerProviderInterface, getListenersForEvent, 1, IS_ITERABLE, 0)
PHP_PSR_BEGIN_ARG_WITH_RETURN_TYPE_INFO(EventDispatcher, ListenerProviderInterface, getListenersForEvent, 1, IS_ITERABLE, 0)
ZEND_ARG_TYPE_INFO(0, event, IS_OBJECT, 0)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_WITH_RETURN_TYPE_INFO(PsrEventDispatcherStoppableEventInterface, isPropagationStopped, 0, _IS_BOOL, 0)
PHP_PSR_BEGIN_ARG_WITH_RETURN_TYPE_INFO(EventDispatcher, StoppableEventInterface, isPropagationStopped, 0, _IS_BOOL, 0)
PHP_PSR_END_ARG_INFO()
#endif

Expand Down
6 changes: 3 additions & 3 deletions psr_http_client.c
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
PHP_PSR_API zend_class_entry * PsrHttpClientClientInterface_ce_ptr;

static zend_function_entry PsrHttpClientClientInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpClientClientInterface, sendRequest)
PHP_PSR_ABSTRACT_ME(HttpClient, ClientInterface, sendRequest)
PHP_FE_END
};

Expand All @@ -41,7 +41,7 @@ static zend_always_inline void php_psr_register_PsrHttpClientClientExceptionInte
PHP_PSR_API zend_class_entry * PsrHttpClientNetworkExceptionInterface_ce_ptr;

static zend_function_entry PsrHttpClientNetworkExceptionInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpClientNetworkExceptionInterface, getRequest)
PHP_PSR_ABSTRACT_ME(HttpClient, NetworkExceptionInterface, getRequest)
PHP_FE_END
};

Expand All @@ -57,7 +57,7 @@ static zend_always_inline void php_psr_register_PsrHttpClientNetworkExceptionInt
PHP_PSR_API zend_class_entry * PsrHttpClientRequestExceptionInterface_ce_ptr;

static zend_function_entry PsrHttpClientRequestExceptionInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpClientRequestExceptionInterface, getRequest)
PHP_PSR_ABSTRACT_ME(HttpClient, RequestExceptionInterface, getRequest)
PHP_FE_END
};

Expand Down
6 changes: 3 additions & 3 deletions psr_http_client.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,14 @@ extern PHP_PSR_API zend_class_entry * PsrHttpClientRequestExceptionInterface_ce_

extern PHP_MINIT_FUNCTION(psr_http_client);

PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpClientClientInterface, sendRequest, 1, Psr\\Http\\Message\\ResponseInterface, 0)
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(HttpClient, ClientInterface, sendRequest, 1, Psr\\Http\\Message\\ResponseInterface, 0)
ZEND_ARG_OBJ_INFO(0, request, Psr\\Http\\Message\\RequestInterface, 0)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpClientNetworkExceptionInterface, getRequest, 0, Psr\\Http\\Message\\RequestInterface, 0)
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(HttpClient, NetworkExceptionInterface, getRequest, 0, Psr\\Http\\Message\\RequestInterface, 0)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpClientRequestExceptionInterface, getRequest, 0, Psr\\Http\\Message\\RequestInterface, 0)
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(HttpClient, RequestExceptionInterface, getRequest, 0, Psr\\Http\\Message\\RequestInterface, 0)
PHP_PSR_END_ARG_INFO()

#endif /* PSR_HTTP_CLIENT_H */
Expand Down
16 changes: 8 additions & 8 deletions psr_http_factory.c
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
PHP_PSR_API zend_class_entry * PsrHttpMessageRequestFactoryInterface_ce_ptr;

static zend_function_entry PsrHttpMessageRequestFactoryInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpMessageRequestFactoryInterface, createRequest)
PHP_PSR_ABSTRACT_ME(HttpMessage, RequestFactoryInterface, createRequest)
PHP_FE_END
};

Expand All @@ -28,7 +28,7 @@ static zend_always_inline void php_psr_register_PsrHttpMessageRequestFactoryInte
PHP_PSR_API zend_class_entry * PsrHttpMessageResponseFactoryInterface_ce_ptr;

static zend_function_entry PsrHttpMessageResponseFactoryInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpMessageResponseFactoryInterface, createResponse)
PHP_PSR_ABSTRACT_ME(HttpMessage, ResponseFactoryInterface, createResponse)
PHP_FE_END
};

Expand All @@ -43,7 +43,7 @@ static zend_always_inline void php_psr_register_PsrHttpMessageResponseFactoryInt
PHP_PSR_API zend_class_entry * PsrHttpMessageServerRequestFactoryInterface_ce_ptr;

static zend_function_entry PsrHttpMessageServerRequestFactoryInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpMessageServerRequestFactoryInterface, createServerRequest)
PHP_PSR_ABSTRACT_ME(HttpMessage, ServerRequestFactoryInterface, createServerRequest)
PHP_FE_END
};

Expand All @@ -58,9 +58,9 @@ static zend_always_inline void php_psr_register_PsrHttpMessageServerRequestFacto
PHP_PSR_API zend_class_entry * PsrHttpMessageStreamFactoryInterface_ce_ptr;

static zend_function_entry PsrHttpMessageStreamFactoryInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamFactoryInterface, createStream)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamFactoryInterface, createStreamFromFile)
PHP_PSR_ABSTRACT_ME(PsrHttpMessageStreamFactoryInterface, createStreamFromResource)
PHP_PSR_ABSTRACT_ME(HttpMessage, StreamFactoryInterface, createStream)
PHP_PSR_ABSTRACT_ME(HttpMessage, StreamFactoryInterface, createStreamFromFile)
PHP_PSR_ABSTRACT_ME(HttpMessage, StreamFactoryInterface, createStreamFromResource)
PHP_FE_END
};

Expand All @@ -75,7 +75,7 @@ static zend_always_inline void php_psr_register_PsrHttpMessageStreamFactoryInter
PHP_PSR_API zend_class_entry * PsrHttpMessageUploadedFileFactoryInterface_ce_ptr;

static zend_function_entry PsrHttpMessageUploadedFileFactoryInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUploadedFileFactoryInterface, createUploadedFile)
PHP_PSR_ABSTRACT_ME(HttpMessage, UploadedFileFactoryInterface, createUploadedFile)
PHP_FE_END
};

Expand All @@ -90,7 +90,7 @@ static zend_always_inline void php_psr_register_PsrHttpMessageUploadedFileFactor
PHP_PSR_API zend_class_entry * PsrHttpMessageUriFactoryInterface_ce_ptr;

static zend_function_entry PsrHttpMessageUriFactoryInterface_methods[] = {
PHP_PSR_ABSTRACT_ME(PsrHttpMessageUriFactoryInterface, createUri)
PHP_PSR_ABSTRACT_ME(HttpMessage, UriFactoryInterface, createUri)
PHP_FE_END
};

Expand Down
16 changes: 8 additions & 8 deletions psr_http_factory.h
Original file line number Diff line number Diff line change
Expand Up @@ -17,44 +17,44 @@ extern PHP_PSR_API zend_class_entry * PsrHttpMessageUriFactoryInterface_ce_ptr;

extern PHP_MINIT_FUNCTION(psr_http_factory);

PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpMessageRequestFactoryInterface, createRequest, 2, Psr\\Http\\Message\\RequestInterface, 0)
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(HttpMessage, RequestFactoryInterface, createRequest, 2, Psr\\Http\\Message\\RequestInterface, 0)
ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0)
ZEND_ARG_INFO(0, uri)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpMessageResponseFactoryInterface, createResponse, 0, Psr\\Http\\Message\\ResponseInterface, 0)
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(HttpMessage, ResponseFactoryInterface, createResponse, 0, Psr\\Http\\Message\\ResponseInterface, 0)
ZEND_ARG_TYPE_INFO(0, code, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, reasonPhrase, IS_STRING, 0)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpMessageServerRequestFactoryInterface, createServerRequest, 2, Psr\\Http\\Message\\ServerRequestInterface, 0)
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(HttpMessage, ServerRequestFactoryInterface, createServerRequest, 2, Psr\\Http\\Message\\ServerRequestInterface, 0)
ZEND_ARG_TYPE_INFO(0, method, IS_STRING, 0)
ZEND_ARG_INFO(0, uri)
ZEND_ARG_ARRAY_INFO(0, serverParams, 0)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpMessageStreamFactoryInterface, createStream, 0, Psr\\Http\\Message\\StreamInterface, 0)
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(HttpMessage, StreamFactoryInterface, createStream, 0, Psr\\Http\\Message\\StreamInterface, 0)
ZEND_ARG_TYPE_INFO(0, content, IS_STRING, 0)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpMessageStreamFactoryInterface, createStreamFromFile, 1, Psr\\Http\\Message\\StreamInterface, 0)
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(HttpMessage, StreamFactoryInterface, createStreamFromFile, 1, Psr\\Http\\Message\\StreamInterface, 0)
ZEND_ARG_TYPE_INFO(0, filename, IS_STRING, 0)
ZEND_ARG_TYPE_INFO(0, mode, IS_STRING, 0)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpMessageStreamFactoryInterface, createStreamFromResource, 1, Psr\\Http\\Message\\StreamInterface, 0)
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(HttpMessage, StreamFactoryInterface, createStreamFromResource, 1, Psr\\Http\\Message\\StreamInterface, 0)
ZEND_ARG_INFO(0, resouce)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpMessageUploadedFileFactoryInterface, createUploadedFile, 1, Psr\\Http\\Message\\UploadedFileInterface, 0)
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(HttpMessage, UploadedFileFactoryInterface, createUploadedFile, 1, Psr\\Http\\Message\\UploadedFileInterface, 0)
ZEND_ARG_OBJ_INFO(0, stream, Psr\\Http\\Message\\StreamInterface, 0)
ZEND_ARG_TYPE_INFO(0, size, IS_LONG, 1)
ZEND_ARG_TYPE_INFO(0, error, IS_LONG, 0)
ZEND_ARG_TYPE_INFO(0, clientFilename, IS_STRING, 1)
ZEND_ARG_TYPE_INFO(0, clientMediaType, IS_STRING, 1)
PHP_PSR_END_ARG_INFO()

PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(PsrHttpMessageUriFactoryInterface, createUri, 0, Psr\\Http\\Message\\UriInterface, 0)
PHP_PSR_BEGIN_ARG_WITH_RETURN_OBJ_INFO(HttpMessage, UriFactoryInterface, createUri, 0, Psr\\Http\\Message\\UriInterface, 0)
ZEND_ARG_TYPE_INFO(0, uri, IS_STRING, 0)
PHP_PSR_END_ARG_INFO()

Expand Down
Loading

0 comments on commit 920e4dd

Please sign in to comment.