PHPackages                             hostnet/accessor-generator-plugin-lib - 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. hostnet/accessor-generator-plugin-lib

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

hostnet/accessor-generator-plugin-lib
=====================================

Generate get, set, add, remove methods on the fly.

6.1.0(8mo ago)10118.9k↓13.5%9MITPHPPHP ^8.1CI passing

Since Nov 6Pushed 8mo ago2 watchersCompare

[ Source](https://github.com/hostnet/accessor-generator-plugin-lib)[ Packagist](https://packagist.org/packages/hostnet/accessor-generator-plugin-lib)[ RSS](/packages/hostnet-accessor-generator-plugin-lib/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (13)Versions (97)Used By (0)

Welcome to the Accessor Generator composer plugin.

Goals
-----

[](#goals)

The goal of this plugin is to provide dynamically generated get, set, add, remove accessor methods for Classes based on information that we can read from the doc comment. Currently we can process Doctrine ORM annotations.

Since the code is automatically generated you do not have to (unit) test it and it will be very consistent with a lot of added boilerplate code that will make your code fail early if you happen to use the wrong type or number of arguments with the generated functions.

Limitations
-----------

[](#limitations)

- Imports through grouped `use` statements is not supported. ([https://wiki.php.net/rfc/group\_use\_declarations](https://wiki.php.net/rfc/group_use_declarations))

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

[](#installation)

Add `hostnet/accessor-generator-plugin-lib` to your `composer.json` and run `composer require hostnet/accessor-generator-plugin-lib`

If you want to invoke generation after installing you can run `php composer.phar dump-autoload`. Add `-vv` to the dump-autoload command for more verbosity.

Usage
-----

[](#usage)

```
