Download the PHP package mauretto78/in-memory-list without Composer

On this page you can find all versions of the php package mauretto78/in-memory-list. 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 in-memory-list

In-memory List

Scrutinizer Code Quality SensioLabsInsight Build Status Codacy Badge [license]() [Packagist]()

In-memory List easily allows you to create and save your lists in memory.

If you are looking for a caching system for your lists this library is suitable for you.

Grab your lists from your API, your database or whatever you want and store them in memory: then, you can quickly retrieve your lists from cache, sorting and performing queries on them.

This package uses:

Basic Usage

To create and store in memory you list do the following:

Drivers

Avaliable drivers:

Refer to official page for more details on PRedis connection.

Parameters

When use create method to a generate a list, you can provide to it a parameters array. The allowed keys are:

** = NOT AVALIABLE WITH PDO DRIVER

uuid

You can assign an uuid to your list (instead, a uuid will be generated):

headers

You can set a headers array to your list:

element-uuid

You can assign an uuid to list elemens (instead, a uuid will be generated). Consider this array:

Maybe you would use id key as uuid in your list:

chunk-size

You can specify the number of elements of each chunk in which the original array will be splitted. The default value is 1000.

PLEASE NOTE THAT chunk-size IS NOT AVALIABLE WITH PDO DRIVER

ttl

You can specify a ttl (in seconds) for your lists:

PLEASE NOTE THAT ttl IS NOT AVALIABLE WITH PDO DRIVER

Delete an element

To delete an element in you list do this:

Push an element

To push an element in you list, use pushElement function. You must provide the list uuid, the element uuid and element data (data must be consistent - see Validation). Look at this example:

Update an element

To update an element in you list, use updateElement function. You must provide the list uuid, the element uuid and element data (data must be consistent - see Validation). Look at this example:

Ttl

You can update ttl of a persisted list with updateTtl method, and retrive the ttl with getTtl function:

PLEASE NOTE THAT ttl IS NOT AVALIABLE WITH PDO DRIVER

Validation (Data consistency)

Please note that your data must be consistent:

Instead, a ListElementNotConsistentException will be thrown. Example:

Sorting and Quering

You can perform queries on your list. This library uses Array Query, please refer to it for the official documentation.

Commands

If you have an application which uses Symfony Console, you have some commands avaliable:

You can register the commands in your app, consider this example:

You have to provide to commands your driver and connection parameters array. Example:

Testing

In order to run all the tests, you have two options:

1. Install all the drivers on your machine

The first way it to install all the drivers on your machine:

Once installed all the drivers, create a file called config/parameters.yml and paste in the content of config/parameters.dist.yml. Finally, change your configuration if needed:

2. Run the project with Docker

You can run the project with Docker.

STEP1: Make the build

STEP2: Raise the app

STEP3: Enter in the docker container

STEP4: Create the schema and run the tests in the container

Built With

Support

If you found an issue or had an idea please refer to this section.

Authors

License

This project is licensed under the MIT License - see the LICENSE.md file for details


All versions of in-memory-list with dependencies

PHP Build Version
Package Version
Requires php Version ^5.6 || ^7.0
ramsey/uuid Version ^3.6
symfony/console Version ^3.2|^4.0
symfony/yaml Version ^3.3|^4.0
doctrine/annotations Version 1.2.*
doctrine/instantiator Version 1.0.*
mauretto78/array-query 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 mauretto78/in-memory-list contains the following files

Loading the files please wait ....