Download the PHP package rollerworks/exception-parser without Composer

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

RollerworksExceptionParser

Build Status Scrutinizer Code Quality

This package provides the Rollerworks ExceptionParser which extracts exception-data to an array.

Basically it wraps multiple exception-catch blocks into one call, and returns the parsed information.

Installation

1. Using Composer

To install the Rollerworks ExceptionParser, add rollerworks/exception-parser to your composer.json

Or manually, by adding the following to your composer.json file:

Then, you can install the new dependency by running Composer's update command from the directory where your composer.json file is located:

Note: This package is stand-alone, composer is only used for generating the autoloader class.

You can also use your own autoloader, but make sure its PSR-4 compatible. See the composer.json file in this package for mapping information.

Usage

Usage is very simple, each exception that you want to process needs a compatible parser which parses the Exception to an array.

The ExceptionParserManager passes trough all the registered exception-parses in order of registration, till one accepts the exception.

When no compatible parser is found an empty array is returned instead.

Exception class

Exception Parser

The SearchFieldRequiredExceptionParser exception parser parses the FieldRequiredException shown above.

ParserManager

Now register the Parser at the ExceptionParserManager.

Note: You can register as many processors as needed.

Key transforming

The ExceptionParserManager also allows to transform the array-key to another format like '{{ name }}'.

'{var}' is the placeholder which is replaced by the current key.

Or you can use a callback that returns the transformed key. This is very useful if the keys contains a prefix or is wrapped inside a special format.

Note: If the callback returns null or void the key is added as incrementing index. Only when the "callback" returns null or void, setting null as constructor value is the default and will not transform the array-keys.


All versions of exception-parser with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.3
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 rollerworks/exception-parser contains the following files

Loading the files please wait ....