-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #18 from jonjomckay/develop
Merge to master for v2.0
- Loading branch information
Showing
10 changed files
with
1,411 additions
and
112 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,3 +2,4 @@ | |
/composer.phar | ||
/build | ||
/.idea | ||
/*.iml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
Quahog | ||
====== | ||
|
||
[](https://travis-ci.org/jonjo-blur/quahog) | ||
|
||
[](https://travis-ci.org/jonjomckay/quahog) | ||
|
||
Quahog is a simple PHP library to interface with the clamd anti-virus daemon. It was written as all of the libraries out | ||
there for interfacing with ClamAV from PHP use ```exec('clamscan')```, which isn't exactly an ideal solution, as | ||
|
@@ -14,23 +15,19 @@ It is recommended to install Quahog through [composer](http://getcomposer.org). | |
```JSON | ||
{ | ||
"require": { | ||
"blurgroup/quahog": "0.*" | ||
"xenolope/quahog": "2.*" | ||
} | ||
} | ||
``` | ||
|
||
## Usage | ||
|
||
```php | ||
// Create a new socket instance in PHP 5.3 | ||
$factory = new Factory(); | ||
$socket = $factory->createClient('unix:///var/run/clamav/clamd.ctl'); | ||
|
||
// Create a new socket instance in PHP >=5.4 | ||
$socket = (new Factory())->createClient('unix:///var/run/clamav/clamd.ctl'); | ||
// Create a new socket instance | ||
$socket = (new \Socket\Raw\Factory())->createClient('unix:///var/run/clamav/clamd.ctl'); | ||
|
||
// Create a new instance of the Client | ||
$quahog = new \Quahog\Client($socket); | ||
$quahog = new \Xenolope\Quahog\Client($socket); | ||
|
||
// Scan a file | ||
$result = $quahog->scanFile('/tmp/virusfile'); | ||
|
@@ -67,12 +64,6 @@ To run the test suite you will need PHPUnit installed. Go to the project root an | |
$ phpunit | ||
```` | ||
|
||
## Credits | ||
|
||
 | ||
|
||
[Jonjo McKay](mailto:[email protected]) and [blur Group](http://blurgroup.com) | ||
|
||
## License | ||
|
||
Quahog is released under the [MIT License](http://www.opensource.org/licenses/MIT) | ||
Quahog is released under the [MIT License](http://www.opensource.org/licenses/MIT) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,29 @@ | ||
{ | ||
"name": "blurgroup/quahog", | ||
"description": "A PHP client library for ClamAV clamd daemon", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Jonjo McKay", | ||
"email": "[email protected]" | ||
} | ||
], | ||
"autoload": { | ||
"psr-0": {"Quahog": "src/"} | ||
}, | ||
"require": { | ||
"php": ">=5.3", | ||
"clue/socket-raw": "0.1.*" | ||
"name": "xenolope/quahog", | ||
"description": "A PHP client library for ClamAV clamd daemon", | ||
"license": "MIT", | ||
"authors": [ | ||
{ | ||
"name": "Jonjo McKay", | ||
"email": "[email protected]" | ||
} | ||
} | ||
], | ||
"autoload": { | ||
"psr-4": { | ||
"Xenolope\\Quahog\\": "src/Quahog" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Xenolope\\Quahog\\Tests\\": "tests/" | ||
} | ||
}, | ||
"require": { | ||
"php": ">=5.6", | ||
"clue/socket-raw": "^1.2" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^4.8", | ||
"mikey179/vfsStream": "^1.6" | ||
} | ||
} |
Oops, something went wrong.