-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Cnab240.php
51 lines (42 loc) · 957 Bytes
/
Cnab240.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
<?php
declare(strict_types = 1);
namespace BankUtils\Cnab\Provider\Febraban;
use BankUtils\Cnab\Contract\Provider;
class Cnab240 implements Provider {
public static function bankCode(): int {
return 0;
}
public static function lineSize(): int {
return 240;
}
public static function map(): array {
return [
'0' => 'fileHeader',
'1' => 'batchHeader',
'3' => [
'A' => 'segmentA',
'B' => 'segmentB',
'Z' => 'segmentZ'
],
'5' => 'batchTrailer',
'9' => 'fileTrailer'
];
}
public static function fileHeader(): array {
return [
'bank' => '9(003)',
'batch' => '9(004)',
'type' => '9(001)',
'reserved' => 'X(009)'
];
}
public static function fileTrailer(): array {
return [];
}
public static function batchHeader(): array {
return [];
}
public static function batchTrailer(): array {
return [];
}
}