Download the PHP package grottopress/getter without Composer
On this page you can find all versions of the php package grottopress/getter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download grottopress/getter
More information about grottopress/getter
Files in grottopress/getter
Download grottopress/getter
More information about grottopress/getter
Files in grottopress/getter
Vendor grottopress
Package getter
Short Description Get private object attributes directly, without calling getter methods.
License MIT
Package getter
Short Description Get private object attributes directly, without calling getter methods.
License MIT
Please rate this library. Is it a good library?
Informations about the package getter
Getter
Description
Getter allows you to get private object attributes directly, without calling getter methods.
For example, instead of calling $myObject->getMyAttr()
, you can just do $myObject->myAttr
. Under the hood, Getter gets your attribute by calling a private getMyAttr()
method that you define in your class.
This way, you get the benefit of syntactic sugar, while maintaining encapsulation.
Installation
Install via composer: composer require grottopress/getter
Usage
Import trait into your class, and use thus:
Development
Run tests with composer run test
.
Contributing
- Fork it
- Switch to the
master
branch:git checkout master
- Create your feature branch:
git checkout -b my-new-feature
- Make your changes, updating changelog and documentation as appropriate.
- Commit your changes:
git commit
- Push to the branch:
git push origin my-new-feature
- Submit a new Pull Request against the
GrottoPress:master
branch.
All versions of getter with dependencies
PHP Build Version
Package Version
Requires
php Version
>=7.0
The package grottopress/getter contains the following files
Loading the files please wait ....