| 103 | #endif |
| 104 | |
| 105 | class PHPExceptionWrapper : public std::exception { |
| 106 | public: |
| 107 | PHPExceptionWrapper(zval* _ex) throw() { |
| 108 | ZVAL_COPY(&ex, _ex); |
| 109 | snprintf(_what, 40, "PHP exception zval=%p", _ex); |
| 110 | } |
| 111 | |
| 112 | PHPExceptionWrapper(zend_object* _exobj) throw() { |
| 113 | ZVAL_OBJ(&ex, _exobj); |
| 114 | snprintf(_what, 40, "PHP exception zval=%p", _exobj); |
| 115 | } |
| 116 | ~PHPExceptionWrapper() throw() { |
| 117 | zval_dtor(&ex); |
| 118 | } |
| 119 | |
| 120 | const char* what() const throw() { |
| 121 | return _what; |
| 122 | } |
| 123 | operator zval*() const throw() { |
| 124 | return const_cast<zval*>(&ex); |
| 125 | } // Zend API doesn't do 'const'... |
| 126 | protected: |
| 127 | zval ex; |
| 128 | char _what[40]; |
| 129 | } ; |
| 130 | |
| 131 | class PHPTransport { |
| 132 | protected: |
no outgoing calls
no test coverage detected