Download the PHP package kafoso/tools without Composer

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

Various generic PHP tools.

Will be expanded as necessary.

Kafoso\Tools\Debug\Dumper

An improved yet different version of PHP's fundamental var_dump method. The presentation is more in par with that of the appearance of PHP classes adhering to PSR-1 and PSR-2. However, for readability reasons, and to save precious space and thus prevent vertigorather than 4.

Handles recursion gracefully and limits the depth (default: 3) of objects and arrays, omitting content going beyond the maximum desired depth.

Especially useful for dumping very large objects and arrays containing redundant or recursive information. E.g. database contents, which have been mapped to PHP classes with (sometimes) complex relations. Said mapping may be performed through PDO, mysqli, Doctrine, and other DBAL or ORM tools.

Example output

A simple class, with an id, a parent/child relationship, and a static variable $list.

Try it: php examples/DebugDumperExample.php

As plain text

The following is produced using Kafoso\Tools\Debug\Dumper::dump($myLittleClass), which presents the contents as plain text (using the Kafoso\Tools\Debug\Dumper\PlainTextFormatter).

As JSON

The same input as the previous plain text example, but this time using Kafoso\Tools\Debug\Dumper::dumpJson($myLittleClass).

JSON_PRETTY_PRINT is on by default, as this is intended for debugging purposes, but may be disabled if desired. E.g. when retrieving JSON through XHR from Javascript where indentations do not matter.

The JSON view contains less information compared to plain text. For instance, there is no class variable exposure information (static, public, protected, private); however, the class variable names and values do appear. Additionally, the following object keys are invasive and change the structure of the resulting Javascript objects.

However, the Dumper is for debugging purposes, after all, and should be used as such.

As HTML

Usage:

The HTML dumper is great for showing variables in a nice, highlighted fashion.

Classes are displayed as psudo-objects with interfaces to inheritance, traits, constants, variables, and methods; "pseudo-object" means the values are displayed with a snapshot of what the object currently contains.

Various options exist, which are stored in a cookie.

Options for showing and hiding sections include:

One option, "Truncate generic objects", allows you to display objects like \DateTime as a string, providing a better overview and saving valuable space.

Do notice, that a maximum depth restriction is enforced, which by default is 3. This number can be changed by passing it as the 2nd variable, e.g.:

This behavior is identical to the plain text and JSON rendering methods.

Sample output:

The theme, "dark-one-ui", is courtesy of the Atom Editor.

Footnotes

1 Vertigo: Massive nested indentations in code, usually produced by nested conditions and loops, resulting in lowered readability.


All versions of tools with dependencies

PHP Build Version
Package Version
Requires php Version >=5.5.0
moontoast/math Version ^1.1
ramsey/uuid Version ^3.7
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 kafoso/tools contains the following files

Loading the files please wait ....