本文整理汇总了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;
}