Download the PHP package linio/common without Composer
On this page you can find all versions of the php package linio/common. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package common
Linio Common
Linio Common contains small components that either extend PHP's functionality or provide a coherent base for Linio components:
- Common types
- Base exceptions
- Monolog processors and handlers
Install
The recommended way to install Linio Common is through composer.
Tests
To run the test suite, you need install the dependencies via composer, then run PHPUnit.
$ composer install
$ vendor/bin/phpunit
Collections
This component has a direct dependency on doctrine/collections. You are encouraged to use them since they are also used as base for most our own custom collection types.
Dictionary
This data structure allows you to create coherent key-value pairs, that can be used in an idiomatic way:
Exceptions
These exceptions provide a good base for all domain exceptions. The included interfaces act as tags that allow the Monolog processors and handlers to interact with them in specified ways.
DomainException
This exception is the core exception in which all other library and application (domain) exceptions should extend. It's used by the exception handlers included in our common libraries for different frameworks. With this, we can easily support translation of messages, and input errors on a per field basis.
ClientException
EntityNotFoundException
Interfaces
The available interfaces are:
Linio\Common\Exception\DoNotLog
- Tells Monolog to ignore the exceptionLinio\Common\Exception\ForceLogging
- Tells Monolog to log the exception regardless ofDoNotLog
Linio\Common\Exception\CriticalError
- Tells Monolog to log the exception asCRITICAL
regardless of it's current level
Logging (Monolog)
This component includes various classes that integrate with Monolog.
Processors
Linio\Common\Logging\CriticalErrorProcessor
- Upgrades exceptions that are CriticalErrors to CRITICAL regardless of log level.Linio\Common\Logging\ExceptionTokenProcessor
- Adds the exception token to the record.
Handlers
DoNotLogHandler
Linio\Common\Logging\DoNotLogHandler
- Ignores exceptions that implement this interface.