PHPackages                             effectra/generator - 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. effectra/generator

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

effectra/generator
==================

The Effectra File Generator package.

v1.0.1(2y ago)0271MITPHP

Since Jun 19Pushed 2y agoCompare

[ Source](https://github.com/effectra/generator)[ Packagist](https://packagist.org/packages/effectra/generator)[ RSS](/packages/effectra-generator/feed)WikiDiscussions main Synced yesterday

READMEChangelog (2)Dependencies (3)Versions (3)Used By (1)

Effectra\\Generator
===================

[](#effectragenerator)

The Effectra\\Generator package provides a set of tools for generating PHP class files and configuration files.

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

[](#installation)

You can install the package via Composer:

```
composer require effectra/generator
```

Usage
-----

[](#usage)

### Generate Class

[](#generate-class)

To generate a PHP class file using the GeneratorClass class, follow these steps:

1. Create an instance of the Creator class:

```
$creator = new Creator();
```

2. Create an instance of the GeneratorClass class, providing the creator and the desired class name:

```
$generator = new GeneratorClass($creator, 'MyClass');
```

3. Customize the class by adding properties, methods, and other elements using the available methods provided by the GeneratorClass and Creator classes.
4. Generate the PHP code for the class:

```
$template = $generator->generate();
```

5. Save the generated code to a file:

```
$template->save('/path/to/MyClass.php');
```

### Generate Config File

[](#generate-config-file)

To generate a configuration file using the GeneratorConfigFile class, follow these steps:

1. Create an instance of the Creator class:

```
$creator = new Creator();
```

2. Create an instance of the GeneratorConfigFile class, providing the creator and the ConfigFile instance:

```
$configFile = new ConfigFile('/path/to/config.php');
$generator = new GeneratorConfigFile($creator, $configFile);
```

3. Generate a new section in the configuration file:

```
$section = 'database';
$config = [
    'driver' => 'mysql',
    'host' => 'localhost',
    'database' => 'mydatabase',
    'username' => 'myusername',
    'password' => 'mypassword',
];

$template = $generator->createSection($section, $config);
```

4. Save the updated configuration file:

```
$template->save('/path/to/config.php');
```

Contributing
------------

[](#contributing)

Contributions are welcome! If you find any issues or would like to suggest new features, please open an issue on the [GitHub repository](https://github.com/effectra/generator).

License
-------

[](#license)

This package is open-source software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

22

—

LowBetter than 21% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~55 days

Total

2

Last Release

1055d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/7e6219ae87e98df8783b2f595b013035dd183c0712afd24045a8acf0a40c3bdf?d=identicon)[effectra](/maintainers/effectra)

---

Top Contributors

[![BMTmohammedtaha](https://avatars.githubusercontent.com/u/95439605?v=4)](https://github.com/BMTmohammedtaha "BMTmohammedtaha (14 commits)")

---

Tags

config-filegenerate-classesgenerate-codegenerate-config-filegenerate-filegeneratorphptemplate

### Embed Badge

![Health badge](/badges/effectra-generator/health.svg)

```
[![Health](https://phpackages.com/badges/effectra-generator/health.svg)](https://phpackages.com/packages/effectra-generator)
```

###  Alternatives

[aldas/modbus-tcp-client

Modbus TCP protocol client library

219144.7k](/packages/aldas-modbus-tcp-client)[sallar/jdatetime

Jalali (Shamsi) DateTime class written in PHP, Supports year higher than 2038

18742.9k4](/packages/sallar-jdatetime)[kesar/ethereum-php

Ethereum client library in PHP

1031.9k](/packages/kesar-ethereum-php)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
