PHPackages                             krak/struct-gen - 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. krak/struct-gen

ActiveComposer-plugin[Utility &amp; Helpers](/categories/utility)

krak/struct-gen
===============

v0.1.3(5y ago)26.6kMITPHPPHP ^7.2CI failing

Since Jun 1Pushed 5y ago1 watchersCompare

[ Source](https://github.com/krakphp/struct-gen)[ Packagist](https://packagist.org/packages/krak/struct-gen)[ RSS](/packages/krak-struct-gen/feed)WikiDiscussions v0.x Synced 1w ago

READMEChangelog (7)Dependencies (8)Versions (8)Used By (0)

Struct Generation
=================

[](#struct-generation)

Define structs as simple php classes with typed property definitions. Include a StructTrait and let the library generate all the boiler plate for you for making immutable value objects that work great with IDEs and static analysis.

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

[](#installation)

Install with composer at `krak/struct-gen`

Usage
-----

[](#usage)

Given some class definitions that use a special trait called `{className}Struct` (where {className} is the actual class name):

```
