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); }
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()); }
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; }
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; }
public function configAction() { $config = new Search_Config('lol'); DebugTools::print_r($config); return false; }
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>'); }
public function get_item_condition() { DebugTools::print_r('get_item_condition called'); return array('test' => 'test data'); }
public static function callback($ret, $callinfo) { echo $callinfo['method'], " result: ", $ret, "\n"; DebugTools::print_r($ret); }