Download the PHP package breier/extended-array without Composer

On this page you can find all versions of the php package breier/extended-array. 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 extended-array

Extended Array

This library started from a discussion on whether it's intuitive or not to get the first element of an array using "reset()". Well I think it's not!

In order to handle arrays and its elements in a clean code manner (readable and maintainable) I developed this library. Please enjoy (use at your own risk XD).

Table of Contents:

Methods from ArrayIterator

You can find all the methods and their documentation at php.net/manual/class.arrayiterator.

But here is a list of non-modified methods: | Method | Parameters | Return | Description | | ------------ | ------------------ | ------ | ----------- | | append | mixed $value | null | `[*]` Append an element to the object | count | | int | The amount of elements | current | | mixed | Get the element under the cursor | getFlags | | int | Get behaviour flags of the ArrayIterator | key | | mixed | Current position element index | offsetGet | mixed $index | mixed | Get element in given index | seek | int $position | null | Moves the cursor to given position | serialize | | string | Applies PHP serialization to the object | setFlags | string $flags | null | Set behaviour flags of the ArrayIterator | unserialize | string $serialized | null | Populates self using PHP unserialize | valid | | bool | Validate element in the current position _* "append" is indirectly modified as it uses "offsetSet" internally_

Methods in ExtendedArrayBase

This is the abstract class that modifies the behaviour of ArrayIterator to improve its use as a clean Object Oriented Class.

Here's the complete list of methods: | Method | Parameters | Return | Description | | ------------- | ---------------------- | ------ | ----------- | | asort | | this | Extending method to support sub-objects | element | | mixed | `[added]` Element is an alias for "current" | end | | this | `[added]` Move the cursor to the end | first | | this | `[added]` First is an alias for "rewind" | getArrayCopy | | array | Extending method to convert sub-objects to array | isArrayObject | mixed $array | bool | `[added][static]` Identifies usable classes | jsonEncode | [int $options[, int $depth]] | string | `[added]` JSON Encode | ksort | | this | Extending method to update position map | last | | this | `[added]` Last is an alias to "end" | natcasesort | | this | Extending method to update position map | natsort | | this | Extending method to update position map | next | | this | Extending method to return $this | offsetExists | mixed $index | bool | Extending method to behave like "array_key_exists" | offsetSet | mixed $index, mixed $newval | null | Extending method to update position map | offsetUnset | mixed $index | null | Extending method to update position map | prev | | this | `[added]` Move the cursor to previous element | rewind | | this | Extending method to return $this | uasort | callable $cmp_function | this | Extending method to update position map | uksort | callable $cmp_function | this | Extending method to update position map

Methods in ExtendedArray

arsort(): ExtendedArray

Reverse sort by element.

Code Example

contains(mixed $needle[, bool $strict]): bool

Contains is similar to "in_array" with object support.

Code Example

diff($array2, ...$arrays): ExtendedArray

Diff is similar to "array_diff" with object support.

Code Example

explode(string $delimiter, string $string[, int $limit = PHP_INT_MAX]): ExtendedArray

[static] Instantiate from exploding a string by delimiter

Code Example

fill(int $start, int $num, $value): ExtendedArray

[static] Instantiate an array filled with value by num of times

Code Example

filter([callable $callback[, int $flag]]): ExtendedArray

A poly-fill for "array_filter".

Code Example

filterWithObjects([callable $callback[, int $flag]]): ExtendedArray

Extending filter to support objects.

Code Example

fromJSON(string $json[, int $depth]): ExtendedArray

[static] Instantiate from a JSON string.

Code Example

isArray(mixed $element): bool

[static] Validates any type of array.

Code Example

implode(string $glue = ''): string

Concatenate array values in a string separated by $glue

Code Example

keys(): ExtendedArray

Get this array keys (properties' names).

Code Example

krsort(): ExtendedArray

Reverse sort by keys.

Code Example

map(callable $callback[, array ...$params]): ExtendedArray

A poly-fill for "array_map".

Code Example

mapWithObjects(callable $callback[, array ...$params]): ExtendedArray

Extending map to support objects.

Code Example

offsetGetFirst(): mixed

Gets first element without moving the array cursor.

Code Example

offsetGetLast(): mixed

Gets last element without moving the array cursor.

Code Example

offsetGetPosition(int $position): mixed

Gets element in the given position without moving the array cursor.

Code Example

shuffle(): ExtendedArray

Shuffle elements randomly

Code Example

values(): ExtendedArray

Get values in a numbered key array

Code Example

All versions of extended-array with dependencies

PHP Build Version
Package Version
Requires php Version ^7.3
ext-pdo Version *
ext-json Version *
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 breier/extended-array contains the following files

Loading the files please wait ....