PHPackages                             k-hei/lombok-like - 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. k-hei/lombok-like

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

k-hei/lombok-like
=================

Automatic get and set using native function \_\_call

v2.2.2(9y ago)252MITPHPPHP ^5.3.0 || ^7.0

Since Jan 3Pushed 9y ago2 watchersCompare

[ Source](https://github.com/Khwesten/LombokLike)[ Packagist](https://packagist.org/packages/k-hei/lombok-like)[ RSS](/packages/k-hei-lombok-like/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (6)DependenciesVersions (8)Used By (0)

Lombok-like
===========

[](#lombok-like)

You don't need create all getters and setters in your class. Only create attributes extends lombok-like and comment it for display in your IDE autocomplete.

Version
-------

[](#version)

@2.1.0 - Throw an exception.

@2.0.0 - Removed abstract methods and change reflection to closure.

@1.2.1 - Change name of methods from \_\_get to get for override.

@1.2.0 - Remove support to codes with underscore and improve to use private attributes.

@1.1.0 - Adaptated to old codes which were used with underscore before name of attribute.

Getting Started
---------------

[](#getting-started)

composer install

```
composer require k-hei/lombok-like

```

### Test Tutorial

[](#test-tutorial)

Include LombokLike class where you need:

```
include 'vendor/autoload.php';

```

Extend it on all classes that you need:

```
class Test extends \LombokLike\BaseEntity {}

```

If you want methods can be displayed in your IDE, use the PHPdoc on attributes:

```
class Test extends \LombokLike\BaseEntity {
    ...
    /**
     * @method typeOfReturn getNameOfAttribute() optionally description
     * @method typeOfReturn setNameOfAttribute($value) optionally description
     */
    protected $nameOfAttribute;
    ...
}

```

And use!

```
$test = new Test();
$test->setNameOfAttribute("Test");
echo $test->getNameOfAttribute();
//Result display is: Test

```

If you call a unknown method, receive a LombokException:

```
$test->setUnknowAttr("Unkmow property");

Fatal error: Uncaught Call to undefined function: setUnknowAttr() In: F:\...\file.php On line: 99
thrown in F:\...\LombokLike\entity\Base.php on line 100

```

Author
------

[](#author)

The LombokLike is created and maintained by [Khwesten Heiner](https://www.facebook.com/khwesten). Heiner is a senior FullStack web developer at [MeuTutor](http://www.meututor.com.br/) and [TeckS](http://tecks.com.br/).

License
-------

[](#license)

The LombokLike is released under the MIT public license.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity63

Established project with proven stability

 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 ~9 days

Total

7

Last Release

3359d ago

Major Versions

v1.2.1 → v2.0.02017-01-05

PHP version history (3 changes)v1.2.0PHP ^5.0.0

v2.1.0PHP ^5.3.0

v2.2.2PHP ^5.3.0 || ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/2aed26187c118305195f730f839a82f0667703b69898693f614c7dbe9b70c5d5?d=identicon)[Khwesten](/maintainers/Khwesten)

---

Top Contributors

[![Khwesten](https://avatars.githubusercontent.com/u/6913630?v=4)](https://github.com/Khwesten "Khwesten (27 commits)")

### Embed Badge

![Health badge](/badges/k-hei-lombok-like/health.svg)

```
[![Health](https://phpackages.com/badges/k-hei-lombok-like/health.svg)](https://phpackages.com/packages/k-hei-lombok-like)
```

###  Alternatives

[jackiedo/dotenv-editor

The .env file editor tool for Laravel 5.8+

2041.2M31](/packages/jackiedo-dotenv-editor)[johnbillion/wp-crontrol

Take control of the cron events on your WordPress website or WooCommerce store

22381.4k1](/packages/johnbillion-wp-crontrol)

PHPackages © 2026

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