PHPackages                             teleiosis/property\_access - 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. teleiosis/property\_access

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

teleiosis/property\_access
==========================

Use calls methods as properties in PHP

06PHP

Since Oct 24Pushed 8y ago1 watchersCompare

[ Source](https://github.com/blbraner1234/PHPPropertyAccess)[ Packagist](https://packagist.org/packages/teleiosis/property_access)[ RSS](/packages/teleiosis-property-access/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Synopsis
--------

[](#synopsis)

PropertyAccess is a small PHP package that will allow you to access your class methods as though there are properties. This works by utilizing \_\_set, \_\_get, and \_\_isset magic methods. By using the above magic methods this also allows you to do this with non existent or private properties as well.

This is setup to mimic using Python's @property decorator

Code Example
------------

[](#code-example)

Lets say you have a User class that want to be able to set the firstName, lastName, and email on. You want to be able to automaticlly construct the email from the Normally you would have something such as the example below

```
