本文整理匯總了PHP中ca_metadata_elements::getRootElementsAsList方法的典型用法代碼示例。如果您正苦於以下問題:PHP ca_metadata_elements::getRootElementsAsList方法的具體用法?PHP ca_metadata_elements::getRootElementsAsList怎麽用?PHP ca_metadata_elements::getRootElementsAsList使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類ca_metadata_elements
的用法示例。
在下文中一共展示了ca_metadata_elements::getRootElementsAsList方法的3個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: Index
public function Index()
{
AssetLoadManager::register('tableList');
$vo_dm = Datamodel::load();
$va_elements = ca_metadata_elements::getRootElementsAsList(null, null, true, true);
$this->view->setVar('element_list', $va_elements);
$this->view->setVar('attribute_types', Attribute::getAttributeTypes());
$o_result_context = new ResultContext($this->request, $this->ops_table_name, 'basic_search');
$o_result_context->setResultList(array_keys($va_elements));
$o_result_context->setAsLastFind();
$o_result_context->saveContext();
return $this->render('elements_list_html.php');
}
示例2: __construct
public function __construct()
{
parent::__construct();
$this->opo_tep = new TimeExpressionParser();
$this->ops_lookup_word_sql = "\n\t\t\tSELECT word_id \n\t\t\tFROM ca_sql_search_words\n\t\t\tWHERE\n\t\t\t\tword = ?\n\t\t";
$this->opqr_lookup_word = $this->opo_db->prepare($this->ops_lookup_word_sql);
$this->ops_insert_word_index_sql = "\n\t\t\tINSERT INTO ca_sql_search_word_index\n\t\t\t(table_num, row_id, field_table_num, field_num, field_row_id, word_id, boost, access)\n\t\t\tVALUES\n\t\t";
$this->ops_insert_word_sql = "\n\t\t\tINSERT INTO ca_sql_search_words\n\t\t\t(word, stem)\n\t\t\tVALUES\n\t\t\t(?, ?)\n\t\t";
$this->ops_insert_ngram_sql = "\n\t\t\tINSERT INTO ca_sql_search_ngrams\n\t\t\t(word_id, ngram, seq)\n\t\t\tVALUES\n\t\t";
$this->opqr_insert_word = $this->opo_db->prepare($this->ops_insert_word_sql);
$this->ops_delete_sql = "DELETE FROM ca_sql_search_word_index WHERE (table_num = ?) AND (row_id = ?)";
$this->opqr_delete = $this->opo_db->prepare($this->ops_delete_sql);
$this->ops_delete_with_field_num_sql = "DELETE FROM ca_sql_search_word_index WHERE (table_num = ?) AND (row_id = ?) AND (field_table_num = ?) AND (field_num = ?)";
$this->opqr_delete_with_field_num = $this->opo_db->prepare($this->ops_delete_with_field_num_sql);
$this->ops_delete_with_field_row_id_sql = "DELETE FROM ca_sql_search_word_index WHERE (table_num = ?) AND (row_id = ?) AND (field_table_num = ?) AND (field_row_id = ?)";
$this->opqr_delete_with_field_row_id = $this->opo_db->prepare($this->ops_delete_with_field_row_id_sql);
$this->ops_delete_with_field_row_id_and_num = "DELETE FROM ca_sql_search_word_index WHERE (table_num = ?) AND (row_id = ?) AND (field_table_num = ?) AND (field_num = ?) AND (field_row_id = ?)";
$this->opqr_delete_with_field_row_id_and_num = $this->opo_db->prepare($this->ops_delete_with_field_row_id_and_num);
$this->ops_delete_dependent_sql = "DELETE FROM ca_sql_search_word_index WHERE (field_table_num = ?) AND (field_row_id = ?)";
$this->opqr_delete_dependent_sql = $this->opo_db->prepare($this->ops_delete_dependent_sql);
$this->opo_stemmer = new SnoballStemmer();
$this->opb_do_stemming = (int) trim($this->opo_search_config->get('search_sql_search_do_stemming')) ? true : false;
if (!($this->ops_indexing_tokenizer_regex = trim($this->opo_search_config->get('indexing_tokenizer_regex')))) {
$this->ops_indexing_tokenizer_regex = "^\\pL\\pN\\pNd/_#\\@\\&\\.";
}
if (!($this->ops_search_tokenizer_regex = trim($this->opo_search_config->get('search_tokenizer_regex')))) {
$this->ops_search_tokenizer_regex = "^\\pL\\pN\\pNd/_#\\@\\&";
}
if (!is_array($this->opa_asis_regexes = $this->opo_search_config->getList('asis_regexes'))) {
$this->opa_asis_regexes = array();
}
//$this->opqr_insert_ngram = $this->opo_db->prepare($this->ops_insert_ngram_sql);
//
// Load info about metadata elements into static var cache if it hasn't already be fetched
//
if (!is_array(WLPlugSearchEngineSqlSearch::$s_metadata_elements)) {
WLPlugSearchEngineSqlSearch::$s_metadata_elements = ca_metadata_elements::getRootElementsAsList();
}
$this->debug = false;
}
示例3: __construct
public function __construct($po_db = null)
{
parent::__construct($po_db);
$this->opo_tep = new TimeExpressionParser();
$this->opo_stemmer = new SnoballStemmer();
$this->opb_do_stemming = (int) trim($this->opo_search_config->get('search_sql_search_do_stemming')) ? true : false;
$this->initDbStatements();
if (!($this->ops_indexing_tokenizer_regex = trim($this->opo_search_config->get('indexing_tokenizer_regex')))) {
$this->ops_indexing_tokenizer_regex = "^\\pL\\pN\\pNd/_#\\@\\&\\.";
}
if (!($this->ops_search_tokenizer_regex = trim($this->opo_search_config->get('search_tokenizer_regex')))) {
$this->ops_search_tokenizer_regex = "^\\pL\\pN\\pNd/_#\\@\\&";
}
if (!is_array($this->opa_asis_regexes = $this->opo_search_config->getList('asis_regexes'))) {
$this->opa_asis_regexes = array();
}
//
// Load info about metadata elements into static var cache if it hasn't already be fetched
//
if (!is_array(WLPlugSearchEngineSqlSearch::$s_metadata_elements)) {
WLPlugSearchEngineSqlSearch::$s_metadata_elements = ca_metadata_elements::getRootElementsAsList();
}
$this->debug = false;
}