This package is abandoned and no longer maintained. The author suggests using the jjware/collections package instead.

Library for working with objects in PHP

0.5.1 2016-03-28 12:57 UTC


Build Status

Library of PHP Classes

This is a work in progress. Contained within are a group of classes which represent a base object, collections, and anything else that I might come up with.


Install the latest version

$ composer require 0n3s3c/baselibrary

Basic Usage


use Base\Collections\Collection;
use Base\Collections\AddItemEventArgs;

$collection = new Collection();

$collection->on("add", function (Collection $sender, AddItemEventArgs $eventArgs) {
  echo $eventArgs->getItem();


$lessThanThree = $collection->where(function ($x) {
  return $x < 3;

//lessThanThree == [1, 2]