PHPackages                             gnugat/medio - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. gnugat/medio

Abandoned → [memio/memio](/?search=memio%2Fmemio)Library[Utility &amp; Helpers](/categories/utility)

gnugat/medio
============

A highly opinionated PHP code generator library

v2.0.1(6y ago)3416823[7 issues](https://github.com/gnugat/medio/issues)MITPHPPHP ^7.0CI passing

Since Oct 12Pushed 3mo ago13 watchersCompare

[ Source](https://github.com/gnugat/medio)[ Packagist](https://packagist.org/packages/gnugat/medio)[ Docs](http://memio.github.io/memio)[ RSS](/packages/gnugat-medio/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (10)Dependencies (7)Versions (49)Used By (0)

Memio
=====

[](#memio)

Memio is a library, it allows you to describe PHP code by building "Model" classes (e.g. `new Method('__construct')`) and then to generate it using a `PrettyPrinter`!

> **Note**: The actual generation logic is held in [Twig templates](http://twig.sensiolabs.org/). If the coding style provided doesn't appeal to you, you can overwrite those templates easily.

Installation
------------

[](#installation)

Install using [Composer](https://getcomposer.org/download):

```
$ composer require memio/memio:^3.0
```

Full example
------------

[](#full-example)

We're going to generate a class with a constructor and two attributes:

```
