Download the PHP package setnemo/asterisk-notation without Composer

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

PHP Asterisk Notation

Latest Stable Version

SonarCloud Coverage SonarCloud Reliability rating SonarCloud Security rating SonarCloud Bugs SonarCloud Code Smells

Github License

Asterisk notation for array access in PHP. Update array access to the next level of usability.

Asterisk notation

Install

Install the latest version using Composer:

Usage

Create a new \Setnemo\Asterisk object:

Methods

Asterisk has the following methods:

add()

Using for adding element with asterisk in key

Work like Adbar\Dot::add()

all()

Work like Adbar\Dot::all()

clear()

Deletes the contents of a given key (sets an empty array):

Multiple keys:

All the stored items:

If key not contains * (asterisk) - it works like Adbar\Dot::clear()

count()

Returns the number of items in a given key:

Items in the root of Dot object:

If key not contains * (asterisk) - it works like Adbar\Dot::count()

delete()

Deletes the given key:

Multiple keys:

flatten()

It works like Adbar\Dot::flatten()

get()

Returns the value of a given key:

Returns a given default value, if the given key doesn't exist:

Default value not work with asterisk

has()

Checks if a given key exists (returns boolean true or false):

Multiple keys:

With asterisk:

With asterisk and value:

With asterisk and value (non-strict mode):

isEmpty()

Checks if a given key is empty (returns boolean true or false):

Multiple keys:

Checks the whole Asterisk object:

Also works with asterisk in key:

merge()

It works like Adbar\Dot::merge() Asterisk in path Asterisk::merge('key', 'value') work like Asterisk::set('key', 'value', false)

mergeRecursive()

It works like Adbar\Dot::mergeRecursive() Asterisk in path Asterisk::mergeRecursive('key', 'value') work like Asterisk::set('key', 'value', false)

mergeRecursiveDistinct()

It works like Adbar\Dot::mergeRecursiveDistinct()

pull()

Returns the value of a given key and deletes the key:

Returns a given default value, if the given key doesn't exist:

Default value not work with asterisk in query!

Returns all the stored items as an array and clears the Dot object:

Key with asterisk:

push()

Pushes a given value to the end of the array in a given key:

Pushes a given value to the end of the array:

With asterisk:

Also work as Asterisk::set('key', 'value', true), where true is asterisk boolean. See Asterisk::set()

replace()

It works like Adbar\Dot::replace()

set()

Sets a given key / value pair:

Multiple key / value pairs:

setArray()

It works like Adbar\Dot::setarray()

setReference()

It works like Adbar\Dot::setreference()

toJson()

It works like Adbar\Dot::toJson()

License

MIT license


All versions of asterisk-notation with dependencies

PHP Build Version
Package Version
Requires php Version ^7.4|~8.0.0
ext-json Version *
adbario/php-dot-notation Version ^2.2
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 setnemo/asterisk-notation contains the following files

Loading the files please wait ....