2017 © Pedro Peláez
 

library haystack

Forget Haystack vs Needle order, the object IS the Haystack. Haystack is a library that allows for pipelining and immutable structures.

image

ericpoe/haystack

Forget Haystack vs Needle order, the object IS the Haystack. Haystack is a library that allows for pipelining and immutable structures.

  • Wednesday, January 10, 2018
  • by ericpoe
  • Repository
  • 3 Watchers
  • 37 Stars
  • 4,177 Installations
  • PHP
  • 2 Dependents
  • 0 Suggesters
  • 1 Forks
  • 1 Open issues
  • 11 Versions
  • 11 % Grown

The README.md

GitHub Workflow Status for Code Testing (master branch) GitHub Workflow Status for Code Analysis (master branch) Software License Packagist Version, (*1)

Haystack

Forget Haystack vs Needle order, the object IS the Haystack. Haystack is a library that allows for pipelining, immutable structures, and UTF-8 strings., (*2)

Install

Haystack is installable as a Composer package:, (*3)

$ composer require ericpoe/haystack

Running tests

$ git clone ...
$ composer install
$ vendor/bin/phpunit

Background

Trying to remember commonly-used PHP functions for strings and arrays in PHP is hard. Are array functions haystack-needle and string functions needle-haystack, or vice versa? Quick, without looking at documentation or using a decent IDE, which is correct: in_array($needle, $haystack) or in_array($haystack, needle)?, (*4)

Also, even though many of the same kinds of functions are run against arrays and strings, the function names are wildly different. strstr and in_array do similar things, yet have different names and are called in different manners., (*5)

Goal

This project will attempt to match as many string and array verbs as possible. For example, $foo->contains("elvis") should determine if the string "elvis" is contained in the $foo object, it shouldn't matter if $foo is a string or an array. Ditto $foo->map($callable) and $foo->filter($callable)., (*6)

How do I?

Check out the manual for all the things you can do with the Haystack library., (*7)

The Versions

10/01 2018

dev-version3

dev-version3

Forget Haystack vs Needle order, the object IS the Haystack. Haystack is a library that allows for pipelining and immutable structures.

  Sources   Download

MIT

The Requires

  • php >=7.1.0

 

The Development Requires

09/12 2016

dev-master

9999999-dev

Forget Haystack vs Needle order, the object IS the Haystack. Haystack is a library that allows for pipelining and immutable structures.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

09/12 2016

v2.0.0

2.0.0.0

Forget Haystack vs Needle order, the object IS the Haystack. Haystack is a library that allows for pipelining and immutable structures.

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

05/06 2016

dev-reduceDuplication

dev-reduceDuplication

Forget Haystack vs Needle order, the object IS the Haystack. Haystack is a library that allows for pipelining and immutable structures.

  Sources   Download

MIT

The Requires

  • php >=5.5.9

 

The Development Requires

02/03 2016

v1.0.2

1.0.2.0

Forget Haystack vs Needle order, the object *IS* the Haystack.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

17/02 2016

v1.0.1

1.0.1.0

Forget Haystack vs Needle order, the object *IS* the Haystack.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

16/02 2016

v1.0.0

1.0.0.0

Forget Haystack vs Needle order, the object *IS* the Haystack.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

10/02 2016

v0.3.0

0.3.0.0

An imagining of PHP as if it were designed around objects.

  Sources   Download

MIT

The Requires

  • php >=5.6.0

 

The Development Requires

02/08 2015

v0.2.0

0.2.0.0

An imagining of PHP as if it were designed around objects.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

27/07 2015

v0.1.1

0.1.1.0

An imagining of PHP as if it were designed around objects.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires

27/07 2015

v0.1.0

0.1.0.0

An imagining of PHP as if it were designed around objects.

  Sources   Download

MIT

The Requires

  • php >=5.4.0

 

The Development Requires