Includes AYAH v1.1.7, a static wrapper class and an update to our main include file to handle loading the official AYAH library from the vendors directory.
34 lines
539 B
PHP
34 lines
539 B
PHP
<?php
|
|
|
|
class API_AYAH extends API_Common
|
|
{
|
|
public static function getHTML()
|
|
{
|
|
$config = Config::getInstance();
|
|
|
|
if (!$config->api['ayah'])
|
|
{
|
|
throw new Exception('Missing API configuration.');
|
|
}
|
|
|
|
$ayah = new AYAH($config->api['ayah']);
|
|
|
|
return $ayah->getPublisherHTML();
|
|
}
|
|
|
|
public static function isHuman()
|
|
{
|
|
$config = Config::getInstance();
|
|
|
|
if (!$config->api['ayah'])
|
|
{
|
|
throw new Exception('Missing API configuration.');
|
|
}
|
|
|
|
$ayah = new AYAH($config->api['ayah']);
|
|
|
|
return $ayah->scoreResult();
|
|
}
|
|
}
|
|
|
|
?>
|