Download the PHP package slavielle/grabbag without Composer

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

Grabbag - Grab objects with ease for PHP

Build Status Coverage Status Maintainability Latest Version on Packagist license

Installation

Grabbag is a PHP library that aims to provide a simple secure way to access PHP objects/arrays chains using path-like expressions.

Features :

What is it all about ... a first example

Using Raw PHP

When you develop - for instance - on top of PHP object-based frameworks or CMS, you often have to use long expressions to access objects/arrays chains. Lets take an example from Drupal 8 : Getting the image URL from a node using entity reference field pointing to a media entity would give something like this :

Using Grabbag

Using Grabbag allows to get access to objects/arrays chains using a path expression

Both approach comparision

Multiple values result using %any

Grabbag can collect more than one simple value using keyword in path. Let's consider the following example that looks like the previous one except for the keyword usage :

if the value corresponding to in the path can be used with (if it's an array or a traversable object), will resolve the path considering each values and will produce a multi-valued result.

For instance if

contains 4 items, then the result of the former example will be an array looking like this :

Structured result using Grabbag queries

Grabbag Queries allow to go a step further by gathering paths in order to produce structured results. Lets take an example :

will produce a structured array such as :

Want to know more about ?

Take a tour on the

Field of use

Grabbag can be used in most of PHP project.

You can use it simply to secure access to objects/array chain or in a more complex manner to produce structured results.

Grabbag is particularly useful for projects built on top of object oriented frameworks/CMS such as Drupal 8, Symfony, Laravel and so on, and can be used everywhere you would have to manipulate values from PHP objects/arrays.

A quick list for possible usage I have in mind are :


All versions of grabbag with dependencies

PHP Build Version
Package Version
Requires php Version >=5.6.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 slavielle/grabbag contains the following files

Loading the files please wait ....