Download the PHP package theiconic/synopsis without Composer

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

synopsis

PHP library to generate a language-agnostic description of PHP objects or values

Build Status Coverage Status Scrutinizer Code Quality Latest Stable Version Total Downloads License

Purpose

This library can be used to generate language-agnostic descriptions of PHP variables or objects that can then be sent over a transport to another system, e.g. for debugging, monitoring and inspection purposes.

It generates a standardised representation that can easily be formatted in different ways.

E.g. possible use-cases are

Setup (via Composer)

Simply import the library in composer

Basic Usage

You will need to start off by instantiating the factory

Now you can synopsise any value

Each call to synopsize() generates an AbstractSynopsis instance which describes the passed value.

Now use one of the formatters to format that data in a way that you can send over a transport or use by other components.

Object Synopsis

When synopsising objects, the factory checks if a custom Synopsis class is registered for the type of the object (i.e. it's class name). If so, then the special Synopsis type is used to synopsise the object and the result entirely depends on its implementation.

Custom object types can be registered via

If no custom type is registered, default object synopsis is used.

A custom IteratorSynopsis type is registered for objects that implement Iterator or IteratorAggregate interfaces.

Default Object Synopsis

The default ObjectSynopsis implementation will inspect the object for any public properties. Each of those properties will be treated as the objects children and synopsised recursively.

The length will be the number of public properties found.

The objects class name will be used as the type.

To determine the value, the implementation will check for the presence and accessibility of any of the following methods in this order

The first method found will be executed and it's return value will be cast to string and used as the objects value.

Default Iterator Synopsis

The default IteratorSynopsis implementation will iterate through the object, synopsise any of the iteration values and add them as children.

Resource Synopsis

When synopsising PHP resource pointers, the factory checks if a custom Synopsis class is registered for the type of resource (determined via get_resource_type()). If so, that type will be used.

By default, custom resource types are registered for some filetypes and streams and they will use stream_get_meta_data() to determine the resource uri and use it as the value.

Custom resource types can be registered via

Exception Synopsis

Exceptions and their traces are synopsised in a special way adding additional properties to the synopsis objects.

These can be utilised in special Exception formatters.

ExceptionSynopsis

TraceSynopsis

Overriding default Synopsis implementations

To override the behaviour for any of the types, simply implement your own Synopsis class (inheriting from AbstractSynopsis) and register it with the factory via e.g.

License

THE ICONIC Synopsis library for PHP is released under the MIT License.


All versions of synopsis with dependencies

PHP Build Version
Package Version
No informations.
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 theiconic/synopsis contains the following files

Loading the files please wait ....