Skip to content

thephpleague/DEPRECATED-squery

Repository files navigation

This library is deprecated, please do not use it.

League\Squery

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