Exemplo n.º 1
0
 public function testQueryStringWithFeedsWhereasFeedsHasAlreadyBeenSet()
 {
     $acp = new AfsAcp('127.0.0.1', 666);
     $query = $acp->get_query();
     $query = $query->set_query('bar')->set_feed('bat')->add_feed('baz');
     $acp->query('foo', array('a', 'b'));
     $query = $acp->get_query();
     $this->assertEquals('foo', $query->get_query());
     $this->assertTrue($query->has_feed());
     $feeds = $query->get_feeds();
     $feed = reset($feeds);
     $this->assertEquals('a', $feed);
     $feed = next($feeds);
     $this->assertEquals('b', $feed);
 }
Exemplo n.º 2
0
<?php

/** @file acp_helper_example.php
 * @example acp_helper_example.php
 */
require_once "PHP_API/afs_lib.php";
$acp = new AfsAcp('eval.partners.antidot.net', 48000);
$acp->query('Men');
$helper = $acp->execute(AfsHelperFormat::HELPERS);
?>


<html>
  <head>
    <title>Antidot PHP API - ACP helper example</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta charset="UTF-8">
    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css">
    <link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css">
    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="../../assets/js/html5shiv.js"></script>
      <script src="../../assets/js/respond.min.js"></script>
    <![endif]-->
  </head>
  <body>
    <div class="page-header">
      <h1>ACP helper example <small>based on the Antidot PHP API</small></h1>
    </div>

<?php