Download the PHP package shahmal1yev/gcollection without Composer
On this page you can find all versions of the php package shahmal1yev/gcollection. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download shahmal1yev/gcollection
More information about shahmal1yev/gcollection
Files in shahmal1yev/gcollection
Package gcollection
Short Description GenericCollection is a versatile PHP library that provides a type-safe collection class for managing various data types. Simplify your data management with intuitive methods and strong type constraints.
License
Informations about the package gcollection
PHP-based GenericCollection
GenericCollection
is a PHP library for handling collections with support for various primitive types. It allows for flexible type validation and manipulation of collections.
Features
- Flexible Type Handling: Supports various primitive types such as
int
,string
,float
,bool
, and more. - Type Validation: Provides methods to validate if an item in the collection adheres to the specified type.
- Extensible: Easily extendable to support custom types and validation logic.
Dependencies
Installation
You can install GenericCollection
via Composer. If you don't have Composer installed, you can get it from getcomposer.org.
Run the following command to install GenericCollection
:
Usage
Here is a basic example of how to use the GenericCollection
:
Available Primitive Types
GenericCollection
includes the following primitive types:
- IntType: Validates integer values.
- StringType: Validates string values.
- FloatType: Validates float values.
- BoolType: Validates boolean values.
- ObjectType: Validates object values.
- CallableType: Validates callable values.
- ResourceType: Validates resource values.
- IterableType: Validates iterable values.
Contributing
Contributions are welcome! Please follow these steps to contribute to the project:
- Fork the Repository: Create a personal copy of the repository by forking it on GitHub.
- Create a Branch: Create a new branch for your changes.
- Make Changes: Implement your changes or fix issues.
- Submit a Pull Request: Push your changes and submit a pull request for review.
Running Tests
To run the tests, make sure you have PHPUnit installed. You can install it via Composer:
Run the tests with the following command:
License
This project is licensed under the MIT License. For more information, see the LICENSE.
Contact
For any questions or feedback, please contact us at LinkedIn.