# getters-and-setters

> Auxiliar class to you don't need create all methods getters and setters of your class.

Latest version **1.1.0** (published 2015-10-23) · MIT license · 0 weekly downloads

## Install

```sh
npm install getters-and-setters
pnpm add getters-and-setters
yarn add getters-and-setters
bun add getters-and-setters
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.0 |
| Published | 2015-10-23 |
| First published | 2015-10-23 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 2 |
| Author | Khwesten Heiner S. de Carvalho |
| Maintainers | khwesten |
| Keywords | getter, automatically, setter, automatically-get-set, auto-get/set |

## Links

- npm: https://www.npmjs.com/package/getters-and-setters
- Repository: https://github.com/Khwesten/GettersAndSetters
- Homepage: https://github.com/Khwesten/GettersAndSetters#readme
- Issues: https://github.com/Khwesten/GettersAndSetters/issues
- npm.io page: https://npm.io/package/getters-and-setters

## Recent versions

- 1.1.0 (latest) — 2015-10-23
- 1.0.0 — 2015-10-23

## README

# GettersAndSetters
You don't need create all getters and setters in your class, only create attributes and comment it for display in your IDE.

## Getting Started

### Test Tutorial

Include GettersAndSetters class where you need:

    include 'GettersAndSetters.php';

Extend it on all classes that you need:

    class Test extends GettersAndSetters {}

Use protected attributes to it can be manipulated:

    class Test extends GettersAndSetters {
        ...
        protected $name;
        ...
    }

If you want methods can be displayed in your IDE, use the PHPdoc on attributes:

    class Test extends GettersAndSetters {
        ...
        /**
         * @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

## Author

The GettersAndSetters 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 [Locadados](https://www.facebook.com/locadados).

## License

The GettersAndSetters is released under the MIT public license.

---
_Source: https://npm.io/package/getters-and-setters · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
