#include "php_http_request_api.h"
#include "php_http_request_object.h"
-#ifndef WONKY
-# ifdef HAVE_SPL
+#if defined(HAVE_SPL) && !HTTP_SHARED_EXT(SPL) && !defined(WONKY)
/* SPL doesn't install its headers */
extern PHPAPI zend_class_entry *spl_ce_Countable;
-# endif
#endif
#define HTTP_BEGIN_ARGS(method, req_args) HTTP_BEGIN_ARGS_EX(HttpMessage, method, 0, req_args)
HTTP_REGISTER_CLASS_EX(HttpMessage, http_message_object, NULL, 0);
#ifndef WONKY
-# ifdef HAVE_SPL
+# if defined(HAVE_SPL) && !HTTP_SHARED_EXT(SPL)
zend_class_implements(http_message_object_ce TSRMLS_CC, 3, spl_ce_Countable, zend_ce_serializable, zend_ce_iterator);
# else
zend_class_implements(http_message_object_ce TSRMLS_CC, 2, zend_ce_serializable, zend_ce_iterator);
http_error(HE_WARNING, HTTP_E_INVALID_PARAM, "Cannot set HttpMessage::requestMethod to an empty string");
RETURN_FALSE;
}
- if (SUCCESS != http_check_method(method)) {
- http_error_ex(HE_WARNING, HTTP_E_REQUEST_METHOD, "Unkown request method: %s", method);
+ if (!http_request_method_exists(1, 0, method)) {
+ http_error_ex(HE_WARNING, HTTP_E_REQUEST_METHOD, "Unknown request method: %s", method);
RETURN_FALSE;
}