Library for type-safe array handling in PHP

2.0.2 2021-06-30 13:26 UTC

This package is auto-updated.

Last update: 2021-09-30 14:01:04 UTC


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.


Use composer to install the library

composer require mslwk/php-typesafe-array


See changelog here.



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