PHPackages                             nilz/memio - 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. nilz/memio

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

nilz/memio
==========

A highly opinionated PHP code generator library

3.0.3(3y ago)03MITPHPPHP ^7.0|^8.0

Since Oct 12Pushed 3y agoCompare

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

READMEChangelogDependencies (7)Versions (54)Used By (0)

Memio [![SensioLabsInsight](https://camo.githubusercontent.com/a003b2d40d0cabba81032adec15126d3937c53064c4f6c50074afdf90c27a327/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f61326232343432332d393834302d343561622d613031312d3539386161336261323662662f6d696e692e706e67)](https://insight.sensiolabs.com/projects/a2b24423-9840-45ab-a011-598aa3ba26bf) [![Travis CI](https://camo.githubusercontent.com/2cc3c5ade3db74e6778880f36bc6422768991ba22fd008be2646410e3d3c1511/68747470733a2f2f7472617669732d63692e6f72672f6d656d696f2f6d656d696f2e706e67)](https://travis-ci.org/memio/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:^1.0

```

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

[](#full-example)

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

```
