CErrorEvent.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. <?php
  2. /**
  3. * CErrorEvent class file.
  4. *
  5. * @author Qiang Xue <qiang.xue@gmail.com>
  6. * @link http://www.yiiframework.com/
  7. * @copyright 2008-2013 Yii Software LLC
  8. * @license http://www.yiiframework.com/license/
  9. */
  10. /**
  11. * CErrorEvent represents the parameter for the {@link CApplication::onError onError} event.
  12. *
  13. * @author Qiang Xue <qiang.xue@gmail.com>
  14. * @package system.base
  15. * @since 1.0
  16. */
  17. class CErrorEvent extends CEvent
  18. {
  19. /**
  20. * @var string error code
  21. */
  22. public $code;
  23. /**
  24. * @var string error message
  25. */
  26. public $message;
  27. /**
  28. * @var string error message
  29. */
  30. public $file;
  31. /**
  32. * @var string error file
  33. */
  34. public $line;
  35. /**
  36. * Constructor.
  37. * @param mixed $sender sender of the event
  38. * @param string $code error code
  39. * @param string $message error message
  40. * @param string $file error file
  41. * @param integer $line error line
  42. */
  43. public function __construct($sender,$code,$message,$file,$line)
  44. {
  45. $this->code=$code;
  46. $this->message=$message;
  47. $this->file=$file;
  48. $this->line=$line;
  49. parent::__construct($sender);
  50. }
  51. }