Example #1
0
 public function clientAction()
 {
     $client = new Jsonrpc_Client('http://yaf-lib.com/search/server');
     $client->debug = true;
     $result = $client->execute('find', array('lol'));
     DebugTools::print_r($result);
 }
Example #2
0
 public function databaseAction()
 {
     $database = new Search_Database();
     DebugTools::print_r($database->get_doccount());
     DebugTools::print_r($database->get_data(1));
     DebugTools::print_r($database->get_termlist(1));
     DebugTools::print_r($database->select());
 }
Example #3
0
 public function memcachedAction()
 {
     $m = new System_Memcachedclient();
     $m->addServer('localhost', 11211);
     $m->set('foo', 'bar');
     $foo = $m->get('foo');
     DebugTools::print_r($foo);
     return false;
 }
Example #4
0
 public function sortAction()
 {
     $arr = array(7, 2, 1, 9, 4, 6, 3);
     $arr = System_Sort::insertion($arr);
     DebugTools::print_r($arr);
     $arr = array(5, 2, 3, 8, 1);
     $arr = System_Sort::insertion($arr);
     DebugTools::print_r($arr);
     $arr = array(7, 2, 1, 9, 4, 6, 3);
     $arr = System_Sort::bubble($arr);
     DebugTools::print_r($arr);
     return false;
 }
Example #5
0
 public function configAction()
 {
     $config = new Search_Config('lol');
     DebugTools::print_r($config);
     return false;
 }
Example #6
0
 public static function useMemory()
 {
     self::$end_mem = memory_get_usage();
     self::print_r('<span style="color:#dd1144;">memory: ' . (double) (self::$end_mem - self::$start_mem) / (1024 * 1024) . ' Mb' . '</span>');
 }
Example #7
0
 public function get_item_condition()
 {
     DebugTools::print_r('get_item_condition called');
     return array('test' => 'test data');
 }
Example #8
0
 public static function callback($ret, $callinfo)
 {
     echo $callinfo['method'], " result: ", $ret, "\n";
     DebugTools::print_r($ret);
 }