Download the PHP package agencyrepublic/webpurify without Composer
On this page you can find all versions of the php package agencyrepublic/webpurify. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download agencyrepublic/webpurify
More information about agencyrepublic/webpurify
Files in agencyrepublic/webpurify
Package webpurify
Short Description A third-party PHP library for implementing web purify
License MIT
Homepage http://github.com/CriticalMassUK/webpurify/
Informations about the package webpurify
Web Purify API
A library for interfacing with WebPurify.
The library is covered by PHPUnit tests using stub mocks and is PSR-0, PSR-1, PSR-2 and PSR-3 compliant.
Installation
Add the following to your composer.json.
Usage
There are two classes which you can use to make requests to Web Purify:
WebPurify\WebPurifyImageWebPurify\WebPurifyText
Most methods listed on the WebPurify documentation can be used as method names
for making API calls. There is exception as return is a reserved keyword in
PHP the method name is returnExpletives.
WebPurify
These methods are available in both classes.
setLogger
WebPurify class is a PSR-3 compliant LoggerAwareInterface. It outputs all HTTP requests and responses to a logger. You will need a logger (like Monolog).
getUseSSL
Get whether SSL will be used for requests.
setUseSSL
Set whether SSL will be used for requests. The default is false.
WebPurifyImage
Instantiate WebPurifyImage by passing through your API key:
imgCheck
Returns: <imgid>
Documentation: webpurify.live.imgcheck
imgStatus
Returns:
- true => approved
- false => declined
- null => pending
Documentation: webpurify.live.imgstatus
imgAccount
Returns: <remaining>
Documentation: webpurify.live.imgaccount
WebPurifyText
Instantiate WebPurifyTexxt by passing through your API key:
check
Returns: boolean <found>
Documentation: webpurify.live.check
checkCount
Returns: boolean <found>
Documentation: webpurify.live.checkcount
replace
Returns: string <text>
Documentation: webpurify.live.replace
returnExpletives
Returns: array <word>
Documentation: webpurify.live.return
addToBlackList
Returns: boolean <success>
Documentation: webpurify.live.addtoblacklist
addToWhiteList
Returns: boolean <success>
Documentation: webpurify.live.addtowhitelist
removeFromBlackList
Returns: boolean <success>
Documentation: webpurify.live.removefromblacklist
removeFromWhiteList
Returns: boolean <success>
Documentation: webpurify.live.removefromwhitelist
getBlackList
Returns: array <word>
Documentation: webpurify.live.getblacklist
getWhiteList
Returns: array <word>
Documentation: webpurify.live.getwhitelist
