Issues (14)

config/dto.php (1 issue)

Labels
Severity
1
<?php
2
3
use Carbon\Carbon;
4
use Cerbero\LaravelDto\Console\DefaultDtoQualifier;
5
use Cerbero\LaravelDto\Manipulators\CarbonConverter;
6
7
use const Cerbero\Dto\NONE;
0 ignored issues
show
The constant Cerbero\Dto\NONE was not found. Maybe you did not declare it correctly or list all dependencies?
Loading history...
8
9
return [
10
    /*
11
    |--------------------------------------------------------------------------
12
    | DTO class qualifier
13
    |--------------------------------------------------------------------------
14
    |
15
    | The name of the class that fully qualifies DTO class names when DTOs are
16
    | generated via Artisan. A default qualifier has been included but feel
17
    | free to replace it if you need DTOs to be in a different directory.
18
    |
19
    */
20
    'qualifier' => DefaultDtoQualifier::class,
21
22
    /*
23
    |--------------------------------------------------------------------------
24
    | DTO value conversions
25
    |--------------------------------------------------------------------------
26
    |
27
    | Sometimes we might want a specific value type to be converted when a DTO
28
    | turns into an array. Below you can set what class should be converted
29
    | and the converter that accommodates its conversion from/to the DTO.
30
    |
31
    */
32
    'conversions' => [
33
        Carbon::class => CarbonConverter::class,
34
    ],
35
36
    /*
37
    |--------------------------------------------------------------------------
38
    | DTO value listeners
39
    |--------------------------------------------------------------------------
40
    |
41
    | Whenever a DTO sets or gets one of its property values, a listener might
42
    | intercept such event and alter the outcome. This is handy for example
43
    | when a value needs to be processed before getting set or retrieved.
44
    |
45
    */
46
    'listeners' => [
47
        // UserData::class => UserDataListener::class,
48
    ],
49
50
    /*
51
    |--------------------------------------------------------------------------
52
    | DTO global flags
53
    |--------------------------------------------------------------------------
54
    |
55
    | The flags to apply to all DTOs by default. Multiple flags might be added
56
    | below by joining them with bitwise OR operators "|". These flags will
57
    | finally be merged with the default flags specified within each DTO.
58
    |
59
    */
60
    'flags' => NONE,
61
];
62