Skip to content

xylemical/code-php

Repository files navigation

PHP Code Writer

Code writer for PHP.

Install

The recommended way to install this library is through composer.

composer require xylemical/code-php

Usage

Example writer using twig (requires xylemical/code-writer-twig):

<?php

use Xylemical\Code\Writer\Twig\TwigRender;

// Structure as created via xylemical/code documentation.
$class = ...;

$loader = new PhpTwigLoader();
$twig = new Environment($loader, ['debug' => TRUE]);
$twig->addExtension(new DebugExtension());
$twig->addExtension(new PhpTwigExtension());
$engine = new TwigRender($twig);

echo $engine->render($class);

License

MIT, see LICENSE.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published