instances->get($id); $sd = &$instance['data']; $searchController = new asl_searchController(array( "phrase" => $s, "id" => $id, "instance" => $instance )); $results = $searchController->search(); if (count($results) <= 0 && $sd['kw_suggestions']) $results = $searchController->kwSuggestions(); do_action('asl_after_search', $s, $results, $id); // Override from hooks if (isset($_POST['asl_get_as_array'])) { return $results; } // Generate the results here $html_results = asl_generate_html_results( $results, $sd ); /* Clear output buffer, possible warnings */ print "!!ASLSTART!!"; print_r($html_results); print "!!ASLEND!!"; die(); } // ------------------------------------------------------------ // ---------------- SINGLETON SPECIFIC -------------------- // ------------------------------------------------------------ public static function getInstance() { if ( ! ( self::$_instance instanceof self ) ) { self::$_instance = new self(); } return self::$_instance; } } }