Skip to content

Commit 7507a86

Browse files
updated custom behaviors documentation
1 parent 91e5dd8 commit 7507a86

File tree

1 file changed

+14
-5
lines changed

1 file changed

+14
-5
lines changed

Documentation/custom-behaviours.md

Lines changed: 14 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
1-
# Custom behaviours
1+
# Custom behaviors
22

33
You have the possibility to create your own step, name generator and compressor.
44

5-
- [Custom step](#custom-step)
6-
- [Custom name generator](#custom-name-generator)
7-
- [Custom compressor](#custom-compressor)
5+
- [Custom step example](#custom-step)
6+
- [Custom name generator example](#custom-name-generator)
7+
- [Custom compressor example](#custom-compressor)
88

99
## Custom step
1010

@@ -84,11 +84,13 @@ Breadlesscode\Backups\Generators\BackupNameGeneratorInterface:
8484
8585
## Custom compressor
8686
87+
MyCustomCompressor.php
88+
8789
```php
8890
<?php
8991
namespace My\Vendor\Compressor;
9092

91-
class MyCompressor extends AbstractCompressor
93+
class MyCustomCompressor extends AbstractCompressor
9294
{
9395
public function compress(string $source, string $targetFolder): ?string
9496
{
@@ -108,3 +110,10 @@ class MyCompressor extends AbstractCompressor
108110
}
109111
}
110112
```
113+
114+
Settings.yaml
115+
```yaml
116+
Breadlesscode:
117+
Backups:
118+
compressor: My\Vendor\Compressor\MyCustomCompressor
119+
```

0 commit comments

Comments
 (0)