eos-project/phpclient

Eos PHP client

0.1.0 2015-06-27 10:50 UTC

README

Scrutinizer Code Quality Build Status

Simple static usage

Eos client can be used from static context


\Eos\Client\Eos::sendString("Foo"); // Wont be sent - Eos not initialized
\Eos\Client\Eos::init("realm", "secret", "hostname"); // Initialize
\Eos\Client\Eos::sendString("Foo"); // Delivered using UDP
\Eos\Client\Eos::send(["message" => "hello", "ip" => $_SERVER["REMOTE_ADDR"]]); // Delivered using UDP

psr3

Eos client bundled with \Eos\Client\EosDefaultLogger which is fully PSR3-compatible with configurable logging threshold level


$l = new \Eos\Client\EosDefaultLogger("xxx", "yyy", "localhost", null, ["demo"], \Psr\Log\LogLevel::INFO);
$l->debug("debug");   // Ignored due threshold
$l->info("info");     // Delivered
$l->notice("notice"); // Delivered