1 | <?php |
||
9 | class Rural extends State |
||
10 | { |
||
11 | const REGEX = '/^P(\d{8})(\d{1})(\d{3})$/'; |
||
12 | |||
13 | const FORMAT = 'P-$1.$2/$3'; |
||
14 | |||
15 | const LENGTH = 12; |
||
16 | |||
17 | const DIGITS_COUNT = 1; |
||
18 | |||
19 | 2 | public function __construct() |
|
23 | |||
24 | /** |
||
25 | * {@inheritdoc} |
||
26 | */ |
||
27 | 2 | public function normalizeNumber($number) |
|
31 | |||
32 | /** |
||
33 | * {@inheritdoc} |
||
34 | */ |
||
35 | 2 | public function extractBaseNumber($number) |
|
39 | |||
40 | /** |
||
41 | * {@inheritdoc} |
||
42 | */ |
||
43 | 2 | public function extractCheckerDigit($number) |
|
47 | |||
48 | /** |
||
49 | * {@inheritdoc} |
||
50 | * |
||
51 | * @see http://www.sintegra.gov.br/Cad_Estados/cad_SP.html |
||
52 | */ |
||
53 | 2 | public function calculateDigit($baseNumber) |
|
64 | } |
||
65 |