Download the PHP package danwe/helpers-gettersetteraccessor without Composer

On this page you can find all versions of the php package danwe/helpers-gettersetteraccessor. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package helpers-gettersetteraccessor

php-Helpers-GetterSetterAccessor

Helper class offering functionality to define combined getter and setter class methods with a minimum of expressive code. An example for a "combined getter and setter" would be User::age( $age=null ) for getting or setting an user's age instead of having two separate methods User::getAge() and User::setAge( $age ).

Latest Stable Version Build Status Coverage Status Download count

Disclaimer

This library is in no way suggesting that combined getters and setters are superior to having separate methods. There might be use cases where each way has certain advantages and disatvantages. Choosing one might often just be a question of the developer's own taste of style.

Usage

See the following usage example:

Performance Implications

You should be aware that GetterSetterAccessor is using PHP's reflection facilities internally to set/get property values.

This package contains a benchmark to test a class using this library versus a simple means implementation. It can be run via:

Example output:

The benchmark result indicated that using GetterSetterAccessor is three to four times slower than using hard coded methods doing the same thing (this might vary depending on the PHP version and the system). If a method is expected to be called several thousand times than this could become an actual concern.

TODOs


All versions of helpers-gettersetteraccessor with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package danwe/helpers-gettersetteraccessor contains the following files

Loading the files please wait ....