Download the PHP package zero-to-prod/dynamic-setter without Composer
On this page you can find all versions of the php package zero-to-prod/dynamic-setter. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download zero-to-prod/dynamic-setter
More information about zero-to-prod/dynamic-setter
Files in zero-to-prod/dynamic-setter
Package dynamic-setter
Short Description Fluently set class properties with dynamic methods.
License MIT
Homepage https://github.com/zero-to-prod/dynamic-setter
Informations about the package dynamic-setter
Zerotoprod\DynamicSetter
Contents
- Introduction
- Requirements
- Installation
- Usage
- Nested Objects
- Local Development
- Contributing
Introduction
Fluently set class properties with dynamic methods.
Requirements
- PHP 7.1 or higher.
Installation
Install Zerotoprod\DynamicSetter
via Composer:
This will add the package to your project’s dependencies and create an autoloader entry for it.
Usage
The DynamicSetter
trait allows you to easily create class instances and dynamically set properties through method chaining.
It provides a simple way to manage object instantiation and property setting with set_*
methods.
To use the DynamicSetter
trait, include it in your class and define the properties you want to set dynamically.
Nested Objects
You can also use the DynamicSetter trait in classes that contain other objects, allowing you to set properties in a nested structure.
Contributing
Contributions, issues, and feature requests are welcome! Feel free to check the issues page if you want to contribute.
- Fork the repository.
- Create a new branch (
git checkout -b feature-branch
). - Commit changes (
git commit -m 'Add some feature'
). - Push to the branch (
git push origin feature-branch
). - Create a new Pull Request.