Download the PHP package xethron/l4-to-string without Composer

On this page you can find all versions of the php package xethron/l4-to-string. 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 l4-to-string

L4ToString

Latest Stable Version Total Downloads Latest Unstable Version License

Logging variables can sometimes cause huge logs, especially if you want to email those logs to yourself.

On the other hand, logging exceptions with the default __toString can will most likely give you just enough information to confuse the hell out of you!

This class extends Xethron\ToString, and in addition, adds a few Laravel 4 specific functions for converting Query Logs to Strings.

Variable to String

This is a function that will display a variable similar to print_r, with the ability to specify the max_lines, max_depth (for arrays) and min_depth (for arrays).

This means that you will never get an email with an array 3000 lines long as you would with print_r.

Xethron\L4ToString::variable( $var, $max_lines, $max_depth, $min_depth )

I recommend adding a global function to one of your startup files for easier access:

Exception to String

This converts an Exception to string, much like PHP's __toString, however, it won't cut off those important pieces of information you require while debugging.

On top of that, it also uses the Variable to String to to include all the variables passed in the Stack Trace.

Two functions are available:

Xethron\L4ToString::exception( $e ); // This will print out the entire Exception

Xethron\L4ToString::trace( $e->getTrace() ); // This will only print out the stack trace

Query Log to String

This will convert the Laravel 4 Query Log to a neat Query String like:

Two Functions are available:

Xethron\L4ToString::queryLog(); // gets the latest query log and prints it Xethron\L4ToString::queryLog( \DB::getQueryLog() ); // Specify your own query log Xethron\L4ToString::query( $qyery ); // Pass a single query from the query log to be converted to string

License

L4ToString is distributed under the terms of the GNU General Public License, version 3 or later.


All versions of l4-to-string with dependencies

PHP Build Version
Package Version
Requires php Version >=5.3.0
xethron/to-string Version 1.*
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 xethron/l4-to-string contains the following files

Loading the files please wait ....