You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
-Execute Fractor from the command line, passing the path to your configuration file as an argument:
53
-
```
54
-
./vendor/bin/fractor process -f fractor.php
55
-
```
52
+
Execute Fractor from the command line, passing the path to your configuration file as an argument:
53
+
```
54
+
./vendor/bin/fractor process -f fractor.php
55
+
```
56
56
57
57
4.**Review Changes**:
58
-
- Fractor will apply the rules specified in the configuration file to the targeted files.
59
-
- Review the changes made by Fractor to ensure they meet your expectations.
58
+
Fractor will apply the rules specified in the configuration file to the targeted files.
59
+
Review the changes made by Fractor to ensure they meet your expectations.
60
60
61
61
5.**Customization**:
62
-
- You can modify existing rules or create new ones to tailor Fractor's behavior to your specific needs.
63
-
- See the "Extending Fractor" section for guidance on creating custom rules.
62
+
You can modify existing rules or create new ones to tailor Fractor's behavior to your specific needs.
63
+
See the "Extending Fractor" section for guidance on creating custom rules.
64
64
65
65
## Extending Fractor
66
66
@@ -71,27 +71,27 @@ Fractor can be extended with additional transformation rules and support for new
71
71
Here's how you can extend Fractor with a custom rule:
72
72
73
73
1.**Creating New Rules**:
74
-
- Create a new rule by subclassing the appropriate rule class for the file type,
75
-
e.g. `\a9f\FractorXml\XmlFractor` for XML files.
76
-
- Each rule should specify the conditions under which it should be applied and the corresponding changes to be made.
77
-
- Ideally, new rules also have a test case that validates that they work correctly.
74
+
- Create a new rule by subclassing the appropriate rule class for the file type,
75
+
e.g. `\a9f\FractorXml\XmlFractor` for XML files.
76
+
- Each rule should specify the conditions under which it should be applied and the corresponding changes to be made.
77
+
- Ideally, new rules also have a test case that validates that they work correctly.
78
78
79
79
2.**Registering New Rules**:
80
-
- Register your custom rules within the Fractor configuration file.
80
+
- Register your custom rules within the Fractor configuration file.
81
81
82
82
### Supporting New File Types
83
83
84
84
1.**Supporting New File Types**:
85
-
- To support a new file type, you will need to implement an instance of `\a9f\Fractor\Fractor\FileProcessor`.
86
-
This processor must take care of decoding a file and then traversing the decoded file structure
87
-
(e.g. the DOM tree of an XML file; see `\a9f\FractorXml\XmlFileProcessor` for an example)
85
+
- To support a new file type, you will need to implement an instance of `\a9f\Fractor\Fractor\FileProcessor`.
86
+
This processor must take care of decoding a file and then traversing the decoded file structure
87
+
(e.g. the DOM tree of an XML file; see `\a9f\FractorXml\XmlFileProcessor` for an example)
88
88
89
89
2.**Testing**:
90
-
- Thoroughly test your extensions to ensure they function as expected and do not introduce unintended side effects.
91
-
- Write unit tests for your custom rules and parsers to maintain code quality and stability.
90
+
- Thoroughly test your extensions to ensure they function as expected and do not introduce unintended side effects.
91
+
- Write unit tests for your custom rules and parsers to maintain code quality and stability.
92
92
93
93
3.**Documentation**:
94
-
- Document your custom rules and file type extensions to aid other users in understanding and utilizing your contributions.
94
+
- Document your custom rules and file type extensions to aid other users in understanding and utilizing your contributions.
95
95
96
96
By extending Fractor in this manner, you can enhance its capabilities and adapt it to handle a wider range of file formats and transformation scenarios.
0 commit comments