Architecture¶
In the scheme below, you may see how PhpTabs core is structured.
It may be useful for all PhpTabs users. Nevertheless, this is more for those who plan to contribute.
Reader ------------ Writer
------------------ | | ------------------
| Guitar Pro, MIDI | | Internal | | Guitar Pro, MIDI |
| JSON, serialized | ------> | | ------> | JSON, serialized |
| file or string | | | | XML, YAML file |
------------------ | | | or string |
| Music ------------------
Importer | |
----------------- | | Renderer
| PHP array | ------> | | ------------------
------------------ | Model | ------> | VexTab |
| | ------------------
| | ------------------
| | ------> | ASCII |
| | ------------------
| |
| | Exporter
| | ------------------
| | ------> | PHP array |
| | ------------------
------------
Component roles¶
- Reader imports data from files and strings into the internal model
- Writer exports data to files or strings
- Renderer exports data to a human-readable representation,
- Exporter exports data as PHP arrays for caching or various usages
- Importer imports data from internal exports (array)
With the internal music model, you can easily convert files from one type to another.