xotelia/remote-debug-center

There is no license information available for the latest version (dev-master) of this package.

SDK to use Remote Debug Center in PHP projects

dev-master 2018-07-09 12:32 UTC

This package is not auto-updated.

Last update: 2019-10-09 18:06:30 UTC


README

PHP SDK for Remote Debug Center Build Status

Installation

Add this line in your composer.json :

{
    "require": {
        "xotelia/remote-debug-center": "dev-master"
    }
}

and run :

$ php composer.phar update xotelia/remote-debug-center

Usage

Clever

You can use this way to integrate RemoteDebugCenter properly in your project by creating your own wrapper.

<?php

require __DIR__.'/vendor/autoload.php';

// Create connection to RDC server
$connection = new \RESTConnection\Client('http://localhost:4242');

// Create and setup Debug resource
$debug = new \Xotelia\RemoteDebugCenter\Resource\Debug();
$debug->setRaw('Debug raw data'); // or var_export($data, true)

// Create dedicated client and send resource to server
$debugClient = new \Xotelia\RemoteDebugCenter\Client\DebugClient($connection);
$debugClient->create($debug);

Quick'n dirty

Or you can use our very quick'n dirty shortcut :

<?php

require __DIR__.'/vendor/autoload.php';

use \Xotelia\RemoteDebugCenter\Helper as RDC;

RDC::debug("raw debug data");

Assuming that RDC server is up on localhost:4242 (its default configuration).

Unit tests

$ vendor/bin/atoum

License

RemoteDebugCenterPhpSdk is licensed under the MIT license.