league/squery

This package is abandoned and no longer maintained. No replacement package was suggested.

PHP wrapper for osquery

2.4.2 2014-12-15 07:28 UTC

README

Build Status Code Quality Code Coverage Version License

PHP wrapper for osquery.

Example

use League\Squery\BuilderProxy;
use League\Squery\RunnerProxy;

$builder = BuilderProxy::select("*")
    ->from("processes")
    ->limit(5);

RunnerProxy::run($builder, function(array $rows) {
    $headings = array_shift($rows);

    foreach ($rows as $row) {
        foreach ($row as $i => $column) {
            print $headings[$i] . ": " . $column . "\n";
        }
    }
}, function($error) {
    print "error: " . $error . "\n";
});

More at squery.thephpleague.com.

Installation

❯ composer require "league/squery:~2.4.0"

Testing

❯ composer create-project --prefer-source "league/squery:~2.4.0" .
❯ vendor/bin/phpunit