unl / php-dwt-parser
A PHP library for parsing DWT files and turning them into PHP classes
Installs: 5 090
Dependents: 1
Suggesters: 0
Security: 0
Stars: 7
Watchers: 8
Forks: 5
Open Issues: 0
Requires
- php: >=8.1
- unl/html-minifier: *
- zendframework/zend-code: ^2.5
Requires (Dev)
- phpunit/phpunit: ^10.5.27
This package is auto-updated.
Last update: 2024-11-11 19:30:33 UTC
README
This package generates php class files (objects) from Dreamweaver template files. Examples found under docs/examples/
.
Test browser output (basic/example_style1.php
):
- Open
docs/examples/basic/example_style1.php
in a browser. - Builds a webpage object based on a class file that was previously generated by
createTemplates.php
.- The member variables of this object are editable regions that should be modified as desired.
- This uses
TemplateStyle1.php
andTemplate_style1.tpl
that have been pregenerated.
Test template creation:
cd docs/examples/basic/
php ../../../bin/createTemplates.php example.ini
This will write new versions of TemplateStyle1.php
and Template_style1.tpl
to docs/examples/basic/
Scanner (scanner_example.php
):
Scans a rendered DWT-based page for editable regions. All editable regions become member variables of the scanner object.