PHP Classes
elePHPant
Icontem

Handy Properties with PHP Accessors and Mutators: Accessors and mutators to access class variables

Recommend this page to a friend!
  Info   View files View files (43)   DownloadInstall with Composer Download .zip   Reputation   Support forum   Blog    
Last Updated Ratings Unique User Downloads Download Rankings
2019-07-09 (2 months ago) RSS 2.0 feedNot yet rated by the usersTotal: 30 This week: 1All time: 9,662 This week: 335Up
Version License PHP version Categories
php-handy-properties 1.0MIT/X Consortium ...5PHP 5, Data types, Traits
Description Author

This package provides accessors and mutators to access class variables.

It provides a trait for use in any class to implement accessor functions that can make certain functions be called when a variable value is retrieved.

The package also provides another trait that implement mutator functions that can make certain functions be called when a variable is accessed to set its value.

PHP Convenient Properties is a PHP library that scaffolds the use of properties through accessors and mutators.

Innovation Award
PHP Programming Innovation award nominee
August 2019
Nominee
Vote
Setters and getters are functions that can be used to control how class variable values are stored and retrieved.

This package provides a simpler approach to implement a general solution to control class variable value access, providing a trait that can be used in many classes to implement setters and getters.

Manuel Lemos
  Performance   Level  
Name: Axel Pardemann <contact>
Classes: 8 packages by
Country: Mexico Mexico
Age: 37
All time rank: 195320 in Mexico Mexico
Week rank: 12 Up2 in Mexico Mexico Up
Innovation award
Innovation award
Nominee: 2x

 

Details

<div align="center">

<h1>PHP Handy Properties</h1>
<p align="center"> 
    <a href="https://packagist.org/packages/norse-blue/handy-properties"><img alt="Stable Release" src="https://img.shields.io/packagist/v/norse-blue/handy-properties.svg?style=flat-square&label=release&logo=packagist&logoColor=eceff4&colorA=4c566a&colorB=5e81ac"></a>
    <a href="https://travis-ci.com/norse-blue/php-handy-properties"><img alt="Build Status" src="https://img.shields.io/travis/com/norse-blue/php-handy-properties.svg?style=flat-square&label=build&logo=travis-ci&logoColor=eceff4&colorA=4c566a&colorB=88c0d0"></a>
    <a href="https://php.net/releases"><img alt="PHP Version" src="https://img.shields.io/packagist/php-v/norse-blue/handy-properties.svg?style=flat-square&label=php&logo=php&logoColor=eceff4&colorA=4c566a&colorB=b48ead"></a>
    <a href="https://codeclimate.com/github/norse-blue/php-handy-properties"><img alt="Maintainability" src="https://img.shields.io/codeclimate/maintainability/norse-blue/php-handy-properties.svg?style=flat-square&label=maintainability&logo=code-climate&logoColor=eceff4&colorA=4c566a&colorB=88c0d0"></a>
    <a href="https://codeclimate.com/github/norse-blue/php-handy-properties"><img alt="Test Coverage" src="https://img.shields.io/codeclimate/coverage/norse-blue/php-handy-properties.svg?style=flat-square&label=coverage&logo=code-climate&logoColor=eceff4&colorA=4c566a&colorB=88c0d0"></a>
    <a href="https://packagist.org/packages/norse-blue/handy-properties"><img alt="Total Downloads" src="https://img.shields.io/packagist/dt/norse-blue/handy-properties.svg?style=flat-square&label=downloads&logoColor=eceff4&colorA=4c566a&colorB=88c0d0"></a>
    <a href="https://github.com/norse-blue/php-handy-properties/blob/master/LICENSE.md"><img alt="License" src="https://img.shields.io/github/license/norse-blue/php-handy-properties.svg?style=flat-square&label=license&logoColor=eceff4&colorA=4c566a&colorB=a3be8c"></a>
</p>

</div> <hr>

PHP Handy Properties is a PHP library that scaffolds the use of properties through accessors and mutators.

Installation

>Requirements: >- PHP 7.3+

Install this package using Composer:

composer require norse-blue/handy-properties

Usage

To get more in-depth knowledge about this package, please refer to the Official Documentation.

Changelog

Please refer to the CHANGELOG.md file for more information about what has changed recently.

Contributing

Contributions to this project are accepted and encouraged. Please read the CONTRIBUTING.md file for details on contributions.

Credits

Security

Please review our security policy to know how to report security vulnerabilities within this package.

Support the development

Do you like this project? Support it by donating

<a href="https://www.buymeacoffee.com/axelitus"><img src="docs/assets/images/buy-me-a-coffee.svg" width="180" alt="Buy me a coffee"></img></a>

License

This package is open-sourced software licensed under the MIT license.

  Files folder image Files  
File Role Description
Files folder image.changelog (1 file)
Files folder image.github (4 files, 1 directory)
Files folder imagedocs (2 files, 2 directories)
Files folder imagesrc (1 file, 3 directories)
Files folder imagetests (1 file, 2 directories)
Accessible without login Plain text file .codeclimate.yml Data Auxiliary data
Accessible without login Plain text file .editorconfig Data Auxiliary data
Accessible without login Plain text file .phpcs.xml.dist Data Auxiliary data
Accessible without login Plain text file .styleci.yml Data Auxiliary data
Accessible without login Plain text file .travis.yml Data Auxiliary data
Accessible without login Plain text file CHANGELOG.md Data Auxiliary data
Accessible without login Plain text file composer.json Data Auxiliary data
Accessible without login Plain text file LICENSE.md Lic. License text
Accessible without login Plain text file php-handy-properties.sublime-project Data Auxiliary data
Plain text file phpinsights.php Class Class source
Accessible without login Plain text file phpstan.neon.dist Data Auxiliary data
Accessible without login Plain text file phpunit.xml.dist Data Auxiliary data
Accessible without login Plain text file README.md Doc. Documentation
Accessible without login Plain text file SECURITY.md Data Auxiliary data

  Files folder image Files  /  .changelog  
File Role Description
  Accessible without login Plain text file CHANGELOG-0.0.0.md Data Auxiliary data

  Files folder image Files  /  .github  
File Role Description
Files folder imageISSUE_TEMPLATE (3 files)
  Accessible without login Plain text file CODE_OF_CONDUCT.md Data Auxiliary data
  Accessible without login Plain text file CONTRIBUTING.md Data Auxiliary data
  Accessible without login Plain text file FUNDING.yml Data Auxiliary data
  Accessible without login Plain text file PULL_REQUEST_TEMPLATE.md Data Auxiliary data

  Files folder image Files  /  .github  /  ISSUE_TEMPLATE  
File Role Description
  Accessible without login Plain text file BUG_REPORT.md Data Auxiliary data
  Accessible without login Plain text file FEATURE_REQUEST.md Data Auxiliary data
  Accessible without login Plain text file QUESTION_DISCUSSION.md Data Auxiliary data

  Files folder image Files  /  docs  
File Role Description
Files folder imageassets (2 directories)
Files folder image_sass (1 directory)
  Accessible without login Plain text file index.md Data Auxiliary data
  Accessible without login Plain text file _config.yml Data Auxiliary data

  Files folder image Files  /  docs  /  assets  
File Role Description
Files folder imageimages (1 file)
Files folder imagejs (1 file)

  Files folder image Files  /  docs  /  assets  /  images  
File Role Description
  Accessible without login Plain text file buy-me-a-coffee.svg Data Auxiliary data

  Files folder image Files  /  docs  /  assets  /  js  
File Role Description
  Accessible without login Plain text file search-data.json Data Auxiliary data

  Files folder image Files  /  docs  /  _sass  
File Role Description
Files folder imagecustom (1 file)

  Files folder image Files  /  docs  /  _sass  /  custom  
File Role Description
  Accessible without login Plain text file custom.scss Data Auxiliary data

  Files folder image Files  /  src  
File Role Description
Files folder imageExceptions (3 files)
Files folder imageSupport (1 file)
Files folder imageTraits (3 files)
  Plain text file HandyObject.php Class Class source

  Files folder image Files  /  src  /  Exceptions  
File Role Description
  Plain text file PropertyBaseException.php Class Class source
  Plain text file PropertyNotAccessibleException.php Class Class source
  Plain text file PropertyNotMutableException.php Class Class source

  Files folder image Files  /  src  /  Support  
File Role Description
  Plain text file Transformer.php Class Class source

  Files folder image Files  /  src  /  Traits  
File Role Description
  Plain text file BuildsMethodName.php Class Class source
  Plain text file HasPropertyAccessors.php Class Class source
  Plain text file HasPropertyMutators.php Class Class source

  Files folder image Files  /  tests  
File Role Description
Files folder imageHandyObject (3 files)
Files folder imageHelpers (4 files)
  Plain text file TestCase.php Class Class source

  Files folder image Files  /  tests  /  HandyObject  
File Role Description
  Plain text file AccessPropertiesTest.php Class Class source
  Plain text file IssetPropertiesTest.php Class Class source
  Plain text file MutatePropertiesTest.php Class Class source

  Files folder image Files  /  tests  /  Helpers  
File Role Description
  Plain text file HandySubjectAccessible.php Class Class source
  Plain text file HandySubjectAccessibleAndMutable.php Class Class source
  Plain text file HandySubjectMutable.php Class Class source
  Plain text file HandySubjectMutableVoid.php Class Class source

 Version Control Unique User Downloads Download Rankings  
 100%
Total:30
This week:1
All time:9,662
This week:335Up