Processor.php 920 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. <?php
  2. /**
  3. * Base class for data processing.
  4. *
  5. * @package raven
  6. */
  7. abstract class Raven_Processor
  8. {
  9. /**
  10. * This constant defines the mask string used to strip sensitive information.
  11. */
  12. const STRING_MASK = '********';
  13. /**
  14. * @var Raven_Client The Raven client
  15. */
  16. protected $client;
  17. /**
  18. * Class constructor.
  19. *
  20. * @param Raven_Client $client The Raven client
  21. */
  22. public function __construct(Raven_Client $client)
  23. {
  24. $this->client = $client;
  25. }
  26. /**
  27. * Override the default processor options
  28. *
  29. * @param array $options Associative array of processor options
  30. */
  31. public function setProcessorOptions(array $options)
  32. {
  33. }
  34. /**
  35. * Process and sanitize data, modifying the existing value if necessary.
  36. *
  37. * @param array $data Array of log data
  38. */
  39. abstract public function process(&$data);
  40. }