Antidot PHP API  version 0.16.0
##PHP API to simplify integration of Antidot components
 All Classes Files Functions Variables Groups Pages
full_lightweight_example.php
<?php
require_once "PHP_API/afs_lib.php";
// You shoud addapt following paths
require_once "/var/www/php-example/Twig-1.15.0/lib/Twig/Autoloader.php";
Twig_Autoloader::register();
$loader = new Twig_Loader_Filesystem('/var/www/php-example/templates');
$twig = new Twig_Environment($loader, array('debug' => true));
$twig->addExtension(new Twig_Extension_Debug());
// Third parameter is set to AfsServiceStatus::STABLE by default.
$search = new AfsSearch('eval.partners.antidot.net', 48000);
// Instead, you can initialize new query and call $search->set_query($initial_query)
$search->build_query_from_url_parameters();
// Default format is AfsHelperFormat::ARRAYS, it can be set to AfsHelperFormat::HELPERS
// when execute method is called.
// Load and apply PHP templates
$template = $twig->loadTemplate('meta_template.html');
echo $template->render($reply);
?>