@@ -1841,6 +1841,31 @@ static PHP_METHOD(Memcached, getResultCode)
1841
1841
}
1842
1842
/* }}} */
1843
1843
1844
+ /* {{{ Memcached::getResultMessage()
1845
+ Returns the result message from the last operation */
1846
+ static PHP_METHOD (Memcached , getResultMessage )
1847
+ {
1848
+ MEMC_METHOD_INIT_VARS ;
1849
+
1850
+ if (zend_parse_parameters (ZEND_NUM_ARGS () TSRMLS_CC , "" ) == FAILURE ) {
1851
+ return ;
1852
+ }
1853
+
1854
+ MEMC_METHOD_FETCH_OBJECT ;
1855
+
1856
+ switch (MEMC_G (rescode )) {
1857
+ case MEMC_RES_PAYLOAD_FAILURE :
1858
+ RETURN_STRING ("PAYLOAD FAILURE" , 1 );
1859
+ break ;
1860
+
1861
+ default :
1862
+ RETURN_STRING (memcached_strerror (i_obj -> memc , MEMC_G (rescode )), 1 );
1863
+ break ;
1864
+ }
1865
+
1866
+ }
1867
+ /* }}} */
1868
+
1844
1869
1845
1870
/****************************************
1846
1871
Internal support code
@@ -2499,6 +2524,9 @@ ZEND_END_ARG_INFO()
2499
2524
ZEND_BEGIN_ARG_INFO (arginfo_getResultCode , 0 )
2500
2525
ZEND_END_ARG_INFO ()
2501
2526
2527
+ ZEND_BEGIN_ARG_INFO (arginfo_getResultMessage , 0 )
2528
+ ZEND_END_ARG_INFO ()
2529
+
2502
2530
ZEND_BEGIN_ARG_INFO_EX (arginfo_get , 0 , 0 , 1 )
2503
2531
ZEND_ARG_INFO (0 , key )
2504
2532
ZEND_ARG_INFO (0 , cache_cb )
@@ -2699,6 +2727,7 @@ static zend_function_entry memcached_class_methods[] = {
2699
2727
MEMC_ME (__construct , arginfo___construct )
2700
2728
2701
2729
MEMC_ME (getResultCode , arginfo_getResultCode )
2730
+ MEMC_ME (getResultMessage , arginfo_getResultMessage )
2702
2731
2703
2732
MEMC_ME (get , arginfo_get )
2704
2733
MEMC_ME (getByKey , arginfo_getByKey )
0 commit comments