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

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

memio/model
===========

Memio's models, used to describe the code to generate

v3.0.3(3mo ago)5312.2k↓30.8%6[1 PRs](https://github.com/memio/model/pulls)8MITPHPPHP ^7.2 || ^8.0CI passing

Since Apr 2Pushed 3mo ago1 watchersCompare

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

READMEChangelog (10)Dependencies (5)Versions (28)Used By (8)

Memio's Models
==============

[](#memios-models)

Describe PHP code (classes/interfaces with their constants, properties, methods, method arguments and even PHPdoc) by constructing "Model" objects.

> **Note**: This package is part of [Memio](http://memio.github.io/memio), a highly opinionated PHP code generator. Have a look at [the main repository](http://github.com/memio/memio).

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

[](#installation)

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

```
composer require memio/model:^3.0

```

Example
-------

[](#example)

Let's say we want to describe the following method:

```
    /**
     * @api
     */
    public function doSomething(ValueObject $valueObject, int $type = self::TYPE_ONE, bool $option = true);
```

In order to do so, we'd need to write the following:

```
