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

ActiveLibrary

memio/memio
===========

A highly opinionated PHP code generator library

v3.0.3(3mo ago)336310.5k↓32.7%23[7 issues](https://github.com/memio/memio/issues)12MITPHPPHP ^7.2 || ^8.0CI passing

Since Oct 12Pushed 3mo ago13 watchersCompare

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

READMEChangelog (10)Dependencies (10)Versions (54)Used By (12)

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:

```
