FieldSanitizer::sanitize()
last analyzed

Size

Total Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
c 1
b 0
f 0
dl 0
loc 1
nc 1
1
<?php
2
3
namespace fieldwork\sanitizers;
4
5
use fieldwork\Synchronizable;
6
7
abstract class FieldSanitizer implements Synchronizable
8
{
9
10
    public abstract function sanitize ($value);
11
12
    public abstract function isLive ();
13
14
    public function isRealtime ()
15
    {
16
        return true;
17
    }
18
19
    public function getJsonData ()
20
    {
21
        return array(
22
            'method'   => $this->describeObject(),
23
            'live'     => $this->isLive(),
24
            'realtime' => $this->isRealtime()
25
        );
26
    }
27
28
}