Getter and setter method trait for PHP
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
Dustin Wilson 802aa1de1d Updated tests 1 year ago
lib Changed namespace, updated composer 1 year ago
tests Updated tests 1 year ago
.gitignore Initial commit 1 year ago
AUTHORS Initial commit 1 year ago
LICENSE Initial commit 1 year ago
README.md Initial commit 1 year ago
composer.json Changed namespace, updated composer 1 year ago
composer.lock Changed namespace, updated composer 1 year ago
run Changed namespace, updated composer 1 year ago

README.md

Getters & Setters

Let's face it. Getters and setters in PHP sucks. Instead of having getter and setter accessor methods for classes we instead have the __get and __set magic methods to handle all properties. Not only are they unwieldy to use when you have many properties they also become difficult to handle when inheriting, especially when traits are involved. This trait attempts to create hackish getter and setter methods that can be extended by simple inheritance.

This trait was originally called MagicProperties and was available in the mensbeam/framework package. That one has been discontinued.

This is a stub. Documentation is forthcoming.