2017 © Pedro Peláez
 

library util

General purpose helper methods

image

harp-orm/util

General purpose helper methods

  • Thursday, July 17, 2014
  • by hkdobrev
  • Repository
  • 2 Watchers
  • 1 Stars
  • 1,027 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 0 Forks
  • 1 Open issues
  • 5 Versions
  • 0 % Grown

The README.md

Util

Build Status Scrutinizer Code Quality Code Coverage Latest Stable Version, (*1)

General purpose helper methods, (*2)

Array Helpers

  • Arr::toAssoc - convert a random array to a strict structure - every entry has a string key
  • Arr::invoke - if the array holds only objects, aggregate the results of a method call on all the objects
  • Arr::pluckProperty - aggregate the value of a property of each object in the array
  • Arr::pluckUniqueProperty - aggregate the value of a property of each object in the array, only unique values
  • Arr::pluck - aggregate all the values of entries with a given key
  • Arr::flatten - flatten all the values of nested arrays
  • Arr::groupBy - group by result of callback

SplObjectStorage Helpers

  • Objects::invoke - aggregate the results of a method call on all the objects
  • Objects::filter - similar to array_filter, but for SplObjectStorage
  • Objects::toArray - convert SplObjectStorage into an array
  • Objects::fromArray - convert an array into a SplObjectStorage
  • Objects::sort - sort a SplObjectStorage using a comparation closure
  • Objects::groupBy - change SplObjectStorage where the "key" object is the result of a callback, and all the other objects are grouped by them

License

Copyright (c) 2014, Clippings Ltd. Developed by Ivan Kerin, (*3)

Under BSD-3-Clause license, read LICENSE file., (*4)

The Versions

17/07 2014

dev-master

9999999-dev

General purpose helper methods

  Sources   Download

BSD-3-Clause

17/07 2014

0.2.2

0.2.2.0

General purpose helper methods

  Sources   Download

BSD-3-Clause

12/06 2014

0.2.1

0.2.1.0

General purpose helper methods

  Sources   Download

BSD-3-Clause

31/05 2014

0.2.0

0.2.0.0

General purpose helper methods

  Sources   Download

BSD-3-Clause

15/05 2014

0.1

0.1.0.0

General purpose helper methods

  Sources   Download

BSD-3-Clause