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