khelechy / argus-php
This is the official PHP library for the ARGUS Engine, this library helps PHP developers and applications seamlessly integrate to the ARGUS Engine, authentication and event listening.
v1.0.1
2024-03-23 12:16 UTC
Requires
None
Requires (Dev)
None
Suggests
None
Provides
None
Conflicts
None
Replaces
None
README
This is the official PHP library for the ARGUS Engine, this library helps PHP developers and applications seamlessly integrate to the ARGUS Engine, authentication and event listening.
Install via Composer
composer require khelechy/argus-php
Usage -
<?php use Khelechy\Argus\Argus;
Have a class to define the fucntion to be called when you receive an Argus Event
<?php class TestSub{ public function subscribeToArgus($argusData){ echo $argusData->Action . "\n"; echo $argusData->ActionDescription . "\n"; echo $argusData->Name . "\n"; echo $argusData->Timestamp . "\n"; } }
Finally use argus like so,
$sub = new TestSub(); $argus = new Argus("testuser", "testpassword"); // Optionally you can pass the host and port, and auth credentials inclusive. $argus->subscribe($sub, 'subscribeToArgus'); $argus->connect();