aashley / nagios-livestatus-client Goto Github PK
View Code? Open in Web Editor NEWPHP Client for MK Livestatus
PHP Client for MK Livestatus
In latest commit: 85f7963
The library breaks compatibility with anything below PHP 7, by using a reserved keyword as method name.
PHP Parse error: syntax error, unexpected 'and' (T_LOGICAL_AND), expecting identifier (T_STRING) in Client.php on line 166
Could you please create a release with a proper version number? Currently we have to set it to dev-master in our composer which isn't locked to a specific commit. Using a release you can do this.
As a follow up on #13
Which unfortunately was not fixed, since i can't re-open a closed issue here is a new one :-)
The method and() in the class Nagios\Livestatus\Client will not work on any version below PHP 7.0.
https://3v4l.org/oEvl3#tabs an example run in different PHP version.
It would be nice if the result from ->execute() was an associated array instead of just a raw dump from the socket.
Since the first index in the array is a list of columns, just use this to build a nice array with array_combine()
Somthing like
$keys = array_shift($response);
foreach ( $response as $row ) {
$res[] = array_combine($keys, $row);
}
or you could use the data from ->columns() to build the keys.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.