spl_exceptions.c 3.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. /*
  2. +----------------------------------------------------------------------+
  3. | Copyright (c) The PHP Group |
  4. +----------------------------------------------------------------------+
  5. | This source file is subject to version 3.01 of the PHP license, |
  6. | that is bundled with this package in the file LICENSE, and is |
  7. | available through the world-wide-web at the following url: |
  8. | https://www.php.net/license/3_01.txt |
  9. | If you did not receive a copy of the PHP license and are unable to |
  10. | obtain it through the world-wide-web, please send a note to |
  11. | license@php.net so we can mail you a copy immediately. |
  12. +----------------------------------------------------------------------+
  13. | Authors: Marcus Boerger <helly@php.net> |
  14. +----------------------------------------------------------------------+
  15. */
  16. #ifdef HAVE_CONFIG_H
  17. # include "config.h"
  18. #endif
  19. #include "php.h"
  20. #include "php_ini.h"
  21. #include "ext/standard/info.h"
  22. #include "zend_interfaces.h"
  23. #include "zend_exceptions.h"
  24. #include "spl_exceptions_arginfo.h"
  25. #include "php_spl.h"
  26. #include "spl_functions.h"
  27. #include "spl_engine.h"
  28. #include "spl_exceptions.h"
  29. PHPAPI zend_class_entry *spl_ce_LogicException;
  30. PHPAPI zend_class_entry *spl_ce_BadFunctionCallException;
  31. PHPAPI zend_class_entry *spl_ce_BadMethodCallException;
  32. PHPAPI zend_class_entry *spl_ce_DomainException;
  33. PHPAPI zend_class_entry *spl_ce_InvalidArgumentException;
  34. PHPAPI zend_class_entry *spl_ce_LengthException;
  35. PHPAPI zend_class_entry *spl_ce_OutOfRangeException;
  36. PHPAPI zend_class_entry *spl_ce_RuntimeException;
  37. PHPAPI zend_class_entry *spl_ce_OutOfBoundsException;
  38. PHPAPI zend_class_entry *spl_ce_OverflowException;
  39. PHPAPI zend_class_entry *spl_ce_RangeException;
  40. PHPAPI zend_class_entry *spl_ce_UnderflowException;
  41. PHPAPI zend_class_entry *spl_ce_UnexpectedValueException;
  42. #define spl_ce_Exception zend_ce_exception
  43. /* {{{ PHP_MINIT_FUNCTION(spl_exceptions) */
  44. PHP_MINIT_FUNCTION(spl_exceptions)
  45. {
  46. spl_ce_LogicException = register_class_LogicException(zend_ce_exception);
  47. spl_ce_BadFunctionCallException = register_class_BadFunctionCallException(spl_ce_LogicException);
  48. spl_ce_BadMethodCallException = register_class_BadMethodCallException(spl_ce_BadFunctionCallException);
  49. spl_ce_DomainException = register_class_DomainException(spl_ce_LogicException);
  50. spl_ce_InvalidArgumentException = register_class_InvalidArgumentException(spl_ce_LogicException);
  51. spl_ce_LengthException = register_class_LengthException(spl_ce_LogicException);
  52. spl_ce_OutOfRangeException = register_class_OutOfRangeException(spl_ce_LogicException);
  53. spl_ce_RuntimeException = register_class_RuntimeException(zend_ce_exception);
  54. spl_ce_OutOfBoundsException = register_class_OutOfBoundsException(spl_ce_RuntimeException);
  55. spl_ce_OverflowException = register_class_OverflowException(spl_ce_RuntimeException);
  56. spl_ce_RangeException = register_class_RangeException(spl_ce_RuntimeException);
  57. spl_ce_UnderflowException = register_class_UnderflowException(spl_ce_RuntimeException);
  58. spl_ce_UnexpectedValueException = register_class_UnexpectedValueException(spl_ce_RuntimeException);
  59. return SUCCESS;
  60. }
  61. /* }}} */