spl_exceptions.c 3.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. /*
  2. +----------------------------------------------------------------------+
  3. | PHP Version 5 |
  4. +----------------------------------------------------------------------+
  5. | Copyright (c) 1997-2016 The PHP Group |
  6. +----------------------------------------------------------------------+
  7. | This source file is subject to version 3.01 of the PHP license, |
  8. | that is bundled with this package in the file LICENSE, and is |
  9. | available through the world-wide-web at the following url: |
  10. | http://www.php.net/license/3_01.txt |
  11. | If you did not receive a copy of the PHP license and are unable to |
  12. | obtain it through the world-wide-web, please send a note to |
  13. | license@php.net so we can mail you a copy immediately. |
  14. +----------------------------------------------------------------------+
  15. | Authors: Marcus Boerger <helly@php.net> |
  16. +----------------------------------------------------------------------+
  17. */
  18. /* $Id$ */
  19. #ifdef HAVE_CONFIG_H
  20. # include "config.h"
  21. #endif
  22. #include "php.h"
  23. #include "php_ini.h"
  24. #include "ext/standard/info.h"
  25. #include "zend_interfaces.h"
  26. #include "zend_exceptions.h"
  27. #include "php_spl.h"
  28. #include "spl_functions.h"
  29. #include "spl_engine.h"
  30. #include "spl_exceptions.h"
  31. PHPAPI zend_class_entry *spl_ce_LogicException;
  32. PHPAPI zend_class_entry *spl_ce_BadFunctionCallException;
  33. PHPAPI zend_class_entry *spl_ce_BadMethodCallException;
  34. PHPAPI zend_class_entry *spl_ce_DomainException;
  35. PHPAPI zend_class_entry *spl_ce_InvalidArgumentException;
  36. PHPAPI zend_class_entry *spl_ce_LengthException;
  37. PHPAPI zend_class_entry *spl_ce_OutOfRangeException;
  38. PHPAPI zend_class_entry *spl_ce_RuntimeException;
  39. PHPAPI zend_class_entry *spl_ce_OutOfBoundsException;
  40. PHPAPI zend_class_entry *spl_ce_OverflowException;
  41. PHPAPI zend_class_entry *spl_ce_RangeException;
  42. PHPAPI zend_class_entry *spl_ce_UnderflowException;
  43. PHPAPI zend_class_entry *spl_ce_UnexpectedValueException;
  44. #define spl_ce_Exception zend_exception_get_default(TSRMLS_C)
  45. /* {{{ PHP_MINIT_FUNCTION(spl_exceptions) */
  46. PHP_MINIT_FUNCTION(spl_exceptions)
  47. {
  48. REGISTER_SPL_SUB_CLASS_EX(LogicException, Exception, NULL, NULL);
  49. REGISTER_SPL_SUB_CLASS_EX(BadFunctionCallException, LogicException, NULL, NULL);
  50. REGISTER_SPL_SUB_CLASS_EX(BadMethodCallException, BadFunctionCallException, NULL, NULL);
  51. REGISTER_SPL_SUB_CLASS_EX(DomainException, LogicException, NULL, NULL);
  52. REGISTER_SPL_SUB_CLASS_EX(InvalidArgumentException, LogicException, NULL, NULL);
  53. REGISTER_SPL_SUB_CLASS_EX(LengthException, LogicException, NULL, NULL);
  54. REGISTER_SPL_SUB_CLASS_EX(OutOfRangeException, LogicException, NULL, NULL);
  55. REGISTER_SPL_SUB_CLASS_EX(RuntimeException, Exception, NULL, NULL);
  56. REGISTER_SPL_SUB_CLASS_EX(OutOfBoundsException, RuntimeException, NULL, NULL);
  57. REGISTER_SPL_SUB_CLASS_EX(OverflowException, RuntimeException, NULL, NULL);
  58. REGISTER_SPL_SUB_CLASS_EX(RangeException, RuntimeException, NULL, NULL);
  59. REGISTER_SPL_SUB_CLASS_EX(UnderflowException, RuntimeException, NULL, NULL);
  60. REGISTER_SPL_SUB_CLASS_EX(UnexpectedValueException, RuntimeException, NULL, NULL);
  61. return SUCCESS;
  62. }
  63. /* }}} */
  64. /*
  65. * Local variables:
  66. * tab-width: 4
  67. * c-basic-offset: 4
  68. * End:
  69. * vim600: fdm=marker
  70. * vim: noet sw=4 ts=4
  71. */