Download the PHP package nsilbernagel/accumulatephp without Composer

On this page you can find all versions of the php package nsilbernagel/accumulatephp. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package accumulatephp

Tests Latest Stable Version Total Downloads License PHP Version Require

Development happens at AccumulatePHP-src

AccumulatePHP

A PHP collections library, inspired by java collections framework.

What is this library for

Using more refined datastructures allows for safer, often more efficient code than using arrays (list and assoc). TreeMap for example guarantees being searchable in O (log n). Furthermore, non-scalar keys can be used as keys in maps.

Static Analysis

AccumulatePHP provides first class support for static analysis through PHPStan level 9.

Installation

Usage Examples

ArraySeries and HashMap are the main two data structures you will be using. Here are examples of how to use them.

ArraySeries

For a complete overview of ArraySeries and the other series available, please refer to the source files under src/series

HashMap

Hashmaps can use any type keys, except for resources and arrays. Classes may implement Hashable interface to determine their hash function and definition of equality. You may refer to https://www.baeldung.com/java-equals-hashcode-contracts to learn more about equals and hashcode and their contracts.

Helpers

AccumulatePHP provides helper methods for creating Accumulations

Structure

Accumulation

The base interface of this library. An accumulation (collection) of items. Iterable and Countable.

SequencedAccumulation

An Accumulation with a defined sequence or order of elements. Which order this is is up to the implementation. It might be insertion order for some or natural order for others.

Series

A SequencedAccumulation that allows getting by index, mapping, filtering etc.

MutableSeries

Like the Series but with methods for mutation.

ArraySeries

Basic array implementation of a MutableSeries

Map

A readonly key-value mapping. Can be created from and converted to associative arrays, will lose any non-scalar keys during conversion. Iterable over its entry objects. It is up to the implementation what type of keys are supported. It is strongly recommended to only use the same type of key for a map (can be enforced through static analysis tools).

Entry

An entry of a map.

SequencedMap

A Map with defined Order of keys

MutableMap

Like Map but with methods for mutation.

SequencedMap

A Map with defined Order of keys

HashMap

A Hashtable-like map implementation.

TreeMap

A Red-Black Tree SequencedMap implementation. Keys are ordered by their natural order (spaceship operator) by default.

Set

An accumulation where every element may only exist once

MutableSet

Like Set but with methods for mutation

SequencedSet

A Set with defined Order of keys

HashSet

Hash implementation of a Set. Uses HashMap in the background.

StrictSet

A Set implementation using php strict comparison.


All versions of accumulatephp with dependencies

PHP Build Version
Package Version
Requires php Version ~8.0 || ~8.1 || ~8.2
jetbrains/phpstorm-attributes Version 1.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package nsilbernagel/accumulatephp contains the following files

Loading the files please wait ....