mslwk/php-typesafe-array

Library for type-safe array handling in PHP

Installs: 21 129

Dependents: 1

Suggesters: 0

Security: 0

Stars: 3

Watchers: 2

Forks: 2

Open Issues: 0

pkg:composer/mslwk/php-typesafe-array

2.1.2 2024-04-17 09:01 UTC

This package is auto-updated.

Last update: 2025-09-17 12:01:39 UTC


README

Scrutinizer Code Quality Code Coverage Build Status Latest Stable Version License Total Downloads

PHP type-safe array

This library was designed to provide you with a way of creating type-safe array-like classes. The MSlwk\TypeSafeArray\ObjectArray allows you to:

  • pass the desired type via constructor (all added objects will be validated against it)
  • use the array object like an array (array accessors, foreach support)
  • use defined methods to operate

There is also a factory class for ObjectArray class instances creation.

Installation

Use composer to install the library

composer require mslwk/php-typesafe-array

Changelog

See changelog here.

Authors

License

This project is licensed under the MIT License - see the LICENSE file for details