xylemical / code-writer-twig
A twig code writing library.
dev-master
2022-06-30 05:44 UTC
Requires
- php: >7.4
- twig/twig: ^3.3
- xylemical/code: dev-master
Requires (Dev)
- xylemical/composer-dev-bundle: ^0.1.0
This package is auto-updated.
Last update: 2025-03-29 00:53:17 UTC
README
Simple writer of code structures using twig templating.
Install
The recommended way to install this library is through composer.
composer require xylemical/code-writer-twig
Usage
Example writer:
<?php use Xylemical\Code\Writer\Twig\TwigWriter; // Structure as created via xylemical/code documentation. $class = ...; $loader = new FilesystemLoader("templates"); $twig = new Environment($loader, ['debug' => TRUE]); $twig->addExtension(new DebugExtension()); $engine = new TwigWriter($twig); echo $engine->write($class);
License
MIT, see LICENSE.