The class didn't provide any value and promised that it would in the future. Any sort of redundant connection logic should simply be contained in a class that can be extended and not an API-centric common class. Trying to move away from all common classes in favor of classes that can be reused in different parts of the core as well as outside of it.
54 lines
1 KiB
PHP
54 lines
1 KiB
PHP
<?php
|
|
|
|
/**
|
|
* Are You A Human Class File for PICKLES
|
|
*
|
|
* PHP version 5
|
|
*
|
|
* Licensed under The MIT License
|
|
* Redistribution of these files must retain the above copyright notice.
|
|
*
|
|
* @author Joshua Sherman <pickles@joshtronic.com>
|
|
* @copyright Copyright 2007-2014, Joshua Sherman
|
|
* @license http://www.opensource.org/licenses/mit-license.html
|
|
* @package PICKLES
|
|
* @link https://github.com/joshtronic/pickles
|
|
*/
|
|
|
|
/**
|
|
* Are You A Human API Interface
|
|
*
|
|
* @link http://areyouahuman.com
|
|
*/
|
|
class API_AYAH
|
|
{
|
|
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();
|
|
}
|
|
}
|
|
|
|
?>
|