Download the PHP package chevere/data-structure without Composer

On this page you can find all versions of the php package chevere/data-structure. 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 data-structure

DataStructure

Build Code size PHPStan Mutation testing badge

Quality Gate Status Maintainability Rating Reliability Rating Security Rating Coverage Technical Debt CodeFactor

Summary

DataStructure provides Map and Vector data structures.

Installing

DataStructure is available through Packagist and the repository source is at chevere/data-structure.

Map

A Map is a sequential collection of key-value pairs. Keys can be of type integer and string.

Create a Map by passing named arguments of any type.

Put Map values

The withPut method is used to put value(s) to the Map.

Counting Map keys

The count method returns the number of keys mapped.

Map keys

The keys method is used to retrieve the map keys as an array.

Has Map keys

The has method is used to check if the Map contains the given key(s).

Assert has Map keys

The assertHas method is used to assert if the Map contains the given key(s). It throws an exception when failing to assert.

Get Map value

The get method is used to retrieve the Map value for the given key.

Get Map value or default

The getOrDefault method is used to retrieve the Map value for the given key or a default value if not found.

Vector

A Vector is a sequence of values of any type. Keys are of type integer.

Create a Vector by passing values.

Counting Vector keys

The count method returns the number of keys in the vector.

Vector keys

The keys method is used to retrieve the map keys as an array.

Push Vector values

The withPush method is used to add one or more elements to the end of the sequence.

Set Vector values

The withSet method is used to set the value at the given position.

Unshift Vector values

The withUnshift method is used to prepend one or more elements at the beginning of the sequence.

Insert Vector values

The withInsert method is used to insert values at a given position.

Remove Vector values

The withRemove method is used to remove one or more values at a given position.

Has Vector values

The has method is used to check if the Vector contains the given value(s).

Assert Vector has values

The assertHas method is used to assert if the Vector contains the given value(s). It throws an exception when failing to assert.

Get Vector value

The get method is used to retrieve the Vector value at the given position.

Find values

The find method is used to find the position for the given value.

Contains values

The contains method is used to check if the Vector contains the given value(s).

Documentation

Documentation is available at chevere.org.

License

Copyright Rodolfo Berrios A.

Chevere is licensed under the Apache License, Version 2.0. See LICENSE for the full license text.

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.


All versions of data-structure with dependencies

PHP Build Version
Package Version
Requires php Version ^8.1
chevere/message Version ^1.0.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 chevere/data-structure contains the following files

Loading the files please wait ....