Download the PHP package setono/client without Composer

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

PHP abstraction for identifying a browser client

Latest Version Build Status Code Coverage Mutation testing

This library provides a small, framework-agnostic value object for identifying a browser client: a stable id together with arbitrary, optionally expiring metadata. A companion Cookie class serializes that id — along with a format version and "first/last seen" timestamps — to and from a cookie value, so the same visitor can be recognized across requests.

Installation

When you don't supply an id yourself, the library generates a UUIDv7. To use that, install one of the supported UUID libraries (if both are installed, symfony/uid is preferred):

Usage

The client

Metadata

Metadata is a string => mixed bag. It implements ArrayAccess, Countable and IteratorAggregate, so you can use it like an array:

Expiring entries

Pass a TTL (in seconds) as the third argument to set(). Expired entries are pruned lazily: they are no longer returned by get()/has() and are excluded from iteration and count().

Persisting and restoring

Metadata::toArray() returns everything needed to rebuild the object — including the expiry bookkeeping — so you can store it (in a database, cache, session, ...) and reconstruct the client later with the timestamps intact:

Client and Metadata are also JsonSerializable:

Storing the id in a cookie

The Cookie class converts a client id to and from a cookie value. The value also carries a format version and the timestamps for when the client was first and last seen. The library only produces and parses the string — reading the request cookie and writing it to the response is left to your HTTP layer.


All versions of client with dependencies

PHP Build Version
Package Version
Requires php Version >=8.1
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 setono/client contains the following files

Loading the files please wait ...