query
stringlengths
9
43.3k
document
stringlengths
17
1.17M
metadata
dict
negatives
listlengths
0
30
negative_scores
listlengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Adds new keywords into tables TBL_WORDLIST and TBL_WORDMAP
function gwAddNewKeywords($id_dict, $id_term, $arKeywords, $termIdOld, $isClean, $date_created) { global $arFields, $intFields, $arStop, $sys; global $oDb, $oSqlQ; # @header("content-type: text/html; charset=utf-8"); // Adding search keywords $arKeywordsJoin = array(); for (reset($arKeywords); list($k, $v) = each($arKeywords);) { $arKeywordsJoin = array_merge($arKeywordsJoin, $v); // common array with all keywords } // unique keywords only, have to run second time $arKeywordsJoin = array_flip($arKeywordsJoin); $arQuery = array(); $arSql = array(); if (!empty($arKeywordsJoin)) { $word_text_sql = "'" . implode("', '", array_keys($arKeywordsJoin)) . "'"; /* Get the list of already known keywords and their IDs */ $arSql = $oDb->sqlExec($oSqlQ->getQ('get-word', TBL_WORDLIST, $word_text_sql)); } # prn_r($arSql); $q2 = $q1 = array(); if (!empty($arSql)) // some keywords are exist already { $cnt = 0; // for each founded keyword for (; list($arK, $arV) = each($arSql);) { if ($isClean) // overwrite mode { $arQuery[0] = $oSqlQ->getQ('del-wordmap-by-term-dict', $termIdOld, $id_dict); } $q2['word_id'] = $arV['word_id']; $q2['term_id'] = $id_term; $q2['dict_id'] = $id_dict; $q2['date_created'] = $date_created; // Set Field ID for (reset($arFields); list($id_field, $fV) = each($arFields);) { if (isset($arKeywords[$id_field]) && in_array($arV['word_text'], $arKeywords[$id_field])) { $q2['term_match'] = $id_field; $arQueryMapExist[] = gw_sql_insert($q2, TBL_WORDMAP, 1, $cnt); unset($arKeywordsJoin[$arV['word_text']]); // remove existent keyword $cnt++; } } } } // // Add new kewords # prn_r($arKeywordsJoin); # prn_r($arKeywords); // $q2 = $q1 = array(); $q1['word_id'] = $q2['word_id'] = ($oDb->MaxId(TBL_WORDLIST, 'word_id') - 1); $cnt = $cntMap = 0; // for each new keyword for (reset($arKeywordsJoin); list($newkeyword, $v2) = each($arKeywordsJoin);) { $q2['word_id']++; $q2['dict_id'] = $id_dict; $q2['term_id'] = $id_term; $q2['date_created'] = $date_created; $q1['word_id']++; $q1['word_text'] = ''; // // Set index ID per field for (reset($arFields); list($id_field, $fV) = each($arFields);) { if (isset($arKeywords[$id_field]) && in_array($newkeyword, $arKeywords[$id_field])) { $q2['term_match'] = $id_field; $q1['word_text'] = $newkeyword; // add keyword into map $arQueryMap[] = gw_sql_insert($q2, TBL_WORDMAP, 1, $cntMap); unset($arKeywordsJoin[$newkeyword]); // remove new keyword $cntMap++; } } // add new word into wordlist if ($q1['word_text'] != '') { $arQueryWord[] = gw_sql_insert($q1, TBL_WORDLIST, 1, $cnt); $cnt++; } } /* Queries for existent keywords */ if (isset($arQueryMapExist)) { $arQuery[] = implode('', $arQueryMapExist); } /* Queries for new keywords */ if (isset($arQueryWord)) { $arQuery[] = implode('', $arQueryWord); } /* Queries for new keywords map */ if (isset($arQueryMap)) { $arQuery[] = implode('', $arQueryMap); } /* Displays queries */ if ($sys['isDebugQ']) { $arQuery = gw_highlight_sql($arQuery); print '<ul class="gwsql"><li>'.implode(';</li><li>', $arQuery).';</li></ul>'; } else { for (; list($kq, $vq) = each($arQuery);) { if (!$oDb->sqlExec($vq)) { print '<li class="xt">Error: cannot exec query: '.$arQuery[$i].';</li>'; } } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_keywords ( $new_keywords )\r\n\t\t{\r\n\t\t\r\n\t\t\t$this->errno = DB_OK;\r\n\r\n\t\t\tif ( $this->cat_id == -1 )\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tSuch category hasn't been created\r\n\t\t\t{\r\n\t\t\t\t$this->errno = WRONG_ID;\r\n\t\t\t\treturn ;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ( ! ( $result = $this->con->query( \"SELECT cat_keywords FROM category WHERE cat_id=$this->cat_id\" ) ) )\r\n\t\t\t{\r\n\t\t\t\t$this->errno = MYSQL_ERROR;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tFailed to connect\t\r\n\t\t\t\treturn ;\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif ( $result->num_rows == 1 )\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tas the id is unique one row should have been returned\r\n\t\t\t{\r\n\t\t\t\t$row = $result->fetch_row();\r\n\t\t\t\t$kw = $row[0];\r\n\t\t\t}\t\t\t\t\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$this->errno = MYSQL_ERROR;\r\n\t\t\t\treturn ;\r\n\t\t\t}\t\t\t\r\n\t\t\t\r\n\t\t\t/* gathering all keywords into one variable with # as delimiter to insert it to the database */\r\n\t\t\t$kw_length = 0; \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tinitialize with 0 in case the keywords array hasn't been set\r\n\t\r\n\t\t\tif ( isset ( $new_keywords ) )\r\n\t\t\t\t$kw_length = count( $new_keywords );\r\n\r\n\t\t\tif ( $kw_length == 0 )\r\n\t\t\t{\r\n\t\t\t\t$this->errno = WRONG_INPUT;\r\n\t\t\t\treturn ;\t\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tfor ( $i = 0; $i < $kw_length; $i++ )\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tgenerating the keyword string which will enter to the database\r\n\t\t\t\t$kw = $kw.\"#\".$new_keywords[$i];\t\t\t\r\n\t\t\t\r\n\t\t\tif( !$this->con->query( \"UPDATE category SET cat_keywords=\\\"$kw\\\" WHERE cat_id=$this->cat_id;\" ) )\t\t\t\r\n\t\t\t{\r\n\t\t\t\t$this->errno = MYSQL_ERROR;\t\t\t\t\t\r\n\t\t\t\treturn ;\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tFailed to query\t\t\t\t\r\n\t\t\t}\r\n\r\n\t\t\t$this->cat_keywords = NULL;\r\n\t\t\t\r\n\t\t\t$tok = strtok( $kw, \"#\" );\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t//\tturning the keywords string into an array\r\n\t\t\t\r\n\t\t\twhile ( $tok !== false ) \r\n\t\t\t{\r\n\t\t\t\t$this->cat_keywords [] = $tok;\r\n\t\t\t\t$tok = strtok( \"#\" );\r\n\t\t\t}\t\t\t\r\n\t\r\n\t\t}", "protected function _syncKeywords() {}", "private function installWords()\n {\n $data = file(__DIR__ . '/../bad_words_pl.txt');\n\n $bom = pack('H*', 'EFBBBF');\n\n $rows = [];\n foreach ($data as $row) {\n $rows[] = [trim(preg_replace(\"/^$bom/\", '', $row))];\n }\n\n Yii::$app\n ->db\n ->createCommand()\n ->batchInsert($this->table, ['word'], $rows)\n ->execute();\n }", "public static function addKeywords($params)\n {\n $data = new ExcludedKeyword();\n $data->keyword = BackEnd_Helper_viewHelper::stripSlashesFromString( $params['keyword']);\n $data->action = BackEnd_Helper_viewHelper::stripSlashesFromString($params['actionType']);\n $data->url = BackEnd_Helper_viewHelper::stripSlashesFromString($params['redirectTo']);\n $data->save();\n\n if($params['actionType'] == 1){\n\n //split value by comman (,)\n $splitedVal = explode(',',$params['selectedShopForSearchbar']) ;\n //get hidden value from posted form\n\n foreach ($splitedVal as $sp) {\n //find shop by name from shop table\n $relKeyWords = new RefExcludedkeywordShop();\n //add value in array by index\n $relKeyWords->keywordid = $data->id;//get last inserted keyword id\n $relKeyWords->shopid = $sp;\n $relKeyWords->keywordname = BackEnd_Helper_viewHelper::stripSlashesFromString($params['keyword']);\n $relKeyWords->save();\n\n }\n }\n //call cache function\n FrontEnd_Helper_viewHelper::clearCacheByKeyOrAll('all_excludedkeyword_list');\n //die('out');\n\n }", "private function addKeyword()\n {\n // get demanded link data\n $this->model->action('link','addKeyword', \n array('id_key' => (int)$_REQUEST['id_key'],\n 'id_link' => (int)$_REQUEST['id_link']));\n }", "function mx_add_search_words($mode, $post_id, $post_text, $post_title = '', $mx_mode = 'mx')\n\t{\n\t\tglobal $db, $config, $lang;\n\n\t\t// $search_match_table = SEARCH_MATCH_TABLE;\n\t\t// $search_word_table = SEARCH_WORD_TABLE;\n\n\t\tswitch ($mx_mode)\n\t\t{\n\t\t\tcase 'mx':\n\t\t\t\t$search_match_table = MX_MATCH_TABLE;\n\t\t\t\t$search_word_table = MX_WORD_TABLE;\n\t\t\t\t$db_key = 'block_id';\n\t\t\tbreak;\n\t\t\tcase 'kb':\n\t\t\t\t$search_match_table = KB_MATCH_TABLE;\n\t\t\t\t$search_word_table = KB_WORD_TABLE;\n\t\t\t\t$db_key = 'article_id';\n\t\t\tbreak;\n\t\t}\n\n\t\tstopwords_synonyms_init();\n\n\t\t$search_raw_words = array();\n\t\t$search_raw_words['text'] = split_words(clean_words('post', $post_text, $stopwords_array, $synonyms_array));\n\t\t$search_raw_words['title'] = split_words(clean_words('post', $post_title, $stopwords_array, $synonyms_array));\n\n\t\t@set_time_limit(0);\n\n\t\t$word = array();\n\t\t$word_insert_sql = array();\n\t\twhile (list($word_in, $search_matches) = @each($search_raw_words))\n\t\t{\n\t\t\t$word_insert_sql[$word_in] = '';\n\t\t\tif (!empty($search_matches))\n\t\t\t{\n\t\t\t\tfor ($i = 0; $i < sizeof($search_matches); $i++)\n\t\t\t\t{\n\t\t\t\t\t$search_matches[$i] = trim($search_matches[$i]);\n\n\t\t\t\t\tif($search_matches[$i] != '')\n\t\t\t\t\t{\n\t\t\t\t\t\t$word[] = $search_matches[$i];\n\t\t\t\t\t\tif (!strstr($word_insert_sql[$word_in], \"'\" . $search_matches[$i] . \"'\"))\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\t$word_insert_sql[$word_in] .= ($word_insert_sql[$word_in] != \"\") ? \", '\" . $search_matches[$i] . \"'\" : \"'\" . $search_matches[$i] . \"'\";\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (sizeof($word))\n\t\t{\n\t\t\tsort($word);\n\n\t\t\t$prev_word = '';\n\t\t\t$word_text_sql = '';\n\t\t\t$temp_word = array();\n\t\t\tfor($i = 0; $i < sizeof($word); $i++)\n\t\t\t{\n\t\t\t\tif ($word[$i] != $prev_word)\n\t\t\t\t{\n\t\t\t\t\t$temp_word[] = $word[$i];\n\t\t\t\t\t$word_text_sql .= (($word_text_sql != '') ? ', ' : '') . \"'\" . $word[$i] . \"'\";\n\t\t\t\t}\n\t\t\t\t$prev_word = $word[$i];\n\t\t\t}\n\t\t\t$word = $temp_word;\n\n\t\t\t$check_words = array();\n\n\t\t\t$value_sql = '';\n\t\t\t$match_word = array();\n\t\t\tfor ($i = 0; $i < sizeof($word); $i++)\n\t\t\t{\n\t\t\t\t$new_match = true;\n\t\t\t\tif (isset($check_words[$word[$i]]))\n\t\t\t\t{\n\t\t\t\t\t$new_match = false;\n\t\t\t\t}\n\n\t\t\t\tif ($new_match)\n\t\t\t\t{\n\t\t\t\t\t$value_sql .= (($value_sql != '') ? ', ' : '') . '(\\'' . $word[$i] . '\\', 0)';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($value_sql != '')\n\t\t\t{\n\t\t\t\t$sql = \"INSERT IGNORE INTO \" . $search_word_table . \" (word_text, word_common) VALUES $value_sql\";\n\t\t\t\t$db->sql_query($sql);\n\t\t\t}\n\t\t}\n\n\t\twhile(list($word_in, $match_sql) = @each($word_insert_sql))\n\t\t{\n\t\t\t$title_match = ($word_in == 'title') ? 1 : 0;\n\n\t\t\tif ($match_sql != '')\n\t\t\t{\n\t\t\t\t$sql = \"INSERT INTO \" . $search_match_table . \" ($db_key, word_id, title_match)\n\t\t\t\t\tSELECT $post_id, word_id, $title_match\n\t\t\t\t\t\tFROM \" . $search_word_table . \"\n\t\t\t\t\t\tWHERE word_text IN ($match_sql)\";\n\t\t\t\t$db->sql_query($sql);\n\t\t\t}\n\t\t}\n\n\t\tif ($mode == 'single')\n\t\t{\n\t\t\t// remove_common('single', 4/10, $word);\n\t\t}\n\n\t\treturn;\n\t}", "public function setKeyWords()\n {\n if (empty($this->sqlKeywords)) {\n $this->sqlKeywords = [\"abort\",\"absolute\",\"access\",\"action\",\"add\",\"admin\",\"after\",\"aggregate\",\"all\",\"also\",\"alter\",\"always\",\"analyse\",\"analyze\",\"and\",\"any\",\"array\",\"as\",\"asc\",\"assertion\",\"assignment\",\"asymmetric\",\"at\",\"attribute\",\"authorization\",\"backward\",\"before\",\"begin\",\"between\",\"bigint\",\"binary\",\"bit\",\"boolean\",\"both\",\"by\",\"cache\",\"called\",\"cascade\",\"cascaded\",\"case\",\"cast\",\"catalog\",\"chain\",\"char\",\"character\",\"characteristics\",\"check\",\"checkpoint\",\"class\",\"close\",\"cluster\",\"coalesce\",\"collate\",\"collation\",\"column\",\"comment\",\"comments\",\"commit\",\"committed\",\"concurrently\",\"configuration\",\"conflict\",\"connection\",\"constraint\",\"constraints\",\"content\",\"continue\",\"conversion\",\"copy\",\"cost\",\"create\",\"cross\",\"csv\",\"cube\",\"current\",\"current_catalog\",\"current_date\",\"current_role\",\"current_schema\",\"current_time\",\"current_timestamp\",\"current_user\",\"cursor\",\"cycle\",\"data\",\"database\",\"day\",\"deallocate\",\"dec\",\"decimal\",\"declare\",\"default\",\"defaults\",\"deferrable\",\"deferred\",\"definer\",\"delete\",\"delimiter\",\"delimiters\",\"depends\",\"desc\",\"dictionary\",\"disable\",\"discard\",\"distinct\",\"do\",\"document\",\"domain\",\"double\",\"drop\",\"each\",\"else\",\"enable\",\"encoding\",\"encrypted\",\"end\",\"enum\",\"escape\",\"event\",\"except\",\"exclude\",\"excluding\",\"exclusive\",\"execute\",\"exists\",\"explain\",\"extension\",\"external\",\"extract\",\"false\",\"family\",\"fetch\",\"filter\",\"first\",\"float\",\"following\",\"for\",\"force\",\"foreign\",\"forward\",\"freeze\",\"from\",\"full\",\"function\",\"functions\",\"global\",\"grant\",\"granted\",\"greatest\",\"group\",\"grouping\",\"handler\",\"having\",\"header\",\"hold\",\"hour\",\"identity\",\"if\",\"ilike\",\"immediate\",\"immutable\",\"implicit\",\"import\",\"in\",\"including\",\"increment\",\"index\",\"indexes\",\"inherit\",\"inherits\",\"initially\",\"inline\",\"inner\",\"inout\",\"input\",\"insensitive\",\"insert\",\"instead\",\"int\",\"integer\",\"intersect\",\"interval\",\"into\",\"invoker\",\"is\",\"isnull\",\"isolation\",\"join\",\"key\",\"label\",\"language\",\"large\",\"last\",\"lateral\",\"leading\",\"leakproof\",\"least\",\"left\",\"level\",\"like\",\"limit\",\"listen\",\"load\",\"local\",\"localtime\",\"localtimestamp\",\"location\",\"lock\",\"locked\",\"logged\",\"mapping\",\"match\",\"materialized\",\"maxvalue\",\"method\",\"minute\",\"minvalue\",\"mode\",\"month\",\"move\",\"name\",\"names\",\"national\",\"natural\",\"nchar\",\"next\",\"no\",\"none\",\"not\",\"nothing\",\"notify\",\"notnull\",\"nowait\",\"null\",\"nullif\",\"nulls\",\"numeric\",\"object\",\"of\",\"off\",\"offset\",\"oids\",\"on\",\"only\",\"operator\",\"option\",\"options\",\"or\",\"order\",\"ordinality\",\"out\",\"outer\",\"over\",\"overlaps\",\"overlay\",\"owned\",\"owner\",\"parallel\",\"parser\",\"partial\",\"partition\",\"passing\",\"password\",\"placing\",\"plans\",\"policy\",\"position\",\"preceding\",\"precision\",\"prepare\",\"prepared\",\"preserve\",\"primary\",\"prior\",\"privileges\",\"procedural\",\"procedure\",\"program\",\"quote\",\"range\",\"read\",\"real\",\"reassign\",\"recheck\",\"recursive\",\"ref\",\"references\",\"refresh\",\"reindex\",\"relative\",\"release\",\"rename\",\"repeatable\",\"replace\",\"replica\",\"reset\",\"restart\",\"restrict\",\"returning\",\"returns\",\"revoke\",\"right\",\"role\",\"rollback\",\"rollup\",\"row\",\"rows\",\"rule\",\"savepoint\",\"schema\",\"scroll\",\"search\",\"second\",\"security\",\"select\",\"sequence\",\"sequences\",\"serializable\",\"server\",\"session\",\"session_user\",\"set\",\"setof\",\"sets\",\"share\",\"show\",\"similar\",\"simple\",\"skip\",\"smallint\",\"snapshot\",\"some\",\"sql\",\"stable\",\"standalone\",\"start\",\"statement\",\"statistics\",\"stdin\",\"stdout\",\"storage\",\"strict\",\"strip\",\"substring\",\"symmetric\",\"sysid\",\"system\",\"table\",\"tables\",\"tablesample\",\"tablespace\",\"temp\",\"template\",\"temporary\",\"text\",\"then\",\"time\",\"timestamp\",\"to\",\"trailing\",\"transaction\",\"transform\",\"treat\",\"trigger\",\"trim\",\"true\",\"truncate\",\"trusted\",\"type\",\"types\",\"unbounded\",\"uncommitted\",\"unencrypted\",\"union\",\"unique\",\"unknown\",\"unlisten\",\"unlogged\",\"until\",\"update\",\"user\",\"using\",\"vacuum\",\"valid\",\"validate\",\"validator\",\"value\",\"values\",\"varchar\",\"variadic\",\"varying\",\"verbose\",\"version\",\"view\",\"views\",\"volatile\",\"when\",\"where\",\"whitespace\",\"window\",\"with\",\"within\",\"without\",\"work\",\"wrapper\",\"write\",\"xml\",\"xmlattributes\",\"xmlconcat\",\"xmlelement\",\"xmlexists\",\"xmlforest\",\"xmlparse\",\"xmlpi\",\"xmlroot\",\"xmlserialize\",\"year\",\"yes\",\"zone\"];\n }\n }", "protected function setKeywords() {\r\n\t\t$keywords = $this->newsItem->getKeywords();\r\n\t\t$keywordsAction = $this->settings['news']['semantic']['general']['keywords']['action'];\r\n\t\t$pageKeywords = $GLOBALS['TSFE']->page['keywords'];\r\n\t\tif (!empty($keywordsAction) && !empty($pageKeywords)) {\r\n\t\t\tswitch ($keywordsAction) {\r\n\t\t\t\tcase 'prepend':\r\n\t\t\t\t\t$keywords = (empty($keywords)) ? $pageKeywords : $keywords . ', ' . $pageKeywords;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 'append':\r\n\t\t\t\t\t$keywords = (empty($keywords)) ? $pageKeywords : $pageKeywords . ',' . $keywords;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault:\r\n\t\t\t}\r\n\t\t}\r\n\t\t$keywordsArray = t3lib_div::trimExplode(',', $keywords);\r\n\t\t$keywordsLimit = intval($this->settings['news']['semantic']['general']['keywords']['limit']);\r\n\t\t$this->keywords = (empty($keywordsLimit)) ? array_unique($keywordsArray) : $this->keywords = array_slice(array_unique($keywordsArray), 0, $keywordsLimit);\r\n\t}", "function add_keywords($keywords) {\n\n $operations = array();\n\n for ($i = 0; $i < count($keywords); $i++) {\n\n $k = $keywords[$i];\n\n if (!isset($k['match_type']))\n $k['match_type'] = AW_MATCH_TYPE_BROAD;\n\n $keyword = '<criterion xsi:type=\"Keyword\">\n <text>'.$this->__xml($k['text']).'</text>\n <matchType>'.\n $this->__xml($k['match_type'])\n .'</matchType>\n </criterion>';\n\n $operations[] =\n $this->__make_criterion_operation('ADD',\n $k['ad_group_id'],\n $keyword,\n $k['user_status'],\n $k['destination_url']);\n\n }\n\n return $this->__do_mutate('AdGroupCriterionService', $operations);\n\n}", "public function AddHeadKeywords($keywords){\r\n\t\t$this->head->AddKeywords($keywords);\r\n\t}", "public function insertKeyword($page_id, $word) {\n $page_id = $this->connection->escape_string($page_id);\n $word = $this->connection->escape_string($word);\n \n $this->query(\"INSERT INTO Keywords (page_id, word)\"\n . \" VALUES ('$page_id', '$word')\");\n }", "public function testAssignKeywords()\n {\n $this->markTestIncomplete(\n 'This test has not been implemented yet.'\n );\n }", "private function create_frequency_table($words)\n {\n foreach($words as $key => $word) \n {\n $this->insert_word($word);\n }\n }", "public function setKeywords($keywords, $encoding = 'UTF-8') {}", "static public function addKeyword($new_keyword) {\n\t\tself::$page_keywords[] = (string)trim($new_keyword);\n\t}", "public function setKeywords($keywords)\n {\n $this->keywords = (array)$keywords;\n }", "public static function AddCountOfWords() {\r\n $conn = ModMetocHelper::coToDa();\r\n $cont = ModMetocHelper::conTab();\r\n\r\n $sql = \"ALTER TABLE $cont ADD count_of_words INT(10)\";\r\n $result = $conn->query($sql);\r\n }", "function gwAddTerm($arPre, $id_dict, $arStop, $in_term, $is_specialchars, $is_overwrite, $intLine = 0, $isDelete = 0)\r\n{\r\n\tglobal $oDom, $oFunc, $oDb, $oSqlQ, $oCase, $oL, $oHtml, $oSess;\r\n\tglobal $arFields, $arDictParam, $arTermParam, $cnt, $tid, $sys;\r\n\tglobal $gw_this, $qT;\r\n\r\n#\t@header(\"content-type: text/html; charset=utf-8\");\r\n\r\n\t$id_w = $oDb->MaxId($arDictParam['tablename']);\r\n\t$isQ = 1;\r\n\t$isCleanMap = 0;\r\n\t$id_old = isset($tid) ? $tid : 0;\r\n\t$queryA = $qT = array();\r\n\t$isTermExist = 0;\r\n\t/* Used for keywords */\r\n\t$str_term_filtered = $oDom->get_content($arPre['term']);\r\n\t/* remove {TEMPLATES}, {%TEMPLATES%} */\r\n\t$str_term_filtered = preg_replace(\"/{(%)?([A-Za-z0-9:\\-_]+)(%)?}/\", '', $str_term_filtered);\r\n\t$str_term_filtered = trim($str_term_filtered);\r\n\t/* Used in database */\r\n\t$str_term_src = gw_fix_input_to_db($str_term_filtered);\r\n\t\r\n\t$str_term_filtered = gw_unhtmlspecialamp($str_term_filtered);\r\n\t/* 22 jul 2003: Custom Term ID */\r\n\t$qT['id'] = $oDom->get_attribute('id', 'term', $arPre['term'] );\r\n\t$qT['id'] = preg_replace(\"/[^0-9]/\", '', trim($qT['id']));\r\n\t/* */\r\n\tif (!$isDelete)\r\n\t{\r\n\t\t/* -- Check for an existed term -- */\r\n\t\t/* prepare keywords for a term */\r\n\t\tif ($is_specialchars)\r\n\t\t{\r\n\t\t\t/* Keep specials */\r\n\t\t\t$str_term_filtered = $oCase->nc($str_term_filtered);\r\n\t\t\t$str_term_filtered = gw_text_wildcars($str_term_filtered);\r\n\t\t\t$arKeywordsT = text2keywords($oCase->rm_($str_term_filtered), 1);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t/* Remove specials */\r\n\t\t\t$str_term_filtered = text_normalize($str_term_filtered);\r\n\t\t\t$arKeywordsT = text2keywords($str_term_filtered, $arDictParam['min_srch_length']);\r\n\t\t}\r\n\t\t/* Are there any keywords? */\r\n\t\t$isTermEmpty = (empty($arKeywordsT) && (strlen(trim( $str_term_filtered )) == 0)) ? 1 : 0;\r\n\t\tif (!$isTermEmpty)\r\n\t\t{\r\n\t\t\t/* no empty keywords for a term */\r\n\t\t\t/* SQL-query */\r\n\t\t\t/* Get existent keywords, standard mode */\r\n\t\t\t$word_srch_sql = ($qT['id'] != '') ? 't.id = \"' . $qT['id'] . '\"' : '';\r\n\t\t\tif ($word_srch_sql == '')\r\n\t\t\t{\r\n\t\t\t\t$word_srch_sql = \"k.word_text IN ('\" . implode(\"', '\", $arKeywordsT) . \"')\";\r\n\t\t\t}\r\n\t\t\t$sql = $oSqlQ->getQ('get-term-exists', TBL_WORDLIST, $arDictParam['tablename'], $id_dict,\r\n\t\t\t\t\t\t$in_term, $word_srch_sql\r\n\t\t\t\t\t);\r\n\t\t\t/* Get existent keywords, keep specialchars mode */\r\n\t\t\tif (($is_specialchars) || empty($arKeywordsT))\r\n\t\t\t{\r\n\t\t\t\t$ar_chars_sql = array('\\\\' => '\\\\\\\\', '\\\\%' => '\\\\\\\\\\\\\\%', '\\\\_' => '\\\\\\\\\\\\\\_', '\\\\\"' => '\\\\\\\\\\\\\\\"', \"\\\\'\" => \"\\\\\\\\\\\\\\'\");\r\n\t\t\t\t$sql = $oSqlQ->getQ('get-term-exists-spec', $arDictParam['tablename'],\r\n\t\t\t\t\t\tstr_replace(array_keys($ar_chars_sql), array_values($ar_chars_sql), gw_addslashes( $str_term_src ))\r\n\t\t\t\t\t);\r\n\t\t\t}\r\n\t\t\t$arSql = $oDb->sqlExec($sql);\r\n#\t\t\tprn_r($arSql, __LINE__ . '<br />' . $sql);\r\n\t\t\t$isTermNotMatched = 1; // `No term found' by default\r\n\r\n\t\t\tfor (; list($arK, $arV) = each($arSql);) // compare founded values (Q) with imported (T)\r\n\t\t\t{\r\n\t\t\t\t$id_old = $arV['id']; // get ID for existent keywords.\r\n\t\t\t\tif ($id_old == $qT['id'])\r\n\t\t\t\t{\r\n\t\t\t\t\t$isTermNotMatched = 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t\tif ($is_specialchars)\r\n\t\t\t\t{\r\n\t\t\t\t\t/* 1 - is the minimum length */\r\n\t\t\t\t\t$arKeywordsQ = text2keywords( text_normalize($arV['term']), 1);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\t/* $arDictParam['min_srch_length'] - is the minimum length */\r\n\t\t\t\t\t$arKeywordsQ = text2keywords( text_normalize($arV['term']), $arDictParam['min_srch_length']);\r\n\t\t\t\t}\r\n#\t\t\t\tprn_r($arKeywordsQ);\r\n\t\t\t\t$div1 = sizeof(gw_array_exclude($arKeywordsT, $arKeywordsQ));\r\n\t\t\t\t$div2 = sizeof(gw_array_exclude($arKeywordsQ, $arKeywordsT));\r\n\t\t\t\t$isTermNotMatched = ($div1 + $div2);\r\n\t\t\t\t// if the sum of excluded arrays is 0, this term already exists\r\n\t\t\t\tif (!$isTermNotMatched) // in english, double negative means positive... yeah\r\n\t\t\t\t{\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t} // end of for each founded terms\r\n\t\t\tif ($isTermNotMatched > 0)\r\n\t\t\t{\r\n\t\t\t\t$isQ = 1;\r\n\t\t\t\t$isTermExist = 0;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$isTermExist = 1;\r\n\t\t\t}\r\n\t\t} // !$isTermEmpty\r\n\t}\r\n\t/* */\r\n\tif (!isset($str_term_filtered))\r\n\t{\r\n\t\t$str_term_filtered = gw_text_wildcars($str_term_filtered);\r\n\t\t$str_term_filtered = text_normalize($str_term_filtered);\r\n\t}\r\n\t/* 21 jan 2006: new `date_created' for new terms */\r\n\t/* 23 apr 2008: subtract 61 second */\r\n\t$qT['date_created'] = isset($arPre['date_created']) ? $arPre['date_created'] : $sys['time_now_gmt_unix'];\r\n\t$qT['date_modified'] = $sys['time_now_gmt_unix'] - 61;\r\n\t$qT['date_created'] -= 61;\r\n\t/* 21 jul 2003: Better protection by adding random Next ID number */\r\n\t$arTermParam['tid'] = $qT['id'] = ($qT['id'] == '') ? mt_rand($id_w, ($sys['leech_factor'] * 2) + $id_w) : $qT['id'];\r\n\t$qT['term'] = $str_term_src;\r\n\t/* 15 sep 2007: Term URI */\r\n\t/* 08 apr 2008: Make link to added term */\r\n\t/* 11 apr 2008: Better URI */\r\n\t/* 23 apr 2008: Even better URI. Added transliteration. */\r\n\t$qT['term_uri'] = $oDom->get_attribute('uri', 'term', $arPre['term'] );\r\n\t$qT['term_uri'] = ($qT['term_uri'] == '') ? $qT['id'].'-'.$oCase->translit( $oCase->lc($str_term_filtered)) : $qT['term_uri'];\r\n\t$qT['term_uri'] = $oCase->rm_entity($qT['term_uri']);\r\n\t$qT['term_uri'] = preg_replace('/[^0-9A-Za-z_-]/', '-', $qT['term_uri']);\r\n\t$qT['term_uri'] = preg_replace('/-{2,}/', '-', $qT['term_uri']);\r\n\tif ($qT['term_uri'] == '-')\r\n\t{\r\n\t\t$qT['term_uri'] = $qT['id'].'-';\r\n\t}\r\n\t$arTermParam['term_uri'] = $qT['term_uri'];\r\n\r\n\t$qT['defn'] =& $arPre['parameters']['xml'];\r\n\t/* Alphabetic orders 1,2,3 */\r\n\t$qT['term_1'] = $oDom->get_attribute('t1', 'term', $arPre['term'] );\r\n\t$qT['term_2'] = $oDom->get_attribute('t2', 'term', $arPre['term'] );\r\n\t$qT['term_3'] = $oDom->get_attribute('t3', 'term', $arPre['term'] );\r\n\t/* -- Custom Alphabetic Toolbar -- */\r\n\t/* Select custom rules for uppercasing */\r\n\t$sql = 'SELECT az_value, az_value_lc FROM `'.$sys['tbl_prefix'].'custom_az` WHERE `id_profile` = \"'.$arDictParam['id_custom_az'].'\"';\r\n\t$arSqlAz = $oDb->sqlRun($sql, 'st');\r\n\tfor (; list($arK, $arV) = each($arSqlAz);)\r\n\t{\r\n\t\t$str_term_src = str_replace($arV['az_value_lc'], $arV['az_value'], $str_term_src);\r\n\t}\r\n\t/* Unicode uppercase */\r\n\t$str_term_src_uc = $oCase->uc( $str_term_src );\r\n\t/* 1.8.7: Custom sorting order */\r\n\t$qT['term_order'] = $oDom->get_attribute('term_order', 'term', $arPre['term'] );\r\n\t$qT['term_order'] = ($qT['term_order'] == '') ? $str_term_src_uc : $qT['term_order'];\r\n\t$qT['term_a'] = $qT['term_b'] = $qT['term_c'] = $qT['term_d'] = $qT['term_e'] = $qT['term_f'] = 0;\r\n\t/* Prepare A, AAZZ, AAAZZZ */\r\n\t$qT['term_3'] = ($qT['term_3'] == '') ? $oFunc->mb_substr($str_term_filtered, 2, 1, $sys['internal_encoding']) : $qT['term_3'];\r\n\t$qT['term_2'] = ($qT['term_2'] == '') ? $oFunc->mb_substr($str_term_filtered, 1, 1, $sys['internal_encoding']) : $qT['term_2'];\r\n\t$qT['term_1'] = ($qT['term_1'] == '') ? $oFunc->mb_substr($str_term_filtered, 0, 1, $sys['internal_encoding']) : $qT['term_1'];\r\n\t/* */\r\n\t$ar_field_names = array('a','b','c','d','e','f');\r\n\tpreg_match_all(\"/./u\", $qT['term_order'], $ar_letters);\r\n\tfor (; list($cnt_letter, $letter) = each($ar_letters[0]);)\r\n\t{\r\n\t\tif (isset($ar_field_names[$cnt_letter]))\r\n\t\t{\r\n\t\t\t$qT['term_'.$ar_field_names[$cnt_letter]] = text_str2ord($letter);\r\n\t\t}\r\n\t}\r\n\t/* Fix htmlspecial characters */\r\n\t$qT['term_3'] = gw_htmlspecialamp(gw_unhtmlspecialamp($qT['term_3']));\r\n\t$qT['term_2'] = gw_htmlspecialamp(gw_unhtmlspecialamp($qT['term_2']));\r\n\t$qT['term_1'] = gw_htmlspecialamp(gw_unhtmlspecialamp($qT['term_1']));\r\n\t/* */\r\n\t$qT['is_active'] = $oDom->get_attribute('is_active', 'term', $arPre['term']);\r\n\t$qT['is_complete'] = $oDom->get_attribute('is_complete', 'term', $arPre['term']);\r\n#prn_r($qT, __LINE__.__FILE__);\r\n#exit;\r\n\tif ($isDelete || $isTermExist)\r\n\t{\r\n\t\t/* Assign Term ID from previously added term */\r\n\t\t$arTermParam['tid'] = $id_old;\r\n\t\tif ($is_overwrite)\r\n\t\t{\r\n\t\t\t$qT['id'] = $id_old;\r\n\t\t\t$isCleanMap = 1;\r\n\t\t\t$isTermExist = 0;\r\n#\t\t\t$queryA[] = $oSqlQ->getQ('del-term_id', $arDictParam['tablename'], $id_old, $id_dict);\r\n\t\t}\r\n\t}\r\n\tif (!$isDelete && $isTermExist)\r\n\t{\r\n\t\t/* Term already exists */\r\n\t\t$ar_matched_terms = array();\r\n\t\tfor (reset($arSql); list($arK, $arV) = each($arSql);)\r\n\t\t{\r\n\t\t\t$ar_matched_terms[] = $oHtml->a($sys['page_admin'].'?'.GW_ACTION.'='.GW_A_EDIT.'&'.GW_TARGET.'='.GW_T_TERMS.'&id='.$id_dict.'&tid=' . $arV['id'],\r\n\t\t\t\t\t\t $arV['term'], '', '', $oL->m('3_edit'));\r\n\t\t}\r\n\t\t$str_line = implode(' | ', $ar_matched_terms);\r\n\t\t$queryA = '<dl style=\"margin:0\">';\r\n\t\t$queryA .= '<dt class=\"xu red\">'.$oL->m('reason_25').' - <strong>'. $str_term_src . '</strong></dt>';\r\n\t\t$queryA .= '<dd class=\"termpreview\">' .$str_line. '</dd>';\r\n\t\t$queryA .= '</dl>';\r\n\t\t$isQ = 0;\r\n\t}\r\n\t/* Allow query */\r\n\tif ($isQ)\r\n\t{\r\n\t\t/* Prepare keywords per field */\r\n#\t\t$ot = new gw_timer('addterm');\r\n\t\tfor (reset($arFields); list($fK, $fV) = each($arFields);)\r\n\t\t{\r\n\t\t\t// Init\r\n\t\t\t$arKeywords[$fK] = array();\r\n\t\t\t//\r\n#\t\t\t$int_min_length = (isset($fV[2]) && ($fV[2] != 'auto') && ($fV[2] != '')) ? $fV[2] : $arDictParam['min_srch_length'];\r\n#\t\t\t$int_min_length = (!isset($fV[2]) || ($fV[2] == 'auto') ) ? $int_min_length : $fV[2];\r\n\t\t\t//\r\n\t\t\t// Make keywords from array\r\n\t\t\t// space is required, otherwise `...word</defn><defn>word...' will become `wordword'\r\n\t\t\t$tmpStr = '';\r\n\t\t\tif (isset($arPre[$fV[0]]))\r\n\t\t\t{\r\n\t\t\t\t$tmpStr = $oDom->get_content( $arPre[$fV[0]] );\r\n\t\t\t}\r\n\t\t\tif ($tmpStr != '') // do not parse empty strings\r\n\t\t\t{\r\n\t\t\t\t// Get maximum search length per field\r\n\t\t\t\t$int_min_length = $fV[2];\r\n\t\t\t\tif ( is_string($int_min_length) )\r\n\t\t\t\t{\r\n\t\t\t\t\t$int_min_length = $arDictParam['min_srch_length'];\r\n\t\t\t\t}\r\n#\t\t\t\t$isStrip = ($srchLength == 1) ? 0 : 1;\r\n# prn_r( text_normalize( $tmpStr ) . ' ' . $fV[0] . '; len=' . $int_min_length);\r\n\t\t\t\t/* Fix wildcars, 1.6.1 */\r\n\t\t\t\t$tmpStr = str_replace('<![CDATA[', '', $tmpStr);\r\n\t\t\t\t$tmpStr = str_replace(']]>', '', $tmpStr);\r\n\t\t\t\t$tmpStr = gw_text_wildcars($tmpStr);\r\n\t\t\t\t/* */\r\n#\t\t\t\tprn_r( $fV );\r\n\t\t\t\t$arKeywords[$fK] = text2keywords( gw_text_sql(text_normalize($tmpStr)), $int_min_length, 25, $sys['internal_encoding'] );\r\n\t\t\t\t/* Remove stopwords from parsed strings only (others are empty) */\r\n\t\t\t\t$arKeywords[$fK] = gw_array_exclude( $arKeywords[$fK], $arStop);\r\n\t\t\t}\r\n\t\t}\r\n\t\t/* keywords convertion time */\r\n#\t\tprn_r( $arKeywords );\r\n#\t\tprint $ot->endp(__LINE__, __FILE__);\r\n#\t\texit;\r\n\t\t/* Remove double keywords from definition */\r\n\t\tfor (reset($arFields); list($fK, $fV) = each($arFields);)\r\n\t\t{\r\n\t\t\tif ($fK != 0)\r\n\t\t\t{\r\n\t\t\t\t$arKeywords[0] = gw_array_exclude( $arKeywords[0], $arKeywords[$fK]);\r\n\t\t\t}\r\n\t\t}\r\n\t\t/** Keywords were prepared */\r\n\t\t/** Add keywords to database! */\r\n# prn_r($arStop);\r\n# prn_r($arKeywords);\r\n# prn_r($arPre);\r\n\t\tgwAddNewKeywords($id_dict, $qT['id'], $arKeywords, $id_old, $isCleanMap, $qT['date_created']);\r\n\t\t$qT['int_bytes'] = strlen($qT['defn']);\r\n\t\t/* Checksum */\r\n\t\t$qT['crc32u'] = crc32($str_term_src_uc);\r\n\t\t/* Add User ID to term */\r\n\t\tif ($gw_this['vars'][GW_ACTION] == GW_A_ADD)\r\n\t\t{\r\n\t\t\t$qT['id_user'] = $oSess->id_user;\r\n\t\t}\r\n\t\t/* Add relation `user to term' */\r\n\t\t$q2['user_id'] = $oSess->id_user;\r\n\t\t$q2['term_id'] = $qT['id'];\r\n\t\t$q2['dict_id'] = $id_dict;\r\n\t\t// -------------------------------------------------\r\n\t\t// Turn on text parsers\r\n\t\t// -------------------------------------------------\r\n\t\t// Process automatic functions\r\n\t\tfor (; list($k, $v) = each($gw_this['vars']['funcnames'][GW_A_UPDATE . GW_T_TERM]);)\r\n\t\t{\r\n\t\t\tif (function_exists($v))\r\n\t\t\t{\r\n\t\t\t\t$v();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t/* REPLACE or UPDATE */\r\n\t\tif ($isDelete || $isTermExist)\r\n\t\t{\r\n\t\t\tif ($is_overwrite)\r\n\t\t\t{\r\n\t\t\t\tunset($qT['id']);\r\n\t\t\t\t$queryA[] = gw_sql_update($qT, $arDictParam['tablename'], 'id = \"'.$id_old.'\"');\r\n\t\t\t}\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t$id_old = $qT['id'];\r\n\t\t\t$queryA[] = gw_sql_insert($qT, $arDictParam['tablename'], 1);\r\n\t\t}\r\n\r\n\t\t/* 23 Nov 2007: history of changes */\r\n\t\t$qT['id_term'] = $id_old;\r\n\t\t$qT['id_dict'] = $arDictParam['id'];\r\n\t\t$qT['id_user'] = $oSess->id_user;\r\n\t\t$qT['keywords'] = serialize($arKeywords);\r\n\t\tunset($qT['id']);\r\n\t\t\r\n\t\t$queryA[] = gw_sql_insert($qT, $sys['tbl_prefix'].'history_terms', 1);\r\n\t\t/* Assign edited term to user */\r\n\t\t$queryA[] = gw_sql_replace($q2, TBL_MAP_USER_TERM, 1);\r\n\t\t/* Check table to keep indexes */\r\n\t\t$arQuery[] = 'CHECK TABLE `'.$arDictParam['tablename'].'`';\r\n\t} /* is_query allowed */\r\n\treturn $queryA;\r\n}", "static public function setTopicKeywords($keywords, $topicid, $userid, $glue=null) {\n\t\tif (!isset(self::$_topics [$topicid][$userid])) {\n\t\t\tself::loadTopics(array($topicid), $userid);\n\t\t}\n\t\t$oldkeywords = isset(self::$_topics [$topicid][$userid]) ? self::$_topics [$topicid][$userid] : array();\n\n\t\t// Load new keywords missing from the topic\n\t\t$keywords = self::cleanKeywords($keywords, $glue);\n\t\tself::loadKeywords($keywords);\n\n\t\t$keywords = array_flip($keywords);\n\t\t$dellist = array_diff_key ( $oldkeywords, $keywords );\n\t\t$addlist = array_diff_key ( $keywords, $oldkeywords );\n\t\tforeach ($dellist as $keyword=>$i) {\n\t\t\t$instance = self::$_instances [$keyword];\n\t\t\t$instance->delTopic($topicid, $userid);\n\t\t}\n\t\tforeach ($addlist as $keyword=>$i) {\n\t\t\t$instance = self::$_instances [$keyword];\n\t\t\t$instance->addTopic($topicid, $userid);\n\t\t}\n\t\treturn $keywords;\n\t}", "public function registerKeywords(array $keywords) {\r\n\t\tforeach ($keywords as $nextKeyword) {\r\n\t\t\t$this->registerKeyword($nextKeyword);\r\n\t\t}\r\n\t}", "public function keywords()\r\n {\r\n }", "function bl_InsertWords($page_id,$words)\n {\n\n \tforeach ($words as $word => $infos) \n \t{\n\t\t\t// On test si l'URL existe deja\n\t\t\t$worditem = db_getWordByWord($word);\n\t\t\tif (!$worditem) {\n\t\t\t\t$id = db_addWord($word);\n\t\t\t} else {\n\t\t\t\t// l'URL existe deja\n\t\t\t\t$id = $worditem['word_id'];\n\t\t\t}\n\n\n \t\t//if (!db_isWordedExist($page_id,$id)) {\n \t\t\t//db_createFastWorded($page_id,$id,$infos['total']['avg_weight'],$infos['total']['avg_density']);\n \t\t//}\n \t\t//db_insertWordedData($page_id,$id,$tag,$infos['freq'],$infos['density'],$infos['weight']);\n \t}\n \tdb_createFastWorded($page_id,$words);\n }", "public function run()\n {\n $keywords = ['new', 'internal', 'expensive', 'second hand', 'antique', 'electronic', 'furniture'];\n\n foreach ($keywords as $keywordName) {\n $keyword = new Keyword();\n $keyword->name = $keywordName;\n $keyword->save();\n }\n }", "public function setKeywords($var)\n {\n $arr = GPBUtil::checkRepeatedField($var, \\Google\\Protobuf\\Internal\\GPBType::STRING);\n $this->keywords = $arr;\n\n return $this;\n }", "static public function setKeywords($new_keywords) {\n\t\tif (is_string($new_keywords)) {\n\t\t\t$new_keywords = explode(',', $new_keywords);\n\t\t\tforeach($new_keywords as &$keyword) {\n\t\t\t\t$keyword = trim($keyword);\n\t\t\t}\n\t\t}\n\t\tself::$page_keywords = (array)$new_keywords;\n\t}", "public function setKeywords(string $keywords)\n {\n $this->keywords = $keywords;\n }", "public function setKeyWord($key){\n $this->keyword = $key;\n }", "static function save_keywords($post_id, $keywords){\n\t\t\tupdate_post_meta($post_id, 'affiliate_keywords', $keywords);\n\t\t}", "function setKeyWords( &$value )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->KeyWords = ( $value );\n }", "public function CargarKeywords()\n\t{\n\t\t$data_table = $this->data_source->ejecutarConsulta(\"SELECT * FROM keywords\");\n\t\treturn $data_table;\n\t}" ]
[ "0.6899649", "0.6315743", "0.6269624", "0.62153697", "0.6179198", "0.61315554", "0.60629374", "0.60450596", "0.60157603", "0.60083413", "0.59692585", "0.5944565", "0.58526736", "0.58253616", "0.58253443", "0.581905", "0.5809284", "0.5784633", "0.57677084", "0.57584035", "0.5731846", "0.57291585", "0.57113206", "0.5700475", "0.56436455", "0.56241786", "0.5606095", "0.5598879", "0.5584361", "0.555455" ]
0.6956576
0
11 aug 2003: do not enclose with quotes all numerals 4 Oct 2002: short INSERT format (intCnt = [ 0, 1, 2 ... ] 24 May 2002: $isFields include field names to query or not 8 Feb 2005: no quotes for hexadecimal values 22 Feb 2005: DELAYED inserts
function gw_sql_insert($SQLnamesA, $table, $isFields = 1, $intCnt = 0, $is_delayed = 0) { $query = ''; $SQLfileds = ''; $SQLfiledA = $SQLvalueA = array(); if (is_array($SQLnamesA)) { for (reset($SQLnamesA); list($k, $v) = each($SQLnamesA);) { $v = gw_text_sql($v); if ($v == '') { $vF = "''"; } elseif ( preg_match("/^[0-9]{3,12}$/", $v) && !preg_match("/^[0-1]/", $v) || preg_match("/^0x[0-9a-f]/", $v)) { // enum('0','1', .. ,'9'), timestamp(14), hex $vF = $v; } else { $vF = "'" . $v . "'"; } $SQLfiledA[] = $k; $SQLvalueA[] = $vF; } $SQLvalues = implode(',', $SQLvalueA); if ($isFields) { $SQLfileds = ' (`' . implode('`, `', $SQLfiledA) . '`)'; } if (!$intCnt) { $query = CRLF.'INSERT '.($is_delayed ? 'DELAYED ': '').'INTO `' . $table .'`'. $SQLfileds . ' VALUES ('.$SQLvalues.')'; } else { $query = ', ('.$SQLvalues.')'; } } return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GenerateSqlInsert($data, $fields)\n{\n $loc = \"database.php->GenerateSqlInsert\";\n // First make an array that is an intersection of the two inputs.\n $final = array();\n foreach($fields as $f)\n {\n $fn = $f[0]; // Field name\n $ft = $f[1]; // Field type\n if(!isset($data[$fn])) continue;\n if(is_null($data[$fn])) continue;\n $v = $data[$fn];\n $final[] = array(\"FieldName\"=>$fn, \"FieldType\"=>$ft, \"Value\"=>$v);\n }\n if(count($final) <= 0) return false;\n\n // First, list the columns...\n $sql = ' (';\n $c = 0;\n foreach($final as $f)\n {\n if($c != 0) $sql .= ', ';\n $sql .= $f[\"FieldName\"];\n $c++;\n }\n $sql .= ') VALUES (';\n $c = 0;\n foreach($final as $f)\n {\n if($c != 0) $sql .= ', ';\n if($f[\"FieldType\"] == 'int') $sql .= intval($f[\"Value\"]);\n else if($f[\"FieldType\"] == 'str') $sql .= '\"' . SqlClean($f[\"Value\"]) . '\"';\n else if($f[\"FieldType\"] == 'bool') $sql .= TFstr($f[\"Value\"]);\n else \n {\n DieWithMsg($loc, \"Bad Sql type: \" . $f[\"FieldType\"] . \n \" for field \" . $f[\"FieldName\"] . '.'); \n }\n $c++;\n }\n $sql .= ') ';\n return $sql;\n}", "function ParseInsertIntoStatement($strSQL)\n//returns an associative array of info\n//return table name keyed to qpre . \"tablename\"\n{\n\t$strSQL=deMultiple($strSQL, \" \");\n\t$arrOut=Array();\n\t$strLen=strlen($strSQL);\n\t$firstparenloc=strpos($strSQL, \"(\");\n\t$secondparenloc=strpos($strSQL, \")\", $firstparenloc);\n\t$thirdparenloc=strpos($strSQL, \"(\", $secondparenloc);\n\t$fourthparenloc=strpos($strSQL, \")\", $thirdparenloc);\n\t$strRawFieldnames=substr($strSQL, $firstparenloc+1, $secondparenloc-$firstparenloc-1);\n\t$strRawFieldvalues=substr($strSQL, $thirdparenloc+1, $fourthparenloc-(1+$thirdparenloc));\n\t$spacebeforefirstparen=strrpos($strSQL, \" \", -($strLen- $firstparenloc));\n\t//echo $firstparenloc . \"=\" . $spacebeforefirstparen . \"=<br>\";\n\tif($spacebeforefirstparen+1==$firstparenloc)\n\t{\n\t\t$spacebeforefirstparen=strrpos($strSQL, \" \", -($strLen- (1+ $firstparenloc)));\n\t\t\n\t}\n\t$tablename=substr($strSQL, $spacebeforefirstparen+1, ($firstparenloc-$spacebeforefirstparen-1));\n\t//echo $tablename . \"*<br>\";\n\t//echo \"*\" . $thirdparenloc . \" \" .$fourthparenloc . \" \" . $strRawFieldvalues. \"*<br>\";\n\t$strRawFieldnames=str_replace(\" \", \"\", $strRawFieldnames);\n\t$arrFieldNames=ParseStringToArraySkippingQuotedRegions($strRawFieldnames, \"'\\\"\", \",\");\n\t$arrValues=ParseStringToArraySkippingQuotedRegions($strRawFieldvalues, \"'\\\"\", \",\");\n\t$i=0;\n\tforeach($arrFieldNames as $thisfieldname)\n\t{\n\t \tif($thisfieldname!=\"\")\n\t\t{\n\t\t\t$arrOut[$thisfieldname]=trim($arrValues[$i]);\n\t\t\t$i++;\n\t\t}\n\t}\n\t$arrOut[qpre . \"table\"]=$tablename;\n\treturn $arrOut;\n}", "function insert_stmt(){\n\t\tglobal $in;\n\t\tif ($this->attributes['BYTB']!='' )$this->fields_value_bytb($this->attributes['BYTB']);\n\t\t\n\t\t\n\t\tif ($this->attributes['TB']!='no'){\n\t\t\t$i=0;\n\t\t\tforeach ($this->values as $key => $val){\t\t\t\t\n\t\t\t\t$this->field_stmt[$i]=\"{$key}\";\n\t\t\t\t$this->value_stmt[$i]=\"{$in[$key]}\";\n\t\t\t\t\n\t\t\t\tif($in[$key]==1){\n\t\t\t\t\t$i++;\n\t\t\t\t\t$this->field_stmt[$i]=\"D_{$key}\";\n\t\t\t\t\t#GC 20/04/2015 gestione popolamento decode\n\t\t\t\t\tif (isset($this->attributes['DECODE'][$key])) $this->value_stmt[$i]=\"{$this->attributes['DECODE'][$key]}\";\n\t\t\t\t\telse $this->value_stmt[$i]=$val;\n\t\t\t\t}\n\t\t\t\t#GC 20/04/2015 gestione sbiancamento decode\n\t\t\t\tif($in[$key]==0){\n\t\t\t\t\t$i++;\n\t\t\t\t\t$this->field_stmt[$i]=\"D_{$key}\";\n\t\t\t\t\t$this->value_stmt[$i]=\"\";\n\t\t\t\t}\n\t\t\t\t$i++;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn;\n\t}", "function getInsert($table,$data)\n\t{\n\n\t\t$fields\t\t\t= array();\n\t\t$values\t\t\t= array();\n\n\t\tforeach ($data as $curdata)\n\t\t{\n\n\t\t\t$fields[]\t= $curdata['field'];\n\n\t\t\tswitch (strtolower($curdata['type']))\n\t\t\t{\n\t\t\t\tcase 'i'\t:\n\t\t\t\t\t$values[]\t= (int)$curdata['value'];\n\t\t\t\t\tbreak;\n\t\t\t\tcase 's'\t:\n\t\t\t\t\t$values[]\t= '\\''.addslashes_mssql($curdata['value']).'\\'';\n\t\t\t\t\tbreak;\n\t\t\t\tcase 'd'\t:\n\t\t\t\t\t$values[]\t= 'CONVERT(datetime, \\''.date('Y-m-d H:i:s',(int)$curdata['value']).'\\', 120)';\n\t\t\t\t\tbreak;\n\t\t\t}\n\n\t\t}\n\n\t\treturn 'INSERT INTO '.$table.' ('.implode(', ',$fields).') VALUES ('.implode(', ',$values).')';\n\n\t}", "private function formatInsertCommand( )\n {\n $data_buffer_length = @ count( $this->data_buffer );\n if ( $data_buffer_length == 0 )\n return false;\n\n $sql = 'INSERT INTO ' . $this->table_name . ' ';\n $sql_columns = '(';\n $sql_values = ' VALUE(';\n $this->quote( );\n $i = 0;\n foreach ( $this->data_buffer as $k => $v )\n {\n $sql_columns .= $k;\n $sql_values .= $v;\n if ( ( $i + 1 ) < $data_buffer_length )\n {\n $sql_columns .= ',';\n $sql_values .= ',';\n }\n $i++;\n }\n $sql_columns .= ')';\n $sql_values .= ')';\n $sql .= $sql_columns . $sql_values;\n return $sql;\n }", "function generate_sql_batch_insert($table, $arr_field, $arr_row, $ignore='')\n {\n $num_field = count($arr_field);\n $num_row = count($arr_row);\n\n $sql = '';\n $sql .= \"INSERT {$ignore} INTO $table (\";\n for ($i=0; $i< $num_field; $i++)\n {\n $sql.= $arr_field[$i];\n if ($i != $num_field - 1)\n {\n $sql .= ', ';\n }\n }\n\n $sql .= ') VALUES ';\n\n for ($i = 0; $i < $num_row; $i ++)\n {\n $sql .= '(';\n for ($j =0; $j< $num_field; $j++)\n {\n // Lay thong tin cu the cua tung ban ghi de noi mang\n $sql .= \"'{$arr_row[$i][$j]}'\";\n if ($j != $num_field -1)\n {\n $sql .= ', ';\n }\n }\n\n $sql .= ')';\n if ($i != $num_row - 1)\n {\n $sql .= ', ';\n }\n }\n\n return $sql;\n }", "function getInsertQuery($j_obj,$tblName,$ignore){\n $qi = \"INSERT INTO $tblName (\";\n //reset($j_obj);\n try{\n foreach($j_obj as $j_arr_key => $value){\n if(in_array($j_arr_key,explode(\",\",$ignore))){\n continue;\n }\n $qi .= $j_arr_key . \",\";\n }\n $qi = substr_replace($qi,\"\",-1);\n $qi .= \") VALUES (\";\n reset($j_obj);\n foreach($j_obj as $j_arr_key => $value){\n if(in_array($j_arr_key,explode(\",\",$ignore))){\n continue;\n }\n $qi .= \"'\" . $value . \"',\";\n }\n $qi = substr_replace($qi,\"\",-1);\n $qi .= \")\";\n }catch(Exception $e){\n return \"In Exception\";\n }\n return $qi;\n}", "public function insert_13fields($tablename, $fieldname, $fieldvalue, $fieldname1, $fieldvalue1, $fieldname2, $fieldvalue2, $fieldname3, $fieldvalue3, $fieldname4, $fieldvalue4, $fieldname5, $fieldvalue5, $fieldname6, $fieldvalue6, $fieldname7, $fieldvalue7, $fieldname8, $fieldvalue8, $fieldname9, $fieldvalue9, $fieldname10, $fieldvalue10, $fieldname11, $fieldvalue11, $fieldname12, $fieldvalue12){\n\n $mysqli = $this->connect();\n\n $sql = \"INSERT INTO {$tablename} SET {$fieldname}=:fieldvalue, {$fieldname1}=:fieldvalue1, {$fieldname2}=:fieldvalue2, {$fieldname3}=:fieldvalue3, {$fieldname4}=:fieldvalue4, {$fieldname5}=:fieldvalue5, {$fieldname6}=:fieldvalue6, {$fieldname7}=:fieldvalue7, {$fieldname8}=:fieldvalue8, {$fieldname9}=:fieldvalue9, {$fieldname10}=:fieldvalue10, {$fieldname11}=:fieldvalue11, {$fieldname12}=:fieldvalue12\";\n\n $stmt = $mysqli->prepare($sql);\n\n if($stmt->execute([':fieldvalue'=>$fieldvalue, ':fieldvalue1'=>$fieldvalue1, ':fieldvalue2'=>$fieldvalue2, ':fieldvalue3'=>$fieldvalue3, ':fieldvalue4'=>$fieldvalue4, ':fieldvalue5'=>$fieldvalue5, ':fieldvalue6'=>$fieldvalue6, ':fieldvalue7'=>$fieldvalue7, ':fieldvalue8'=>$fieldvalue8, ':fieldvalue9'=>$fieldvalue9, ':fieldvalue10'=>$fieldvalue10, ':fieldvalue11'=>$fieldvalue11, ':fieldvalue12'=>$fieldvalue12])){\n \n return \"Insertion Made\";\n //array('action'=>'Success', 'counting'=>1);\n } else {\n return $failed=\"failed: \" . $mysqli->error;\n \n //array('action'=>'Success', 'counting'=>0);\n }\n\n}", "public function IngestFields($fields,$seg_id,$db_handle)\n {\n $i = 0;\n $statement = \"INSERT INTO HL7_Fields_Received(HFR_SRId,HFR_Position,HFR_Value)\n VALUES \";\n \n foreach($fields as $field)\n {\n if($i!=0)\n $statement .= \",\";\n \n $statement .= \"(\".$seg_id.\",\".$i.\",\\\"\".$db_handle->EscapeStrings($field).\"\\\")\";\n $i++;\n }\n \n echo $statement;\n \n if($db_handle->InsertDB($statement) < 1)\n {\n Throw new Exception(\"INSERT ERROR : \".$statement.\" no record inserted\");\n }\n \n }", "function insert($spec, $fields) {\n\t\t$values = implode(', ', array_fill(0, count($fields), '?'));\n\t\tforeach($fields as &$field) $field = \"{{$field}}\";\n\t\t$fields = implode(', ', $fields);\n\t\t$sql = \"INSERT INTO {$spec['from']} ({$fields}) VALUES ({$values})\";\n\t\treturn $this->quoteIdentifiers($this->aliasFields($sql, false));\n\t}", "public function compileInsertString( $data )\n {\n \t$field_names\t= \"\";\n\t\t$field_values\t= \"\";\n\n\t\tforeach( $data as $k => $v )\n\t\t{\n\t\t\t$add_slashes = 1;\n\t\t\t\n\t\t\tif ( $this->manual_addslashes )\n\t\t\t{\n\t\t\t\t$add_slashes = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif ( !empty($this->no_escape_fields[ $k ]) )\n\t\t\t{\n\t\t\t\t$add_slashes = 0;\n\t\t\t}\n\t\t\t\n\t\t\tif ( $add_slashes )\n\t\t\t{\n\t\t\t\t$v = $this->addSlashes( $v );\n\t\t\t}\n\t\t\t\n\t\t\t$field_names .= $this->fieldNameEncapsulate . \"$k\" . $this->fieldNameEncapsulate . ',';\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Forcing data type?\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\tif ( substr( $v, -1 ) == '\\\\' )\n\t\t\t{\n\t\t\t\t$v = preg_replace( '#\\\\\\{1}$#', '&#92;', $v );\n\t\t\t}\n\t\t\t\t\t\n\t\t\tif ( !empty($this->_dataTypes[ $k ]) )\n\t\t\t{\n\t\t\t\tif ( $this->_dataTypes[ $k ] == 'string' )\n\t\t\t\t{\n\t\t\t\t\t$field_values .= $this->fieldEncapsulate . $v . $this->fieldEncapsulate . ',';\n\t\t\t\t}\n\t\t\t\telse if ( $this->_dataTypes[ $k ] == 'int' )\n\t\t\t\t{\n\t\t\t\t\t$field_values .= intval($v).\",\";\n\t\t\t\t}\n\t\t\t\telse if ( $this->_dataTypes[ $k ] == 'float' )\n\t\t\t\t{\n\t\t\t\t\t$field_values .= floatval($v).\",\";\n\t\t\t\t}\n\t\t\t\tif ( $this->_dataTypes[ $k ] == 'null' )\n\t\t\t\t{\n\t\t\t\t\t$field_values .= \"NULL,\";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// No? best guess it is then..\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\telse\n\t\t\t{\n\t\t\t\tif ( is_numeric( $v ) and strcmp( intval($v), $v ) === 0 )\n\t\t\t\t{\n\t\t\t\t\t$field_values .= $v.\",\";\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$field_values .= $this->fieldEncapsulate . $v . $this->fieldEncapsulate . ',';\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t$field_names = rtrim( $field_names, \",\" );\n\t\t$field_values = rtrim( $field_values, \",\" );\n\t\n\t\treturn array( 'FIELD_NAMES' => $field_names,\n\t\t\t\t\t 'FIELD_VALUES' => $field_values,\n\t\t\t\t\t);\n\t}", "function buildInsert($params)\n {\n $fieldList = $this->getFieldList($params['table']);\n $fieldInsert = '';\n $valueInsert = '';\n\n reset($fieldList);\n while(current($fieldList))\n {\n if (in_array(current($fieldList), array_keys($params)))\n {\n $fieldInsert .= \"`\" . current($fieldList) . \"`, \";\n $valueInsert .= \"'\" . $params[current($fieldList)] . \"', \";\n }\n else\n {\n $this->setError(\"\", \"buildInsert #001\");\n return false;\n }\n $fieldInfo = next($fieldList);\n }\n\n $fieldInsert = preg_replace(\"/,\\s*$/\", \"\", $fieldInsert);\n $valueInsert = preg_replace(\"/,\\s*$/\", \"\", $valueInsert);\n\n $result = \"INSERT INTO `\"\n . $params[\"table\"]\n . \"` (\" . $fieldInsert . \") VALUES (\" . $valueInsert . \");\";\n return $result;\n }", "public function insert(...$field_values);", "function sql_insert($table, $fields) {\n\t$sql = sql_connect();\n\tif( !$sql ){\n\t\treturn false;\n\t}\n\t$prefix = var_get('sql/prefix', '');\n\n\t$query = 'INSERT INTO ' . sql_quote($prefix . $table, true);\n\t$query .= ' (' . implode(',', array_keys($fields)) . ') VALUES (' . implode(',', array_fill(0, sizeof($fields), '?')) . ');';\n\n\tsql_dump($query);\n\n\t//var_dump($query, array_values($fields));\n\t$q = $sql->prepare($query);\n\treturn $q->execute(array_values($fields));\n}", "function GenerateSqlSet($data, $fields)\n{\n $sql = ' ';\n $c = 0;\n foreach($fields as $f)\n {\n $fn = $f[0]; // Field name\n $ft = $f[1]; // Field type\n if(!isset($data[$fn])) continue;\n if(is_null($data[$fn])) continue;\n $v = $data[$fn];\n if($c != 0) $sql .= ', ';\n $sql .= $fn . '=';\n if($ft == 'int') { $sql .= intval($v); }\n else if($ft == 'str') { $sql .= '\"' . SqlClean($v) . '\"'; }\n else if($ft == 'bool') { $sql .= TFstr($v); }\n else {DieWithMsg(\"databaselib.php->GenerateSQLSet\", \"Bad type: \" . $ft . \" for field \" . $fn . '.'); }\n $c++;\n }\n if($c == 0) return false;\n return $sql;\n}", "function yy_r102(){ \n $this->_retvalue = new SQL\\Insert(@$this->yystack[$this->yyidx + -2]->minor);\n $this->_retvalue->into($this->yystack[$this->yyidx + 0]->minor[0])->fields($this->yystack[$this->yyidx + 0]->minor[1]);\n }", "function genericinsert ($table, $data) {\n $names = '';\n $values = '';\n foreach ($data as $key => $value) {\n if (substr($key,0,1) == '@') {\n $names .= substr($key,1).',';\n $values .= $value.',';\n } else {\n $names .= $key.',';\n $values .= '\"'.mysql_real_escape_string($value).'\",';\n }\n }\n // INSERT INTO table (a,b,c) values (1,2,3)\n $query = 'INSERT INTO `'.mysql_real_escape_string($table).'` '.\n '('.substr($names ,0,strlen($names )-1).') values '.\n '('.substr($values,0,strlen($values)-1).')';\n return $query;\n}", "function Insert($table, $fields)\n {\n $values = array();\n foreach ($fields as $value)\n {\n if (is_int($value)) $values[]=$value;\n else $values[]=\"'\".$this->EscapeString($value).\"'\";\t\t\n }\n\n $sql = sprintf(\"INSERT INTO %s (%s) VALUES(%s)\",$table, implode(',',array_keys($fields)), implode(',',$values));\n\n if ($this->Query($sql)) return $this->InsertID($table);\n else return false;\n }", "function _query_insert_parse($query){\n $open_brace_first = strpos($query,\"(\",0)+1;\n $close_brace_first = strpos($query,\")\",0);\n $open_brace_second = strpos($query,\"(\",$open_brace_first)+1;\n $close_brace_second = strpos($query,\")\",$open_brace_second);\n \n $cols = substr($query,$open_brace_first,$close_brace_first-$open_brace_first);\n $cols_val = substr($query, $open_brace_second,$close_brace_second-$open_brace_second);\n \n $cols_arr = explode(\",\",$cols);\n $cols_val_arr = explode(\",\",$cols_val);\n \n $qmap = array();\n $len = count($cols_arr);\n for($i=0;$i<$len;$i++){\n $key = trim($cols_arr[$i]);\n $val = trim($cols_val_arr[$i],\"'\");\n $qmap[\"$key\"] = $val;\n }\n return $qmap;\n }", "function my_insert_record( $table_name , $datas ){\r\n \r\n\tglobal $connection;\r\n\r\n\t$build_query = \" INSERT INTO `\".$table_name .\"` SET \" ;\r\n\tforeach( $datas as $field => $value ){\r\n\t\r\n\t\t$build_query .= \"`\".$field .\"` = \". $value . \", \";\r\n\t\r\n\t}\r\n\t\r\n\t$insert_query = rtrim( trim($build_query) , \",\" ); \r\n \r\n\tif( my_query( $insert_query ) ){\r\n\t\treturn $connection->insert_id; \r\n\t}\r\n\treturn false;\r\n\r\n}", "function insert_stmt_prepare($new_insert=false){\r\n\t\tforeach ( $this->fields as $key => $val ) {\r\n\t\t\tif (isset ( $val ['TYPE'] ) && $val ['TYPE'] != '')\r\n\t\t\t$field_type = \"field_{$val['TYPE']}\";\r\n\t\t\telse\r\n\t\t\t$field_type = \"field\";\r\n\r\n\t\t\tif ($this->config_service['field_lib'] != '' && file_exists ( $this->config_service['field_lib'] . $field_type . \".inc\" )) {\r\n\t\t\t\tinclude_once $this->config_service['field_lib'] . $field_type . \".inc\";\r\n\t\t\t} else\r\n\t\t\tinclude_once \"{$field_type}.inc\";\r\n\t\t\t$field_obj = new $field_type ( $this, $key, $this->conn, $this->tb_vals, $this->session_vars, $this->service, $this->errors );\r\n\r\n\t\t\tif ($field_obj->attributes ['PK'] == 'yes')\r\n\t\t\t$pk [$field_obj->attributes ['VAR']] = $in [$field_obj->attributes ['VAR']];\r\n\t\t\tif ($new_insert) {\r\n\t\t\t\t//non deve capitare\r\n\t\t\t\t$field_obj->insert_stmt ( true );\r\n\t\t\t\tforeach ( $field_obj->value_stmt as $key_f => $val_f ) {\r\n\t\t\t\t\tif ($field_obj->value_stmt [$key_f] == \"next\") {\r\n\t\t\t\t\t\tif ($field_obj->id==$this->config_service['PK_SERVICE'] && $this->config_service['PK_SEQ']!='' && !isset($this->session_vars['ajax_call'])){\r\n\t\t\t\t\t\t\t$sql_query=\"select {$this->config_service['PK_SEQ']}.nextval as PK_ID from dual\";\r\n\t\t\t\t\t\t\t$sql=new query($this->conn);\r\n\t\t\t\t\t\t\t$sql->set_sql($sql_query);\r\n\t\t\t\t\t\t\t$sql->exec();//non richiede binding\r\n\t\t\t\t\t\t\t$sql->get_row();\r\n\t\t\t\t\t\t\t$pk_id=$sql->row['PK_ID'];\r\n\t\t\t\t\t\t\t$this->pk_value = $pk_id;\r\n\t\t\t\t\t\t\t$in [$field_obj->attributes ['VAR']] = $pk_id;\r\n\t\t\t\t\t\t\t$this->session_vars[$field_obj->attributes ['VAR']]=$pk_id;\r\n\t\t\t\t\t\t\t$in_s=$in;\r\n\t\t\t\t\t\t\tglobal $in;\r\n\t\t\t\t\t\t\t$in=$in_s;\r\n\t\t\t\t\t\t\t$field_obj->value_stmt [$key_f] = $in [$field_obj->attributes ['VAR']];\r\n\t\t\t\t\t\t\t$field_obj->value_stmt [$key_f]=$pk_id;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\tif ($field_obj->attributes ['WHERE'] != '')\r\n\t\t\t\t\t\t\t$where = \"where \" . $field_obj->attributes ['WHERE'];\r\n\t\t\t\t\t\t\t//$where = preg_replace ( \"/\\[(.*?)\\]/e\", \"var_glob('\\\\1')\", $where );\r\n\t\t\t\t\t\t\t$where=preg_replace_callback ( \"/\\[(.*?)\\]/\", function($matches){return var_glob($matches[1]);}, $where );\r\n\t\t\t\t\t\t\t$query = \"select max(\" . $field_obj->attributes ['VAR'] . \") as max from \" . $this->form ['TABLE'] . \" $where\";\r\n\t\t\t\t\t\t\t$sql = new query ( $conn );\r\n\t\t\t\t\t\t\t$sql->set_sql ( $query );\r\n\t\t\t\t\t\t\t$sql->exec ();//complessa da gestire con carlo\r\n\t\t\t\t\t\t\t$sql->get_row ();\r\n\t\t\t\t\t\t\t$in [$field_obj->attributes ['VAR']] = $sql->row ['MAX'] + 1;\r\n\t\t\t\t\t\t\t$this->pk_value = $sql->row ['MAX'] + 1;\r\n\t\t\t\t\t\t\t$field_obj->value_stmt [$key_f] = $in [$field_obj->attributes ['VAR']];\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t$values [$field_obj->field_stmt [$key_f]] = $field_obj->value_stmt [$key_f];\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\t$field_obj->insert_stmt ();\r\n\t\t\t\tforeach ( $field_obj->value_stmt as $key_f => $val_f )\r\n\t\t\t\t$values [$field_obj->field_stmt [$key_f]] = $field_obj->value_stmt [$key_f];\r\n\t\t\t}\r\n\t\t}\r\n\t\t$this->insert_stmt=$values;\r\n\t\t$this->insert_stmt_pk=$pk;\r\n\r\n\t}", "function insert ($conn , $table , $fields , $values) {\n\n\t\t$fields = implode(\",\", $fields) ;\n\t\t$values = implode(\"','\", $values) ;\n\n\t\t// insert querry\n\t\t$sql=\"INSERT INTO $table (id, $fields) VALUES ('', '$values')\" ;\n\t\t$result =mysql_query($sql ,$conn ) ;\n\n\n\t\tif (mysql_affected_rows()>0) {\n\t\t\treturn TRUE ;\n\n\t\t}\n\n\t\telse {\n\t\t\tdie(\"Error : \".mysql_error()) ;\n\t\t}\n\t}", "public function insertEscaped(...$field_values);", "function DoInsertRecordSQL($table, &$avalues, &$blobfields, &$pageObject)\n{\n\t//\tmake SQL string\n\t$strSQL = \"insert into \".$pageObject->connection->addTableWrappers($table).\" \";\n\t\n\t$strFields = \"(\";\n\t$strValues = \"(\";\n\t$blobs = PrepareBlobs($avalues, $blobfields, $pageObject);\n\t\n\tforeach($avalues as $akey => $value)\n\t{\n\t\t$strFields.= $pageObject->getTableField($akey).\", \";\n\t\t\n\t\tif( in_array($akey, $blobfields) )\t\t\t\n\t\t\t$strValues.= $value.\", \";\n\t\telse\n\t\t{\n\t\t\tif( is_null($pageObject->cipherer) )\n\t\t\t\t$strValues.= add_db_quotes($akey, $value).\", \";\n\t\t\telse \n\t\t\t\t$strValues.= $pageObject->cipherer->AddDBQuotes($akey, $value).\", \";\n\t\t}\n\t}\n\t\n\tif( substr($strFields, -2) == \", \" )\n\t\t$strFields = substr($strFields, 0, strlen($strFields) - 2);\n\t\n\tif( substr($strValues, -2) == \", \" )\n\t\t$strValues = substr($strValues, 0, strlen($strValues) - 2);\n\t\n\t$strSQL.= $strFields.\") values \".$strValues.\")\";\n\t\n\tif( !ExecuteUpdate($pageObject, $strSQL, $blobs) )\n\t\treturn false;\n\t\t\n\t$pageObject->ProcessFiles();\n\n\treturn true;\n}", "function insert($table,$data){\n\t\t$j=0;\n\t\t$c=count($data);\n\t\tforeach($data as $key=>$value){\n\t\t\t$j++;\n\t\t\tif($c==$j){\n\t\t\t\t$line_1.='`'.$key.'`';\n\t\t\t\t$line_2.=\"'\".rce_remove_quotes(mysql_real_escape_string($value)).\"'\";\n\t\t\t} else {\n\t\t\t\t$line_1.='`'.$key.'`, ';\n\t\t\t\t$line_2.=\"'\".rce_remove_quotes(mysql_real_escape_string($value)).\"', \";\n\t\t\t}\n\t\t}\n\t\t$r=mysql_query(\"\n\t\t\tINSERT INTO `$table`\n\t\t\t(\".$line_1.\") VALUES\n\t\t\t(\".$line_2.\")\n\t\t\");\n\t\treturn $r;\n\t}", "function db_array_to_insert_sqladd( $arr ) {\n\t$s = '';\n\tif ( DB_TYPE == 'access' )$arr = toutf( $arr );\n\t$keys = array();\n\t$values = array();\n\tforeach ( $arr as $k => $v ) {\n\t\t$k = ( $k );\n\t\t$v = ( $v );\n\t\t$keys[] = '`' . $k . '`';\n is_array( $v ) || is_object( $v ) and $v=tojson($v);\n\t\t$v = ( is_int( $v ) || is_float( $v ) ) ? $v : \"'$v'\";\n\t\t$values[] = $v;\n\t}\n\t$keystr = implode( ',', $keys );\n\t$valstr = implode( ',', $values );\n\t$sqladd = \"($keystr) VALUES ($valstr)\";\n\treturn $sqladd;\n}", "function is_complex_qinsert($parse_map,$table){\n $q_map = $parse_map;\n\n $valid_tbls = array();\n $valid_tbls = get_cols_table($table);\n\n foreach ($q_map as $tbl_name => $tbl_val) {\n # code..\n if(!in_array($tbl_name,$valid_tbls))\n {\n $is_complex = 1;\n return $is_complex;\n }\n }\n\n // handle special case\n $is_contain = false;\n $str = _query_insert_valid($query);\n if(stripos($str,\"values\")==TRUE)\n $is_contain = true;\n\n\n $is_complex = 0;\n\n // validating map\n $needles = array(\"values\",\"VALUES\",\"INTO\",\"into\",\"INSERT\",\"insert\",\"select\",\"SELECT\",\"union\",\"IN\",\"(\",\")\",\"OR\",\"<\",\">\");\n foreach ($q_map as $col => $value) { \n foreach($needles as $needle){\n $pattern ='#\\b'.$needle.'\\b#';\n if (preg_match($pattern,$value) || preg_match($pattern, $col)) { \n $is_complex=1; break; \n } \n }\n }\n\n if($is_contain)\n $is_complex = 1;\n \n return $is_complex ;\n }", "function _build_import_insert($sourceFieldId, $sourceValue) {\n $importFields = array('kov_nr', 'vge_nr', 'pers_nr', 'corr_naam', 'ov_datum', \n 'vge_adres', 'type', 'specificatie', 'prijs', 'notaris', 'tax_waarde', 'taxateur', \n 'tax_datum', 'bouwkundige', 'bouw_datum', 'definitief');\n /*\n * sourceFieldId 0, 1, 2 are integer\n */\n if ($sourceFieldId < 3) {\n if (!empty($sourceValue)) {\n $result = $importFields[$sourceFieldId].' = '.$sourceValue;\n }\n return $result;\n }\n /*\n * sourceFieldId 3, 5, 6, 8, 9, 10, 11, 13 and 15 are simple strings\n */\n $stringIds = array(3, 5, 6, 8, 9, 10, 11, 13, 15);\n if (in_array($sourceFieldId, $stringIds)) {\n $escapedValue = CRM_Core_DAO::escapeString($sourceValue);\n $result = $importFields[$sourceFieldId].\" = '\".$escapedValue.\"'\";\n return $result;\n }\n /*\n * sourceFieldId 4, 12 and 14 are dates\n */\n $dateIds = array(4, 12, 14);\n if (in_array($sourceFieldId, $dateIds)) {\n $dateValue = date('d-m-Y', strtotime(_reformat_date($sourceValue)));\n if (empty($dateValue) || $dateValue == '01-01-1970') {\n $result = '';\n } else {\n $result = $importFields[$sourceFieldId].\" = '\".$dateValue.\"'\";\n }\n return $result;\n }\n}", "protected function _sql_insert ( /* void */ )\n {\n /*\n Start SQL query.\n */\n $sql = 'INSERT INTO ';\n /*\n In which table ?\n */\n $sql .= $this->aTables[0] . ' ';\n /*\n Use fields names ?\n */\n $sql .= (empty($this->aFields)) ? '' : \"\\n(\" . implode(', ', $this->aFields) . ')';\n /*\n Insert values.\n */\n $sql .= \"\\nVALUES (\" . implode(\", \", $this->aValues) . \")\";\n /*\n Return SQL.\n */\n return $sql;\n }", "function db_copy_data($conn, $table, $where, $fields=\"ID\", $values=\"0\") {\n\t$sql = \"select * from $table where $where\";\n\t$result = db_exec($conn, $sql);\n\t$n = mysql_num_fields($result);\n\t$except_fields = explode(',', $fields);\n\t$set_values = explode(',', $values);\n\t$c = count($except_fields);\n\tfor ($i=0; $i<$n; $i++) {\n\t\t$f = mysql_field_name($result, $i);\n\t\t$except = false;\n\t\tfor ($j=0; $j<$c; $j++) {\n\t\t\tif ($f==trim($except_fields[$j])) {\n\t\t\t\t$except = true;\n\t\t\t\t$field_array[] = $set_values[$j].\" as `\".$f.\"`\";\n\t\t\t}\n\t\t}\n\t\tif (!$except) $field_array[] = \"`\".$f.\"`\";\n\t}\n\tdb_free($result);\n\t$field_list = implode(\",\", $field_array);\n\t$sql = \"insert into $table select $field_list from $table where $where\";\n\tdb_exec($conn, $sql);\n\treturn mysql_insert_id();\n}" ]
[ "0.67727214", "0.6455783", "0.64232427", "0.62759495", "0.62687874", "0.6187857", "0.6158087", "0.6123919", "0.60920525", "0.6054932", "0.60216385", "0.59857553", "0.5966598", "0.59391123", "0.59107584", "0.59096766", "0.5884136", "0.58570486", "0.5847232", "0.58350754", "0.58348775", "0.5816312", "0.5805892", "0.58045393", "0.58044934", "0.57978904", "0.57856476", "0.57619953", "0.57595974", "0.5758846" ]
0.7179409
0
Set the base value for accelerated Rewards.
public function setBaseValue() { $sessionstaff = $this->Session->read('staff'); if ($_POST['base_value'] == '') { $_POST['base_value'] = 0; } $this->AccessStaff->query('update access_staffs set base_value=' . $_POST['base_value'] . ' where clinic_id=' . $sessionstaff['clinic_id']); echo 1; die; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function set_base($val) {\n\t\t$this->base = $val;\n\t}", "public function setBaseValue($baseValue)\r\n {\r\n $this->baseValue = $baseValue;\r\n return $this;\r\n }", "public function setBase( $base ) {\n\n $this->base = $base;\n }", "public function setBaseToGlobalRate($rate);", "public function set_value($value) {\n\t\t$this->_value = $value + 0;\n\t}", "public function setBaseState($baseState) {}", "public function testSetBaseAllowsSettingOfBase()\n {\n $request = new Request($this->config, []);\n $base = uniqid('', true);\n $request->setBase($base);\n $this->assertEquals($base, $request->getBase());\n $this->assertEquals($base, $request->base);\n }", "public function setBase($base)\n\t{\n\t\t$this->base = $base;\n\n\t\treturn $this;\n\t}", "public function setBase($base) {\n $this->base = $base;\n return $this;\n }", "public function setMaxSpeed($val){\n $this->maxSpeed = $val;\n return $this;\n }", "public function setAdvance($number);", "private function compute($base){\n\t\t$amount = \n\t\t $this->getSkillPercent($this->miningSkill) *\n\t\t $this->getSkillPercent($this->astroSkill) *\n\t\t $this->getSkillPercent($this->frigateSkill) *\n\t\t $this->getSkillPercent($this->upgradeLaser)\t\t\n\t\t;\n\t\treturn $base * $amount * $this->getVentureBonus();\n\t}", "public function setBasePrice(?float $basePrice): self\n {\n $this->initialized['basePrice'] = true;\n $this->basePrice = $basePrice;\n\n return $this;\n }", "public function setLogarithmicBase($value) {\r\n $this->logarithmicBase = $this->setDoubleProperty($this->logarithmicBase, $value);\r\n }", "public function setIsBase(bool $isBase)\n\t{\n\t\t$this->isBase=$isBase; \n\t\t$this->keyModified['is_base'] = 1; \n\n\t}", "function set_acl_base($base)\n {\n $this->acl_base = $base;\n foreach ($this->plugins as $name => $obj) {\n $this->plugins[$name]->set_acl_base($base);\n }\n }", "public function setStoreToBaseRate($rate);", "public function getBaseValue()\r\n {\r\n return $this->baseValue;\r\n }", "public function setBaseAdjustmentPositive($baseAdjustmentPositive);", "public function getBaseToGlobalRate();", "public function set_reward_point_multiplier($value = FALSE)\r\n\t{\t\t\r\n\t\tif (empty($value) || $value < 0)\r\n\t\t{\r\n\t\t\t// Look-up database value.\r\n\t\t\tif ($config_data = $this->get_database_config_data('reward_point_multiplier'))\r\n\t\t\t{\r\n\t\t\t\t$value = $config_data[$this->flexi->cart_database['configuration']['columns']['reward_point_multiplier']];\r\n\t\t\t}\r\n\t\t\t// Look-up config file value.\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\t$value = $this->flexi->cart_defaults['configuration']['reward_point_multiplier'];\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t$this->flexi->cart_contents['settings']['configuration']['reward_point_multiplier'] = $this->format_calculation($value, 4, TRUE);\r\n\t\t\r\n\t\treturn TRUE;\r\n\t}", "public function setAttackSpeed()\n {\n $this->_role->attack_speed = 2.50;\n }", "public function setCurrentPower($newValue) {\r\n $this->cached_current_power = $newValue;\r\n }", "public function setAttackSpeed()\n {\n $this->_role->attack_speed = 0.75;\n }", "public function setBase($base = null): object\n\t{\n\t\tif (null !== $base && !($base instanceof FHIRUri)) {\n\t\t\t$base = new FHIRUri($base);\n\t\t}\n\t\t$this->_trackValueSet($this->base, $base);\n\t\t$this->base = $base;\n\t\treturn $this;\n\t}", "public function ChargerUnDefi($base,$num)\n {\n\n }", "public function baseUnit($value) {\n return $this->setProperty('baseUnit', $value);\n }", "public function setBaseToOrderRate($rate);", "public function setSpeed($value){\n\t\t$value = (int) $value;\n\t\tif ($value < 28) $value=28;\n\t\tif ($value > 128) $value=128;\n\t\t$this->_sendPacketToController(self::SET_SPEED, pack('C', $value));\n\t\treturn $this->_getResponse();\n\t}", "public function getStoreToBaseRate();" ]
[ "0.6826884", "0.60023266", "0.5996425", "0.55798393", "0.5542416", "0.5478484", "0.54539037", "0.53596675", "0.53251433", "0.52467805", "0.51846284", "0.51768655", "0.51767176", "0.5137322", "0.5115109", "0.5111494", "0.5091897", "0.50695765", "0.5000818", "0.4999898", "0.49884635", "0.4988252", "0.49660975", "0.49659336", "0.49622074", "0.49568915", "0.49494398", "0.49231762", "0.49158913", "0.49143574" ]
0.62036175
1
Return the raw post content for the specified post id
public static function get_raw_post_content(int $post_id): string { $post = get_post($post_id); return $post ? $post->post_content : ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPost($id) {\n\t\treturn $this->postDAL->getPost($id);\n\t}", "public function getPostContent();", "public function getPost($id)\n\t{\n\t\t// make sure we have the latest state of posts\n\t\tif (!isset($this->metadata['posts'])) {\n\t\t\t$this->regeneratePostsMetadata();\n\t\t}\n\t\t// get the file: metadata for the post contains type => use it for constructing the path\n\t\t$output = array();\n\t\tif (isset($this->metadata['posts'][$id])) {\n\t\t\t$postMeta = $this->metadata['posts'][$id];\n\t\t\t$postType = $postMeta['type'];\n\t\t\t$postJSON = file_get_contents($this->rootFolder . '/contents/' . $postType . '/' . $id . '.json');\n\t\t\tif ($postJSON != '') {\n\t\t\t\t$output = json_decode($postJSON, true);\n\t\t\t}\n\t\t}\n\n\t\treturn $output;\n\t}", "public function content() { return $this->post->post_content; }", "function get_the_content_by_id($post_id) {\n $page_data = get_page($post_id);\n if ($page_data) {\n return $page_data->post_content;\n }\n else return false;\n}", "public static function get($id) {\n return get_post($id);\n }", "public function getPostDataById($postId);", "public function get_content() {\n\t\treturn $this->_post->post_content;\n\t}", "public function render_content( $post_id ) {\n\n\t\t\t$post = Brizy_Editor_Post::get( $post_id );\n\n\t\t\tif ( $post && $post->uses_editor() ) {\n\n\t\t\t\t$content = apply_filters( 'brizy_content', $post->get_compiled_html(), Brizy_Editor_Project::get(), $post->get_wp_post() );\n\n\t\t\t\techo do_shortcode( $content );\n\t\t\t}\n\t\t}", "public function getPostContent() : string {\n\t\treturn $this->postContent;\n\t}", "public function viewPostById($post) {\n $db = $this->dbConnect();\n $req = $db->prepare('SELECT id, title, content, DATE_FORMAT(creation_date, \\'%d/%m/%Y à %Hh%imin%ss\\') AS creation_date_fr FROM posts WHERE id = ?');\n $req->execute(array($post->getId()));\n\n $postById = $req->fetch();\n\n return $postById;\n }", "public function takePost($idPost){\r\n $db = $this->connectDB();\r\n $post = $db->prepare('SELECT id, title, text, DATE_FORMAT(date, \"le %d %b %Y à %H:%i\") AS datePost FROM oui.posts WHERE id = ?');\r\n $post->execute(array($idPost));\r\n \r\n return $post;\r\n }", "function getPost($pid)\n {\n $post= $this->db->getPost($pid);\n if ($post)\n {\n //show a quick reference url, poster and posted datetime\n $post['posttitle'] = \"Posted by {$post['poster']} on {$post['postdate']}\";\n \n $post['downloadurl'] = $this->conf['this_script'] . \"?dl=$pid\";\n $post['deleteurl'] = $this->conf['this_script'] . \"?erase=$pid\";\n $post['pid'] = $pid;\n }\n else\n {\n $post['code'] = '<b>Unknown post id, it may have been deleted</b><br />';\n $this->errors[] = 'Unknown post id, it may have expired or been deleted';\n } \n \n return $post;\n }", "static function get_post_by_id($post){\n\t\treturn self::$db->where('token_id',$post)->get('blog')->results();\n\t}", "public function getById($id): Post\n {\n return $this->post->where('id', $id)->get();\n }", "public function getPost($id){\n $answer = array();\n $id = self::cleanSQL(self::$conn, $id);\n $sql = \"SELECT * FROM \" . self::getTable() . \" WHERE POSTID = '\" . $id . \"'\";\n $result = self::query($sql);\n if(!$result){\n return false;\n }else{\n while($row = $result->fetch_row()){\n $buffer = array(\n 'POSTID' => $row[0],\n 'UID' => $row[1],\n 'CID' => $row[2],\n 'title' => $row[3],\n 'author' => $row[4],\n 'likes' => $row[5],\n 'image' => $row[6],\n 'category' => $row[7],\n 'created_at' => $row[8],\n 'updated_at' => $row[9]\n ); \n array_push($answer, $buffer); \n }\n return $answer;\n }\n }", "public function getById($id)\n {\n return Post::find($id);\n }", "public function Content() {\n /**\n * No ACF by default. Uncomment this and delete the regular get post line.\n * $data = \\DustPress\\Query::get_acf_post( get_the_ID() );\n */\n $data = \\DustPress\\Query::get_post( get_the_ID() );\n\n return $data;\n }", "public function Content() {\n /**\n * No ACF by default. Uncomment this and delete the regular get post line.\n * $data = \\DustPress\\Query::get_acf_post( get_the_ID() );\n */\n $data = \\DustPress\\Query::get_post( get_the_ID() );\n\n return $data;\n }", "public static function _getPostFromId( $_post_id ) {\n global $post_id;\n $post_id = $_post_id;\n $post = get_post( $post_id );\n setup_postdata( $post );\n return new WPOO_Post( $post );\n }", "public function get_data_post($id)\n {\n $this->db->where('socialUsuarioId', $id);\n $datos = $this->db->get('social_media');\n return $datos->row();\n }", "public function show($id)\n {\n\n $post = $this->post->with('tags')->find($id);\n //dd($post);// = unserialize($post->photo);\n return $post;\n //return $this->post->with('tags')->find($id);\n }", "public static function getPostById($id) {\n\t\t$em = dbconnection::getInstance()->getEntityManager() ;\n\n\t\t$postRepository = $em->getRepository('post');\n\t\t$post = $postRepository->findOneById(array('id' => $id));\n\n\t\treturn $post; \n\t}", "public function getPostDirect($postId)\n {\n $sql = \"select * from wp_posts where ID = '\" . $postId . \"' and\n post_status = 'publish'\";\n $data = $wpdb->get_results($sql);\n\n return $data[0];\n }", "public function findPostById($id)\n {\n return $this->postDao->findPostById($id);\n }", "public function getById($id)\n {\n $post = Post::find($id);\n\n return $post;\n }", "public function postInfo($postId)\n {\n return Post::find($postId);\n }", "function getPost($post_id) {\n $result = pg_query_params($GLOBALS['web_db_conn'], \"SELECT title, content FROM posts WHERE post_id = $1\", array($post_id));\n\n $row = pg_fetch_row($result);\n\n $title = $row[0];\n $content = $row[1];\n\n return array($title, $content);\n}", "function getPostObject($post_id) {\n\t\t$post_url = get_permalink($post_id);\n\t\t$title = strip_tags(get_the_title($post_id));\n\t\t$tagObjects = get_the_tags($post_id);\n\t\t$single = is_single();\n\t\t$tags = \"\";\n\t\tif (!empty($tagObjects)) {\n\t\t\t$tags .= $tagObjects[0]->name;\n\t\t\tfor ($i = 1; $i < count($tagObjects); $i++) {\n\t\t\t\t$tags .= \",\".$tagObjects[$i]->name;\n\t\t\t}\n\t\t}\n\t\t$category = get_the_category($post_id);\n\t\t$categories = \"\";\n\t\tif (!empty($category)) {\n\t\t\t$categories .= $category[0]->name;\n\t\t\tfor ($i=1; $i<count($category); $i++) {\n\t\t\t\t$categories .= \",\".$category[$i]->name;\n\t\t\t}\n\t\t}\n\t\t$author = get_the_author();\n\t\t$date = get_the_date('U', $post_id) * 1000;\n\t\t$comments = get_comments_number($post_id);\n\n\t\t$tmdb = get_post_meta($post_id,'imdb_id');\n\n\t\t$post_object = array(\n\t\t\t'id' => $post_id,\n\t\t\t'url' => $post_url,\n\t\t\t'title' => $title,\n\t\t\t'tags' => $tags,\n\t\t\t'categories' => $categories,\n\t\t\t'comments' => $comments,\n\t\t\t'date' => $date,\n\t\t\t'author' => $author,\n\t\t\t'single' => $single,\n\t\t\t'img' => get_the_post_thumbnail_url($post_id),\n\t\t\t'tmdb' => $tmdb\n\t\t);\n\t\treturn $post_object;\n\t}", "function get_post($id) {\n $ci = & get_instance();\n $ci->db->from('post');\n $ci->db->where('post_id', $id);\n $post = $ci->db->get()->result();\n\n if (!(is_array($post) && count($post) == 1)) {\n return NULL;\n }\n\n $ci->db->from('comment');\n $ci->db->where('post_id', $post[0]->post_id);\n\n $comments = build_comments($ci->db->get()->result());\n\n $ci->db->from('text_post');\n $ci->db->where('post_id', $post[0]->post_id);\n $text_posts = $ci->db->get()->result();\n\n if (is_array($text_posts) && count($text_posts) == 1) {\n $text_post = build_text_post($post[0], $text_posts[0]->post_text);\n $text_post->comments = $comments;\n return $text_post;\n } else {\n $ci->db->from('link_post');\n $ci->db->where('post_id', $post[0]->post_id);\n $link_posts = $ci->db->get()->result();\n\n if (is_array($link_posts) && count($link_posts) == 1) {\n $link_post = build_link_post($post[0], $link_posts[0]->post_link);\n $link_post->comments = $comments;\n return $link_post;\n } else {\n return NULL;\n }\n }\n }" ]
[ "0.744184", "0.73112255", "0.69985807", "0.69716084", "0.6937682", "0.6913452", "0.6876634", "0.68681437", "0.6836498", "0.68342894", "0.6816118", "0.6777162", "0.66507035", "0.66397727", "0.661593", "0.66022325", "0.6547359", "0.6529206", "0.6529206", "0.6519101", "0.6493818", "0.64740497", "0.64295006", "0.6429084", "0.6411489", "0.6403636", "0.6398612", "0.6387878", "0.6381843", "0.6380568" ]
0.8504743
0
lixlpixel recursive PHP functions scan_directory_recursively( directory to scan, filter ) expects path to directory and optional an extension to filter
function scan_directory_recursively($directory, $filter=FALSE) { if(substr($directory,-1) == '/') { $directory = substr($directory,0,-1); } if(!file_exists($directory) || !is_dir($directory)) { return FALSE; }elseif(is_readable($directory)) { $directory_list = opendir($directory); while($file = readdir($directory_list)) { if($file != '.' && $file != '..' && $file != '.DS_Store' && $file != '.svn') { $path = $directory.'/'.$file; if(is_readable($path)) { $subdirectories = explode('/',$path); if(is_dir($path)) { $directory_tree[] = array( 'path' => $path, 'name' => end($subdirectories), 'modified' => filemtime($path), 'kind' => 'directory', 'content' => scan_directory_recursively($path, $filter)); }elseif(is_file($path)) { $extension = end(explode('.',end($subdirectories))); if($filter === FALSE || $filter == $extension) { // Get metadata and image dimensions $size = getimagesize($path, $info); // Get containing directory of file $directory_array = explode('/', $path); $parent_folder = min($directory_array); // Reset title, caption, tags $title = $caption = $taglist = $tags = ''; $directory_tree[] = array( 'path' => dirname($path), 'group' => $parent_folder, 'file' => end($subdirectories), 'extension' => $extension, 'size' => filesize($path), 'width' => $size[0], 'height' => $size[1], 'modified' => filemtime($path), 'title' => $title, 'caption' => $caption, 'tags' => $tags, 'kind' => 'file'); } } } } } closedir($directory_list); return $directory_tree; }else{ return FALSE; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function scan_directory($dir, $ext = '*', $recurse = true) {\n $files = array ();\n if ($handle = opendir($dir)) {\n while (false !== ($file = readdir($handle))) {\n if ($file == '.' || $file == '..' ||\n $file == 'CVS' || preg_match('|^\\.|', $file)) {\n continue;\n }\n if (is_link($dir . '/' . $file)) {\n continue;\n }\n if (is_dir ($dir . '/' . $file)) {\n if ($recurse == true)\n $files = array_merge($files, scan_directory ($dir . '/' . $file, $ext));\n } else {\n if($ext == get_file_extension($file) || $ext == '*') {\n $files[] = $dir . '/' . $file;\n }\n }\n }\n closedir($handle);\n }\n return $files;\n}", "public function scanRecursive($regex_filter=NULL)\n\t{\n\t\t$this->tossIfException();\n\t\t\n\t\t$files = $this->scan();\n\t\t$objects = $files;\n\t\t\n\t\t$total_files = sizeof($files);\n\t\tfor ($i=0; $i < $total_files; $i++) {\n\t\t\tif ($files[$i] instanceof fDirectory) {\n\t\t\t\tarray_splice($objects, $i+1, 0, $files[$i]->scanRecursive());\n\t\t\t}\n\t\t}\n\t\t\n\t\tif ($regex_filter) {\n\t\t\t$new_objects = array();\n\t\t\tforeach ($objects as $object) {\n\t\t\t\t$test_path = ($object instanceof fDirectory) ? substr($object->getPath(), 0, -1) . '/' : $object->getPath();\n\t\t\t\tif (!preg_match($regex_filter, $test_path)) {\n\t\t\t\t\tcontinue;\t\n\t\t\t\t}\t\n\t\t\t\t$new_objects[] = $object;\n\t\t\t}\n\t\t\t$objects = $new_objects;\n\t\t}\n\t\t\n\t\treturn $objects;\n\t}", "function RecursiveScanDir($dir, $prefix = '') {\n\t$dir = rtrim($dir, '\\\\/');\n\t$result = array();\n\tforeach (scandir($dir) as $f) {\n if (\n preg_match('`/tmp/`', \"$dir/$f\")\n || preg_match('`/fpdf.php$`', \"$dir/$f\")\n || preg_match('`/libs/pi_barcode.php$`', \"$dir/$f\")\n || preg_match('`/libs/phpmailer/`', \"$dir/$f\")\n || preg_match('`/libs/securimage/`', \"$dir/$f\")\n || preg_match('`/libs/Smarty/`', \"$dir/$f\")\n )\n continue;\n\t\tif ($f !== '.' and $f !== '..') {\n\t\t\tif (is_dir(\"$dir/$f\")) {\n\t\t\t\t$result = array_merge($result, RecursiveScanDir(\"$dir/$f\", \"$prefix$f/\"));\n\t\t\t} else {\n\t\t\t\tif ( strtolower(substr(pathinfo($f,PATHINFO_EXTENSION),0,3)) == \"php\" && pathinfo(__FILE__,PATHINFO_BASENAME ) != pathinfo($f,PATHINFO_BASENAME ) )\n\t\t\t\t\t$result[] = $prefix.$f;\n\t\t\t}\n\t\t}\n\t}\n\treturn $result;\n}", "public function find($path,$filters = null,$recursive = false){\n if(!$this->isDir($path)) return false;\n if(!$filters) $filters = [];\n if(!array_key_exists(File::FIND_FILTER_TYPE,$filters)) $filters[File::FIND_FILTER_TYPE] = File::FIND_TYPE_FILE;\n $files = [];\n if($dir = $this->nlist($path)) foreach($dir as $entry) if(trim(basename($entry),'.')) try{\n $info = ['dir' => $is_dir = $this->isDir($entry)];\n if($is_dir && $recursive) $files += $this->find($entry,$filters,$recursive);\n foreach($filters as $key => $value){\n if($operator = preg_match('/^(\\\\w+)(\\\\W+)$/',$key,$match) ? $match[2] : null) $key = $match[1];\n else $operator = '==';\n switch($key){\n case File::FIND_FILTER_TYPE:\n if($value == File::FIND_TYPE_ALL) break;\n if(($value & File::FIND_TYPE_DIR) && !$is_dir) continue 3;\n if(($value & File::FIND_TYPE_FILE) && $is_dir) continue 3;\n break;\n case File::FIND_FILTER_NAME:\n if(!Str::operator($info[$key] = $entry,$operator,$value)) continue 3;\n break;\n case File::FIND_FILTER_TIME:\n if($is_dir || !Str::operator($info[$key] = $this->mdtm($entry),$operator,$value)) continue 3;\n break;\n case File::FIND_FILTER_SIZE:\n if($is_dir || !Str::operator($info[$key] = $this->size($entry),$operator,\\Rsi\\Number::shorthandBytes($value))) continue 3;\n break;\n case File::FIND_FILTER_FUNC:\n if(!($info[$key] = call_user_func($value,$full,$info))) continue 3;\n break;\n }\n }\n $files[$entry] = $info;\n }\n catch(\\Exception $e){}\n return $files;\n }", "public function scanDirPathsRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, string>\n */\n return $this->scanRawRecursive(false, true, $filter, false);\n }", "function scandir_recursive($directory, $format = null, $excludes = array()){\n $format = ($format == null) ? 'absolute' : $format;\n $paths = array();\n $stack[] = $directory;\n while($stack){\n $this_resource = array_pop($stack);\n if ($resource = scandir($this_resource)){\n $i = 0;\n while (isset($resource[$i])){\n if ($resource[$i] != '.' && $resource[$i] != '..'){\n $current = array(\n 'absolute' => \"{$this_resource}/{$resource[$i]}\",\n 'relative' => preg_replace('/' . preg_quote($directory, '/') . '/', '', \"{$this_resource}/{$resource[$i]}\")\n );\n if (is_file($current['absolute'])){\n $paths[] = $current[$format];\n } elseif (is_dir($current['absolute'])){\n $paths[] = $current[$format];\n $stack[] = $current['absolute'];\n }\n }\n $i++;\n }\n }\n }\n if (count($excludes) > 0){\n $clean = array();\n foreach($paths as $path){\n $remove = false;\n foreach($excludes as $exclude){\n $exclude = preg_quote($exclude, '/');\n $exclude = str_replace('\\*', '.*', $exclude);\n if (preg_match('/' . $exclude . '/', $path)){\n $remove = true;\n }\n }\n if (!$remove) $clean[] = $path;\n }\n $paths = $clean;\n }\n return $paths;\n}", "public function scanFilePathsRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, string>\n */\n return $this->scanRawRecursive(true, false, $filter, false);\n }", "protected function _findFiles($extensions = '') {\n\t\t$this->_files = [];\n\t\tforeach ($this->_paths as $path) {\n\t\t\tif (!is_dir($path)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t$Iterator = new RegexIterator(\n\t\t\t\tnew RecursiveIteratorIterator(new RecursiveDirectoryIterator($path)),\n\t\t\t\t'/^.+\\.(' . $extensions . ')$/i',\n\t\t\t\tRegexIterator::MATCH\n\t\t\t);\n\t\t\tforeach ($Iterator as $file) {\n\t\t\t\t$excludes = ['Config'];\n\t\t\t\t//Iterator processes plugins even if not asked to\n\t\t\t\tif (empty($this->params['plugin'])) {\n\t\t\t\t\t$excludes = array_merge($excludes, ['Plugin', 'plugins']);\n\t\t\t\t}\n\t\t\t\tif (empty($this->params['vendor'])) {\n\t\t\t\t\t$excludes = array_merge($excludes, ['Vendor', 'vendors']);\n\t\t\t\t}\n\t\t\t\tif (!empty($excludes)) {\n\t\t\t\t\t$isIllegalPluginPath = false;\n\t\t\t\t\tforeach ($excludes as $exclude) {\n\t\t\t\t\t\tif (strpos($file, $path . $exclude . DS) === 0) {\n\t\t\t\t\t\t\t$isIllegalPluginPath = true;\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tif ($isIllegalPluginPath) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif ($file->isFile()) {\n\t\t\t\t\t$this->_files[] = $file->getPathname();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "protected function scanDirectory($dir, $include_tests) {\n $files = array();\n\n // In order to scan top-level directories, absolute directory paths have to\n // be used (which also improves performance, since any configured PHP\n // include_paths will not be consulted). Retain the relative originating\n // directory being scanned, so relative paths can be reconstructed below\n // (all paths are expected to be relative to $this->root).\n $dir_prefix = ($dir == '' ? '' : \"$dir/\");\n $absolute_dir = ($dir == '' ? $this->root : $this->root . \"/$dir\");\n\n if (!is_dir($absolute_dir)) {\n return $files;\n }\n // Use Unix paths regardless of platform, skip dot directories, follow\n // symlinks (to allow extensions to be linked from elsewhere), and return\n // the RecursiveDirectoryIterator instance to have access to getSubPath(),\n // since SplFileInfo does not support relative paths.\n $flags = \\FilesystemIterator::UNIX_PATHS;\n $flags |= \\FilesystemIterator::SKIP_DOTS;\n $flags |= \\FilesystemIterator::FOLLOW_SYMLINKS;\n $flags |= \\FilesystemIterator::CURRENT_AS_SELF;\n $directory_iterator = new \\RecursiveDirectoryIterator($absolute_dir, $flags);\n\n // Filter the recursive scan to discover extensions only.\n // Important: Without a RecursiveFilterIterator, RecursiveDirectoryIterator\n // would recurse into the entire filesystem directory tree without any kind\n // of limitations.\n $filter = new RecursiveExtensionFilterIterator($directory_iterator);\n $filter->acceptTests($include_tests);\n\n // The actual recursive filesystem scan is only invoked by instantiating the\n // RecursiveIteratorIterator.\n $iterator = new \\RecursiveIteratorIterator($filter,\n \\RecursiveIteratorIterator::LEAVES_ONLY,\n // Suppress filesystem errors in case a directory cannot be accessed.\n \\RecursiveIteratorIterator::CATCH_GET_CHILD\n );\n\n foreach ($iterator as $key => $fileinfo) {\n $name = $fileinfo->getBasename('.info.yml');\n\n if ($this->fileCache && $cached_extension = $this->fileCache->get($fileinfo->getPathName())) {\n $files[$cached_extension->getType()][$key] = $cached_extension;\n continue;\n }\n\n // Determine extension type from info file.\n $type = FALSE;\n $file = $fileinfo->openFile('r');\n while (!$type && !$file->eof()) {\n preg_match('@^type:\\s*(\\'|\")?(\\w+)\\1?\\s*$@', $file->fgets(), $matches);\n if (isset($matches[2])) {\n $type = $matches[2];\n }\n }\n if (empty($type)) {\n continue;\n }\n $name = $fileinfo->getBasename('.info.yml');\n $pathname = $dir_prefix . $fileinfo->getSubPathname();\n\n $filename = $name . '.' . $type;\n\n if (!file_exists(dirname($pathname) . '/' . $filename)) {\n $filename = NULL;\n }\n\n $extension = new Extension($this->root, $type, $pathname, $filename);\n\n // Track the originating directory for sorting purposes.\n $extension->subpath = $fileinfo->getSubPath();\n $extension->origin = $dir;\n\n $files[$type][$key] = $extension;\n\n if ($this->fileCache) {\n $this->fileCache->set($fileinfo->getPathName(), $extension);\n }\n }\n return $files;\n }", "function scanDir($cfg) //$view, $tdir , $subdir='', $match)\n {\n $ff = HTML_FlexyFramework::get();\n \n $subdir = $cfg['subdir'];\n $scandir = $cfg['tdir']. (empty($subdir) ? '' : '/') . $subdir;\n \n if (in_array($subdir, $cfg['skipdir'])) {\n return array();\n }\n // skip dom_templates\n \n if (!file_exists($scandir)) {\n return array();\n }\n $dh = opendir($scandir);\n if(!$dh){\n return array(); // something went wrong!?\n }\n $ret = array();\n \n while (($fn = readdir($dh)) !== false) {\n // do we care that it will try and parse the template directory??? - not really..\n // as we are only looking for php files..\n if(empty($fn) || $fn[0] == '.'){\n continue;\n }\n \n $fullpath = $scandir.(empty($scandir) ? '' : \"/\").$fn;\n // echo \"filename: $fullpath \\n\";\n \n if (is_link($fullpath)) {\n continue;\n }\n \n if(is_dir($fullpath)){\n // then recursively call self...\n $cfg['subdir'] = $subdir . (empty($subdir) ? '' : '/') . $fn;\n $children = $this->scanDir($cfg);\n if (count($children)) {\n $ret = array_merge($ret, $children);\n \n }\n continue;\n \n }\n \n if (!preg_match($cfg['match'], $fn) || !is_file($fullpath)) {\n continue;\n }\n \n \n \n $ret[] = $subdir . (empty($subdir) ? '' : '/'). $fn; /// this used to be strtolower?? why???\n\n \n \n }\n// print_r($ret);\n \n return $ret;\n \n \n \n \n }", "private function scanDir(string $path, array &$files, bool $recursion = false): void\n {\n $handler = opendir($path);\n\n while ($item = readdir($handler)) {\n if (in_array($item, ['.', '..'])) {\n continue;\n }\n\n $itemPath = sprintf('%s/%s', $path, $item);\n\n if (is_file($itemPath)) {\n $files[] = $itemPath;\n continue;\n }\n\n if ($recursion && is_dir($itemPath)) {\n $this->scanDir($itemPath, $files, $recursion);\n }\n }\n }", "public function scanFilesRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, File>\n */\n return $this->scanRawRecursive(true, false, $filter, true);\n }", "function rScanDir($scanMe) {\r\n\t\tglobal $path, $tmpPath, $cur_folder, $tags2;\r\n\t\tforeach($scanMe as $folder)\r\n\t\t{\r\n\t\t\tif(is_dir($path.$tmpPath.$folder) && $folder !=\".\" && $folder !=\"..\")\r\n\t\t\t{\r\n\t\t\t\t$cur_folder[] = $tmpPath.$folder;\r\n\t\t\t\techo \"getTagString input:\".$tmpPath.$folder.\"<br/>\";\r\n\t\t\t\t$tags2[] = getTagString($tmpPath.$folder);\r\n\t\t\t\t$tmpPath .= $folder.\"/\";\r\n\t\t\t\trScanDir(scandir($path.$tmpPath));\r\n\t\t\t}\r\n\t\t}\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\"));\r\n\t\t$tmpPath = substr($tmpPath, 0, strrpos($tmpPath, \"/\")+1);\r\n\t}", "function processDirectory($path=\"\", $filter, $transform) {\n\t\t$dir_handle = @opendir($path) or die(\"Unable to open $path\");\n\n\t\t//running the while loop\n\t\t$count = 0;\n\n\t\twhile ($name = readdir($dir_handle)) \n\t\t{\n\t\t\t$pathname = \"$path/$name\";\n\t\t\t// echo \"dir loop: $path/$name\\n\";\n\t\t\tif(strpos($name, \".\") === 0) {\n\t\t\t\t// skipping dot file\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\tif(is_dir($pathname)) {\n\t\t\t\t$this->processDirectory($pathname, $filter, $transform);\n\t\t\t} else if(is_file($pathname)) {\n\t\t\t\tif($this->isCssFile($pathname)) {\n\t\t\t\t\t$this->transformCssFile($pathname);\n\t\t\t\t}\n\t\t\t\telse if($this->isImageFile($pathname)) {\n\t\t\t\t\t$this->transformImageFile($pathname);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$count++;\n\t\t}\n\t\tclosedir($dir_handle);\n\t}", "function scan_dir($dir, $type=array(),$only=FALSE, $allFiles=FALSE, $recursive=TRUE, $onlyDir=\"\", &$files){\n\t$handle = @opendir($dir);\n\tif(!$handle)\n\t\treturn false;\n\twhile ($file = @readdir ($handle))\n\t{\n\t\tif (eregi(\"^\\.{1,2}$\",$file) || $file == 'index.html')\n\t\t{\n\t\t\tcontinue;\n\t\t}\n\t\tif(!$recursive && $dir != $dir.$file.\"/\")\n\t\t{\n\t\t\tif(is_dir($dir.$file))\n\t\t\t\tcontinue;\n\t\t}\n\t\tif(is_dir($dir.$file))\n\t\t{\n\t\t\tscan_dir($dir.$file.\"/\", $type, $only, $allFiles, $recursive, $file, $files);\n\t\t}\n\t\telse\n\t\t{\n if($only)\n\t\t\t\t$onlyDir = $dir;\n\n\t\t\t$files = buildArray($dir,$file,$onlyDir,$type,$allFiles,$files);\n\t\t}\n\t}\n\t@closedir($handle);\n\treturn $files;\n}", "function searchDir($base_dir=\"./\",$p=\"\",$f=\"\",$allowed_depth=-1){\n\t$contents=array();\n\n\t# trim all input arguments for whitespace\n\t$base_dir=trim($base_dir);\n\t$p=trim($p);\n\t$f=trim($f);\n\n # if base dir is not given, use the this\n\tif($base_dir==\"\")$base_dir=\"./\";\n\n\t# if last character of basedir lacks a \"/\" then add one\n\tif(substr($base_dir,-1)!=\"/\")$base_dir.=\"/\";\n\n\t# remove the \"../\" and \"./\" directories, and trim all \"./\"\n\t$p=str_replace(array(\"../\",\"./\"),\"\",trim($p,\"./\"));\n\n\t# add the requested path to the base directory string\n\t$p=$base_dir.$p;\n\n\t#if p is not a directory, meaning it is a file, get the path to it\n\tif(!is_dir($p))$p=dirname($p);\n\n\t#if the last character of p is not a \"/\" then add one\n\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\n\t# if caps are set on allowed depth (allowed depth>-1) count the dirs\n\tif($allowed_depth>-1){\n\t\t$allowed_depth=count(explode(\"/\",$base_dir))+ $allowed_depth-1;\n\t\t$p=implode(\"/\",array_slice(explode(\"/\",$p),0,$allowed_depth));\n\t\tif(substr($p,-1)!=\"/\")$p.=\"/\";\n\t}\n\n\t# if f is empty, create an empty array, if not explode and store elements\n\t$filter=($f==\"\")?array():explode(\",\",strtolower($f));\n\n\t# store the files in the files array, and shut up while scanning\n\t$files=@scandir($p);\n\n\t# if there are no files after scan, return an empty array and the path\n\tif(!$files)return array(\"contents\"=>array(),\"currentPath\"=>$p);\n\n\t# iterate through all files found\n\tfor ($i=0;$i<count($files);$i++){\n\n\t\t# gather name and path of each file\n\t\t$fName=$files[$i];\n\t\t$fPath=$p.$fName;\n\n\t\t# check if the file is a directory and tag it as directory\n\t\t# each file is tagged as a folder by default\n\t\t$isDir=is_dir($fPath);\n\t\t$add=false;\n\t\t$fType=\"folder\";\n\n\t\t# if the file is a file\n\t\tif(!$isDir){\n\n\t\t\t# extract extension from filename\n\t\t\t$ft=strtolower(substr($files[$i],strrpos($files[$i],\".\")+1));\n\t\t\t$fType=$ft;\n\n\t\t\t# if there is anything in the filter that matches, add it\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(in_array($ft,$filter))$add=true;\n\t\t\t}else{\n\t\t\t\t$add=true;\n\t\t\t}\n\t\t# if the file is a folder\n\t\t}else{\n\t\t\tif($fName==\".\")continue;\n\t\t\t$add=true;\n\n\t\t\t# filter it, and discard if bad\n\t\t\tif($f!=\"\"){\n\t\t\t\tif(!in_array($fType,$filter))$add=false;\n\t\t\t}\n\n\t\t\t# if the file is the \"..\" folder\n\t\t\tif($fName==\"..\"){\n\t\t\t\t# if we are in the base dir, no not add upper directory option\n\t\t\t\tif($p==$base_dir){\n\t\t\t\t\t$add=false;\n\t\t\t\t}else $add=true;\n\n\t\t\t\t# explode the path by path steps\n\t\t\t\t$tempar=explode(\"/\",$fPath);\n\t\t\t\t# remove last two elements, so the file references parent dir\n\t\t\t\tarray_splice($tempar,-2);\n\t\t\t\t# implode the array, to recreate the path string\n\t\t\t\t$fPath=implode(\"/\",$tempar);\n\t\t\t\t# if for some reason, this reference is shorter than basedir, deny it!\n\t\t\t\tif(strlen($fPath)<= strlen($base_dir))$fPath=\"\";\n\t\t\t}\n\t\t}\n\n\t\t# if the created fPath is non-zero, append to basedir\n\t\tif($fPath!=\"\")$fPath=substr($fPath,strlen($base_dir));\n\t\t# if approved to add, add path, name and type to contents[] array\n\t\tif($add)$contents[]=array(\"fPath\"=>$fPath,\"fName\"=>$fName,\"fType\"=>$fType);\n\t}\n\n\t# if p is shorter than base_dir, deny it! Else, cut away base_dir and use it\n\t$p=(strlen($p)<= strlen($base_dir))?$p=\"\":substr($p,strlen($base_dir));\n\t# return the final contents and its respective path\n\treturn array(\"contents\"=>$contents,\"currentPath\"=>$p);\n}", "public function scanDirsRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir>\n */\n return $this->scanRawRecursive(false, true, $filter, true);\n }", "function directory_list($directory_base_path, $filter_dir = false, $filter_files = false, $exclude = \".|..|.DS_Store|.svn\", $recursive = true)\r\n\t{\r\n\t\t$directory_base_path = rtrim($directory_base_path, \"/\") . \"/\";\r\n\r\n\t\tif ( !is_dir($directory_base_path) )\r\n\t\t{\r\n\t\t\terror_log(__FUNCTION__ . \"File at: $directory_base_path is not a directory.\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\t$result_list = array();\r\n\t\t$exclude_array = explode(\"|\", $exclude);\r\n\r\n\t\tif ( !$folder_handle = opendir($directory_base_path) )\r\n\t\t{\r\n\t\t\terror_log(__FUNCTION__ . \"Could not open directory at: $directory_base_path\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\twhile ( false !== ($filename = readdir($folder_handle)) )\r\n\t\t\t{\r\n\t\t\t\tif ( !in_array($filename, $exclude_array) )\r\n\t\t\t\t{\r\n\t\t\t\t\tif ( is_dir($directory_base_path . $filename . \"/\") )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tif ( $recursive && strcmp($filename, \".\") != 0 && strcmp($filename, \"..\") != 0 )\r\n\t\t\t\t\t\t{ // prevent infinite recursion\r\n\t\t\t\t\t\t\terror_log($directory_base_path . $filename . \"/\");\r\n\t\t\t\t\t\t\t$result_list[$filename] = $this->directory_list(\"$directory_base_path$filename/\", $filter_dir, $filter_files, $exclude, $recursive);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\telseif ( !$filter_dir )\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t$result_list[] = $filename;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telseif ( !$filter_files )\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\t$result_list[] = $filename;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tclosedir($folder_handle);\r\n\t\t\treturn $result_list;\r\n\t\t}\r\n\t}", "function searchFile($directory, $file)\n{\n // Blacklisted directory names - not doing so will provoke an endless loop\n $blacklist = array ( '.idea', '.git', '.', '..');\n\n // Getting a handle on the directory\n $dir_handle = opendir($directory);\n\n // Looping on all the directorie's entry to find the right file\n while(false !== ($entry = readdir($dir_handle)))\n {\n //if($entry != '.' && $entry != '..' && $entry != '.idea' && $entry != '.git')\n if(!in_array($entry, $blacklist))\n {\n // if it's a directory - call back the same function recursively\n if(is_dir($directory. DIRECTORY_SEPARATOR .$entry))\n {\n searchFile($directory . DIRECTORY_SEPARATOR . $entry, $file);\n }\n // If it's a file, test against class name to know if it is the right file\n else if(str_replace(\".php\", \"\", $entry) == get_class_name($file))\n {\n $path = $directory . DIRECTORY_SEPARATOR . $entry;\n add_to_cache($file, $path);\n\n return;\n }\n }\n }\n\n closedir($dir_handle);\n\n\n}", "public function scanRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string, Dir|File>\n */\n return $this->scanRawRecursive(true, true, $filter, true);\n }", "function l10n_drupal_files_scan($source = NULL, $automated = FALSE) {\n\n // We look for projects in the working directory.\n $workdir = variable_get('l10n_server_connector_l10n_drupal_files_directory', '');\n\n if (!is_dir($workdir)) {\n drupal_set_message(t('The configured directory (%workdir) cannot be found. <a href=\"@configure\">Check your configuration</a>.', array('%workdir' => $workdir, '@configure' => url('admin/l10n_server/connectors/config/l10n_drupal/files'))));\n }\n else {\n // define a list of allowed extensions, we will use it later on file_scan_directory\n // and further regular expression buildung processing. Thanks to EugenMayer\n $allowed_file_extensions = array('.tar.gz', '.tgz');\n // build the regular expression\n foreach($allowed_file_extensions as $key => $extension) {\n // escape the file extensions for later regular expression usage\n $allowed_file_extensions[$key] = preg_quote($extension);\n }\n $file_extension_pattern = '(' . implode('|', $allowed_file_extensions) . ')$';\n\n // Packages are always .tar.gz files.\n $files = file_scan_directory($workdir, $file_extension_pattern);\n if (count($files)) {\n foreach ($files as $path => $file) {\n\n if (!l10n_drupal_is_supported_version($path)) {\n // Skip files for unsupported versions.\n continue;\n }\n\n // Get rid of $workdir prefix on file names, eg.\n // drupal-6.x-6.19.tar.gz\n // Drupal/drupal-4.6.7.tar.gz or\n // files/Ubercart/ubercart-5.x-1.0-alpha8.tar.gz.\n $path = $package = trim(preg_replace('!(^' . preg_quote($workdir, '!') . ')(.+)\\.tar\\.gz!', '\\2', $path), '/');\n\n // split the filename into parts to $filename_splitted\n // [0] = the full string\n // [1] = the subdirectory and filename with extension\n // [1] = the subdirectory and filename without extension\n // [2] = the extension .tar.gz or .tgz\n $file_splitted = array(); // ensure to be a array....\n // the regular expression pattern (i put it in a var because i can better handle it with dpm for debugging, move if you want...)\n $file_split_pattern = '!^'. preg_quote($workdir, '!') .'((.+)'. $file_extension_pattern .')!';\n preg_match( $file_split_pattern, $path, $file_splitted );\n // put the result in vars for better handling\n list($file_fullpath, $file_subpath_ext, $file_subpath, $file_extension) = $file_splitted;\n\n // redefine the path to subpath without slash at beginning\n $path = trim($file_subpath, '/');\n // same on package\n $package = trim($file_subpath, '/');\n $project_title = '';\n if (strpos($path, '/')) {\n // We have a slash, so this package is in a subfolder.\n // Eg. Drupal/drupal-4.6.7 or Ubercart/ubercart-5.x-1.0-alpha8.\n // Grab the directory name as project title.\n list($project_title, $package) = explode('/', $path);\n }\n if (strpos($package, '-')) {\n // Only remaining are the project uri and release,\n // eg. drupal-4.6.7 or ubercart-5.x-1.0-alpha8.\n list($project_uri, $release_version) = explode('-', $package, 2);\n\n l10n_drupal_save_data($project_uri, ($project_title ? $project_title : $project_uri), $release_version, trim($file_subpath_ext, '/'), filemtime($file->filename));\n }\n else {\n // File name not formatted properly.\n $result['error'] = t('File name should have project codename and version number included separated with hyphen, such as drupal-5.2.tar.gz.');\n }\n }\n }\n }\n\n $user_feedback = FALSE;\n $results = db_query_range(\"SELECT * FROM {l10n_server_release} WHERE pid IN (SELECT pid FROM {l10n_server_project} WHERE connector_module = 'l10n_drupal_files' AND status = 1) ORDER BY last_parsed ASC\", 0, variable_get('l10n_server_connector_l10n_drupal_files_limit', 1));\n while ($release = db_fetch_object($results)) {\n\n // Only parse file if something changed since we last parsed it.\n $file_name = $workdir . '/' . $release->download_link;\n\n if (file_exists($file_name)) {\n if (filemtime($file_name) > $release->last_parsed) {\n $result = l10n_drupal_parse_package($file_name, $release);\n\n // User feedback, if not automated. Log messages are already done.\n if (isset($result['error']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['error'], 'error');\n }\n elseif (isset($result['message']) && !$automated) {\n $user_feedback = TRUE;\n drupal_set_message($result['message']);\n }\n }\n else {\n if (!$automated) {\n $user_feedback = TRUE;\n drupal_set_message(t('@release was already parsed, no need to scan again.', array('@release' => $release->download_link)));\n }\n }\n }\n // Hackish update of last parsed time so other tarballs will get into the queue too.\n // @todo: work on something better for this.\n db_query(\"UPDATE {l10n_server_release} SET last_parsed = %d WHERE rid = %d\", time(), $release->rid);\n }\n if (!$automated && !$user_feedback) {\n drupal_set_message(t('No (new) local Drupal files found to scan in %workdir.', array('%workdir' => $workdir)));\n }\n\n // Ensure that a Drupal page will be displayed with the messages.\n return '';\n}", "public function scanFileNamesRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string>\n */\n return $this->scanRawRecursive(true, false, $filter, null);\n }", "function find($dir, $pattern){\n // escape any character in a string that might be used to trick\n // a shell command into executing arbitrary commands\n $dir = escapeshellcmd($dir);\n // get a list of all matching files in the current directory\n $files = glob(\"$dir/$pattern\");\n // find a list of all directories in the current directory\n // directories beginning with a dot are also included\n foreach (glob(\"$dir/{.[^.]*,*}\", GLOB_BRACE|GLOB_ONLYDIR) as $sub_dir){\n $arr = find($sub_dir, $pattern); // resursive call\n $files = array_merge($files, $arr); // merge array with files from subdirectory\n }\n // return all found files\n return $files;\n}", "public function php_file_tree_dir($directory, $return_link, $extensions = array(), $first_call = true) {\n \n // Get and sort directories/files\n if( function_exists(\"scandir\") ) $file = scandir($directory); else $file = php4_scandir($directory);\n natcasesort($file);\n // Make directories first\n $files = $dirs = array();\n foreach($file as $this_file) {\n if( is_dir(\"$directory/$this_file\" ) ) $dirs[] = $this_file; else $files[] = $this_file;\n }\n $file = array_merge($dirs, $files);\n \n // Filter unwanted extensions\n if( !empty($extensions) ) {\n foreach( array_keys($file) as $key ) {\n if( !is_dir(\"$directory/$file[$key]\") ) {\n $ext = substr($file[$key], strrpos($file[$key], \".\") + 1); \n if( !in_array($ext, $extensions) ) unset($file[$key]);\n }\n }\n }\n \n if( count($file) > 2 ) { // Use 2 instead of 0 to account for . and .. \"directories\"\n $php_file_tree = \"<ul\";\n if( $first_call ) { $php_file_tree .= \" class=\\\"php-file-tree\\\"\"; $first_call = false; }\n $php_file_tree .= \">\";\n foreach( $file as $this_file ) {\n if( $this_file != \".\" && $this_file != \"..\" ) {\n if( is_dir(\"$directory/$this_file\") ) {\n // Directory\n $php_file_tree .= \"<li class=\\\"pft-directory\\\"><a href=\\\"#\\\">\" . htmlspecialchars($this_file) . \"</a>\";\n $php_file_tree .= php_file_tree_dir(\"$directory/$this_file\", $return_link ,$extensions, false);\n $php_file_tree .= \"</li>\";\n } else {\n // File\n // Get extension (prepend 'ext-' to prevent invalid classes from extensions that begin with numbers)\n $ext = \"ext-\" . substr($this_file, strrpos($this_file, \".\") + 1); \n $link = str_replace(\"[link]\", \"$directory/\" . urlencode($this_file), $return_link);\n $php_file_tree .= \"<li class=\\\"pft-file \" . strtolower($ext) . \"\\\"><a href=\\\"$link\\\">\" . htmlspecialchars($this_file) . \"</a></li>\";\n }\n }\n }\n $php_file_tree .= \"</ul>\";\n }\n return $php_file_tree;\n }", "public function scanDirNamesRecursive(callable $filter = null): Generator\n {\n /**\n * @var Generator<string>\n */\n return $this->scanRawRecursive(false, true, $filter, null);\n }", "function grep($directory, $pattern = null, $recurse = true) {\n static $in_recurse = false;\n static $skip_charachers;\n $reset_in_recurse = false;\n if (!$in_recurse) {\n if (!\\is_dir($directory))\n return array();\n $directory = \\realpath($directory) . \"/\";\n $skip_charachers = \\strlen($directory);\n $in_recurse = $reset_in_recurse = true;\n }\n $ret = array();\n $dirhandle = \\opendir($directory);\n while (false !== ($nodename = \\readdir($dirhandle))) {\n if ($nodename[0] == \".\")\n continue;\n $subpath = $directory . $nodename;\n if (\\is_dir($subpath)) {\n if ($recurse)\n $ret = \\array_merge($ret, grep($subpath . \"/\", $pattern));\n } else if ($pattern == null || \\preg_match($pattern, $subpath))\n $ret[] = \\substr($subpath, $skip_charachers);\n }\n \\closedir($dirhandle);\n if ($reset_in_recurse)\n $in_recurse = false;\n return $ret;\n}", "function bob_scandir($root_path, $bad_path, $recursive) {\n $output = array();\n if (file_exists($root_path)){\n $paths = scandir($root_path);\n if ($paths === False)\n return False;\n foreach ($paths as $path) {\n $potential_path = \"${root_path}/${path}\";\n\n // Ignore any files in the bad (admin) path or files that begin with a period.\n if ($potential_path == $bad_path or $path[0] == '.')\n continue;\n\n $output[] = $potential_path;\n $bad_folder = ''; // not sure what this is for\n if ($recursive and is_dir($potential_path)) // Recursively descend and print out files.\n $output = array_merge($output, bob_scandir($potential_path, $bad_folder, $recursive));\n }\n }\n return $output;\n}", "private function findFiles($directory, $extensions = array())\r\n {\r\n $directory = ROOT_DIR_NAME;\r\n\r\n if($this->check_search_directory($directory))\r\n {\r\n $search = $this->filter_search_str($this->search);\r\n $directories = array();//\"\";\r\n function glob_recursive($directory, &$directories = array(), $search)\r\n {\r\n foreach(glob($directory, GLOB_ONLYDIR | GLOB_NOSORT) as $folder)\r\n {\r\n $directories[] = $folder;\r\n glob_recursive(\"{$folder}/*\", $directories, $search);\r\n }\r\n }\r\n @glob_recursive($directory, $directories, $search);\r\n $files = array ();\r\n foreach($directories as $directory)\r\n {\r\n $slashes = \"../\";\r\n if(strpos($directory, \"..//\") !== FALSE)\r\n {\r\n $slashes = \"..//\";\r\n }\r\n if (in_array(str_replace($slashes, \"\", $directory), $this->ignored)) continue;\r\n $this->find_all_files($directory, $extensions, $search);\r\n /*foreach($extensions as $extension)\r\n {\r\n foreach(glob(\"{$directory}/{$search}.{$extension}\") as $file)\r\n {\r\n $files[$extension][] = $file;\r\n $filename = str_replace(\"..//\", \"\", $file);\r\n $this->root_files_folders[$filename] = filemtime($file);\r\n }\r\n }*/\r\n }\r\n @arsort($this->root_files_folders);\r\n if($this->sort != 'date')\r\n {\r\n @$this->root_files_folders = $this->sort_with_name($this->root_files_folders);\r\n }\r\n }\r\n @$this->root_files_folders = array_keys($this->root_files_folders);\r\n }", "public function test_scan_directories()\n {\n $content = array('.','..','application','.git','nbproject','system');\n $object = Directory::factory(ROOT);\n $res = $object->scan(Directory::SORT_ASC, Directory::SCAN_DIRS);\n \n $this->assertEquals(count($content), count($res));\n foreach($res as $path=>$dir){\n $this->assertTrue(in_array($dir->get_base_name(), $content));\n $this->assertInstanceOf('\\Kaili\\Directory', $dir);\n }\n }", "private function directoryScan($dir) {\n\t\t\n\t\t// check for the validity of input / working directory\n\t\t\n\t\tif (!is_dir($dir)) {\n\t\t\tdie(\"'$dir' is not a directory.\".LE);\n\t\t}\n\t\t\n\t\t// listing directory contents\n\t\t\n\t\t$result = [];\n\t\t\n\t\t$root = scandir($dir);\n\t\tforeach($root as $value)\n\t\t{\n\t\t\t// removing dots & output directory\n\t\t\t\n\t\t\tif($value === '.' || $value === '..') {\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t// listing only files\n\t\t\t\n\t\t\tif(is_file(\"$dir\".DS.\"$value\")) {\n\t\t\t\t$result[$value]=\"$dir\".DS.\"$value\";\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t// recursive call to self(this method) so we can get files listing recursively\n\t\t\t\n\t\t\tforeach($this->directoryScan(\"$dir\".DS.\"$value\") as $value1)\n\t\t\t{\n\t\t\t\t$result[basename($value1)]=$value1;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $result;\n\t}" ]
[ "0.7365833", "0.6470901", "0.64123094", "0.6315087", "0.6304886", "0.62927294", "0.62897396", "0.6267294", "0.6255155", "0.6250878", "0.62452817", "0.6229992", "0.61644083", "0.6160024", "0.61408114", "0.6133717", "0.61173576", "0.6106241", "0.6103352", "0.6040724", "0.5990699", "0.5987583", "0.598338", "0.5974081", "0.59211254", "0.59075975", "0.5902595", "0.5888189", "0.5883263", "0.58740044" ]
0.73558325
1
Get the emoji country flag for the given country code.
function country_flag($countryCode) { return CountryFlag::get($countryCode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function country_code(): mixed\n\t{\n\t\treturn self::$query->country_code;\n\t}", "static function get_country($code) {\n $countries = self::get_countries();\n foreach($countries as $c) {\n if($c->code == $code || $c->code2l == $code) {\n return $c;\n }\n }\n return FALSE;\n }", "public function countryCode();", "public function country()\r\n\t{\r\n\t\t$country = \\Shop\\Models\\Countries::fromCode( $this->country_isocode_2 );\r\n\r\n\t\treturn $country;\r\n\t}", "function getTeamFlag($countryCode) {\n\tif (!empty($countryCode)) {\n\t\treturn \"<img src='http://img.fifa.com/imgml/flags/s/{$countryCode}.gif' title='{$countryCode}' />\";\n\t}\n}", "function getCountry($code){\n\t\n\tglobal $dz;\n\t\n\tif(strlen($code)!=2){\n\t\t\n\t\t// Invalid input.\n\t\terror('field/invalid','country');\n\t\t\n\t}\n\t\n\t// Make sure it's uppercase:\n\t$code=strtoupper($code);\n\t\n\t// Get the row:\n\t$row=$dz->get_row('select country_id from countries where iso2=\"'.$code.'\"');\n\t\n\tif(!$row){\n\t\t\n\t\t// Country was not found.\n\t\terror('country/notfound');\n\t\t\n\t}\n\t\n\treturn $row['country_id'];\n}", "public static function getIsoFlag($iso_code)\n\t{\n\t\tif (strlen($iso_code) == 3)\n\t\t{\n\t\t\t$iso_code = self::convertIso3to2($iso_code);\n\t\t}\n\n\t\tif ($iso_code)\n\t\t{\n\t\t\t$path = JURI::root() . 'media/com_tracks/images/flags/' . strtolower($iso_code) . '.png';\n\n\t\t\treturn $path;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}", "public static function visitor_country()\n {\n $code = null;\n if (Director::isDev()) {\n if (isset($_GET['countryfortestingonly'])) {\n $code = $_GET['countryfortestingonly'];\n Controller::curr()->getRequest()->getSession()->set('countryfortestingonly', $code);\n }\n if ($code = Controller::curr()->getRequest()->getSession()->get('countryfortestingonly')) {\n Controller::curr()->getRequest()->getSession()->set('MyCloudFlareCountry', $code);\n }\n }\n if (! $code) {\n if (isset($_SERVER['HTTP_CF_IPCOUNTRY']) && $_SERVER['HTTP_CF_IPCOUNTRY']) {\n return $_SERVER['HTTP_CF_IPCOUNTRY'];\n }\n $code = Controller::curr()->getRequest()->getSession()->get('MyCloudFlareCountry');\n if (! $code) {\n $address = self::get_remote_address();\n if (strlen($address) > 3) {\n $code = CloudFlareGeoIP::ip2country($address, true);\n }\n if (! $code) {\n $code = self::get_default_country_code();\n }\n if ('' === $code) {\n $code = Config::inst()->get('CloudFlareGeoip', 'default_country_code');\n }\n Controller::curr()->getRequest()->getSession()->set('MyCloudFlareCountry', $code);\n }\n }\n\n return $code;\n }", "public function getCountryCode();", "public static function getCountry(string $code): string\n {\n if (Str::contains($code, '_')) {\n $tab = explode('_', $code);\n\n return Str::lower($tab[1]);\n } elseif (Str::contains($code, '-')) {\n $tab = explode('-', $code);\n\n return Str::lower($tab[1]);\n }\n\n return config('contentful.default_country');\n }", "function country($code = null)\n{\n if (!$code) {\n return \\SumanIon\\CloudFlare::country() ?: 'US';\n }\n\n if (true === $code) {\n return country(\\SumanIon\\CloudFlare::country() ?: 'US');\n }\n\n try {\n return app('earth')->findOneByCode($code);\n } catch (\\Exception $ex) {\n return null;\n }\n}", "function get_Flag($country_code){\n //return the GIF of the country in HTML code\n \n $url = 'http://appslabs.net/mobile-brain-test/images/flags/' . $country_code . '.gif';\n $img = \"<img src=$url>\";\n \n return($img);\n}", "protected function getCountryByCode(string $code)\n {\n global $db;\n require_once DOL_DOCUMENT_ROOT.'/core/class/ccountry.class.php';\n $pays = new \\Ccountry($db);\n if ($pays->fetch(0, $code) > 0) {\n return $pays->id;\n }\n\n return false;\n }", "public static function getCountryByCode($code){\n return Country::findOne([ 'code'=> $code]);\n }", "public static function emoji_from_country_code(string $country_code_iso_3166_1): string\n {\n if ($country_code_iso_3166_1 === '') {\n return '';\n }\n\n if (self::strlen($country_code_iso_3166_1) !== 2) {\n return '';\n }\n\n $country_code_iso_3166_1 = \\strtoupper($country_code_iso_3166_1);\n\n $flagOffset = 0x1F1E6;\n $asciiOffset = 0x41;\n\n return (self::chr((self::ord($country_code_iso_3166_1[0]) - $asciiOffset + $flagOffset)) ?? '') .\n (self::chr((self::ord($country_code_iso_3166_1[1]) - $asciiOffset + $flagOffset)) ?? '');\n }", "protected function formatCountry($countryCode)\n {\n $countries = trans('geolocation::countries');\n\n return array_key_exists($countryCode, $countries) ? $countries[$countryCode] : $countryCode;\n }", "public function countryCode(): string\n {\n return $this->getData('CountryCodeISO3166A2');\n }", "abstract public function countryISOCode();", "public function getCountryCode()\n {\n return $this->code;\n }", "public function getCountry()\n {\n $arr_countries = array(\n 'F' =>\t_('Austria'),\n 'T' =>\t_('Belgium'),\n 'D' =>\t_('Finland'),\n 'E' =>\t_('France'),\n 'L' =>\t_('France'),\n 'P' =>\t_('Germany'),\n 'R' =>\t_('Germany'),\n 'N' =>\t_('Greece'),\n 'K' =>\t_('Ireland'),\n 'J' =>\t_('Italy'),\n 'G' =>\t_('Netherlands'),\n 'H' =>\t_('United Kingdom'),\n 'U' =>\t_('Portugal'),\n 'M' =>\t_('Spain'),\n );\n\n return $arr_countries[$this->str_value[0]];\n }", "public function getCountryCode(): string;", "public function findCountry($code)\n {\n\n $country = $this->em->getRepository('TTBundle:Airport')->findOneByAirportCode($code);\n\n return $country;\n }", "public function getCountry($country_code) {\n\t\t$SQL = 'SELECT country_name FROM country WHERE country_code=:country_code';\n\t\t$STMT = self::$_connection->prepare($SQL);\n\t\t$STMT->execute(['country_code'=>$country_code]);\n\t\treturn $STMT->fetch();\n\t}", "public function getCountry() : string {\n\t\t\treturn substr($this->value, 4, 2);\n\t\t}", "public function country(): string\n {\n return $this->country;\n }", "public function getCountryCode()\n {\n return $this->countryCode;\n }", "public function getCountryCode()\n {\n return $this->countryCode;\n }", "public function getCountryCode()\n {\n return $this->countryCode;\n }", "public function getCountry()\n {\n return isset($this->address_data['country']) ? $this->address_data['country'] : null;\n }", "public function getCountryCode()\n {\n return $this->country_code;\n }" ]
[ "0.6938896", "0.6765127", "0.66688985", "0.66329914", "0.66089135", "0.64887667", "0.6487301", "0.6464388", "0.64364856", "0.64127177", "0.63825023", "0.635371", "0.6349881", "0.6336349", "0.62748784", "0.62381095", "0.61727625", "0.6118596", "0.6111141", "0.60943353", "0.60930884", "0.6090048", "0.6087576", "0.6086795", "0.60774446", "0.6075289", "0.6075289", "0.6075289", "0.606894", "0.60685176" ]
0.75854194
0
Get Legal Document Type By RemarkTypeId
public function getLegalDocumentTypeByRemarkId ($remarkTypeId) { $legalDocumentType = 0; if ($remarkTypeId == ApplicationRemarkType::TYPE_FILE_BIR_PERMIT ) { $legalDocumentType = LegalDocumentType::TYPE_BIR_PERMIT; } else if ($remarkTypeId == ApplicationRemarkType::TYPE_FILE_MAYORS_PERMIT ) { $legalDocumentType = LegalDocumentType::TYPE_MAYORS_PERMIT; } else if ($remarkTypeId == ApplicationRemarkType::TYPE_FILE_DTI_SEC_PERMIT) { $legalDocumentType = LegalDocumentType::TYPE_DTI_SEC_PERMIT; } else if ($remarkTypeId == ApplicationRemarkType::TYPE_FILE_FORM) { $legalDocumentType = LegalDocumentType::TYPE_FORM_M11501; } else if ($remarkTypeId == ApplicationRemarkType::TYPE_FILE_SSS) { $legalDocumentType = LegalDocumentType::TYPE_SSS; } else if ($remarkTypeId == ApplicationRemarkType::TYPE_FILE_PAG_IBIG) { $legalDocumentType = LegalDocumentType::TYPE_PAG_IBIG; } else if ($remarkTypeId == ApplicationRemarkType::TYPE_FILE_POSTAL) { $legalDocumentType = LegalDocumentType::TYPE_POSTAL; } else if ($remarkTypeId == ApplicationRemarkType::TYPE_FILE_PASSPORT) { $legalDocumentType = LegalDocumentType::TYPE_PASSPORT; } else if ($remarkTypeId == ApplicationRemarkType::TYPE_FILE_DRIVERS_LICENSE) { $legalDocumentType = LegalDocumentType::TYPE_DRIVERS_LICENSE; } else if ($remarkTypeId == ApplicationRemarkType::TYPE_FILE_PRC) { $legalDocumentType = LegalDocumentType::TYPE_PRC; } else if ($remarkTypeId == ApplicationRemarkType::TYPE_FILE_VOTERS_ID) { $legalDocumentType = LegalDocumentType::TYPE_VOTERS_ID; } else if ($remarkTypeId == ApplicationRemarkType::TYPE_FILE_SCHOOL_ID) { $legalDocumentType = LegalDocumentType::TYPE_SCHOOL_ID; } else if ($remarkTypeId == ApplicationRemarkType::TYPE_FILE_TIN) { $legalDocumentType = LegalDocumentType::TYPE_TIN; } else if ($remarkTypeId == ApplicationRemarkType::TYPE_VALID_ID) { $legalDocumentType = LegalDocumentType::TYPE_VALID_ID; } return $legalDocumentType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocType();", "function readDocumentType($id){\n $obj = new DocumentType($id);\n if($obj->isNew()) return false; else return $obj;\n }", "public function setDocType($docType);", "public function getDocumentType() {\n\t\tif($this->document_type == 'DOCUMENT' && $this->document_id)\n\t\t\treturn Yii::t('store', $this->document->document_type);\n\t\telse\n\t\t\treturn Yii::t('store', $this->document_type);\n\t}", "public function getDocumentType()\n {\n return $this->document_type;\n }", "public function recurrenceTypeId(): RecurrenceTypeId;", "public function getDocumentType() {\n return $this->document['type'];\n }", "public function document_type() {\r\n\t\t$class = __CLASS__;\r\n\t\treturn (isset($class::_object()->document_type)) ? $class::_object()->document_type:null;\r\n }", "public function fetchDocumentByTypeAndId(string $type, string $docId, $prototype = null);", "public function setIdType(string $idType): static;", "function get_request_type($id_request_type){\n $this->db->where('id', $id_request_type);\n $query = $this->db->get('type_request');\n return($query->result());\n }", "public function get_type(): string;", "public function getDocumentType()\n {\n return $this->_documentType;\n }", "public function getCustomTypeId();", "public function get($typeId);", "public function get_type();", "public function getCompanyTypeDoc()\n {\n return $this->hasOne(CompanyTypeDocument::className(), ['id' => 'company_type_doc_id']);\n }", "private static final function getDocumentType () {\r\n // Do return ...\r\n return self::$objDocumentType;\r\n }", "public function getDocumentType()\n {\n $value = $this->get(self::DOCUMENTTYPE);\n return $value === null ? (integer)$value : $value;\n }", "public function pageType($typeOrId);", "public static function getType($recordId)\n\t{\n\t\t$metadata = Functions::getCRMRecordMetadata($recordId);\n\t\treturn $metadata ? $metadata['setype'] : null;\n\t}", "public function getTaxDocumentType()\n\t{\n\t\treturn $this->getIfSet('type', $this->data->taxDocument);\n\t}", "public function getTypeId()\n {\n return $this->get(self::_TYPE_ID);\n }", "function docTypeBelongsToField($iDocTypeID) {\n\t\tglobal $default;\n\t\treturn lookupField(\"$default->document_type_fields_table\", \"field_id\", \"document_type_id\", $iDocTypeID );\n\t}", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;", "public function getType(): string;" ]
[ "0.6941356", "0.6457717", "0.61338395", "0.60111564", "0.5937266", "0.5935095", "0.59086734", "0.5865947", "0.5862416", "0.5848411", "0.5792302", "0.57666224", "0.57645994", "0.5755874", "0.57437575", "0.56948435", "0.56588215", "0.5648785", "0.56168324", "0.5576396", "0.55717546", "0.55303925", "0.5527857", "0.551614", "0.55158067", "0.55158067", "0.55158067", "0.55158067", "0.55158067", "0.55158067" ]
0.7972749
0
Update Accreditation Application Type
public function updateApplicationType (AccreditationApplication $accreditationApplication, $accreditationApplicationTypeId, Store $store) { $accreditationReference = $this->em->getReference('YilinkerCoreBundle:AccreditationLevel', $accreditationApplicationTypeId); if(!is_null($accreditationReference)){ $store->setIsEditable(false); } $store->setAccreditationLevel($accreditationReference); $accreditationApplication->setAccreditationLevel($accreditationReference); $this->qrCodeGenerator->generateStoreQrCode($store, $store->getStoreSlug()); if(!is_null($accreditationReference)){ $this->elasticaObjectPersister->insertOne($store); } $this->em->flush(); return $accreditationApplication; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setApplicationIdentityType(?TeamworkApplicationIdentityType $value): void {\n $this->getBackingStore()->set('applicationIdentityType', $value);\n }", "function editApp($appid, $usertype, $date, $projtitle, $princinvest, $coprincinvest1, $princinvestdept, $princinvestphone, $email, $deadline, $grant, $exemption, $numA, $numB, $numC, $numD, $numF, $numG\n , $risks, $conA, $conB, $conC1, $conC2, $conC3, $desc, $benf, $reas, $ids) {\n $strQuery = \"update `irb-application` set Status='$usertype',DateSubmitted='$date', TitleOfProject='$projtitle',\n\t\t\t\t\t\tPrincipalInvestigator='$princinvest',CoPrincipalInvestigator='$coprincinvest1',\n PIDepartment='$princinvestdept',PIPhoneNo='$princinvestphone',Email='$email',\n GrantSource='$grant',GrantDeadline='$deadline',Exemption='$exemption',\n NumCharOfSubjects='$numA',SpecialClasses='$numB',HowRecruited='$numC',\n HowResProc='$numD',ReseachMethodClass='$numF',DataSources='$numG',\n ReseachIndepthProcedure='$risks',ExtentOfConf='$conA',PorcForHandlingData='$conB',\n HowDisseminated='$conC1',HowInformed='$conC2',HowConfProtected='$conC3',\n WillSubjectReward='$desc',WhatIntrinsicBenefits='$benf',FailedAppReason='$reas',CheckBoxArray='$ids'\" . \" where ApplicationID=$appid\";\n echo \"$strQuery\";\n return $this->query($strQuery);\n }", "private function update_type($new_type) { \n\n\t\tif ($this->_update_item('type',$new_type,'50')) { \n\t\t\t$this->type = $new_type;\n\t\t}\n\n\t}", "private function replaceDocumentTypeToAccessibleType(): void\n\t{\n\t\t$replaces = [\n\t\t\tStoreDocumentTable::TYPE_ARRIVAL => StoreDocumentTable::TYPE_STORE_ADJUSTMENT,\n\t\t\tStoreDocumentTable::TYPE_STORE_ADJUSTMENT => StoreDocumentTable::TYPE_ARRIVAL,\n\t\t];\n\n\t\tforeach ($replaces as $baseType => $anotherType)\n\t\t{\n\t\t\t$can = $this->accessController->checkByValue(ActionDictionary::ACTION_STORE_DOCUMENT_MODIFY, $baseType);\n\t\t\tif (!$can)\n\t\t\t{\n\t\t\t\t$this->canSelectDocumentType = false;\n\n\t\t\t\t// change current type\n\t\t\t\tif ($this->documentType === $baseType)\n\t\t\t\t{\n\t\t\t\t\t$can = $this->accessController->checkByValue(ActionDictionary::ACTION_STORE_DOCUMENT_MODIFY, $anotherType);\n\t\t\t\t\tif ($can)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->documentType = $anotherType;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "public function update(Request $request, Type $type)\n {\n //\n $request -> validate([\n 'name' => 'required'\n ]);\n\n Type::update($request->all());\n\n return redirect()->route('type')\n ->with('success','แก้ไขหมวดหมู่อัลบั้มสำเร็จ');\n }", "public function update(Request $request, Application $app)\n {\n if ($request->category_id==2||$request->category_id==3||$request->category_id==10||$request->category_id==1) {\n $type = ['application_type_id'=>1];\n } else if($request->category_id==4||$request->category_id==5||$request->category_id==7||$request->category_id==8||$request->category_id==9||$request->category_id==11||$request->category_id==12||$request->category_id==13) {\n $type = ['application_type_id'=>4];\n }else{\n $type = ['application_type_id'=>2];\n }\n\n for ($i=1; $i < 7; $i++) {\n Productivity::create([\n 'app_id' => $app->id,\n 'category_id' => $app->category_id,\n 'role_id'=>$i\n ]);\n }\n $data = array_merge($type,$request->all());\n Application::find($app->id)->update($data);\n return back()->with('success','Update berhasil!');\n }", "public function mf_application_type() {\n\n\t\t$args = array(\n\t\t\t'posts_per_page' => 2000,\n\t\t\t'post_type' => 'mf_form',\n\t\t\t'post_status' => 'any',\n\n\t\t\t// Prevent new posts from affecting the order\n\t\t\t'orderby' => 'ID',\n\t\t\t'order' => 'ASC',\n\n\t\t\t// Speed this up\n\t\t\t'no_found_rows' => true,\n\t\t\t'update_post_meta_cache' => false,\n\t\t\t'update_post_term_cache' => false,\n\t\t);\n\n\t\t// Get the first set of posts\n\t\t$query = new WP_Query( $args );\n\n\t\twhile ( $query->have_posts() ) : $query->the_post();\n\t\tglobal $post;\n\t\t\tsetup_postdata($post);\n\t\t\t//WP_CLI::line( get_the_title() );\n\t\t\t$json = json_decode( str_replace( array(\"\\'\", \"u03a9\", \"u2019\"), array(\"'\", '&#8486;', '&rsquo;'), get_the_content() ) );\n\t\t\t//WP_CLI::line( $json->form_type );\n\t\t\t$type = wp_set_object_terms( get_the_ID(), $json->form_type, 'type' );\n\t\t\tif ( is_array( $type ) ) {\n\t\t\t\tWP_CLI::success( 'Updated ' . get_the_title() );\n\t\t\t} elseif (is_wp_error( $type )) {\n\t\t\t\tWP_CLI::warning( 'Wasn\\'t able to update ' . get_the_title() );\n\t\t\t}\n\t\tendwhile;\n\t\tWP_CLI::success( \"Boom!\" );\n\t\t\n\t}", "public function update(Request $request, Type $type)\n {\n //\n }", "public function update(Request $request, Type $type)\n {\n //\n }", "function updateRegistrationType(&$registrationType) {\n\t\t$expiryDate = $registrationType->getExpiryDate();\n\t\t$returner = $this->update(\n\t\t\tsprintf('UPDATE registration_types\n\t\t\t\tSET\n\t\t\t\t\tsched_conf_id = ?,\n\t\t\t\t\tcost = ?,\n\t\t\t\t\tcurrency_code_alpha = ?,\n\t\t\t\t\topening_date = %s,\n\t\t\t\t\tclosing_date = %s,\n\t\t\t\t\texpiry_date = %s,\n\t\t\t\t\taccess = ?,\n\t\t\t\t\tinstitutional = ?,\n\t\t\t\t\tmembership = ?,\n\t\t\t\t\tpub = ?,\n\t\t\t\t\tseq = ?,\n\t\t\t\t\tcode = ?\n\t\t\t\tWHERE type_id = ?',\n\t\t\t\t$this->dateToDB($registrationType->getOpeningDate()),\n\t\t\t\t$this->datetimeToDB($registrationType->getClosingDate()),\n\t\t\t\t$expiryDate === null?'null':$this->datetimeToDB($expiryDate)\n\t\t\t), array(\n\t\t\t\t(int) $registrationType->getSchedConfId(),\n\t\t\t\t(float) $registrationType->getCost(),\n\t\t\t\t$registrationType->getCurrencyCodeAlpha(),\n\t\t\t\t(int) $registrationType->getAccess(),\n\t\t\t\t(int) $registrationType->getInstitutional(),\n\t\t\t\t(int) $registrationType->getMembership(),\n\t\t\t\t(int) $registrationType->getPublic(),\n\t\t\t\t(float) $registrationType->getSequence(),\n\t\t\t\t$registrationType->getCode(),\n\t\t\t\t(int) $registrationType->getTypeId()\n\t\t\t)\n\t\t);\n\t\t$this->updateLocaleFields($registrationType);\n\t\treturn $returner;\n\t}", "public function update(Request $request, Ctype $ctype)\n {\n //\n }", "public function updateExpenseTypes()\n {\n $this->validate([\n 'name' => ['required', Rule::unique('expense_types')->ignore($this->expenseType->id)],\n 'description' => 'nullable',\n ]);\n\n $this->expenseType->update([\n 'name' => mb_strtolower($this->name),\n 'description' => mb_strtolower($this->description),\n ]);\n\n session()->flash('success', 'You have successfully updated an expenseType.');\n\n return redirect(route('breed-types.index'));\n }", "public function setConfigurationAccountType(?SecureAssessmentAccountType $value): void {\n $this->getBackingStore()->set('configurationAccountType', $value);\n }", "function InfUpdateAffCode($inf_aff_id, $inf_aff_code) {\n\n\t$affiliate = new Infusionsoft_Affiliate();\n\t$affiliate->Id = $inf_aff_id;\n\t$affiliate->AffCode = $inf_aff_code;\n\t$affiliate->save(); // Update affiliate in Infusionsoft\n}", "public function update(Request $request, Access_Code $access_Code)\n {\n //\n }", "public function saveAccreditationAction()\n {\n $site_id = $this->_getParam(\"site_id\");\n $site = \\Fisdap\\EntityUtils::getEntity(\"SiteLegacy\", $site_id);\n $form_data = $this->_getParam(\"form_data\");\n \n $form = new Account_Form_Accreditation($site);\n \n $process_result = $form->process($form_data);\n \n if ($process_result['success'] === true) {\n $success = \"true\";\n $html_res = \"<div class='success'>Your accreditation info has been saved.</div>\";\n } else {\n $errors = $this->formatFormErrors($process_result);\n $success = \"false\";\n $html_res = $errors['html'];\n }\n \n $this->_helper->json(array(\"success\" => $success, \"result\" => $html_res, \"form_elements_with_errors\" => $errors['elements']));\n }", "public function update($id, TypeRequest $request)\n {\n\n $updatedType = $this->typeRepo->update($id, $request->all());\n\n if ($updatedType) {\n\n \\Session::flash('success', 'Apprasial order Type was successfully updated!');\n\n return redirect()->route('admin.appraisal.appr-types.index');\n \n } else {\n\n \\Session::flash('error', 'Something was wrong!');\n\n return redirect()->route('admin.appraisal.appr-types.index');\n }\n }", "public function update(Request $request, PermitType $permit_type)\n {\n $data = $request->validate([\n 'abbreviation' => 'string|required',\n 'name' => 'string'\n ]);\n\n $permit_type->Abbreviation = $data['abbreviation'];\n\n if ($request->has('name'))\n $permit_type->Name = $data['name'];\n\n $permit_type->save();\n\n return response()->json([\n 'message' => lang('update_successful')\n ], 200);\n }", "function update_card_type($CardTypeID,$params)\n {\n $this->db->where('CardTypeID',$CardTypeID);\n return $this->db->update('card_types',$params);\n }", "public function update(Request $request, $type, Ckp $ckp)\n {\n if ($request->issend == \"1\") {\n $request->validate([\n 'activityname.*' => 'required',\n 'activityunit.*' => 'required',\n 'activitytarget.*' => 'required|numeric|min:0',\n 'activityreal.*' => 'required|numeric|min:0',\n ]);\n\n $ckp->status_id = '3';\n $ckp->save();\n\n $submittedckp = new SubmittedCkp;\n //$submittedckp->assessor_id = User::where('department_id', $ckp->user->department->parent->id)->first()->id;\n $submittedckp->assessor_id = $ckp->user->assessor->id;\n $submittedckp->ckp_id = $ckp->id;\n $submittedckp->status_id = '3';\n $submittedckp->save();\n } else {\n $ckp->status_id = '2';\n $ckp->save();\n }\n\n if ($request->removedactivity) {\n ActivityCkp::whereIn('id', $request->removedactivity)->delete();\n }\n\n for ($i = 0; $i < count($request->activityname); $i++) {\n $activity = new ActivityCkp;\n if ($request->activityid[$i]) {\n $activity = ActivityCkp::find($request->activityid[$i]);\n }\n $activity->type = $request->activitytype[$i];\n $activity->name = $request->activityname[$i];\n $activity->unit = $request->activityunit[$i];\n $activity->target = $request->activitytarget[$i];\n $activity->creditcode = $request->activitycreditcode[$i];\n $activity->credit = $request->activitycredit[$i];\n if ($type == 'ckpr') {\n $activity->real = $request->activityreal[$i];\n $activity->quality = '100';\n }\n $activity->note = $request->activitynote[$i];\n $activity->ckp_id = $ckp->id;\n $activity->save();\n }\n\n if ($request->issend == \"1\") {\n return redirect('/ckps')->with('success-send', 'CKP sudah dikirim dan sedang dalam proses penilaian!');\n } else {\n if ($type == 'ckpt') {\n return redirect('/ckps/ckpt/' . $ckp->id . '/edit')->with('success-save', 'CKP sudah disimpan!');\n } else if ($type == 'ckpr') {\n return redirect('/ckps/ckpr/' . $ckp->id . '/edit')->with('success-save', 'CKP sudah disimpan!');\n } else {\n abort(404);\n }\n }\n }", "public function update(TypeStoreRequest $request, types $type)\n {\n $type->update([\n 'type_id' => $request->type_id,\n 'type_name' => $request->type_name,\n // 'password' => Hash::make($request->password),\n ]);\n return redirect()->route('types.index')->with('message','Type updated Successfully');\n }", "public function editAction()\r\n {\r\n $this->logger->log('editAction page invoked', Zend_Log::DEBUG);\r\n\r\n $config = new Zend_Config_Ini(APPLICATION_PATH . '/configs/pagination.ini', APPLICATION_ENV);\r\n $maxElements = $config->list->attribute->size;\r\n\r\n $typeId = $this->_getParam('citypeId');\r\n $this->elementId = $typeId;\r\n $citypeServiceUpdate = new Service_Citype_Update($this->translator, $this->logger, parent::getUserInformation()->getThemeId());\r\n $attributes = $citypeServiceUpdate->getAttributes();\r\n $relations = $citypeServiceUpdate->getRelations();\r\n\r\n $citypeServiceGet = new Service_Citype_Get($this->translator, $this->logger, parent::getUserInformation()->getThemeId());\r\n $this->logger->log('getCiTypeData:' . $typeId, Zend_Log::DEBUG);\r\n $dbData = $citypeServiceGet->getCiTypeData($typeId);\r\n $this->elementId = $dbData[Db_CiType::NAME];\r\n\r\n\r\n $form = $citypeServiceUpdate->getUpdateCiTypeForm($typeId, $attributes, $relations, $dbData['defaultProject'], $maxElements);\r\n\r\n if ($this->_request->isPost()) {\r\n $newFormData = $this->_request->getPost();\r\n $newFormData['icon'] = $form->getValue('icon');\r\n if ($form->isValid($newFormData)) {\r\n $this->logger->log('Form is valid', Zend_Log::DEBUG);\r\n\r\n $notification = array();\r\n try {\r\n $check = $citypeServiceUpdate->updateCiType($typeId, $newFormData, $dbData);\r\n parent::clearNavigationCache();\r\n if ($check) $notification['success'] = $this->translator->translate('ciTypeUpdateSuccess');\r\n } catch (Exception_Citype_Unknown $e) {\r\n $this->logger->log('User \"' . parent::getUserInformation()->getId() . '\" encountered an unknownen error while updating CiType \"' . $attributeGroupId . '\" ', Zend_Log::ERR);\r\n $notification['error'] = $this->translator->translate('ciTypeUpdateFailed');\r\n } catch (Exception_Citype_UpdateFailed $e) {\r\n $this->logger->log('User \"' . parent::getUserInformation()->getId() . '\" failed to update CiType \"' . $attributeGroupId . '\" ', Zend_Log::ERR);\r\n $notification['error'] = $this->translator->translate('ciTypeUpdateFailed');\r\n } catch (Exception_Citype_WrongIconType $e) {\r\n $this->logger->log('User \"' . parent::getUserInformation()->getId() . '\" failed to update CiType \"' . $attributeGroupId . '\", icon file type wrong!', Zend_Log::ERR);\r\n $notification['error'] = $this->translator->translate('citypeWrongIconType');\r\n } catch (Exception_Citype_UpdateItemNotFound $e) {\r\n $this->logger->log('User \"' . parent::getUserInformation()->getId() . '\" failed to update CiType \"' . $attributeGroupId . '\". No items where updated!', Zend_Log::ERR);\r\n $notification['error'] = $this->translator->translate('ciTypeUpdateFailed');\r\n }\r\n\r\n $this->_helper->FlashMessenger($notification);\r\n $this->_redirect('citype/index');\r\n } else {\r\n $form->populate($newFormData);\r\n }\r\n } else {\r\n\r\n $form->populate($dbData);\r\n }\r\n\r\n $c = 0;\r\n\r\n $this->view->parent = $dbData['parentCiType'];\r\n\r\n if (isset($dbData['addAttribute_20']))\r\n $c = 1;\r\n if (isset($dbData['addAttribute_40']))\r\n $c = 2;\r\n\r\n $this->view->storedIcon = $dbData['icon'];\r\n $this->view->maxElements = $maxElements;\r\n $this->view->c = $c;\r\n $this->view->attributes = $attributes;\r\n $this->view->relations = $relations;\r\n $this->view->form = $form;\r\n }", "function affwp_admin_update_affiliate_program( $affiliate, $updated ) {\n\n\tif ( $updated ) {\n\n\t\t$affiliate_id = $affiliate->affiliate_id;\n\n\t\tif ( ! empty( $_POST['program'] ) ) {\n\n\t\t\t$program = sanitize_text_field( $_POST['program'] );\n\n\t\t\taffwp_update_affiliate_meta( $affiliate_id, 'program', $program );\n\n\t\t} else {\n\n\t\t\taffwp_delete_affiliate_meta( $affiliate_id, 'program' );\n\n\t\t}\n\t}\n\n}", "public function getAccType()\n {\n return $this->acc_type;\n }", "public function actionUpdate()\r\n {\r\n $model=Settings::findOne(1);\r\n\r\n \r\n if ($model->load(Yii::$app->request->post())) \r\n {\r\n $model->code=strtolower($model->code);\r\n if($model->save())\r\n {\r\n Yii::$app->session->setFlash('success','Account Updated');\r\n return $this->redirect(['/site/index']);\r\n }\r\n else\r\n {\r\n print_r($model->errors); exit;\r\n }\r\n } \r\n else \r\n {\r\n Yii::$app->view->title=\"Update Account Info\";\r\n return $this->render('update', [\r\n 'model' => $model,\r\n ]);\r\n }\r\n \r\n\r\n }", "public function update(Request $request, ExamType $examType)\n {\n $request->validate([\n \"name\" => \"required|string|max:255\",\n \"slug\" => \"required|string|max:255|unique:exam_types,slug,\" . $examType->id,\n ]);\n $data = [\n \"name\" => $request->name,\n \"slug\" => $request->slug\n ];\n if ($examType->update($data)) {\n Toastr::success('Successfully Exam Type Updated', \"Success\");\n } else {\n Toastr::error('Something Went Wrong!', \"Error\");\n }\n return back();\n }", "public function edit(Type $type)\n {\n //\n }", "public function edit(Type $type)\n {\n //\n }", "public function edit(Type $type)\n {\n //\n }", "public function getAccidentType()\n {\n return $this->accidentType;\n }" ]
[ "0.5755849", "0.56772304", "0.565952", "0.5540196", "0.5482525", "0.5469314", "0.5304715", "0.53039974", "0.53039974", "0.5302946", "0.52719194", "0.5254388", "0.52502245", "0.52392447", "0.5219835", "0.521965", "0.5203743", "0.51803476", "0.51655036", "0.51630604", "0.5161146", "0.51611304", "0.51556957", "0.5143421", "0.5133631", "0.5130508", "0.5126644", "0.5126644", "0.5126644", "0.51260674" ]
0.71197236
0
Get Application Completion Percentage
public function getApplicationCompletionPercentage (AccreditationApplication $accreditationApplication = null, $legalDocuments = null) { $progress = 0; if ($accreditationApplication !== null) { if ((bool)$accreditationApplication->getIsBusinessApproved() === true) { $progress = AccreditationApplication::BUSINESS_INFORMATION_PERCENTAGE; } if ((bool)$accreditationApplication->getIsBankApproved() === true) { $progress += AccreditationApplication::BANK_INFORMATION_PERCENTAGE; } if ($legalDocuments !== null && sizeof($legalDocuments) > 0) { foreach ($legalDocuments as $legalDocument) { $legalDocumentTypeId = $legalDocument->getLegalDocumentType()->getLegalDocumentTypeId(); $isApproved = (bool)$legalDocument->getIsApproved(); if ( (int) $legalDocumentTypeId === LegalDocumentType::TYPE_DTI_SEC_PERMIT && $isApproved) { $progress += AccreditationApplication::DTI_FILE_PERCENTAGE; } else if ( (int) $legalDocumentTypeId === LegalDocumentType::TYPE_MAYORS_PERMIT && $isApproved === true) { $progress += AccreditationApplication::MAYORS_FILE_PERCENTAGE; } else if ( (int) $legalDocumentTypeId === LegalDocumentType::TYPE_BIR_PERMIT && $isApproved === true) { $progress += AccreditationApplication::BIR_FILE_PERCENTAGE; } else if ( (int) $legalDocumentTypeId === LegalDocumentType::TYPE_FORM_M11501 && $isApproved === true) { $progress += AccreditationApplication::FORM_FILE_PERCENTAGE; } else if ( (int) $legalDocumentTypeId === LegalDocumentType::TYPE_SSS && $isApproved === true) { $progress += AccreditationApplication::SSS_PERCENTAGE; } else if ( (int) $legalDocumentTypeId === LegalDocumentType::TYPE_PAG_IBIG && $isApproved === true) { $progress += AccreditationApplication::PAGIBIG_PERCENTAGE; } else if ( (int) $legalDocumentTypeId === LegalDocumentType::TYPE_POSTAL&& $isApproved === true) { $progress += AccreditationApplication::POSTAL_PERCENTAGE; } else if ( (int) $legalDocumentTypeId === LegalDocumentType::TYPE_PASSPORT && $isApproved === true) { $progress += AccreditationApplication::PASSPORT_PERCENTAGE; } else if ( (int) $legalDocumentTypeId === LegalDocumentType::TYPE_DRIVERS_LICENSE && $isApproved === true) { $progress += AccreditationApplication::DRIVERS_PERCENTAGE; } else if ( (int) $legalDocumentTypeId === LegalDocumentType::TYPE_PRC && $isApproved === true) { $progress += AccreditationApplication::PRC_PERCENTAGE; } else if ( (int) $legalDocumentTypeId === LegalDocumentType::TYPE_VOTERS_ID && $isApproved === true) { $progress += AccreditationApplication::VOTERS_PERCENTAGE; } else if ( (int) $legalDocumentTypeId === LegalDocumentType::TYPE_SCHOOL_ID && $isApproved === true) { $progress += AccreditationApplication::SCHOOL_PERCENTAGE; } } } } return $progress; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function completions() {\n\t\t$completions_calc = $this->_completions/$this->_attempts;\n\t\t// Other NFL QBR specific manipulations\n\t\t$completions_calc -= .3;\n\t\tif ($completions_calc * 5 < 0) {\n\t\t\t$completions_calc = 0;\n\t\t} elseif ($completions_calc * 5 > 2.375) {\n\t\t\t$completions_calc = 2.375;\n\t\t} else {\n\t\t\t$completions_calc *= 5;\n\t\t}\n\t\treturn $completions_calc;\n\t}", "public function get_percentage_complete() {\n\t\t$percentage = affwp_calculate_percentage( $this->get_current_count(), $this->get_total_count() );\n\n\t\tif ( $percentage > 100 ) {\n\t\t\t$percentage = 100;\n\t\t}\n\n\t\treturn $percentage;\n\t}", "public function get_percentage_complete() {\n\t\t$args = $this->get_donation_argument( array( 'number' => - 1, 'output' => '' ) );\n\t\tif ( isset( $args['page'] ) ) {\n\t\t\tunset( $args['page'] );\n\t\t}\n\t\t$query = give_get_payments( $args );\n\t\t$total = count( $query );\n\t\t$percentage = 100;\n\t\tif ( $total > 0 ) {\n\t\t\t$percentage = ( ( 30 * $this->step ) / $total ) * 100;\n\t\t}\n\t\tif ( $percentage > 100 ) {\n\t\t\t$percentage = 100;\n\t\t}\n\n\t\treturn $percentage;\n\t}", "public function getPercentOfCompletedProfile(){\n $pendingCount = $this->getPendingNotificationCount();\n $notificationCount = $this->getNotificationCount();\n $completedCount = $notificationCount - $pendingCount;\n return round(($completedCount * 100.0) / $notificationCount);\n }", "public function getPercentCompleted()\n {\n return $this->percent_completed;\n }", "public function getPercentComplete()\n {\n if (array_key_exists(\"percentComplete\", $this->_propDict)) {\n return $this->_propDict[\"percentComplete\"];\n } else {\n return null;\n }\n }", "function getGoalPercent(){\n $goal = $GLOBALS['GOAL_STEPS'];\n $cursteps = getCurrentSteps();\n $percent = ( $cursteps[0]['steps'] / $goal ) * 100;\n return round($percent);\n}", "public function getPercentageComplete()\n {\n if (array_key_exists(\"percentageComplete\", $this->_propDict)) {\n return $this->_propDict[\"percentageComplete\"];\n } else {\n return null;\n }\n }", "public function getAchievementsPercentage() {\n return $this->getAchievementsDone() / sizeof($this->achievements);\n }", "public function getIptPercent();", "function usp_ews_get_progess_percentage($events, $attempts) {\n $attemptcount = 0;\n\n\t$count_events = count($events);\n foreach($events as $event) {\n if($attempts[$event['type'].$event['id']] == 1) {\n $attemptcount++;\n }\n }\n\t$progressvalue = ($attemptcount==0 || $count_events==0) ? 0 : $attemptcount / $count_events;\n\n return (int)($progressvalue * 100);\n}", "public function getPercent()\n {\n return $this->helper->getPercent();\n }", "function usp_ews_find_color_percentage($mycompletion){\n\t\t\n\t\tif($mycompletion <= EWS_DEFAULT_UNSATISFACTORY_INDEX){\n\t\t\t$color = get_string('notAttempted_colour', 'block_usp_ews');\n\t\t}else if($mycompletion > EWS_DEFAULT_SATISFACTORY_INDEX){\n\t\t\t$color = get_string('attempted_colour', 'block_usp_ews');\n\t\t}else{\n\t\t\t$color = get_string('amber_colour', 'block_usp_ews');\n\t\t}\n\t\treturn $color;\n\n}", "function getGameProgression()\n {\n // With the mini game number we divide the game in 3 thirds (0-33,\n // 33-66, 66-100%), and looking at the player discs we can further\n // divide each third: each disc on an agentarea counts as a 1/9th\n // solved case; each disc on a locslot as a 1/3rd solve case. We\n // average that over the player count, and thus get the in-minigame\n // progress.\n $base = (self::getGameStateValue(\"minigame\") - 1) * (100 / $this->constants['MINIGAMES']);\n $base = max(0, $base);\n $discs_on_agentarea = count($this->tokens->getTokensOfTypeInLocation('disc_%', 'agentarea_%'));\n $discs_on_locslot = count($this->tokens->getTokensOfTypeInLocation('disc_%', 'locslot_%'));\n $perc_cases_solved = 0;\n $perc_cases_solved += $discs_on_agentarea * (1/9);\n $perc_cases_solved += $discs_on_locslot * (1/3);\n $minigame_progress = $perc_cases_solved / self::getPlayersNumber();\n $progress = $base + ($minigame_progress * 33);\n return floor($progress);\n }", "public function getUsagePercentage()\n {\n return $this->usagePercentage;\n }", "public function getUsagePercent() : float\n\t{\n\t\treturn $this->usagePercent;\n\t}", "public function calculate_coupon_background_progress() {\n\t\t\t$progress = array();\n\n\t\t\t$start_time = get_site_option( 'start_time_woo_sc', false );\n\t\t\t$current_time = get_site_option( 'current_time_woo_sc', false );\n\t\t\t$all_tasks_count = get_site_option( 'all_tasks_count_woo_sc', false );\n\t\t\t$remaining_tasks_count = get_site_option( 'remaining_tasks_count_woo_sc', false );\n\n\t\t\t$percent_completion = floatval( 0 );\n\t\t\tif ( false !== $all_tasks_count && false !== $remaining_tasks_count ) {\n\t\t\t\t$percent_completion = ( ( intval( $all_tasks_count ) - intval( $remaining_tasks_count ) ) * 100 ) / intval( $all_tasks_count );\n\t\t\t\t$progress['percent_completion'] = floatval( $percent_completion );\n\t\t\t}\n\n\t\t\tif ( $percent_completion > 0 && false !== $start_time && false !== $current_time ) {\n\t\t\t\t$time_taken_in_seconds = $current_time - $start_time;\n\t\t\t\t$time_remaining_in_seconds = ( $time_taken_in_seconds / $percent_completion ) * ( 100 - $percent_completion );\n\t\t\t\t$progress['remaining_seconds'] = ceil( $time_remaining_in_seconds );\n\t\t\t}\n\n\t\t\treturn $progress;\n\t\t}", "public function getPercent()\n {\n return $this->percent;\n }", "public function getPercent() {\n return $this->percent;\n }", "public function calculatePercentage() {\n $questionCountAnswered = $this->questionAnalytics->getCountAnswered();\n if ($questionCountAnswered === 0) { //prevent division by 0 error\n $this->percentSelected = 0;\n }\n else {\n $percentSelected = $this->countAnswered / $questionCountAnswered * 100;\n $this->percentSelected = round($percentSelected, 0);\n }\n }", "public function progress()\n {\n return $this->totalsportevents > 0 ? round(($this->processedsportevents() / $this->totalsportevents) * 100) : 0;\n }", "public function getPercentage()\n {\n return $this->percentage;\n }", "public static function percent($suiteResults) {\n $sum = $suiteResults['pass'] + $suiteResults['fail'];\n return round($suiteResults['pass'] * 100 / max($sum, 1), 2);\n }", "public function test_course_progress_percentage_with_just_activities() {\n global $DB;\n\n // Add a course that supports completion.\n $course = $this->getDataGenerator()->create_course(array('enablecompletion' => 1));\n\n // Enrol a user in the course.\n $user = $this->getDataGenerator()->create_user();\n $studentrole = $DB->get_record('role', array('shortname' => 'student'));\n $this->getDataGenerator()->enrol_user($user->id, $course->id, $studentrole->id);\n\n // Add four activities that use completion.\n $assign = $this->getDataGenerator()->create_module('assign', array('course' => $course->id),\n array('completion' => 1));\n $data = $this->getDataGenerator()->create_module('data', array('course' => $course->id),\n array('completion' => 1));\n $this->getDataGenerator()->create_module('forum', array('course' => $course->id),\n array('completion' => 1));\n $this->getDataGenerator()->create_module('forum', array('course' => $course->id),\n array('completion' => 1));\n\n // Add an activity that does *not* use completion.\n $this->getDataGenerator()->create_module('assign', array('course' => $course->id));\n\n // Mark two of them as completed for a user.\n $cmassign = get_coursemodule_from_id('assign', $assign->cmid);\n $cmdata = get_coursemodule_from_id('data', $data->cmid);\n $completion = new completion_info($course);\n $completion->update_state($cmassign, COMPLETION_COMPLETE, $user->id);\n $completion->update_state($cmdata, COMPLETION_COMPLETE, $user->id);\n\n // Check we have received valid data.\n // Note - only 4 out of the 5 activities support completion, and the user has completed 2 of those.\n $this->assertEquals('50', \\core_completion\\progress::get_course_progress_percentage($course, $user->id));\n }", "public function getProgress()\n\t{\n\t\treturn 0;\n\t}", "public function profile_completion() {\n\n $count_empty = '';\n return $count_empty;\n }", "public function getProcessFeesPercent()\r\n {\r\n return $this->process_fees_percent;\r\n }", "public function getPercentLevel()\n { \n $experience_level = $this->getExperienceShortMax();\n\n $experience_current_level = $this->getExperienceShort();\n\n $percent = ($experience_current_level * 100)/$experience_level;\n\n return $percent;\n }", "protected function getProgressAttribute()\n {\n $startdate = Carbon::parse($this->listed_at);\n $enddate = Carbon::parse($this->expired_at);\n $now = Carbon::now();\n\n if($now >= $enddate) {\n return 100;\n }\n\n return number_format(($startdate->diffInDays($now) / $startdate->diffInDays($enddate)) * 100, 0);\n }", "public function percentageParticipation()\n {\n $expectedPartipant = $this->getExpectedParticipants();\n if (count($expectedPartipant) == 0) {\n return 0;\n }\n $actualParticipant = $this->users()\n ->where('users.role_id', Role::findBySlug('PART')->id)\n ->orWhere('users.role_id', Role::findBySlug('GEST')->id)\n ->get()->unique();\n return round((count($actualParticipant) / count($expectedPartipant)) * 100);\n }" ]
[ "0.6884999", "0.67731214", "0.6702122", "0.6677123", "0.6529506", "0.6520701", "0.6495131", "0.6405681", "0.6253002", "0.6239268", "0.6070016", "0.6059016", "0.60315907", "0.5914786", "0.59082884", "0.5845962", "0.58259296", "0.5804386", "0.57900715", "0.5783191", "0.5777193", "0.57496566", "0.5718898", "0.5689251", "0.5677458", "0.5668826", "0.5653384", "0.56264246", "0.56027806", "0.55714023" ]
0.71300673
0
Get Application Type by store type
public function getApplicationTypeByStoreType ($storeType) { if ( (int) $storeType === AccreditationApplication::SELLER_TYPE_RESELLER) { $storeType = AccreditationApplication::SELLER_TYPE_RESELLER; } else { $storeType = AccreditationApplication::SELLER_TYPE_MERCHANT; } return $storeType; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAppType();", "public function getApplicationType()\n {\n return $this->applicationType;\n }", "protected function getAppUuid($type, $store)\n {\n $url = \"\";\n if ($type ==\"sketch\") {\n $url = $this->_codesHelper->getSketchUrl($store);\n }\n if ($type ==\"photo\") {\n $url = $this->_codesHelper->getImpreseeUuid($store);\n }\n return $this->_codesHelper->getCode($url);\n }", "final public function getType() {\n\t\treturn 'app';\n\t}", "public static function getRunType()\n {\n return 'store';\n }", "public function getStoreByCode($store)\n {\n if (is_null($this->_stores)) {\n $this->_stores = Mage::app()->getStores(true, true);\n }\n if (isset($this->_stores[$store])) {\n return $this->_stores[$store];\n }\n return false;\n }", "private function type($type) {\n\t\t$t = $this->api_map[$type];\n\t\t$t[\"url\"] = $this->get(\"store_url\") . $t[\"url\"] . \"?api_key=\".$this->get(\"api_key\");\n\t\treturn $t;\n\t}", "public function getProductType();", "public function get_type();", "public static function getTypeName($type = ''): string\n {\n switch ($type) {\n case '':\n $type = 'app_id';\n break;\n case 'app':\n $type = 'appid';\n break;\n default:\n $type = $type.'_id';\n }\n\n return $type;\n }", "private function getThemeConfigKey($type = '') {\n if (strcasecmp($type, 'desktop') === 0) {\n $type = '';\n }\n $r = 'Garden.'.ucfirst($type).'Theme';\n return $r;\n }", "public function getThemeKey($type = '') {\n if ($type === 'mobile') {\n $r = $this->config->get('Garden.MobileTheme', AddonManager::DEFAULT_MOBILE_THEME);\n } else {\n $r = $this->config->get('Garden.Theme', AddonManager::DEFAULT_DESKTOP_THEME);\n }\n return $r;\n }", "public function get_type(): string;", "final public function getBackendByType($type) {\n\t\t$type = mb_strtolower($type);\n\t\tif (!array_key_exists($type, $this->map))\n\t\t\treturn NULL;\n\t\treturn $this->map[$type];\n\t}", "public function getDatabaseType();", "public function getDatabaseType();", "public function getCheckoutType($store = null)\n {\n return $this->getVersionConfig($store)->getType();\n }", "function get_type() {\n\t\treturn $this->get_data( 'type' );\n\t}", "public function getType(){\n return ucfirst(array_search($this->type, self::userTypes()));\n }", "public function checkBookType($type = null){\n $result = $this->find()\n ->where(['alias'=> $type]) ->first();;\n return $result;\n }", "public function mf_application_type() {\n\n\t\t$args = array(\n\t\t\t'posts_per_page' => 2000,\n\t\t\t'post_type' => 'mf_form',\n\t\t\t'post_status' => 'any',\n\n\t\t\t// Prevent new posts from affecting the order\n\t\t\t'orderby' => 'ID',\n\t\t\t'order' => 'ASC',\n\n\t\t\t// Speed this up\n\t\t\t'no_found_rows' => true,\n\t\t\t'update_post_meta_cache' => false,\n\t\t\t'update_post_term_cache' => false,\n\t\t);\n\n\t\t// Get the first set of posts\n\t\t$query = new WP_Query( $args );\n\n\t\twhile ( $query->have_posts() ) : $query->the_post();\n\t\tglobal $post;\n\t\t\tsetup_postdata($post);\n\t\t\t//WP_CLI::line( get_the_title() );\n\t\t\t$json = json_decode( str_replace( array(\"\\'\", \"u03a9\", \"u2019\"), array(\"'\", '&#8486;', '&rsquo;'), get_the_content() ) );\n\t\t\t//WP_CLI::line( $json->form_type );\n\t\t\t$type = wp_set_object_terms( get_the_ID(), $json->form_type, 'type' );\n\t\t\tif ( is_array( $type ) ) {\n\t\t\t\tWP_CLI::success( 'Updated ' . get_the_title() );\n\t\t\t} elseif (is_wp_error( $type )) {\n\t\t\t\tWP_CLI::warning( 'Wasn\\'t able to update ' . get_the_title() );\n\t\t\t}\n\t\tendwhile;\n\t\tWP_CLI::success( \"Boom!\" );\n\t\t\n\t}", "public function get_type() {\n\t\treturn 'catalog';\n\t}", "public function phpunit_get_store_class() {\n return get_class($this->get_store());\n }", "public function phpunit_get_store_class() {\n return get_class($this->get_store());\n }", "public function phpunit_get_store_class() {\n return get_class($this->get_store());\n }", "function getType(): string;", "function getType(): string;", "protected function _getShopSystemType()\n {\n switch ($this->_getEdition()) {\n case self::TYPE_COMMUNITY:\n $type = 76;\n break;\n case self::TYPE_ENTERPRISE:\n $type = 228;\n break;\n case self::TYPE_GO:\n $type = 229;\n break;\n default:\n $type = null;\n }\n\n return $type;\n }", "public function get_item_type() {\n $query = $this->db->get('item_type');\n if ($query->num_rows() > 0) {\n return $query->result();\n } else {\n return false;\n }\n }", "public function get(string $type): mixed\n {\n if (array_key_exists($type, $this->store)) {\n return $this->store[$type];\n }\n\n return $this->getBinding($type)\n ->getInstance();\n }" ]
[ "0.7872113", "0.6817175", "0.6235384", "0.60161245", "0.5928851", "0.5903828", "0.5883104", "0.5837614", "0.5820838", "0.58197296", "0.5815476", "0.577914", "0.57312566", "0.5672414", "0.5671038", "0.5671038", "0.5614743", "0.5598212", "0.5597602", "0.5563028", "0.5542724", "0.5519884", "0.5516678", "0.5516678", "0.5516678", "0.5502335", "0.5502335", "0.5499164", "0.54984003", "0.54958093" ]
0.7433134
1
Add City ID to error message
protected function getErrorWithCityId(FreeShippingInterface $city, $errorText) { return '[City ID: ' . $city->getCityId() . '] ' . $errorText; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function message()\n {\n return 'The Category id is invalid.';\n }", "public function message()\n {\n return 'The report location is invalid because there is an active existing report already in the area. Please don\\'t create duplicate reports.';\n }", "public function message()\n {\n return 'Invalid Category Id';\n }", "protected function getErrorWithTermId(\\Formax\\MortgageSimulator\\Model\\Term $term, $errorText)\n {\n return '[FormCrud ID: ' . $term->getId() . '] ' . $errorText;\n }", "public function message()\n {\n return 'Town already exist.';\n }", "public function cityname_validation($city) {\n $this->form_validation->set_message('cityname_validation', 'The %s field is not valid City or Destination Code');\n\n preg_match_all('/\\(([A-Za-z0-9 ]+?)\\)/', $city, $out);\n $cityCode = $out[1];\n\n if (!empty($cityCode))\n return TRUE;\n else\n return FALSE;\n }", "public function __construct($city_id)\n {\n $this->city_id = $city_id;\n }", "public function message()\n {\n return 'The postcode not valid';\n }", "public function message()\n {\n return trans('validation.custom.phone.error');\n }", "public function message()\n {\n return 'Given term id is not a role id.';\n }", "function error_label($errors, $name) {\n //create span for the error message to appear (of class 'error_message')\n echo \"<br> <span id=\\\"$name\\\" class=\\\"error_message\\\">\";\n\n //Check if an error has occurred for the field\n if (isset($errors[$name])) {\n //input code of error message if error had occurred for the field\n echo $errors[$name];\n }\n echo '</span>';\n}", "public function message()\n {\n return 'Wrong Address';\n }", "protected function createValidationErrorMessage() {}", "private function errorMessages()\n {\n return [\n 'question_category_id.required' => 'Atleast one question-category '.\n 'is required',\n ];\n }", "public function message()\n {\n return 'Errores en plantilla<li>'.join('</li><li>',$this->invalid);\n }", "protected function getErrorFlashMessage() {\n\t\treturn $this->translate('tx_placements.error'.'.organization.'. $this->actionMethodName);\n\t }", "function add_id_to_invoice_errors( $message, $order_id ) {\n\n\t\t$ids_db = get_option('wmbr_auto_invoice_errors');\n\t\t$nfes = get_post_meta( $order_id, 'nfe', true );\n\n\t\tif ( !empty($nfes) && is_array($nfes) ) {\n\t\t\tforeach ( $nfes as $nfe ) {\n\t\t\t\tif ( $nfe['status'] == 'aprovado' ) {\n\t\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$ids_db[$order_id] = array(\n\t\t\t'datetime' => current_time(\"d-m-Y H:i:s\"),\n\t\t\t'error' => $message\n\t\t);\n\n\t\tupdate_option( 'wmbr_auto_invoice_errors', $ids_db );\n\n\t}", "public function addError($field_id, $message)\n {\n if ($field_id) {\n $this->errors[$field_id] = $message;\n } else {\n $this->errors[] = $message;\n }\n }", "public static function error($id) \n {\n $language = $_SESSION['language'];\n $layout = 'layouts/polyglot/errors.php';\n $errors = require 'configs/errors.php';\n\n if (array_key_exists($id, $errors))\n {\n if (array_key_exists($language, $errors[$id]))\n {\n $title = $errors[$id][$language]['title'];\n $cause = $errors[$id][$language]['cause'];\n $advice = $errors[$id][$language]['advice'];\n } \n else\n {\n $title = $errors[$id]['en']['title'];\n $cause = $errors[$id]['en']['cause'];\n $advice = $errors[$id]['en']['advice'];\n }\n }\n else\n {\n $title = $errors['404']['en']['title'];\n $cause = $errors['404']['en']['cause'];\n $advice = $errors['404']['en']['advice'];\n }\n\n if (is_numeric($id))\n {\n http_response_code($id);\n } \n\n require $layout;\n exit; \n }", "private function errorMessages()\n {\n return [\n 'name.unique' => 'A category with the same name exists',\n ];\n }", "protected function _getErrorNumber()\n {\n return '';\n }", "function addErrorMessage($start, $end, $description, &$message){\n\t$message = \"- Please enter data in: \";\n\t\n\tif($start == \"\")\n\t\t$message = $message . \"Start Date field - \";\n\tif($end == \"\")\n\t\t$message = $message . \"End Date field - \";\n\tif($description == \"\")\n\t\t$message = $message . \"Description field - \";\n\tif($message == \"- Please enter data in: \") \n\t\t$message = \"\";\n}", "public function message()\n {\n return 'The fields [Team ID, Phone and Sticky Phone Number ID] are required';\n }", "protected function giveCity()\n {\n return \"Luanda minha CIDADE\";\n }", "function errorStatic($formId, $errors)\n\t{\n\t\t//vd($errors);\n\t\tdie(('\n\t\t\t<script>\n\t\t\t\twindow.top.showError(\"'.$errors[0]['msg'].'\", \"'.$formId.' .info\");\n\t\t\t\twindow.top.loading(0, \"'.$formId.' .loading\", \"fast\");\n\t\t\t\twindow.top.$(\"#'.$formId.' input, #'.$formId.' select\").each(function(n,element){\n\t\t\t\t\twindow.top.$(element).removeClass(\"error\")\n\t\t\t\t});\n\t\t\t\terrors = '.json_encode($errors).';\n\t\t\t\tfor(var i in errors)\n\t\t\t\t{\n\t\t\t\t\twindow.top.$(\\'#'.$formId.' input[name=\"\\'+errors[i].name+\\'\"]\\').addClass(\\'error\\');\n\t\t\t\t}\n\t\t\t</script>'));\n\t}", "public function errorText()\n\t{\n\t\t$list = str_replace(',', ', ', str_replace(\"'\", '', $this->column->constraint));\n\t\t$last = strrpos($list, ', ');\n\t\t$replace = substr($list, $last, strlen($list)-$last);\n\t\t$list = str_replace($replace, str_replace(', ', ' or ', $replace), $list);\n\n\t\treturn \"%s may only be set to $list\";\n\t}", "function build(): string\n {\n return 'not_have_city';\n }", "public function message()\n {\n return \"The :attribute is not same has parent: {$this->town->short_postcode}\";\n }", "public function renderGlobalErrorMessage()\n {\n $message = \"\";\n $nberror = count($this->getErrorSchema());\n if ($nberror > 0) {\n $tmp = $this->getErrorSchema()->getErrors();\n $message = \"<div class='alert alert-danger'>Please check your form, $nberror field(s) seem(s) not correctly filled </br>\";\n foreach ($tmp as $key => $e) {\n if ($key == 'Description'){\n $message .= \"- Problem description field is too long (4000 characters max): Please use verbose mode and reduce this field.\";\n }\n\n }\n $message .= \"</div>\";\n }\n return $message;\n }", "protected function addErrorProductId($id)\n {\n return $this->messageManager->addErrorMessage(__('[Product ID: %1] Cannot add this product to the warehouse',$id));\n }" ]
[ "0.59879893", "0.5731379", "0.5701401", "0.5597393", "0.55355686", "0.54918677", "0.5469727", "0.5438394", "0.5365454", "0.53522265", "0.5349465", "0.53309846", "0.5321003", "0.53204316", "0.5296143", "0.52917516", "0.52876145", "0.5279534", "0.5278833", "0.5271116", "0.52514106", "0.5248696", "0.5245955", "0.52292407", "0.52147776", "0.5202128", "0.51894844", "0.5182701", "0.5167433", "0.51602626" ]
0.7037821
0
Converts a hash in hex form to binary form
public static function hexToBin($hash) { // If using PHP 5.4, there is a native function to convert from hex to binary static $useNative; if ($useNative === null) { $useNative = function_exists('hex2bin'); } if (!$useNative && strlen($hash) % 2 !== 0) { $hash = '0' . $hash; } return $useNative ? hex2bin($hash) : pack("H*", $hash); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function binToHex($hash)\n {\n return bin2hex($hash);\n }", "function sha1_bin($hex)\r\n{\r\n return pack('H40', $hex);\r\n}", "function hextobin($hexString) \n { \n $length = strlen($hexString); \n $binString=\"\"; \n $count=0; \n while($count<$length) \n { \n $subString =substr($hexString,$count,2); \n $packedString = pack(\"H*\",$subString); \n if ($count==0)\n {\n $binString=$packedString;\n } \n \n else \n {\n $binString.=$packedString;\n } \n \n $count+=2; \n } \n return $binString; \n }", "static public function hexToBin(string $hex): string\n {\n $code = \"0123456789abcdef\";\n $bin = \"\";\n for ($i = strlen($hex) - 1; $i >= 0; $i--) {\n $char = $hex[$i];\n $dec = strpos($code, $char);\n $binpart = decbin($dec);\n $bin = self::prependBin($binpart, 4) . $bin;\n }\n\n return $bin;\n }", "public static function hex2bin(string $str): string {\n return hex2bin(strlen($str) % 2 == 1 ? \"0\" . $str : $str);\n }", "function blake2bHex($input, $key, $outlen = 64) {\n\t\t$output = $this->blake2b($input, $key, $outlen);\n\t\treturn $this->toHex($output);\n\t}", "function bstr2bin($input)\r\n\t{\r\n\t\tif (!is_string($input)) return null; // Sanity check\r\n\t\t// Unpack as a hexadecimal string\r\n\t\t$value = unpack('H*', $input);\r\n\t\t// Output binary representation\r\n\t\t$value = str_split($value[1], 1);\r\n\t\t$bin = '';\r\n\t\tforeach ($value as $v){\r\n\t\t\t$b = str_pad(base_convert($v, 16, 2), 4, '0', STR_PAD_LEFT);\r\n\t\t\t$bin .= $b;\r\n\t\t}\r\n\t\treturn $bin;\r\n\t}", "public static function hex2str($hex) {}", "private function _hex2bin ($data)\r\n\t{\r\n\t\t$len = strlen ($data);\r\n\t\treturn pack (\"H\" . $len, $data);\r\n\t}", "private function hex2bin($data){\n $encoded = '';\n $data_arr = str_split($data, 2);\n\n foreach($data_arr as $val){\n $binary = base_convert($val, 16, 2);\n $encoded .= str_pad($binary, 8, '0', STR_PAD_LEFT);\n }\n return $encoded;\n }", "public static function gmpBinconv($hex)\n {\n $rem = '';\n $dv = '';\n $byte = '';\n $digits = array();\n\n for ($x = 0; $x < 256; $x++) {\n $digits[$x] = chr($x);\n }\n\n if (substr(strtolower($hex), 0, 2) != '0x') {\n $hex = '0x'.strtolower($hex);\n }\n\n while (gmp_cmp($hex, 0) > 0) {\n $dv = gmp_div($hex, 256);\n $rem = gmp_strval(gmp_mod($hex, 256));\n $hex = $dv;\n $byte = $byte.$digits[$rem];\n }\n\n return strrev($byte);\n }", "private function filter(string $hash): string\n {\n $RSA_SHA256prefix = [\n 0x30,\n 0x31,\n 0x30,\n 0x0D,\n 0x06,\n 0x09,\n 0x60,\n 0x86,\n 0x48,\n 0x01,\n 0x65,\n 0x03,\n 0x04,\n 0x02,\n 0x01,\n 0x05,\n 0x00,\n 0x04,\n 0x20,\n ];\n $unpHash = $this->binToArray($hash);\n $signedInfoDigest = array_values($unpHash);\n $digestToSign = [];\n $this->systemArrayCopy($RSA_SHA256prefix, 0, $digestToSign, 0, count($RSA_SHA256prefix));\n $this->systemArrayCopy($signedInfoDigest, 0, $digestToSign, count($RSA_SHA256prefix), count($signedInfoDigest));\n\n return $this->arrayToBin($digestToSign);\n }", "function bin2bstr($input)\r\n\t{\r\n\t\tif (!is_string($input)) return null; // Sanity check\r\n\t\t// Pack into a string\r\n\t\t$input = str_split($input, 2);\r\n\t\t$str = '';\r\n\t\tforeach ($input as $v){\r\n\t\t\t$str .= base_convert($v, 2, 16);\r\n\t\t}\r\n\t\t$str = pack('H*', $str);\r\n\t\treturn $str;\r\n\t}", "public static function str2hex($str) {}", "public static function tohex($data, $bin2hex=true) {\n $data = (is_object($data) || is_array($data)) ? json_encode($data) : $data;\n if (! is_string($data)) return 0;\n\n if($bin2hex) return bin2hex(gzcompress($data));\n else\n {\n $len = strlen($data);\n if ($len % 2) return 0;\n else if (strspn($data, '0123456789abcdefABCDEF') != $len) return 0;\n $data = pack('H*', $data);\n return gzuncompress($data);\n }\n }", "protected function packConvertHexStringToRawBinary($hex_string){\n\t\treturn pack('h*', $hex_string);\n\t}", "function toBin($str){\n $str = (string)$str;\n $l = strlen($str);\n $result = '';\n while($l--){\n $result = str_pad(decbin(ord($str[$l])),8,\"0\",STR_PAD_LEFT).$result;\n }\n return $result;\n }", "public function toHex()\n {\n if (!$this->internalBin) return false;\n return self::binTohex($this->internalBin);\n }", "private static function hexToBase62(string $hex) : string\n {\n $hex = strrev($hex);\n \n return gmp_strval(gmp_init($hex, 16), 62);\n }", "public function hash();", "static public function binToHex(string $bin): string\n {\n $code = \"0123456789abcdef\";\n\n // check the length\n $rest = strlen($bin) % 4;\n if ($rest > 0) {\n // we need to prepend 0's....\n $newLength = strlen($bin) + (4 - $rest);\n $bin = self::prependBin($bin, $newLength);\n }\n\n $parts = str_split($bin, 4);\n $res = \"\";\n foreach ($parts as $p) {\n $dec = bindec($p);\n $res .= $code[$dec];\n }\n\n return $res;\n }", "public function base58_encode_checksum($hex) { \n\n\t// SHA256 Hash\n\t$checksum = hash('sha256', hash('sha256', pack('H*', $hex), true));\n\t$hash = $hex . substr($checksum, 0, 8);\n\n\t// Return\n\treturn $this->base58_encode($hash);\n\n}", "function _foaf_normalize_hex($hex) {\n return strtoupper(preg_replace('/[^a-zA-Z0-9]/', '', $hex));\n}", "public function getCodeHash() {\n $date = new \\DateTime();\n return hexdec($date->format('d-m-y his'));\n }", "public function getHash();", "public function hash(): string;", "function replaceHashHex($hex) {\n\tglobal $base;\n\t$oldHex = $hex;\n\t$baseHex = $base->hex2RGB( str_replace('#', '', $oldHex) );\n\techo $baseHex[0] . ', ' . $baseHex[1] . ', ' . $baseHex[2] ;\n}", "final public function getHash() {}", "public function getHash(): string;", "public function getHash(): string;" ]
[ "0.7451742", "0.6904995", "0.6477196", "0.6408912", "0.63023025", "0.6293589", "0.6181585", "0.6171403", "0.6148444", "0.61452526", "0.6131103", "0.59920394", "0.59887", "0.59275705", "0.5838102", "0.58224994", "0.5807395", "0.58048457", "0.5736268", "0.57354736", "0.57052416", "0.56896", "0.5679689", "0.5662763", "0.5608325", "0.5595422", "0.55806583", "0.55395496", "0.5529414", "0.5529414" ]
0.76573384
0
Converts a hash in binary form to hex form
public static function binToHex($hash) { return bin2hex($hash); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function hexToBin($hash)\n {\n // If using PHP 5.4, there is a native function to convert from hex to binary\n static $useNative;\n if ($useNative === null) {\n $useNative = function_exists('hex2bin');\n }\n\n if (!$useNative && strlen($hash) % 2 !== 0) {\n $hash = '0' . $hash;\n }\n\n return $useNative ? hex2bin($hash) : pack(\"H*\", $hash);\n }", "function sha1_bin($hex)\r\n{\r\n return pack('H40', $hex);\r\n}", "public static function str2hex($str) {}", "public static function hex2str($hex) {}", "function toHex($bytes) {\n\t\treturn implode('', array_map(function ($n){return ($n < 16 ? \"0\" : \"\") . dechex($n);}, $bytes));\n\t}", "function blake2bHex($input, $key, $outlen = 64) {\n\t\t$output = $this->blake2b($input, $key, $outlen);\n\t\treturn $this->toHex($output);\n\t}", "public function toHex()\n {\n if (!$this->internalBin) return false;\n return self::binTohex($this->internalBin);\n }", "public static function tohex($data, $bin2hex=true) {\n $data = (is_object($data) || is_array($data)) ? json_encode($data) : $data;\n if (! is_string($data)) return 0;\n\n if($bin2hex) return bin2hex(gzcompress($data));\n else\n {\n $len = strlen($data);\n if ($len % 2) return 0;\n else if (strspn($data, '0123456789abcdefABCDEF') != $len) return 0;\n $data = pack('H*', $data);\n return gzuncompress($data);\n }\n }", "function replaceHashHex($hex) {\n\tglobal $base;\n\t$oldHex = $hex;\n\t$baseHex = $base->hex2RGB( str_replace('#', '', $oldHex) );\n\techo $baseHex[0] . ', ' . $baseHex[1] . ', ' . $baseHex[2] ;\n}", "static public function binToHex(string $bin): string\n {\n $code = \"0123456789abcdef\";\n\n // check the length\n $rest = strlen($bin) % 4;\n if ($rest > 0) {\n // we need to prepend 0's....\n $newLength = strlen($bin) + (4 - $rest);\n $bin = self::prependBin($bin, $newLength);\n }\n\n $parts = str_split($bin, 4);\n $res = \"\";\n foreach ($parts as $p) {\n $dec = bindec($p);\n $res .= $code[$dec];\n }\n\n return $res;\n }", "function _foaf_normalize_hex($hex) {\n return strtoupper(preg_replace('/[^a-zA-Z0-9]/', '', $hex));\n}", "function asc2hex ($temp)\n{\n $len = strlen($temp);\n $data = \"\";\n for ($i=0; $i<$len; $i++) $data.=sprintf(\"%02x\",ord(substr($temp,$i,1)));\n return $data;\n}", "function hextobin($hexString) \n { \n $length = strlen($hexString); \n $binString=\"\"; \n $count=0; \n while($count<$length) \n { \n $subString =substr($hexString,$count,2); \n $packedString = pack(\"H*\",$subString); \n if ($count==0)\n {\n $binString=$packedString;\n } \n \n else \n {\n $binString.=$packedString;\n } \n \n $count+=2; \n } \n return $binString; \n }", "public function hash();", "final public function toHex() : Hex\n {\n return $this->hex;\n }", "private function strtohex($input) {\n\n $output = '';\n\n foreach (str_split($input) as $c)\n $output.=sprintf(\"%02X\", ord($c));\n\n return $output;\n }", "public static function hashObject($obj) : string\n {\n return sodium_bin2hex(sodium_crypto_generichash($obj));\n }", "private function filter(string $hash): string\n {\n $RSA_SHA256prefix = [\n 0x30,\n 0x31,\n 0x30,\n 0x0D,\n 0x06,\n 0x09,\n 0x60,\n 0x86,\n 0x48,\n 0x01,\n 0x65,\n 0x03,\n 0x04,\n 0x02,\n 0x01,\n 0x05,\n 0x00,\n 0x04,\n 0x20,\n ];\n $unpHash = $this->binToArray($hash);\n $signedInfoDigest = array_values($unpHash);\n $digestToSign = [];\n $this->systemArrayCopy($RSA_SHA256prefix, 0, $digestToSign, 0, count($RSA_SHA256prefix));\n $this->systemArrayCopy($signedInfoDigest, 0, $digestToSign, count($RSA_SHA256prefix), count($signedInfoDigest));\n\n return $this->arrayToBin($digestToSign);\n }", "function base64_to_hex($str_to_conv) {\n\n\t$bin_cod = '';\n\n\t$bin_string = '';\n\tfor ($i=0; $i<strlen($str_to_conv); $i++) { \n\t\t$base_64_key = array_search($str_to_conv[$i], $base64_code);\n\t\t$bin_string .= sprintf(\"%06d\", decbin($base_64_key));\n\t}\n\n\t$hex_string = '';\n\tfor ($i=0; $i < strlen($bin_string); $i += 4) { \n\t\t$hex_string .= base_convert(substr($bin_string, $i, 4), 2, 16);\n\t}\n\n\treturn $hex_string;\n}", "public static function bin2hex($length = 32): string\n {\n return bin2hex(random_bytes($length));\n }", "public function hash(): string;", "public function toHex()\n\t{\n\t\treturn sprintf('#%s%s%s', Strings::padLeft(dechex($this->r), 2, '0'), Strings::padLeft(dechex($this->g), 2, '0'), Strings::padLeft(dechex($this->b), 2, '0'));\n\t}", "function ascii_to_hex($ascii)\n{\n\t$hex = '';\n\n\tfor($i = 0; $i < strlen($ascii); $i++)\n\t{\n\t\t$hex .= str_pad(base_convert(ord($ascii[$i]), 10, 16), 2, '0', STR_PAD_LEFT);\n\t}\n\treturn $hex;\n}", "protected function unpackConvertRawBinaryToHexString($raw){\n\t\treturn unpack('h*', $raw);\n\t}", "public function toHex()\n {\n return $this->toRGB()->toHex();\n }", "public static function hex2bin(string $str): string {\n return hex2bin(strlen($str) % 2 == 1 ? \"0\" . $str : $str);\n }", "static protected function DigestHex( $strHex, $strH0, $strH1, $strH2, $strH3, $strH4 )\n\t{\n\t\t$strK[ 0 ] = \"5A827999\";\n\t\t$strK[ 1 ] = \"6ED9EBA1\";\n\t\t$strK[ 2 ] = \"8F1BBCDC\";\n\t\t$strK[ 3 ] = \"CA62C1D6\";\n\t\t\n\t\t//Hex words are used in the encryption process, these can be any valid 8 digit hex value\n\t\t$strH[ 0 ] = $strH0;\n\t\t$strH[ 1 ] = $strH1;\n\t\t$strH[ 2 ] = $strH2;\n\t\t$strH[ 3 ] = $strH3;\n\t\t$strH[ 4 ] = $strH4;\n\t\t\n\t\t//divide the Hex block into 16 hex words\n\t\tfor( $intPos = 0 ; $intPos <= ( \\strlen( $strHex ) / 8 ) - 1 ; $intPos = $intPos + 1 )\n\t\t{\n\t\t\t$strWords[ intval( $intPos ) ] = substr( $strHex, ( intval( $intPos ) * 8 ) + 1 - 1, 8 );\n\t\t}\n\t\t\n\t\t//encode the Hex words using the constants above\n\t\t//innitialize 80 hex word positions\n\t\tfor( $intPos = 16 ; $intPos <= 79 ; $intPos = $intPos + 1 )\n\t\t{\n\t\t\t$strTemp = $strWords[ intval( $intPos ) - 3 ];\n\t\t\t$strTemp1 = self::HexBlockToBinary( $strTemp );\n\t\t\t$strTemp = $strWords[ intval( $intPos ) - 8 ];\n\t\t\t$strTemp2 = self::HexBlockToBinary( $strTemp );\n\t\t\t$strTemp = $strWords[ intval( $intPos ) - 14 ];\n\t\t\t$strTemp3 = self::HexBlockToBinary( $strTemp );\n\t\t\t$strTemp = $strWords[ intval( $intPos ) - 16 ];\n\t\t\t$strTemp4 = self::HexBlockToBinary( $strTemp );\n\t\t\t$strTemp = self::BinaryXOR( $strTemp1, $strTemp2 );\n\t\t\t$strTemp = self::BinaryXOR( $strTemp, $strTemp3 );\n\t\t\t$strTemp = self::BinaryXOR( $strTemp, $strTemp4 );\n\t\t\t$strWords[ intval( $intPos ) ] = self::BlockToHex( self::BinaryShift( $strTemp, 1 ) );\n\t\t}\n\t\t\n\t\t//initialize the changing word variables with the initial word variables\n\t\t$strA[ 0 ] = $strH[ 0 ];\n\t\t$strA[ 1 ] = $strH[ 1 ];\n\t\t$strA[ 2 ] = $strH[ 2 ];\n\t\t$strA[ 3 ] = $strH[ 3 ];\n\t\t$strA[ 4 ] = $strH[ 4 ];\n\t\t\n\t\t//Main encryption loop on all 80 hex word positions\n\t\tfor( $intPos = 0 ; $intPos <= 79 ; $intPos = $intPos + 1 )\n\t\t{\n\t\t\t$strTemp = self::BinaryShift( self::HexBlockToBinary( $strA[ 0 ] ), 5 );\n\t\t\t$strTemp1 = self::HexBlockToBinary( $strA[ 3 ] );\n\t\t\t$strTemp2 = self::HexBlockToBinary( $strWords[ intval( $intPos ) ] );\n\t\t\t\n\t\t\tswitch( $intPos )\n\t\t\t{\n\t\t\t\tcase 0 :\n\t\t\t\tcase 1 :\n\t\t\t\tcase 2 :\n\t\t\t\tcase 3 :\n\t\t\t\tcase 4 :\n\t\t\t\tcase 5 :\n\t\t\t\tcase 6 :\n\t\t\t\tcase 7 :\n\t\t\t\tcase 8 :\n\t\t\t\tcase 9 :\n\t\t\t\tcase 10 :\n\t\t\t\tcase 11 :\n\t\t\t\tcase 12 :\n\t\t\t\tcase 13 :\n\t\t\t\tcase 14 :\n\t\t\t\tcase 15 :\n\t\t\t\tcase 16 :\n\t\t\t\tcase 17 :\n\t\t\t\tcase 18 :\n\t\t\t\tcase 19 :\n\t\t\t\t\t$strTemp3 = self::HexBlockToBinary( $strK[ 0 ] );\n\t\t\t\t\t$strTemp4 = self::BinaryOR( self::BinaryAND( self::HexBlockToBinary( $strA[ 1 ] ), self::HexBlockToBinary( $strA[ 2 ] ) ), self::BinaryAND( self::BinaryNOT( self::HexBlockToBinary( $strA[ 1 ] ) ), self::HexBlockToBinary( $strA[ 3 ] ) ) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 20 :\n\t\t\t\tcase 21 :\n\t\t\t\tcase 22 :\n\t\t\t\tcase 23 :\n\t\t\t\tcase 24 :\n\t\t\t\tcase 25 :\n\t\t\t\tcase 26 :\n\t\t\t\tcase 27 :\n\t\t\t\tcase 28 :\n\t\t\t\tcase 29 :\n\t\t\t\tcase 30 :\n\t\t\t\tcase 31 :\n\t\t\t\tcase 32 :\n\t\t\t\tcase 33 :\n\t\t\t\tcase 34 :\n\t\t\t\tcase 35 :\n\t\t\t\tcase 36 :\n\t\t\t\tcase 37 :\n\t\t\t\tcase 38 :\n\t\t\t\tcase 39 :\n\t\t\t\t\t$strTemp3 = self::HexBlockToBinary( $strK[ 1 ] );\n\t\t\t\t\t$strTemp4 = self::BinaryXOR( self::BinaryXOR( self::HexBlockToBinary( $strA[ 1 ] ), self::HexBlockToBinary( $strA[ 2 ] ) ), self::HexBlockToBinary( $strA[ 3 ] ) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 40 :\n\t\t\t\tcase 41 :\n\t\t\t\tcase 42 :\n\t\t\t\tcase 43 :\n\t\t\t\tcase 44 :\n\t\t\t\tcase 45 :\n\t\t\t\tcase 46 :\n\t\t\t\tcase 47 :\n\t\t\t\tcase 48 :\n\t\t\t\tcase 49 :\n\t\t\t\tcase 50 :\n\t\t\t\tcase 51 :\n\t\t\t\tcase 52 :\n\t\t\t\tcase 53 :\n\t\t\t\tcase 54 :\n\t\t\t\tcase 55 :\n\t\t\t\tcase 56 :\n\t\t\t\tcase 57 :\n\t\t\t\tcase 58 :\n\t\t\t\tcase 59 :\n\t\t\t\t\t$strTemp3 = self::HexBlockToBinary( $strK[ 2 ] );\n\t\t\t\t\t$strTemp4 = self::BinaryOR( self::BinaryOR( self::BinaryAND( self::HexBlockToBinary( $strA[ 1 ] ), self::HexBlockToBinary( $strA[ 2 ] ) ), self::BinaryAND( self::HexBlockToBinary( $strA[ 1 ] ), self::HexBlockToBinary( $strA[ 3 ] ) ) ), self::BinaryAND( self::HexBlockToBinary( $strA[ 2 ] ), self::HexBlockToBinary( $strA[ 3 ] ) ) );\n\t\t\t\t\tbreak;\n\t\t\t\tcase 60 :\n\t\t\t\tcase 61 :\n\t\t\t\tcase 62 :\n\t\t\t\tcase 63 :\n\t\t\t\tcase 64 :\n\t\t\t\tcase 65 :\n\t\t\t\tcase 66 :\n\t\t\t\tcase 67 :\n\t\t\t\tcase 68 :\n\t\t\t\tcase 69 :\n\t\t\t\tcase 70 :\n\t\t\t\tcase 71 :\n\t\t\t\tcase 72 :\n\t\t\t\tcase 73 :\n\t\t\t\tcase 74 :\n\t\t\t\tcase 75 :\n\t\t\t\tcase 76 :\n\t\t\t\tcase 77 :\n\t\t\t\tcase 78 :\n\t\t\t\tcase 79 :\n\t\t\t\t\t$strTemp3 = self::HexBlockToBinary( $strK[ 3 ] );\n\t\t\t\t\t$strTemp4 = self::BinaryXOR( self::BinaryXOR( self::HexBlockToBinary( $strA[ 1 ] ), self::HexBlockToBinary( $strA[ 2 ] ) ), self::HexBlockToBinary( $strA[ 3 ] ) );\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t$strTemp = self::BlockToHex( $strTemp );\n\t\t\t$strTemp1 = self::BlockToHex( $strTemp1 );\n\t\t\t$strTemp2 = self::BlockToHex( $strTemp2 );\n\t\t\t$strTemp3 = self::BlockToHex( $strTemp3 );\n\t\t\t$strTemp4 = self::BlockToHex( $strTemp4 );\n\t\t\t\n\t\t\t$strTemp = self::HexAdd( $strTemp, $strTemp1 );\n\t\t\t$strTemp = self::HexAdd( $strTemp, $strTemp2 );\n\t\t\t$strTemp = self::HexAdd( $strTemp, $strTemp3 );\n\t\t\t$strTemp = self::HexAdd( $strTemp, $strTemp4 );\n\t\t\t\n\t\t\t$strA[ 4 ] = $strA[ 3 ];\n\t\t\t$strA[ 3 ] = $strA[ 2 ];\n\t\t\t$strA[ 2 ] = self::BlockToHex( self::BinaryShift( self::HexBlockToBinary( $strA[ 1 ] ), 30 ) );\n\t\t\t$strA[ 1 ] = $strA[ 0 ];\n\t\t\t$strA[ 0 ] = $strTemp;\n\t\t}\n\t\t\n\t\t//Concatenate the final Hex Digest\n\t\treturn $strA[ 0 ] . $strA[ 1 ] . $strA[ 2 ] . $strA[ 3 ] . $strA[ 4 ];\n\t}", "public function getHash();", "function hex_to_ascii($hex)\n{\n\t$ascii = '';\n\n\tif (strlen($hex) % 2 == 1)\n\t{\n\t\t$hex = '0'.$hex;\n\t}\n\n\tfor($i = 0; $i < strlen($hex); $i += 2)\n\t{\n\t\t$ascii .= chr(base_convert(substr($hex, $i, 2), 16, 10));\n\t}\n\treturn $ascii;\n}", "function nthash($password = \"\") {\n return strtoupper(bin2hex(mhash(MHASH_MD4, iconv(\"UTF-8\", \"UTF-16LE\", $password))));\n }" ]
[ "0.7061621", "0.6726149", "0.66637397", "0.637879", "0.63669884", "0.627641", "0.62530893", "0.6201719", "0.61720675", "0.6148772", "0.61055416", "0.60956055", "0.60699683", "0.59929836", "0.59890974", "0.59841913", "0.59590477", "0.5954503", "0.5944585", "0.59282887", "0.5887245", "0.58797103", "0.58727", "0.58325326", "0.5812588", "0.5799866", "0.5787102", "0.57656413", "0.57395", "0.5737163" ]
0.80508184
0
Lists all DollInfo models.
public function actionIndex() { $searchModel = new DollInfoSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function liste()\n {\n $discs = $this->LoadModel('Disc');\n $discDetail = $discs->info_record();\n $this->render('liste', [\n 'discs' => $discDetail\n ]);\n }", "public function getModels();", "public function getModels();", "public function listModels() {\n\n $config = $this->initConfig($version = AnalyzeModel::VERSION);\n\n $config->setQuery( [ 'version' => $version ] );\n\n $config->setMethod(HttpClientConfiguration::METHOD_GET);\n $config->setType(HttpClientConfiguration::DATA_TYPE_JSON);\n $config->setURL(self::BASE_URL.\"/models\");\n\n return $this->sendRequest($config);\n }", "public function listar() {\n $rs = $this->model->listar();\n\n echo $this->toJson($rs);\n }", "public function getList()\n {\n $this->db->order_by(\"id\", 'desc');\n $this->db->where('status', 1);\n return $this->db->get($this->model);\n }", "public function index()\n {\n return $this->showList(ObjectMuseum::where('deleted','=',ObjectMuseum::ACTIVE)->get());\n }", "public function index()\n {\n return $this->model->all();\n }", "public function index()\n {\n return $this->model->getAll();\n }", "public function fetch_all_models() {\n global $pdo;\n\n $query = $pdo->prepare(\"SELECT * FROM talents\");\n $query -> execute();\n return $query->fetchAll(\\PDO::FETCH_ASSOC);\n }", "public function getAll()\n {\n return $this->model->orderBy('id', 'DESC')->get();\n }", "public function index(){\n return $this->model->all();\n }", "public function getList()\n {\n \treturn $this->model->where('is_base', '=', 0)->get();\n }", "public function GetAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return DB::table('product_models')->get()->all();\n }", "public function actionList()\r\n {\r\n $this->_userAutehntication();\r\n switch($_GET['model'])\r\n {\r\n case 'posts': \r\n $models = Post::model()->findAll();\r\n break; \r\n default: \r\n $this->_sendResponse(501, sprintf('Error: Mode <b>list</b> is not implemented for model <b>%s</b>',$_GET['model']) );\r\n exit; \r\n }\r\n if(is_null($models)) {\r\n $this->_sendResponse(200, sprintf('No Post found for model <b>%s</b>', $_GET['model']) );\r\n } else {\r\n $rows = array();\r\n foreach($models as $model)\r\n $rows[] = $model->attributes;\r\n\r\n $this->_sendResponse(200, CJSON::encode($rows));\r\n }\r\n }", "public static function getList()\n {\n $models = self::find()->all();\n $list = ArrayHelper::map($models, 'id', 'name');\n return $list;\n }", "private function getAllModels()\n {\n return (object)ModelRegistry::getAllObjects();\n }", "public function getList()\n {\n return $this->model->getList();\n }", "public function modelList(){\n \t$data = DB::table(\"categories\")->orderBy(\"id\",\"desc\")->paginate(4);\n \treturn $data;\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public function getAll()\n {\n return $this->model->all();\n }", "public static function getListado(){\n return Dispositivo::model()->findAll();\n }", "public static function all() {\n\t\t$classe = get_called_class();\n\t\t$table = str_replace(\"db_\", \"\", $classe);\n\t\t$liste = db::findAll(db::table($table));\n\t\treturn $liste;\n\t}", "public function viewallunitmodelsAction() {\n\n\t\t$model = new Unit_Model_UnitModel();\n\t\t$this->view->records = $model->fetchAll( 'name','ASC' );\n \n\t\tif( $this->view->records ) {\n $attached = $model->getAttachedModels();\n $this->view->attached = $attached;\n\t\t $this->view->paginator = $this->paginate( $this->view->records );\n }\n\t}", "public function index()\n\t{\n\t\treturn Lense::all();\n\t}", "public function actionIndex()\n {\n\n $query = Daodien::find();\n $pagination = new Pagination([\n 'defaultPageSize' => 5,\n 'totalCount' => $query->count(),\n ]);\n $listDaoDien = $query->orderBy(['created_at' => SORT_DESC])\n ->offset($pagination->offset)\n ->limit($pagination->limit)->all();\n $data = ObjDaoDien::getListObject($listDaoDien);\n return $this->render('index',[\n 'listDaoDien' => $data,\n 'pagination' => $pagination]);\n }", "function lists()\n {\n $data[\"data\"] = $this->RapatModel->get();\n $this->load->view('rapat/lists', $data);\n }", "public function all()\n {\n return $this->model->get();\n }" ]
[ "0.64438814", "0.6298668", "0.6298668", "0.62913895", "0.62639356", "0.6258607", "0.61507505", "0.61457294", "0.6141489", "0.611133", "0.60787356", "0.60374194", "0.60351723", "0.60313755", "0.60252273", "0.60233015", "0.6013212", "0.6010859", "0.5968535", "0.5959769", "0.59231067", "0.59231067", "0.59231067", "0.59055114", "0.5895789", "0.5895661", "0.58702326", "0.58362705", "0.58179444", "0.581476" ]
0.71787024
0
Calculates the current holdings of the given Player.
public function getCurrentHoldings($player){ $resultset = null; $results = array(); $stocks = $this->stocks->all(); $this->db->select('Quantity, Trans, Stock, Value'); $this->db->from('transactions t'); $this->db->join('stocks s', 's.Code=t.Stock', 'left'); $this->db->join('players p', 'p.Player=t.Player', 'left'); $this->db->where('t.Player', $player); $query = $this->db->get(); if($query->num_rows() != 0) { $resultset = $query->result_array(); } foreach( $stocks as $item ) { $results[$item->Code] = 0; } if ( count( $resultset ) > 0 ) foreach( $resultset as $result ) { $amount = $result["Quantity"]; $action = $result["Trans"]; $stock = $result["Stock"]; $price = $result["Value"]; $sign = ( $action == "buy" ) ? 1 : -1; $results[$stock] += $sign * $amount * $price; } return array($results); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPlayerHoldings($player)\n {\n $queryString = \"SELECT transactions.*, stocks.Value AS customValue FROM transactions JOIN stocks ON stocks.Code = transactions.Stock WHERE Player='\" . $player . \"'\";\n $activity = $this->db->query($queryString);\n\n $stockArray = array();\n foreach ($activity->result() as $thisStock) {\n if (!isset($stockArray[$thisStock->Stock])) {\n $stockArray[$thisStock->Stock] = 0;\n }\n if ($thisStock->Trans == 'sell') {\n $stockArray[$thisStock->Stock] -= (int)$thisStock->Quantity;\n } else if ($thisStock->Trans == 'buy') {\n $stockArray[$thisStock->Stock] += (int)$thisStock->Quantity;\n }\n }\n\n $returnArray = array();\n foreach ($stockArray as $key => $value) {\n $returnArray[] = array(\n 'Stock' => $key,\n 'Quantity' => $value\n );\n }\n return $returnArray;\n }", "function playerHit($name, $deck, $player, $dealer, $bet, $insuranceBet, $bankroll){\n\t$newCard = drawACard($deck);\n\t$player[] = $newCard;\n\t$total = getTotal($player);\n\t//echo out each card and total\n\tforeach ($player as $card) {\n\t\techo '[' . $card['card'] . ' ' . $card['suit'] . '] ';\n\t}\n\techo $name . ' total = ' . $total . PHP_EOL;\n\t//notify when player busts\n\tif (getTotal($player) > 21) {\n\t\tevaluateHands($name, $player, $dealer, $bet, $insuranceBet, $bankroll);\n\t}\n\treturn $player;\n}", "function getTotalHoldings()\n\t{\n\t\t$lastTrade = $this->data->getLastCompletedTrade();\n\t\t$previousTrade = $lastTrade && $lastTrade->getPreviousBotTradeID() ? $this->data->getTradeByID($lastTrade->getPreviousBotTradeID()) : null;\n\n\t\tif ($this->baseAssetIsNative())\n\t\t{\n\t\t\t$sum = $this->getCurrentBaseAssetBudget();\n\t\t\t$otherAssetAmmount = $this->getCurrentCounterAssetBudget();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$sum = $this->getCurrentCounterAssetBudget();\n\t\t\t$otherAssetAmmount = $this->getCurrentBaseAssetBudget();\n\t\t}\n\n\t\tif ($lastTrade && $lastTrade->getType() == Trade::TYPE_BUY)\n\t\t{\n\t\t\t$price = $this->data->getAssetValueForTime(Time::now());\n\n\t\t\tif ($price)\n\t\t\t\t$price = 1/$price;\n\n\t\t\t$sum += $otherAssetAmmount * $price;\n\t\t}\n\t\telse if ($lastTrade && $previousTrade && $previousTrade->getType() == Trade::TYPE_BUY)\n\t\t{\n\t\t\t$price = $this->data->getAssetValueForTime(Time::now());\n\t\t\t\n\t\t\tif ($price)\n\t\t\t\t$price = 1/$price;\n\n\t\t\t$sum += $otherAssetAmmount * $price;\n\t\t}\n\n\t\treturn $sum;\n\t}", "function playerStaysInPenaltyBox($currentPlayer) {\n\t}", "public function requestPlayerBet(Player $player);", "public function getRealTimeHoldings()\n {\n return $this->hasILS() ? $this->holdLogic->getHoldings(\n $this->getUniqueID(), $this->getConsortialIDs()\n ) : [];\n }", "public function calculateTotalLunch()\n\t{\n\t\t$result = 0;\n\n\t\t$passengers = $this->getPassengers();\n\n\t\tif( count($passengers) )\n\t\t{\n\t\t\tforeach ($passengers as $passenger)\n\t\t\t{\n\t\t\t\tif( (int)$passenger->status < 3 )\n\t\t\t\t{\n\t\t\t\t\tif($passenger->lunch)\n\t\t\t\t\t{\n\t\t\t\t\t\t$result++;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\treturn $result;\n\t}", "function playerSentToPenaltyBox($currentPlayer) {\n\t}", "protected function computeAllowed() {\n\t\tif($this->tees) {\n\t\t\t$this->exact_handicap = $this->player->handicap;\n\t\t\t$a = $this->player->allowed($this->tees);\n\t\t\t$this->handicap = array_sum($a); // playing handicap\n\t\t\t$this->save();\n\t\t\tif($this->hasDetails()) {\t\t\t\t\n\t\t\t\t$i = 0;\n\t\t\t\tforeach($this->getScoreWithHoles()->each() as $score) {\n\t\t\t\t\t$score->allowed = $a[$i++];\n\t\t\t\t\t$score->save();\n\t\t\t\t}\n\t\t\t}\n\t\t}\t\t\n\t}", "public function passGo($player){\n $player->collect($this->go_amount);\n }", "public function calculate_votes()\r\n\t{\r\n\t\t$this->votes_total = $this->votes_up + $this->votes_down;\r\n\t\t$this->votes_balance = $this->votes_up - $this->votes_down;\r\n\r\n\t\t// Note: division by zero must be prevented\r\n\t\t$this->votes_pct_up = ($this->votes_total === 0) ? 0 : $this->votes_up / $this->votes_total * 100;\r\n\t\t$this->votes_pct_down = ($this->votes_total === 0) ? 0 : $this->votes_down / $this->votes_total * 100;\r\n\t}", "function playerCoins($currentPlayer, $playerCoins) {\n\t}", "public function getCollisions($player)\n {\n $collisions = collect();\n $playerSelections = PlayerPick::where('pool_id', $player->pool->id)->get()->groupBy('player_id');\n\n /* If the player doesnt currently have 2 picks then there is no chance of collision */\n if (count($player->houseguests) !== 2) {\n return $collisions;\n }\n\n foreach ($playerSelections as $selections) {\n $houseguests = $player->houseguests()->pluck('houseguest_id');\n\n if ($selections->pluck('houseguest_id')->count() !== 3) {\n continue;\n }\n\n $collisionValues = $selections->pluck('houseguest_id')->values()->diff($houseguests);\n\n /* If the two players selections are off by 1 then remove the remaining houseguest\n from the available list so they dont end up with the same selections */\n (count($collisionValues) === 1) ? $collisions->push($collisionValues) : null;\n }\n\n return $collisions->flatten();\n }", "public function play()\n {\n $this->spin();\n foreach ($this->bets as $bet_type => $wager)\n {\n if (method_exists(Game, $bet_type))\n {\n if ($payoff = $this->$bet_type())\n {\n $this->win = true;\n $money_won = ($wager * $payoff);\n $this->increment_money_won($money_won);\n $this->increment_money($money_won);\n }\n else\n {\n $this->increment_money_lost($wager);\n $this->decrement_money($wager);\n }\n }\n }\n return $this->win;\n }", "function pokerWinner($player1Hand){\n $pairCount = 0;\n $twoPairCount = 0;\n $threeOfAKind = 0;\n $fourOfAKindCount = 0;\n $straightCount = 0;\n $flushCount = 0;\n $fullHouseCount = 0;\n $fourOfAKindCount = 0;\n $straightFlushCount = 0;\n $royalFlushCount = 0;\n $consecutive = 0;\n $value = 10;\n\n $matchingCardCount = pairFinder($player1Hand);\n\n if($matchingCardCount == 3){\n \n $fourOfAKindCount = 1;\n $threeOfAKind = 1;\n $pairCount = 2;\n }\n\n if($matchingCardCount == 2){\n $threeOfAKind = 1;\n $pairCount = 1;\n }\n\n if($matchingCardCount == 1){\n $pairCount = 1;\n\n }\n\n //check for two pairs\n if(twoPairFinder($player1Hand)){\n $pairCount = 2;\n $twoPairCount = 1;\n }\n\n\n\n if(straightFinder($player1Hand)){\n $straightCount = 1;\n\n\n }\n\n //check for flush\n if(flushFinder($player1Hand)){\n $flushCount = 1;\n\n }\n\n //check for straight flush\n if($flushCount == 1 && $straightCount == 1){\n $straightFlushCount = 1;\n }\n\n //check for royal flush\n if($straightFlushCount == 1){\n if(royalFlushFinder($player1Hand)){\n $royalFlushCount = 1;\n }\n }\n\n //Testing area\n\n // echo 'The $pairCount is: ' . $pairCount . \"\\n\" . \"\\n\";\n // echo 'The $twoPairCount is: ' . $twoPairCount . \"\\n\" . \"\\n\";\n // echo 'The $threeOfAKind is: ' . $threeOfAKind . \"\\n\" . \"\\n\";\n // echo 'The $fourOfAKindCount is: ' . $fourOfAKindCount . \"\\n\" . \"\\n\";\n // echo 'The $straightCount is: ' . $straightCount . \"\\n\" . \"\\n\";\n // echo 'The $flushCount is: ' . $flushCount . \"\\n\" . \"\\n\";\n // echo 'The $fullHouseCount is: ' . $fullHouseCount . \"\\n\" . \"\\n\";\n // echo 'The $fourOfAKindCount is: ' . $fourOfAKindCount . \"\\n\" . \"\\n\";\n // echo 'The $straightFlushCount is: ' . $straightFlushCount . \"\\n\" . \"\\n\";\n // echo 'The $royalFlushCount is: ' . $royalFlushCount . \"\\n\" . \"\\n\";\n\n\n //Give out points\n if($royalFlushCount == 1){\n $value = 10;\n return $value;\n }\n\n if($straightFlushCount == 1){\n $value = 9;\n return $value;\n }\n\n if($fourOfAKindCount == 1){\n $value = 8;\n return $value;\n }\n\n if($fullHouseCount == 1){\n $value = 7;\n return $value;\n }\n\n if($flushCount == 1){\n $value = 6;\n return $value;\n }\n\n if($straightCount == 1){\n $value = 5;\n return $value;\n }\n\n if($threeOfAKind == 1){\n $value = 4;\n return $value;\n }\n\n if($twoPairCount == 1){\n $value = 3;\n return $value;\n }\n\n if($pairCount == 1){\n $value = 2;\n return $value;\n }\n\n else{\n $value = 1;\n return $value;\n }\n\n\n}", "public function addHoldings(Holdings $holdings)\r\n {\r\n array_push($this->holdings, $holdings);\r\n }", "public function rewardWinners(& $wins,& $table){\n\t\t$pots=& $table->game_pots;\n\t\t$leftOvers=$pots[\"left_overs\"]->amount;\n\t\t$x.=print_r($wins,true);\n\t\t$x.=\"\\n\\n\";\n\t\tforeach ($wins as $points=>$winners){// loop through winners by highest points , search for elegible pot then add that pot to the users'amount'\n\t\t\t$pot_on=count($winners); // how many winners for single pot ?\n\t\t\t$x.= \"got $pot_on winners with score of $points\\n\";\n\t\t\tif ($pon_on=='1'){\n\t\t\t\t$table->dealerChat($pot_on.' winner .');\n\t\t\t}elseif($pon_on>'1'){\n\t\t\t\t$table->dealerChat($pot_on.' winners .');\n\t\t\t}\n\t\t\t$winName=$this->getWinName($points);\n\t\t\t//generate win text\n\t\t\t$winText=' With <label class=\"hand_name\">'.$winName->handName.'</label>' ;\n\t\t\tif ($winName->handName=='High Card'){\n\t\t\t\t$winText.=' '.$winName->normalKicker ;\n\t\t\t}else{\n\t\t\t\tif (isset($winName->doubleKicker)){\n\t\t\t\t\t$winText.=' of '.$winName->doubleKicker ;\n\t\t\t\t}\n\t\t\t\tif ((isset($winName->normalKicker) && !isset($winName->doubleKicker)) || isset($winName->normalKicker) && isset($winName->doubleKicker) && $winName->doubleKicker!=$winName->normalKicker){\n\t\t\t\t\t$winText.=' and '.$winName->normalKicker.' kicker' ;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tforeach ($winners as $winnerId){\n\t\t\t\t$x.= \" - checking winner $winnerId :\\n\";\n\t\t\t\t//search for pots who has this player id\n\t\t\t\t$winPlayer=new Player($winnerId);\n\t\t\t\t\t$x.= \" - Winner is $winPlayer->display_name $winPlayer->seat_id has $ $winPlayer->amount :\\n\";\n\t\t\t\t\tforeach ($pots as $id=>$pot){\n\t\t\t\t\t\tif ($pot->amount>0 && $id!=='left_overs'){\n\t\t\t\t\t\t\t$pot->amount+=$leftOvers;\n\t\t\t\t\t\t\t$leftOvers=0;\n\t\t\t\t\t\t\tif (!isset($pot->original_amount)){$pot->original_amount=$pot->amount;}\n\t\t\t\t\t\t\t$winAmount=round($pot->original_amount/$pot_on);\n\t\t\t\t\t\t\tif (in_array($winnerId,$pot->eligible)!==false){\n\t\t\t\t\t\t\t\t$pots[$id]->amount-=$winAmount;\n\t\t\t\t\t\t\t\t$winPlayer->amount+=$winAmount;\n\t\t\t\t\t\t\t\t$table->dealerChat($winPlayer->profile_link.' has won the pot <label class=\"cash_win\">($'.$winAmount.')</label> '.$winText.' .');\n\t\t\t\t\t\t\t\tif ($winAmount>0){$winPlayer->won=5;}else{$winPlayer->won=0;}\n\t\t\t\t\t\t\t\tif (substr($winPlayer->bet_name,0,6)=='<label'){\n\t\t\t\t\t\t\t\t\t$oldAmount=substr($winPlayer->bet_name,26,strpos($winPlayer->bet_name,'</label>')-26);\n\t\t\t\t\t\t\t\t\t$oldAmount+=$winAmount;\n\t\t\t\t\t\t\t\t\t$winPlayer->bet_name='<label class=\"winLabel\">+$'.$oldAmount.'</label>';\n\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t$winPlayer->bet_name='<label class=\"winLabel\">+$'.$winAmount.'</label>';\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t$winPlayer->saveBetData();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}//\n\t\t\t\t\t}//\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t}//\n\t\t\t\n\t\t}//\n\t\tfile_put_contents('wins.txt',$x);\n\t\n\t}", "function statusAfterPlayerGettingOutOfPenaltyBox($currentPlayer, $currentPlace, $currentCategory) {\n\t}", "function getGameProgression()\n { \n // Start or end of game\n $current_state = $this->gamestate->state();\n switch($current_state['name']) {\n case 'gameSetup':\n case 'turn0':\n return 0;\n case 'whoBegins':\n return 1;\n case 'justBeforeGameEnd':\n case 'gameEnd':\n return 100;\n }\n // For other states (all included in player action)\n $players = self::loadPlayersBasicInfos();\n \n // The total progression is a mix of:\n // -the progression of the decreasing number of cards in deck (end of game by score)\n // -the progression of each player in terms of the achievements they get\n \n // Progression in cards\n // Hypothesis: a card of age 9 is drawn three times quicker than a card of age 1. Cards of age 10 are worth six times a card of age 1 because if there are none left it is the end of the game\n $weight = 0;\n $total_weight = 0;\n \n $number_of_cards_in_decks = self::countCardsInLocation(0, 'deck', true);\n for($age=1; $age<=10; $age++) {\n $n = $number_of_cards_in_decks[$age];\n switch($age) {\n case 1:\n $n_max = 14 - 2 * count($players); // number of cards in the deck at the beginning: 14 (15 minus one taken for achievement) minus the cards dealt to the players at the beginning\n $w = 1; // weight for cards of age 1: 1\n break;\n case 10:\n $n++; // one more \"virtual\" card because the game is not over where the tenth age 10 card is drawn (but quite...)\n $n_max = 11; // number of cards in the deck at the beginning: 10, +1 one more \"virtual\" card because the game is not over when the last is drawn\n $w = 6; // weight for cards of age 10: 6\n break;\n default:\n $n_max = 9; // number of cards in the deck at the beginning: 9 (10 minus one taken for achievement)\n $w = ($age-1) / 4 + 1; // weight between 1.25 (for age 2) and 3 (for age 9)\n break;\n };\n $weight += ($n_max - $n) * $w; // What is really important are the cards already drawn\n $total_weight += $n_max * $w;\n }\n $progression_in_cards = $weight/$total_weight;\n \n // Progression of players\n // This is the ratio between the number of achievements the player have got so far and the number of achievements needed to win the game\n $progression_of_players = array();\n $n_max = self::getGameStateValue('number_of_achievements_needed_to_win');\n foreach($players as $player_id=>$player) {\n $n = self::getPlayerNumberOfAchievements($player_id);\n $progression_of_players[] = $n/$n_max;\n }\n \n // If any of the above progression was 100%, the game would be over. So, 100% is a kind of \"absorbing\" element. So,the method is to multiply the complements of the progression.\n // A complement is defined as 100% - progression\n $complement = 1 - $progression_in_cards;\n foreach($progression_of_players as $progression) {\n $complement *= 1 - $progression;\n }\n $final_progression = 1 - $complement;\n \n // Convert the final result in percentage\n $percentage = intval(100 * $final_progression);\n $percentage = min(max(1, $percentage), 99); // Set that progression between 1% and 99%\n return $percentage;\n }", "public function updateScoresAndShots()\n {\n $this->player1score = 0;\n $this->player1shots = 0;\n $this->player2score = 0;\n $this->player2shots = 0;\n\n foreach ($this->getTurns() as $turn) {\n if ($turn->isVoid()) {\n continue;\n }\n\n if ($turn->getPlayer() == $this->getGame()->getPlayer1()) {\n $this->player1score += $turn->getTotalScore();\n $this->player1shots += 3;\n } else {\n $this->player2score += $turn->getTotalScore();\n $this->player2shots += 3;\n }\n }\n }", "public function stateScores () : void {\r\n $highestHand = 0;\r\n\r\n foreach ($this->players() as $player) {\r\n if ( $player->handValue() > $highestHand && ! $player->busted() )\r\n $highestHand = $player->handValue();\r\n\r\n if ( $player->busted() )\r\n echo 'Player ' . $player->getName() . ' busted with ' . $player->handValue();\r\n else\r\n echo 'Player ' . $player->getName() . \"'s hand : \" . $player->handValue();\r\n echo PHP_EOL;\r\n }\r\n\r\n if ( $this->dealer->handValue() > $highestHand && ! $this->dealer->busted() )\r\n $highestHand = $this->dealer->handValue();\r\n\r\n if ( $this->dealer->busted() )\r\n echo 'Dealer busted with ' . $this->dealer->handValue();\r\n else\r\n echo \"Dealer's hand : \" . $this->dealer->handValue();\r\n echo PHP_EOL;\r\n\r\n echo PHP_EOL, PHP_EOL, \"Highest Hands : \";\r\n foreach ($this->players() as $player)\r\n if ( $player->handValue() == $highestHand )\r\n echo $player->getName() . \" \";\r\n if ( $this->dealer->handValue() == $highestHand )\r\n echo 'Dealer';\r\n echo PHP_EOL, PHP_EOL;\r\n }", "public function holdingLeft(){\n\t\treturn $this->_sendPacketToController(self::HOLDING_LEFT);\n\t}", "private function passTime()\n {\n // guys in bathroom lose pee equal to peeSpeed\n // guys at bar gain pee equal to drinkSpeed\n // guys in bathroom with pee == 0 return to bar\n }", "function calculatePoints($Points = array(), $MatchType, $BattingMinimumRuns, $ScoreValue, $BallsFaced = 0, $Overs = 0, $Runs = 0, $MinimumOverEconomyRate = 0, $PlayerRole, $HowOut)\n {\n /* Match Types */\n $MatchTypes = array('ODI' => 'PointsODI', 'List A' => 'PointsODI', 'T20' => 'PointsT20', 'T20I' => 'PointsT20', 'Test' => 'PointsTEST', 'Woman ODI' => 'PointsODI', 'Woman T20' => 'PointsT20');\n $MatchTypeField = $MatchTypes[$MatchType];\n $PlayerPoints = array('PointsTypeGUID' => $Points['PointsTypeGUID'], 'PointsTypeShortDescription' => $Points['PointsTypeShortDescription'], 'DefinedPoints' => strval($Points[$MatchTypeField]), 'ScoreValue' => (!empty($ScoreValue)) ? strval($ScoreValue) : \"0\");\n switch ($Points['PointsTypeGUID']) {\n case 'ThreeWickets':\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue == 3) ? strval($Points[$MatchTypeField]) : \"0\";\n $this->defaultBowlingPoints = $PlayerPoints;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsBowlingState == 0) {\n $this->IsBowlingState = 1;\n return $PlayerPoints;\n }\n break;\n case 'FourWickets':\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue == 4) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsBowlingState == 0) {\n $this->IsBowlingState = 1;\n return $PlayerPoints;\n }\n break;\n case 'FiveWickets':\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue == 5) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsBowlingState == 0) {\n $this->IsBowlingState = 1;\n return $PlayerPoints;\n }\n break;\n case 'SixWickets':\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue == 6) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsBowlingState == 0) {\n $this->IsBowlingState = 1;\n return $PlayerPoints;\n }\n break;\n case 'SevenWicketsMore':\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 7) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsBowlingState == 0) {\n $this->IsBowlingState = 1;\n return $PlayerPoints;\n }\n break;\n case 'EightWicketsMore':\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 8) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsBowlingState == 0) {\n $this->IsBowlingState = 1;\n return $PlayerPoints;\n }\n break;\n case 'RunOUT':\n case 'Stumping':\n case 'Four':\n case 'Six':\n case 'EveryRunScored':\n case 'Catch':\n case 'Wicket':\n case 'Maiden':\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue > 0) ? $Points[$MatchTypeField] * $ScoreValue : 0;\n return $PlayerPoints;\n break;\n case 'Duck':\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue <= 0 && $PlayerRole != 'Bowler' && $HowOut != \"Not out\") ? (($BallsFaced >= 1) ? $Points[$MatchTypeField] : 0) : 0;\n return $PlayerPoints;\n break;\n case 'StrikeRate0N49.99':\n $PlayerPoints['CalculatedPoints'] = \"0\";\n $this->defaultStrikeRatePoints = $PlayerPoints;\n if ($Runs >= $BattingMinimumRuns) {\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 0.1 && $ScoreValue <= 49.99) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsStrikeRate == 0) {\n $this->IsStrikeRate = 1;\n return $PlayerPoints;\n }\n } else {\n $PlayerPoints['CalculatedPoints'] = 0;\n }\n break;\n case 'StrikeRate50N74.99':\n if ($Runs >= $BattingMinimumRuns) {\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 50 && $ScoreValue <= 74.99) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsStrikeRate == 0) {\n $this->IsStrikeRate = 1;\n return $PlayerPoints;\n }\n } else {\n $PlayerPoints['CalculatedPoints'] = 0;\n }\n break;\n case 'StrikeRate75N99.99':\n if ($Runs >= $BattingMinimumRuns) {\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 75 && $ScoreValue <= 99.99) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsStrikeRate == 0) {\n $this->IsStrikeRate = 1;\n return $PlayerPoints;\n }\n } else {\n $PlayerPoints['CalculatedPoints'] = 0;\n }\n break;\n case 'StrikeRate100N149.99':\n if ($Runs >= $BattingMinimumRuns) {\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 100 && $ScoreValue <= 149.99) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsStrikeRate == 0) {\n $this->IsStrikeRate = 1;\n return $PlayerPoints;\n }\n } else {\n $PlayerPoints['CalculatedPoints'] = 0;\n }\n break;\n case 'StrikeRate150N199.99':\n if ($Runs >= $BattingMinimumRuns) {\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 150 && $ScoreValue <= 199.99) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsStrikeRate == 0) {\n $this->IsStrikeRate = 1;\n return $PlayerPoints;\n }\n } else {\n $PlayerPoints['CalculatedPoints'] = 0;\n }\n break;\n case 'StrikeRate200NMore':\n if ($Runs >= $BattingMinimumRuns) {\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 200) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsStrikeRate == 0) {\n $this->IsStrikeRate = 1;\n return $PlayerPoints;\n }\n } else {\n $PlayerPoints['CalculatedPoints'] = 0;\n }\n break;\n case 'EconomyRate0N5Balls':\n $PlayerPoints['CalculatedPoints'] = \"0\";\n $this->defaultEconomyRatePoints = $PlayerPoints;\n if ($Overs >= $MinimumOverEconomyRate) {\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 0.1 && $ScoreValue <= 5) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsEconomyRate == 0) {\n $this->IsEconomyRate = 1;\n return $PlayerPoints;\n }\n } else {\n $PlayerPoints['CalculatedPoints'] = 0;\n }\n break;\n case 'EconomyRate5.01N7.00Balls':\n if ($Overs >= $MinimumOverEconomyRate) {\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 5.01 && $ScoreValue <= 7) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsEconomyRate == 0) {\n $this->IsEconomyRate = 1;\n return $PlayerPoints;\n }\n } else {\n $PlayerPoints['CalculatedPoints'] = 0;\n }\n break;\n case 'EconomyRate5.01N8.00Balls':\n if ($Overs >= $MinimumOverEconomyRate) {\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 5.01 && $ScoreValue <= 8) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsEconomyRate == 0) {\n $this->IsEconomyRate = 1;\n return $PlayerPoints;\n }\n } else {\n $PlayerPoints['CalculatedPoints'] = 0;\n }\n break;\n case 'EconomyRate7.01N10.00Balls':\n if ($Overs >= $MinimumOverEconomyRate) {\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 7.01 && $ScoreValue <= 10) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsEconomyRate == 0) {\n $this->IsEconomyRate = 1;\n return $PlayerPoints;\n }\n } else {\n $PlayerPoints['CalculatedPoints'] = 0;\n }\n break;\n case 'EconomyRate8.01N10.00Balls':\n if ($Overs >= $MinimumOverEconomyRate) {\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 8.01 && $ScoreValue <= 10) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsEconomyRate == 0) {\n $this->IsEconomyRate = 1;\n return $PlayerPoints;\n }\n } else {\n $PlayerPoints['CalculatedPoints'] = 0;\n }\n break;\n case 'EconomyRate10.01N12.00Balls':\n if ($Overs >= $MinimumOverEconomyRate) {\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 10.01 && $ScoreValue <= 12) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsEconomyRate == 0) {\n $this->IsEconomyRate = 1;\n return $PlayerPoints;\n }\n } else {\n $PlayerPoints['CalculatedPoints'] = 0;\n }\n break;\n case 'EconomyRateAbove12.1Balls':\n if ($Overs >= $MinimumOverEconomyRate) {\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 12.1) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsEconomyRate == 0) {\n $this->IsEconomyRate = 1;\n return $PlayerPoints;\n }\n } else {\n $PlayerPoints['CalculatedPoints'] = 0;\n }\n break;\n case 'For30runs':\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 30 && $ScoreValue < 50) ? strval($Points[$MatchTypeField]) : \"0\";\n $this->defaultBattingPoints = $PlayerPoints;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsBattingState == 0) {\n $this->IsBattingState = 1;\n return $PlayerPoints;\n }\n break;\n case 'For50runs':\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 50 && $ScoreValue < 100) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsBattingState == 0) {\n $this->IsBattingState = 1;\n return $PlayerPoints;\n }\n break;\n case 'For100runs':\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 100 && $ScoreValue < 150) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsBattingState == 0) {\n $this->IsBattingState = 1;\n return $PlayerPoints;\n }\n break;\n case 'For150runs':\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 150 && $ScoreValue < 200) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsBattingState == 0) {\n $this->IsBattingState = 1;\n return $PlayerPoints;\n }\n break;\n case 'For200runs':\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 200 && $ScoreValue < 300) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsBattingState == 0) {\n $this->IsBattingState = 1;\n return $PlayerPoints;\n }\n break;\n case 'For300runs':\n $PlayerPoints['CalculatedPoints'] = ($ScoreValue >= 300) ? $Points[$MatchTypeField] : 0;\n if ($PlayerPoints['CalculatedPoints'] != 0 && $this->IsBattingState == 0) {\n $this->IsBattingState = 1;\n return $PlayerPoints;\n }\n break;\n default:\n return false;\n break;\n }\n }", "public function getPlayerAverages() : array\n {\n $average['shooting'] = 0;\n $average['skating'] = 0;\n $average['checking'] = 0;\n foreach ($this->players as $player) {\n $average['shooting'] += $player->shooting;\n $average['skating'] += $player->skating;\n $average['checking'] += $player->checking;\n }\n // Checks if zero players are on a squad to prevent division by zero\n if (count($this->players) !== 0) {\n $average['shooting'] = (int) ($average['shooting'] / count($this->players));\n $average['skating'] = (int) ($average['skating'] / count($this->players));\n $average['checking'] = (int) ($average['checking'] / count($this->players));\n }\n return $average;\n }", "private function calculateProbabilityOfWinning(Player $playerOne, Player $playerTwo): float\n {\n $playerOneTransformedRating = $this->getTransformedRating($playerOne);\n $playerTwoTransformedRating = $this->getTransformedRating($playerTwo);\n\n return $playerOneTransformedRating / ($playerOneTransformedRating + $playerTwoTransformedRating);\n }", "public function updateAvailability(Player $player)\n {\n if ($player->getOpponent()) {\n $game = $player->getGame();\n $game->manipulateAvailable(false);\n $this->em->persist($game);\n $this->em->flush();\n }\n }", "function calcLTV() {\n try {\n $results = $db->query(\"SELECT * FROM borrower_tbl WHERE id='\" . $borrowerId . \"';\" );\n } catch (Exception $e) {\n echo \"Could not connect to database!: \" . $e->getMessage();\n exit;\n }\n $borrower = $results->fetchAll(PDO::FETCH_ASSOC);\n \n }", "public function drainPerRound() {\r\n\t\tif ($this->isWeapon()) {\r\n\t\t\t$fullDrain = $this->amount() * $this->drain();\r\n\t\t\treturn ($fullDrain / $this->reload());\r\n\t\t}\r\n\r\n\t\treturn 0;\r\n\t}", "public function totalPeopleUnderControl()\n {\n if (!$this->getStatus()->isFree()) {\n return 0;\n } elseif (0 == $this->peopleUnderControl->length()) {\n return 0;\n } else {\n $peopleUnderControl = $this->peopleUnderControl->length();\n foreach ($this->peopleUnderControl->keys() as $key) {\n $memberActual = $this->peopleUnderControl->getMember($key);\n\n $peopleUnderControl += $memberActual->totalPeopleUnderControl();\n }\n return $peopleUnderControl;\n }\n }" ]
[ "0.66872907", "0.5962012", "0.5804409", "0.5617306", "0.55641145", "0.51231796", "0.50978607", "0.50844836", "0.5065956", "0.50033957", "0.49990228", "0.49630114", "0.494356", "0.49345016", "0.48787436", "0.4860722", "0.48013806", "0.48003072", "0.4798671", "0.47933862", "0.4786656", "0.47808626", "0.4768028", "0.47238207", "0.47121012", "0.47049358", "0.46991852", "0.46989587", "0.46919695", "0.46665734" ]
0.6086163
1
Get the list of parameters for this form.
public static function get_parameters() { return array( array( 'name' => 'termlist_id', 'caption' => 'Term List', 'description' => 'The term list being edited.', 'type' => 'select', 'table' => 'termlist', 'captionField' => 'title', 'valueField' => 'id', 'siteSpecific'=>true, 'group' => 'Terms', 'required'=>true ), array( 'name' => 'language_id', 'caption' => 'Language', 'description' => 'The language that terms are created in.', 'type' => 'select', 'table' => 'language', 'captionField' => 'language', 'valueField' => 'id', 'siteSpecific'=>true, 'group' => 'Terms', 'required'=>true ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormParameters()\n {\n return $this->form_parameters;\n }", "public function getParameters()\n {\n return $this->parameters->all();\n }", "function getFormParams() {\n\t\treturn $this->_formParams;\n\t}", "public function get_parameters() {\r\n\t\treturn $this->parameters;\r\n\t}", "public function parameters()\n\t{\n\t\treturn [\n\t\t\t'parent_id' => $this->input('parent_id'),\n\t\t\t'title' => $this->input('title'),\n\t\t\t'icon' => $this->input('icon'),\n\t\t\t'description' => $this->input('description'),\n\t\t\t'is_active' => $this->has('is_active')\n\t\t];\n\t}", "public function getParameters()\n {\n return $this->params;\n }", "public function getParameters()\n {\n return $this->params;\n }", "public function getParameters()\n {\n return $this->params;\n }", "public function getParameters()\n {\n return $this->params;\n }", "public function parameters()\n {\n return $this->parameters;\n }", "public function parameters()\n {\n return $this->parameters;\n }", "public function get_parameters()\n\t{\n\t\treturn $this->set_params;\n\t}", "public function getParameters()\n {\n return array();\n }", "public function getParameters()\n {\n return $this->parameters;\n }", "public function getParameters()\n {\n return $this->parameters;\n }", "public function getParameters()\n {\n return $this->parameters;\n }", "public function getParameters()\n {\n return $this->parameters;\n }", "public function getParameters()\n {\n return $this->parameters;\n }", "public function getParameters()\n {\n return $this->parameters;\n }", "public function getParameters()\n {\n return $this->parameters;\n }", "public function getParameters()\n {\n return $this->parameters;\n }", "public function getParameters()\n {\n return $this->parameters;\n }", "public function getParameters()\n {\n return $this->parameters;\n }", "public function getParameters()\n {\n return $this->parameters;\n }", "function getParameters() {\n\t\treturn $this->inputParameters;\n\t}", "public function getParameters() {\n \n return $this->params;\n \n }", "public function getParameters() {\n return $this->parameters;\n }", "public function getParameters()\r\n {\r\n return $this->parameters;\r\n }", "public function getParametersList(){\n return $this->_get(2);\n }", "public function getParameters()\n\t{\n\t\treturn $this->parameters;\n\t}" ]
[ "0.83327293", "0.7673348", "0.7606245", "0.74927783", "0.74764305", "0.74746084", "0.74746084", "0.74746084", "0.74746084", "0.74587613", "0.74587613", "0.7454035", "0.74270177", "0.7424826", "0.7424826", "0.7424826", "0.7424826", "0.7424826", "0.7424826", "0.7424826", "0.7424826", "0.7424826", "0.7424826", "0.7424826", "0.74190485", "0.74065864", "0.7400599", "0.7380418", "0.73673797", "0.73620605" ]
0.78400004
1
Return the templates configuration structure which control what extra fields will be shown in the "Template" tab when configuring a form's PDF. The fields key is based on our \GFPDF\Helper\Helper_Abstract_Options Settings API See the Helper_Options_Fields::register_settings() method for the exact fields that can be passed in
public function configuration() { return [ /* Enable core fields */ 'core' => [ 'enable_conditional' => true, 'show_empty' => true, 'background_image' => true, ], /* Create custom fields to control the look and feel of a template */ 'fields' => [ 'letter_number' => [ 'id' => 'letter_number', 'name' => esc_html__( 'Number of letter', 'gravity-forms-pdf-extended' ), 'type' => 'number', 'desc' => esc_html__( 'The number of letter (Shomare-ye name)', 'gravity-forms-pdf-extended' ), ], 'letter_date' => [ 'id' => 'letter_date', 'name' => esc_html__( 'Date of letter', 'gravity-forms-pdf-extended' ), 'type' => 'text', 'desc' => esc_html__( 'The date of letter (Tarikh-e name) in YYY/mm/dd format (jalali calendar)', 'gravity-forms-pdf-extended' ), ], 'first_user_data' => [ 'id' => 'first_user_data', 'name' => esc_html__( 'First user data', 'gravity-forms-pdf-extended' ), 'type' => 'text', 'desc' => esc_html__( 'The first user data', 'gravity-forms-pdf-extended' ), 'inputClass' => 'merge-tag-support mt-hide_all_fields', /* add merge tag support */ ], 'first_user_data_top_space' => [ 'id' => 'first_user_data_top_space', 'name' => esc_html__( 'First user data top space', 'gravity-forms-pdf-extended' ), 'type' => 'number', 'desc' => esc_html__( 'Space from top (in px) for first data', 'gravity-forms-pdf-extended' ), ], 'first_user_data_right_space' => [ 'id' => 'first_user_data_right_space', 'name' => esc_html__( 'First user data right space', 'gravity-forms-pdf-extended' ), 'type' => 'number', 'desc' => esc_html__( 'Space from right (in px) for first data', 'gravity-forms-pdf-extended' ), ], 'second_user_data' => [ 'id' => 'second_user_data', 'name' => esc_html__( 'Second user data', 'gravity-forms-pdf-extended' ), 'type' => 'text', 'desc' => esc_html__( 'Second user data', 'gravity-forms-pdf-extended' ), 'inputClass' => 'merge-tag-support mt-hide_all_fields', /* add merge tag support */ ], 'second_user_data_top_space' => [ 'id' => 'second_user_data_top_space', 'name' => esc_html__( 'Second user data top space', 'gravity-forms-pdf-extended' ), 'type' => 'number', 'desc' => esc_html__( 'Space from top (in px) for second data', 'gravity-forms-pdf-extended' ), ], 'second_user_data_right_space' => [ 'id' => 'second_user_data_right_space', 'name' => esc_html__( 'Second user data right space', 'gravity-forms-pdf-extended' ), 'type' => 'number', 'desc' => esc_html__( 'Space from right (in px) for second data', 'gravity-forms-pdf-extended' ), ], ], ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function template_options() {\n\t\treturn array(\n\t\t\t'title' => __( 'Protected Content Markup', 'byobgpcm' ),\n\t\t\t'fields' => array(\n\t\t\t\t'use_protected_content_markup' => array(\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'label' => __( 'Does this template contain protected content?', 'byobgpcm' ),\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'yes' => __( 'Use protected content markup on this template', 'byobgpcm' )\n\t\t\t\t\t),\n\t\t\t\t\t'dependents' => array( 'yes' )\n\t\t\t\t),\n\t\t\t\t'organization_name' => array(\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => __( 'Organization name is required', 'byobgpcm' ),\n\t\t\t\t\t'width' => 'full',\n\t\t\t\t\t'placeholder' => 'ACME Company',\n\t\t\t\t\t'parent' => array(\n\t\t\t\t\t\t'use_protected_content_markup' => 'yes'\n\t\t\t\t\t),\n\t\t\t\t\t'tooltip' => __( 'Google requires that the name of the organization be published', 'byobgpcm' )\n\t\t\t\t),\n\t\t\t\t'logo_url' => array(\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => __( 'Organization logo URL', 'byobgpcm' ),\n\t\t\t\t\t'width' => 'full',\n\t\t\t\t\t'placeholder' => 'http://acmeco.com/logo-img.jpg',\n\t\t\t\t\t'parent' => array(\n\t\t\t\t\t\t'use_protected_content_markup' => 'yes'\n\t\t\t\t\t),\n\t\t\t\t\t'tooltip' => __( 'Google requires a logo image for the organization - use an absolute url', 'byobgpcm' )\n\t\t\t\t),\n\t\t\t\t'use_more_protection' => array(\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'label' => __( 'Does this template protect content using the \"More Tag\"?', 'byobgpcm' ),\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'yes' => __( 'Include \"More Tag\" protection', 'byobgpcm' )\n\t\t\t\t\t),\n\t\t\t\t\t'parent' => array(\n\t\t\t\t\t\t'use_protected_content_markup' => 'yes'\n\t\t\t\t\t)\n\t\t\t\t),\n\t\t\t\t'selector1' => array(\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => __( 'Selector to protect', 'byobgpcm' ),\n\t\t\t\t\t'width' => 'medium',\n\t\t\t\t\t'code' => 'true',\n\t\t\t\t\t'placeholder' => '.post_box',\n\t\t\t\t\t'parent' => array(\n\t\t\t\t\t\t'use_protected_content_markup' => 'yes'\n\t\t\t\t\t),\n\t\t\t\t\t'tooltip' => __( 'place the class selector you wish to be marked as protected. Include the class indicator', 'byobgpcm' )\n\t\t\t\t),\n\t\t\t\t'selector2' => array(\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => __( 'Selector to protect', 'byobgpcm' ),\n\t\t\t\t\t'width' => 'medium',\n\t\t\t\t\t'code' => 'true',\n\t\t\t\t\t'placeholder' => '.comment_list',\n\t\t\t\t\t'parent' => array(\n\t\t\t\t\t\t'use_protected_content_markup' => 'yes'\n\t\t\t\t\t),\n\t\t\t\t\t'tooltip' => __( 'place the class selector you wish to be marked as protected. Include the class indicator', 'byobgpcm' )\n\t\t\t\t),\n\t\t\t\t'selector3' => array(\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => __( 'Selector to protect', 'byobgpcm' ),\n\t\t\t\t\t'width' => 'medium',\n\t\t\t\t\t'code' => 'true',\n\t\t\t\t\t'placeholder' => '.post_box',\n\t\t\t\t\t'parent' => array(\n\t\t\t\t\t\t'use_protected_content_markup' => 'yes'\n\t\t\t\t\t),\n\t\t\t\t\t'tooltip' => __( 'place the class selector you wish to be marked as protected. Include the class indicator', 'byobgpcm' )\n\t\t\t\t),\n\t\t\t\t'selector4' => array(\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => __( 'Selector to protect', 'byobgpcm' ),\n\t\t\t\t\t'width' => 'medium',\n\t\t\t\t\t'code' => 'true',\n\t\t\t\t\t'placeholder' => '.post_box',\n\t\t\t\t\t'parent' => array(\n\t\t\t\t\t\t'use_protected_content_markup' => 'yes'\n\t\t\t\t\t),\n\t\t\t\t\t'tooltip' => __( 'place the class selector you wish to be marked as protected. Include the class indicator', 'byobgpcm' )\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\t}", "public function plugin_settings_fields() {\n\t\t\t\t\t\t\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'title' => '',\n\t\t\t\t'description' => $this->plugin_settings_description(),\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'app_id',\n\t\t\t\t\t\t'label' => esc_html__( 'Application ID', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'class' => 'medium',\n\t\t\t\t\t\t'feedback_callback' => array( $this, 'initialize_api' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'api_username',\n\t\t\t\t\t\t'label' => esc_html__( 'Account Username', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'class' => 'medium',\n\t\t\t\t\t\t'feedback_callback' => array( $this, 'initialize_api' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'api_password',\n\t\t\t\t\t\t'label' => esc_html__( 'API Password', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'class' => 'medium',\n\t\t\t\t\t\t'input_type' => 'password',\n\t\t\t\t\t\t'feedback_callback' => array( $this, 'initialize_api' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'client_folder',\n\t\t\t\t\t\t'label' => esc_html__( 'Client Folder', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'choices' => version_compare( GFForms::$version, '2.5-dev-1', '>=' ) ? array( $this, 'client_folders_for_plugin_setting' ) : $this->client_folders_for_plugin_setting(),\n\t\t\t\t\t\t'dependency' => array( $this, 'initialize_api' ),\n\t\t\t\t\t\t'no_choices' => esc_html__( 'Unable to retrieve Client Folders.', 'gravityformsicontact' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'type' => 'save',\n\t\t\t\t\t\t'messages' => array(\n\t\t\t\t\t\t\t'success' => esc_html__( 'iContact settings have been updated.', 'gravityformsicontact' )\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\t\t\n\t}", "public function getFormTemplates();", "public function getTemplateOptions();", "function get_settings() {\n\n $defaults = [\n 'general' => [\n 'label' => __( 'General', 'fwp' ),\n 'fields' => [\n 'license_key' => [\n 'label' => __( 'License Key', 'fwp' ),\n 'html' => $this->get_field_html( 'license_key' )\n ],\n 'gmaps_api_key' => [\n 'label' => __( 'Google Maps API Key', 'fwp' ),\n 'html' => $this->get_field_html( 'gmaps_api_key' )\n ],\n 'separators' => [\n 'label' => __( 'Separators', 'fwp' ),\n 'html' => $this->get_field_html( 'separators' )\n ],\n 'loading_animation' => [\n 'label' => __( 'Loading Animation', 'fwp' ),\n 'html' => $this->get_field_html( 'loading_animation', 'dropdown', [\n 'choices' => [ 'fade' => __( 'Fade', 'fwp' ), '' => __( 'Spin', 'fwp' ), 'none' => __( 'None', 'fwp' ) ]\n ] )\n ],\n 'prefix' => [\n 'label' => __( 'URL Prefix', 'fwp' ),\n 'html' => $this->get_field_html( 'prefix', 'dropdown', [\n 'choices' => [ 'fwp_' => 'fwp_', '_' => '_' ]\n ] )\n ],\n 'debug_mode' => [\n 'label' => __( 'Debug Mode', 'fwp' ),\n 'html' => $this->get_field_html( 'debug_mode', 'toggle', [\n 'true_value' => 'on',\n 'false_value' => 'off'\n ] )\n ]\n ]\n ],\n 'woocommerce' => [\n 'label' => __( 'WooCommerce', 'fwp' ),\n 'fields' => [\n 'wc_enable_variations' => [\n 'label' => __( 'Support product variations?', 'fwp' ),\n 'notes' => __( 'Enable if your store uses variable products.', 'fwp' ),\n 'html' => $this->get_field_html( 'wc_enable_variations', 'toggle' )\n ],\n 'wc_index_all' => [\n 'label' => __( 'Include all products?', 'fwp' ),\n 'notes' => __( 'Show facet choices for out-of-stock products?', 'fwp' ),\n 'html' => $this->get_field_html( 'wc_index_all', 'toggle' )\n ]\n ]\n ],\n 'backup' => [\n 'label' => __( 'Backup', 'fwp' ),\n 'fields' => [\n 'export' => [\n 'label' => __( 'Export', 'fwp' ),\n 'html' => $this->get_field_html( 'export' )\n ],\n 'import' => [\n 'label' => __( 'Import', 'fwp' ),\n 'html' => $this->get_field_html( 'import' )\n ]\n ]\n ]\n ];\n\n if ( ! is_plugin_active( 'woocommerce/woocommerce.php' ) ) {\n unset( $defaults['woocommerce'] );\n }\n\n return apply_filters( 'facetwp_settings_admin', $defaults, $this );\n }", "public function getConfigurationFields()\n {\n return [\n 'restApiKey' => [\n //Should be replaced by a password formType but which doesn't\n //empty the field at each edit\n 'type' => 'text',\n 'options' => [\n 'required' => true,\n 'help' => 'pim_prestashop_connector.export.restApiKey.help',\n 'label' => 'pim_prestashop_connector.export.restApiKey.label',\n ],\n ],\n 'prestashopUrl' => [\n 'options' => [\n 'required' => true,\n 'help' => 'pim_prestashop_connector.export.prestashopUrl.help',\n 'label' => 'pim_prestashop_connector.export.prestashopUrl.label',\n ],\n ],\n 'httpLogin' => [\n 'options' => [\n 'required' => false,\n 'help' => 'pim_prestashop_connector.export.httpLogin.help',\n 'label' => 'pim_prestashop_connector.export.httpLogin.label',\n ],\n ],\n 'httpPassword' => [\n 'options' => [\n 'required' => false,\n 'help' => 'pim_prestashop_connector.export.httpPassword.help',\n 'label' => 'pim_prestashop_connector.export.httpPassword.label',\n ],\n ],\n 'defaultStoreView' => [\n 'options' => [\n 'required' => false,\n 'help' => 'pim_prestashop_connector.export.defaultStoreView.help',\n 'label' => 'pim_prestashop_connector.export.defaultStoreView.label',\n 'data' => $this->getDefaultStoreView(),\n ],\n ],\n ];\n }", "public function get_settings_fields() {\n\n\n\t\t/*\n\t\t * name ( name of the field)\n\t\t * type ( type of the field which help to call call class back)\n\t\t * label ( [optional] if you want to display any think the description )\n\t\t * default ( [optional] default values)\n\t\t * options ( [optional] options we use when type is select mostly but this use to give option to fields)\n\t\t * link ( [optional] in case you send a link to field)\n\t\t * sanitize_callback ( [optional] sanitize call back of the field)\n\t\t * priority [ [optional] use to giving parity to the user]\n\t\t * page ( page name we use menu slug this fields belong to this page)\n\t\t *\n\t\t * */\n\n\n\t\t// setting files index key is ( section => array( fields ))\n\t\t$settings_fields = array(\n\t\t\t'test_1' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'name',\n\t\t\t\t\t'label' => __( 'Enter the name', 'sharaz_settings' ),\n\t\t\t\t\t'desc' => __( '<h4>Sharaz Setting Api</h4>if you like please share to others', 'sharaz_settings' ),\n\t\t\t\t\t'type' => 'ss_text',\n\t\t\t\t\t'page' => 'ss_page',\n\t\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t\t'priority' => '5',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'salary',\n\t\t\t\t\t'label' => 'Select your salary range',\n\t\t\t\t\t'type' => 'ss_select',\n\t\t\t\t\t'page' => 'ss_page',\n\t\t\t\t\t'default' => '2000',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'1000' => '1000',\n\t\t\t\t\t\t'2000' => '2000',\n\t\t\t\t\t\t'3000' => '3000',\n\t\t\t\t\t),\n\t\t\t\t\t'priority' => '10'\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'advance_bonus',\n\t\t\t\t\t'label' => __( 'Receving advance bonus', 'sharaz_settings' ),\n\t\t\t\t\t'type' => 'ss_checkbox',\n\t\t\t\t\t'page' => 'ss_page',\n\t\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t\t'priority' => '15',\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'name' => 'your_color',\n\t\t\t\t\t'label' => __( 'Your Setting', 'sharaz-setting' ),\n\t\t\t\t\t'type' => 'ss_color',\n\t\t\t\t\t'page' => 'ss_page',\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'priority' => '20',\n\t\t\t\t)\n\t\t\t),\n\t\t\t'test_2' => array(\n\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'suggestion',\n\t\t\t\t\t\t'label' => __( 'Ang suggestion', 'sharaz_settings' ),\n\t\t\t\t\t\t'desc' => __( '<h4>Please type some</h4>if you like suggest some thing to us', 'sharaz_settings' ),\n\t\t\t\t\t\t'type' => 'ss_text',\n\t\t\t\t\t\t'page' =>'ss_page1',\n\t\t\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t\t\t'priority' => '5',\n\t\t\t\t\t),\n\n\t\t\t)\n\t\t);\n\n\t\treturn $settings_fields;\n\t}", "private function getSectionSettingFields(){\n\t\t\t\n\t\t\t$fields = array(\n\n\t\t\t\tField::text(\n\t\t\t\t\t'name',\n\t\t\t\t\t__( 'Template name', 'chefsections' )\n\t\t\t\t),\n\n\t\t\t\tField::text( \n\t\t\t\t\t'classes',\n\t\t\t\t\t__( 'CSS Classes', 'chefsections' ),\n\t\t\t\t\tarray( \n\t\t\t\t\t\t'placeholder' => __( 'Seperate with commas\\'s', 'chefsections' ),\n\t\t\t\t\t)\n\t\t\t\t),\n\n\t\t\t\tField::checkbox(\n\t\t\t\t\t'hide_container',\n\t\t\t\t\t__( 'Hide Container', 'chefsections' )\n\t\t\t\t),\n\n\t\t\t);\n\n\t\t\t$fields = apply_filters( 'chef_sections_setting_fields', $fields, $this );\n\n\t\t\treturn $fields;\n\t\t}", "function awm_fields_configuration()\n {\n $metas = array(\n 'awm_fields' => array(\n 'item_name' => __('Field', 'extend-wp'),\n 'label' => __('Fields', 'extend-wp'),\n 'case' => 'repeater',\n 'include' => array(\n 'key' => array(\n 'label' => __('Meta key', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'text',\n 'label_class' => array('awm-needed'),\n ),\n 'label' => array(\n 'label' => __('Meta label', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'text',\n 'label_class' => array('awm-needed'),\n ),\n 'case' => array(\n 'label' => __('Field type', 'extend-wp'),\n 'case' => 'select',\n 'options' => awmInputFields(),\n 'label_class' => array('awm-needed'),\n 'attributes' => array('data-callback' => \"awm_get_case_fields\"),\n ),\n 'case_extras' => array(\n 'label' => __('Field type configuration', 'extend-wp'),\n 'case' => 'html',\n 'value' => '<div class=\"awm-field-type-configuration\"></div>',\n 'exclude_meta' => true,\n 'show_label' => true\n ),\n 'attributes' => array(\n 'label' => __('Attributes', 'extend-wp'),\n 'explanation' => __('like min=0 / onchange=action etc'),\n 'minrows' => 0,\n 'case' => 'repeater',\n 'item_name' => __('Attribute', 'extend-wp'),\n 'include' => array(\n 'label' => array(\n 'label' => __('Attribute label', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'text',\n ),\n 'value' => array(\n 'label' => __('Attribute value', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'text',\n ),\n )\n ),\n 'class' => array(\n 'label' => __('Class', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'text',\n 'attributes' => array('placeholder' => __('Seperated with (,) comma', 'extend-wp')),\n ),\n 'required' => array(\n 'label' => __('Required', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'checkbox',\n ),\n 'admin_list' => array(\n 'label' => __('Show in admin list', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'checkbox',\n ),\n 'auto_translate' => array(\n 'label' => __('Auto translate', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'checkbox',\n ),\n 'order' => array(\n 'label' => __('Order', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'number',\n ),\n 'explanation' => array(\n 'label' => __('User message', 'extend-wp'),\n 'case' => 'input',\n 'type' => 'text',\n 'attributes' => array('placeholder' => __('Guidelines for the user', 'extend-wp')),\n ),\n )\n )\n );\n return apply_filters('awm_fields_configuration_filter', $metas);\n }", "private function __getConfigurationFields()\n {\n ob_start();\n\n foreach ($this->config['configuration'] as $config) {\n include 'view/formFields.php';\n }\n\n $html = ob_get_clean();\n\n return $html;\n }", "public function plugin_settings_fields() {\n\n\t\t// Get current plugin settings.\n\t\t$settings = $this->get_plugin_settings();\n\n\t\t// Prepare base fields.\n\t\t$fields = array(\n\t\t\tarray(\n\t\t\t\t'name' => 'accessToken',\n\t\t\t\t'type' => 'hidden',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => 'customAppEnable',\n\t\t\t\t'type' => 'hidden',\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'name' => null,\n\t\t\t\t'label' => null,\n\t\t\t\t'type' => 'auth_token_button',\n\t\t\t),\n\t\t);\n\n\t\t// If API is initialized, add custom app key/secret fields.\n\t\tif ( $this->initialize_api() ) {\n\t\t\t$fields[] = array( 'name' => 'customAppKey', 'type' => 'hidden' );\n\t\t\t$fields[] = array( 'name' => 'customAppSecret', 'type' => 'hidden' );\n\t\t}\n\n\t\t// Setup base fields.\n\t\treturn array( array( 'fields' => $fields ) );\n\n\t}", "public function init_fields () {\r\n\t $options = array( 'wp_die' => __( 'Use WordPress Default', 'woodojo-maintenance-mode' ), 'theme-503' => __( '503.php in the current theme', 'woodojo-maintenance-mode' ) );\r\n\r\n\t $results = $this->find_templates();\r\n\r\n\t\tif ( is_array( $results ) && count( $results ) > 0 ) {\r\n\t\t\tforeach ( $results as $k => $v ) {\r\n\t\t\t\t$options[$k] = $v;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Allow themes/plugins to filter here.\r\n\t $options = apply_filters( 'woodojo_maintenance_mode_templates', $options );\r\n\r\n\t $fields = array();\r\n\t \r\n\t\t$fields['enable'] = array(\r\n\t\t 'name' => __( 'Enable', 'woodojo-maintenance-mode' ), \r\n\t\t 'description' => __( 'Turn on maintenance mode.', 'woodojo-maintenance-mode' ), \r\n\t\t 'type' => 'checkbox', \r\n\t\t 'default' => false, \r\n\t\t 'section' => 'general'\r\n\t\t);\r\n\t \r\n\t\t$fields['role'] = array(\r\n\t\t 'name' => __( 'Bypass Capability Requirement', 'woodojo-maintenance-mode' ), \r\n\t\t 'description' => __( 'Determine which level of users can see the website when in Maintenance Mode.', 'woodojo-maintenance-mode'), \r\n\t\t 'type' => 'select', \r\n\t\t 'default' => 'manage_options', \r\n\t\t 'options'\t=> array(\r\n\t\t \t'manage_options'\t=> __( 'Administrator', 'woodojo-maintenance-mode' ),\r\n\t\t \t'publish_pages'\t\t=> __( 'Editor', 'woodojo-maintenance-mode' ),\r\n\t\t \t'publish_posts'\t\t=> __( 'Author', 'woodojo-maintenance-mode' ),\r\n\t\t \t'edit_posts'\t\t=> __( 'Contributor', 'woodojo-maintenance-mode' ),\r\n\t\t \t'read'\t\t\t\t=> __( 'Subscriber', 'woodojo-maintenance-mode' )\r\n\t\t ),\r\n\t\t 'section' => 'general'\r\n\t\t);\r\n\t \r\n\t\t$fields['template'] = array(\r\n\t\t 'name' => __( 'Template', 'woodojo-maintenance-mode' ), \r\n\t\t 'description' => __( 'Choose the design to be used for your Maintenance Mode screen.', 'woodojo-maintenance-mode' ), \r\n\t\t 'type' => 'select', \r\n\t\t 'default' => 'wp_die', \r\n\t\t 'options'\t=> $options,\r\n\t\t 'section' => 'general'\r\n\t\t);\r\n\t \r\n\t\t$fields['page_title'] = array(\r\n\t\t 'name' => __( 'Maintenance Page Title', 'woodojo-maintenance-mode' ), \r\n\t\t 'description' => __( 'This is the page title for the Maintenance Mode page. Leave blank to use your website\\'s title.', 'woodojo-maintenance-mode' ), \r\n\t\t 'type' => 'text', \r\n\t\t 'default' => '', \r\n\t\t 'section' => 'general'\r\n\t\t);\r\n\r\n\t\t$fields['title'] = array(\r\n\t\t 'name' => __( 'Maintenance Title', 'woodojo-maintenance-mode' ), \r\n\t\t 'description' => __( 'This is the HTML title of the Maintenance Mode page. Leave blank for the default.', 'woodojo-maintenance-mode' ), \r\n\t\t 'type' => 'text', \r\n\t\t 'default' => '', \r\n\t\t 'section' => 'general'\r\n\t\t);\r\n\t \r\n\t\t$fields['note'] = array(\r\n\t\t 'name' => __( 'Maintenance Note', 'woodojo-maintenance-mode' ), \r\n\t\t 'description' => __( 'A brief note that will be included in the Maintenance Mode page. Leave blank for the default text.', 'woodojo-maintenance-mode' ), \r\n\t\t 'type' => 'textarea', \r\n\t\t 'default' => '', \r\n\t\t 'section' => 'general'\r\n\t\t);\r\n\t\t\r\n\t\t$this->fields = $fields;\r\n\t\r\n\t}", "public function get_settings_fields() {\n $settings_fields = array(\n 'grocery-general' => array(\n 'popup_logo' => array(\n 'name' => 'popup_logo',\n 'label' => __( 'Popup Logo', 'fondendpost' ),\n 'desc' => __( 'Logo to show in the popup.', 'fondendpost' ),\n 'type' => 'file',\n ),\n ),\n );\n \n return $settings_fields;\n\n }", "public function load_settings_fields() {\n\t\t\tglobal $wp_rewrite;\n\t\t\tif ( $wp_rewrite->using_permalinks() ) {\n\t\t\t\t$this->setting_option_fields = array(\n\t\t\t\t\t'courses' => array(\n\t\t\t\t\t\t'name' => 'courses',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'label' => sprintf(\n\t\t\t\t\t\t\t// translators: placeholder: Courses.\n\t\t\t\t\t\t\tesc_html_x( '%s', 'placeholder: Courses', 'learndash' ),\n\t\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'courses' )\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'value' => $this->setting_option_values['courses'],\n\t\t\t\t\t\t'class' => 'regular-text',\n\t\t\t\t\t),\n\t\t\t\t\t'lessons' => array(\n\t\t\t\t\t\t'name' => 'lessons',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'label' => sprintf(\n\t\t\t\t\t\t\t// translators: placeholder: Lessons.\n\t\t\t\t\t\t\tesc_html_x( '%s', 'placeholder: Lessons', 'learndash' ),\n\t\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'lessons' )\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'value' => $this->setting_option_values['lessons'],\n\t\t\t\t\t\t'class' => 'regular-text',\n\t\t\t\t\t),\n\t\t\t\t\t'topics' => array(\n\t\t\t\t\t\t'name' => 'topics',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'label' => sprintf(\n\t\t\t\t\t\t\t// translators: placeholder: Topics.\n\t\t\t\t\t\t\tesc_html_x( '%s', 'placeholder: Topics', 'learndash' ),\n\t\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'topics' )\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'value' => $this->setting_option_values['topics'],\n\t\t\t\t\t\t'class' => 'regular-text',\n\t\t\t\t\t),\n\t\t\t\t\t'quizzes' => array(\n\t\t\t\t\t\t'name' => 'quizzes',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'label' => sprintf(\n\t\t\t\t\t\t\t// translators: placeholder: Quizzes.\n\t\t\t\t\t\t\tesc_html_x( '%s', 'placeholder: Quizzes', 'learndash' ),\n\t\t\t\t\t\t\tLearnDash_Custom_Label::get_label( 'quizzes' )\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'value' => $this->setting_option_values['quizzes'],\n\t\t\t\t\t\t'class' => 'regular-text',\n\t\t\t\t\t)\n\t\t\t\t);\n\t\t\t}\n\n\t\t\tif ( $wp_rewrite->using_permalinks() ) {\n\t\t\t\t$example_regular_topic_url = get_option( 'home' ) . '/' . $this->setting_option_values['topics'] . '/topic-slug';\n\t\t\t\t$example_nested_topic_url = get_option( 'home' ) . '/' . $this->setting_option_values['courses'] . '/course-slug/' . $this->setting_option_values['lessons'] . '/lesson-slug/' . $this->setting_option_values['topics'] . '/topic-slug';\n\t\t\t} else {\n\t\t\t\t$example_regular_topic_url = add_query_arg( learndash_get_post_type_slug( 'topic' ), 'topic-slug', get_option( 'home' ) );\n\n\t\t\t\t$example_nested_topic_url = get_option( 'home' );\n\t\t\t\t$example_nested_topic_url = add_query_arg( learndash_get_post_type_slug( 'course'), 'course-slug', $example_nested_topic_url );\n\t\t\t\t$example_nested_topic_url = add_query_arg( learndash_get_post_type_slug( 'lesson' ), 'lesson-slug', $example_nested_topic_url );\n\t\t\t\t$example_nested_topic_url = add_query_arg( learndash_get_post_type_slug( 'topic' ), 'topic-slug', $example_nested_topic_url );\n\t\t\t}\n\n\t\t\t$this->setting_option_fields['nested_urls'] = array(\n\t\t\t\t'name' => 'nested_urls',\n\t\t\t\t'type' => 'checkbox',\n\t\t\t\t'label' => __( 'Enable Nested URLs', 'learndash' ),\n\t\t\t\t'desc' => sprintf(\n\t\t\t\t\t// translators: placeholders: Lesson, Topic, Quiz, Course, Site Home URL, URL to Course Builder Settings.\n\t\t\t\t\t_x(\n\t\t\t\t\t\t'This option will restructure %1$s, %2$s and %3$s URLs so they are nested hierarchically within the %4$s URL.<br />For example instead of the default topic URL <code>%5$s</code> the nested URL would be <code>%6$s</code>. If <a href=\"%7$s\">Course Builder Share Steps</a> has been enabled this setting is also automatically enabled.',\n\t\t\t\t\t\t'placeholders: Lesson, Topic, Quiz, Course, Site Home URL, URL to Course Builder Settings',\n\t\t\t\t\t\t'learndash'\n\t\t\t\t\t),\n\t\t\t\t\tLearnDash_Custom_Label::get_label( 'lesson' ),\n\t\t\t\t\tLearnDash_Custom_Label::get_label( 'topic' ),\n\t\t\t\t\tLearnDash_Custom_Label::get_label( 'quiz' ),\n\t\t\t\t\tLearnDash_Custom_Label::get_label( 'course' ),\n\t\t\t\t\t$example_regular_topic_url,\n\t\t\t\t\t$example_nested_topic_url,\n\t\t\t\t\tadmin_url( 'admin.php?page=courses-options' )\n\t\t\t\t),\n\t\t\t\t'value' => isset( $this->setting_option_values['nested_urls'] ) ? $this->setting_option_values['nested_urls'] : '',\n\t\t\t\t'options' => array(\n\t\t\t\t\t'yes' => __( 'Yes', 'learndash' ),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t$this->setting_option_fields['nonce'] = array(\n\t\t\t\t'name' => 'nonce',\n\t\t\t\t'type' => 'hidden',\n\t\t\t\t'label' => '',\n\t\t\t\t'value' => wp_create_nonce( 'learndash_permalinks_nonce' ),\n\t\t\t\t'class' => 'hidden',\n\t\t\t);\n\n\t\t\t$this->setting_option_fields = apply_filters( 'learndash_settings_fields', $this->setting_option_fields, $this->settings_section_key );\n\n\t\t\tparent::load_settings_fields();\n\t\t}", "public function xml_fields()\n {\n $post_url = build_url(array('page' => '_SELF', 'type' => '_xml_fields'), '_SELF');\n\n return do_template('XML_CONFIG_SCREEN', array(\n '_GUID' => 'cc21f921ecbdbdf83e1e28d2b3f75a3a',\n 'TITLE' => $this->title,\n 'POST_URL' => $post_url,\n 'XML' => file_exists(get_custom_file_base() . '/data_custom/xml_config/fields.xml') ? cms_file_get_contents_safe(get_custom_file_base() . '/data_custom/xml_config/fields.xml') : cms_file_get_contents_safe(get_file_base() . '/data/xml_config/fields.xml'),\n ));\n }", "function layout_get_templates_options_object( )\n\t{\n\n\t\t$ret = new stdClass();\n\n $template_option = $this->get_option('templates');\n if ($template_option) {\n foreach($template_option as $file => $layout) {\n $layout_templates[] = $file;\n }\n }\n\n\t\t$templates = wp_get_theme()->get_page_templates();\n\n\t\t$ret->layout_templates = $this->templates_have_layout( $templates );\n\t\t$ret->template_option = $template_option;\n\n\t\treturn $ret;\n\t}", "function get_settings_fields() {\n global $wrr_pro;\n $settings_fields = array(\n \n 'wc_segmented_ratings' => array(\n array(\n 'name' => 'enable',\n 'label' => 'Enable Segmented Ratings?',\n 'type' => 'checkbox',\n 'desc' => 'Check to enable. Please note, it will not work, if product rating is disabled from <a href=\"' . admin_url( 'admin.php?page=wc-settings&tab=products' ) . '\">WooCommerce setting</a>.',\n ),\n array(\n 'name' => 'member_only',\n 'label' => 'Verified buyers only?',\n 'desc' => 'Check to enable segmented ratings for users only who already purchased the item <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'type' => 'checkbox',\n 'disabled' => true,\n ),\n array(\n 'name' => 'params_per',\n 'label' => 'Parameter Base',\n 'desc' => 'How do you want to set rating parameters for your products? <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'type' => 'radio',\n 'options' => array(\n 'site' => 'Same parameters for all products',\n 'category' => 'Different parameters for each category',\n 'product' => 'Different parameters for each product',\n ),\n 'default' => 'site',\n 'disabled' => true,\n ),\n array(\n 'name' => 'fields',\n 'label' => 'Rating Parameters',\n 'desc' => 'If \\'<strong><label for=\"mdc-wc_segmented_ratings[params_per][site]\">Same parameters for all products</label></strong>\\' choosen for \\'Parameter Base\\' above. Ignore otherwise.<br />Type one segment per line. Separate \\'key\\' and \\'label\\' with a pipe symbol (\\'|\\').',\n 'type' => 'textarea',\n 'default' => 'price|Price'.PHP_EOL.'quality|Quality',\n ),\n ),\n 'wc_rich_editor' => array(\n array(\n 'name' => 'enable',\n 'label' => 'Enable Rich Editor?',\n 'type' => 'checkbox',\n 'desc' => 'Check to enable rich editor (<a href=\"https://en.wikipedia.org/wiki/WYSIWYG\">WYSIWYG</a>) in product review <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'disabled' => true,\n ),\n array(\n 'name' => 'member_only',\n 'label' => 'Verified buyers only?',\n 'desc' => 'Check to enable rich editor for users only who already purchased the item <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'type' => 'checkbox',\n 'disabled' => true,\n ),\n array(\n 'name' => 'teeny',\n 'label' => 'Teeny Mode?',\n 'desc' => 'Check to enable teeny mode. It\\'ll hide some features of WYSIWYG editor. <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'type' => 'checkbox',\n 'default' => 'off',\n 'disabled' => true,\n ),\n array(\n 'name' => 'quicktags',\n 'label' => 'Enable Text editor?',\n 'desc' => 'Check to enable quick tag mode. It\\'ll show \\'Text\\' tab in WYSIWYG editor to write/view HTML. <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'type' => 'checkbox',\n 'default' => 'off',\n 'disabled' => true,\n ),\n array(\n 'name' => 'media_buttons',\n 'desc' => 'Check to allow reviewers to upload/attach media files with review. <i><a href=\"' . $wrr_pro . '\">(Pro Feature)</a></i>',\n 'label' => 'Enable Media Uploader?',\n 'type' => 'checkbox',\n 'default' => 'off',\n 'disabled' => true,\n ),\n ), \n );\n\n return $settings_fields;\n }", "function ca_services_node_template_access_settings($form, &$form_state, $conf) {\n $form['settings']['ca_services_node_template'] = array(\n '#type' => 'select',\n '#title' => t('Services\\'s node template'),\n '#options' => array(\n 'ca_services_node_template_one' => t('Template one'),\n 'ca_services_node_template_two' => t('Template two'),\n 'ca_services_node_template_three' => t('Template three'),\n ),\n '#required' => TRUE,\n '#default_value' => $conf['ca_services_node_template'],\n );\n\n return $form;\n}", "public function load_settings_fields() {\n\t\t\t$this->setting_option_fields = array(\n\t\t\t\t'admin_mail_from_name' => array(\n\t\t\t\t\t'name' => 'admin_mail_from_name',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__( 'From Name', 'learndash' ),\n\t\t\t\t\t'help_text' => esc_html__( 'This is the name of the sender. If not provided will default to the system email name.', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_from_name'] ) ? $this->setting_option_values['admin_mail_from_name'] : '',\n\t\t\t\t),\n\t\t\t\t'admin_mail_from_email' => array(\n\t\t\t\t\t'name' => 'admin_mail_from_email',\n\t\t\t\t\t'type' => 'email',\n\t\t\t\t\t'label' => esc_html__( 'From Email', 'learndash' ),\n\t\t\t\t\t'help_text' => sprintf(\n\t\t\t\t\t\t// translators: placeholder: admin email.\n\t\t\t\t\t\tesc_html_x( 'This is the email address of the sender. If not provided the admin email %s will be used.', 'placeholder: admin email', 'learndash' ),\n\t\t\t\t\t\t'(<strong>' . get_option( 'admin_email' ) . '</strong>)'\n\t\t\t\t\t),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_from_email'] ) ? $this->setting_option_values['admin_mail_from_email'] : '',\n\t\t\t\t),\n\t\t\t\t'admin_mail_to' => array(\n\t\t\t\t\t'name' => 'admin_mail_to',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__( 'Mail To', 'learndash' ),\n\t\t\t\t\t'help_text' => esc_html__( 'Separate multiple email addresses with a comma, e.g. [email protected], [email protected].', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_to'] ) ? $this->setting_option_values['admin_mail_to'] : '',\n\t\t\t\t),\n\t\t\t\t'admin_mail_subject' => array(\n\t\t\t\t\t'name' => 'admin_mail_subject',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__( 'Subject', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_subject'] ) ? $this->setting_option_values['admin_mail_subject'] : '',\n\t\t\t\t),\n\t\t\t\t'admin_mail_message' => array(\n\t\t\t\t\t'name' => 'admin_mail_message',\n\t\t\t\t\t'type' => 'wpeditor',\n\t\t\t\t\t'label' => esc_html__( 'Message', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_message'] ) ? stripslashes( $this->setting_option_values['admin_mail_message'] ) : '',\n\t\t\t\t\t'editor_args' => array(\n\t\t\t\t\t\t'textarea_name' => $this->setting_option_key . '[admin_mail_message]',\n\t\t\t\t\t\t'textarea_rows' => 5,\n\t\t\t\t\t\t'editor_class' => 'learndash_mail_message ' . $this->setting_option_key . '_admin_mail_message',\n\t\t\t\t\t),\n\t\t\t\t\t'label_description' => '<div>\n\t\t\t\t\t\t<h4>' . esc_html__( 'Supported variables', 'learndash' ) . ':</h4>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li><span>$userId</span> - ' . esc_html__( 'User-ID', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$username</span> - ' . esc_html__( 'Username', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$quizname</span> - ' . esc_html__( 'Quiz-Name', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$result</span> - ' . esc_html__( 'Result in percent', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$points</span> - ' . esc_html__( 'Reached points', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$ip</span> - ' . esc_html__( 'IP-address of the user', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$categories</span> - ' . esc_html__( 'Category-Overview', 'learndash' ) . '</li>\n\t\t\t\t\t\t</ul>\t\n\t\t\t\t\t</div>',\n\t\t\t\t),\n\t\t\t\t'admin_mail_html' => array(\n\t\t\t\t\t'name' => 'admin_mail_html',\n\t\t\t\t\t'type' => 'checkbox-switch',\n\t\t\t\t\t'label' => esc_html__( 'Allow HTML', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_html'] ) ? $this->setting_option_values['admin_mail_html'] : '',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'yes' => '',\n\t\t\t\t\t),\n\t\t\t\t),\n\n\t\t\t\t'user_mail_from_name' => array(\n\t\t\t\t\t'name' => 'user_mail_from_name',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__( 'From Name', 'learndash' ),\n\t\t\t\t\t'help_text' => esc_html__( 'This is the name of the sender. If not provided will default to the system email name.', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['admin_mail_from_name'] ) ? $this->setting_option_values['admin_mail_from_name'] : '',\n\t\t\t\t),\n\t\t\t\t'user_mail_from_email' => array(\n\t\t\t\t\t'name' => 'user_mail_from_email',\n\t\t\t\t\t'type' => 'email',\n\t\t\t\t\t'label' => esc_html__( 'From Email', 'learndash' ),\n\t\t\t\t\t'help_text' => sprintf(\n\t\t\t\t\t\t// translators: placeholder: admin email.\n\t\t\t\t\t\tesc_html_x( 'This is the email address of the sender. If not provided the admin email %s will be used.', 'placeholder: admin email', 'learndash' ),\n\t\t\t\t\t\t'(<strong>' . get_option( 'admin_email' ) . '</strong>)'\n\t\t\t\t\t),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['user_mail_from_email'] ) ? $this->setting_option_values['user_mail_from_email'] : '',\n\t\t\t\t),\n\t\t\t\t'user_mail_subject' => array(\n\t\t\t\t\t'name' => 'user_mail_subject',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'label' => esc_html__( 'Subject', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['user_mail_subject'] ) ? $this->setting_option_values['user_mail_subject'] : '',\n\t\t\t\t),\n\t\t\t\t'user_mail_message' => array(\n\t\t\t\t\t'name' => 'user_mail_message',\n\t\t\t\t\t'type' => 'wpeditor',\n\t\t\t\t\t'label' => esc_html__( 'Message', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['user_mail_message'] ) ? stripslashes( $this->setting_option_values['user_mail_message'] ) : '',\n\t\t\t\t\t'editor_args' => array(\n\t\t\t\t\t\t'textarea_name' => $this->setting_option_key . '[user_mail_message]',\n\t\t\t\t\t\t'textarea_rows' => 5,\n\t\t\t\t\t\t'editor_class' => 'learndash_mail_message ' . $this->setting_option_key . '_user_mail_message',\n\t\t\t\t\t),\n\t\t\t\t\t'label_description' => '<div>\n\t\t\t\t\t\t<h4>' . esc_html__( 'Supported variables', 'learndash' ) . ':</h4>\n\t\t\t\t\t\t<ul>\n\t\t\t\t\t\t\t<li><span>$userId</span> - ' . esc_html__( 'User-ID', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$username</span> - ' . esc_html__( 'Username', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$quizname</span> - ' . esc_html__( 'Quiz-Name', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$result</span> - ' . esc_html__( 'Result in percent', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$points</span> - ' . esc_html__( 'Reached points', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$ip</span> - ' . esc_html__( 'IP-address of the user', 'learndash' ) . '</li>\n\t\t\t\t\t\t\t<li><span>$categories</span> - ' . esc_html__( 'Category-Overview', 'learndash' ) . '</li>\n\t\t\t\t\t\t</ul>\t\n\t\t\t\t\t</div>',\n\t\t\t\t),\n\t\t\t\t'user_mail_html' => array(\n\t\t\t\t\t'name' => 'user_mail_html',\n\t\t\t\t\t'type' => 'checkbox-switch',\n\t\t\t\t\t'label' => esc_html__( 'Allow HTML', 'learndash' ),\n\t\t\t\t\t'value' => isset( $this->setting_option_values['user_mail_html'] ) ? $this->setting_option_values['user_mail_html'] : '',\n\t\t\t\t\t'options' => array(\n\t\t\t\t\t\t'yes' => '',\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t);\n\n\t\t\t$this->setting_option_fields = apply_filters( 'learndash_settings_fields', $this->setting_option_fields, $this->settings_section_key );\n\n\t\t\tparent::load_settings_fields();\n\t\t}", "public function feed_settings_fields() {\n\n\t\treturn array(\n\t\t\tarray(\n\t\t\t\t'title' => '',\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'feedName',\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'class' => 'medium',\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'label' => esc_html__( 'Name', 'gravityformsdropbox' ),\n\t\t\t\t\t\t'save_callback' => array( $this, 'sanitize_settings_value' ),\n\t\t\t\t\t\t'tooltip' => sprintf(\n\t\t\t\t\t\t\t'<h6>%s</h6>%s',\n\t\t\t\t\t\t\tesc_html__( 'Name', 'gravityformsdropbox' ),\n\t\t\t\t\t\t\tesc_html__( 'Enter a feed name to uniquely identify this setup.', 'gravityformsdropbox' )\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'fileUploadField',\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'label' => esc_html__( 'File Upload Field', 'gravityformsdropbox' ),\n\t\t\t\t\t\t'choices' => $this->get_file_upload_field_choices(),\n\t\t\t\t\t\t'save_callback' => array( $this, 'sanitize_settings_value' ),\n\t\t\t\t\t\t'tooltip' => sprintf(\n\t\t\t\t\t\t\t'<h6>%s</h6>%s',\n\t\t\t\t\t\t\tesc_html__( 'File Upload Field', 'gravityformsdropbox' ),\n\t\t\t\t\t\t\tesc_html__( 'Select the specific File Upload field that you want to be uploaded to Dropbox.', 'gravityformsdropbox' )\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'destinationFolder',\n\t\t\t\t\t\t'type' => 'folder',\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'label' => esc_html__( 'Destination Folder', 'gravityformsdropbox' ),\n\t\t\t\t\t\t'save_callback' => array( $this, 'sanitize_settings_value' ),\n\t\t\t\t\t\t'tooltip' => sprintf(\n\t\t\t\t\t\t\t'<h6>%s</h6>%s<br /><br />%s',\n\t\t\t\t\t\t\tesc_html__( 'Destination Folder', 'gravityformsdropbox' ),\n\t\t\t\t\t\t\tesc_html__( 'Select the folder in your Dropbox account where the files will be uploaded to.', 'gravityformsdropbox' ),\n\t\t\t\t\t\t\tesc_html__( 'By default, all files are stored in the \"Gravity Forms Add-On\" folder within the Dropbox Apps folder in your Dropbox account.', 'gravityformsdropbox' )\n\t\t\t\t\t\t),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'feedCondition',\n\t\t\t\t\t\t'type' => 'feed_condition',\n\t\t\t\t\t\t'label' => esc_html__( 'Upload Condition', 'gravityformsdropbox' ),\n\t\t\t\t\t\t'checkbox_label' => esc_html__( 'Enable Condition', 'gravityformsdropbox' ),\n\t\t\t\t\t\t'instructions' => esc_html__( 'Upload to Dropbox if', 'gravityformsdropbox' ),\n\t\t\t\t\t),\n\t\t\t\t),\n\t\t\t),\n\t\t);\n\n\t}", "function snax_admin_get_settings_fields() {\n\treturn (array) apply_filters( 'snax_admin_get_settings_fields', array(\n\n\t\t/** General Section **************************************************** */\n\n\t\t'snax_settings_general' => array(\n\t\t\t'snax_active_formats' => array(\n\t\t\t\t'title' => __( 'Active formats', 'snax' ) . '<br /><span style=\"font-weight: normal;\">' . __( '(drag to reorder)', 'snax' ) . '</span>',\n\t\t\t\t'callback' => 'snax_admin_setting_callback_active_formats',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_formats_order' => array(\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t),\n\t\t\t'snax_featured_media_required' => array(\n\t\t\t\t'title' => __( 'Featured image field', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_featured_media_required',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_category_required' => array(\n\t\t\t\t'title' => __( 'Category field', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_category_required',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_category_multi' => array(\n\t\t\t\t'title' => __( 'Multiple categories selection?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_category_multi',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_category_whitelist' => array(\n\t\t\t\t'title' => __( 'Category whitelist', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_category_whitelist',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_category_whitelist',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_category_auto_assign' => array(\n\t\t\t\t'title' => __( 'Auto assign to categories', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_category_auto_assign',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_category_whitelist',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_allow_snax_authors_to_add_referrals' => array(\n\t\t\t\t'title' => __( 'Referral link field ', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_allow_snax_authors_to_add_referrals',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_froala_for_items' => array(\n\t\t\t\t'title' => __( 'Allow rich editor for items in Frontend Submission', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_froala_for_items',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_froala_for_list_items' => array(\n\t\t\t\t'title' => __( 'Allow rich editor for items in open lists', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_froala_for_list_items',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_single_post_page_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Single Post Page', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_show_featured_images_for_formats' => array(\n\t\t\t\t'title' => __( 'Show featured images for single:', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_show_featured_images_for_formats',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_display_comments_on_lists' => array(\n\t\t\t\t'title' => __( 'Display items comments on list view ', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_display_comments_on_lists',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_show_origin' => array(\n\t\t\t\t'title' => __( 'Show the \"This post was created with our nice and easy submission form.\" text', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_show_origin',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_misc_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Misc', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_show_item_count_in_title' => array(\n\t\t\t\t'title' => __( 'Show items count in title', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_item_count_in_title',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_disable_admin_bar' => array(\n\t\t\t\t'title' => __( 'Disable admin bar for non-administrators', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_disable_admin_bar',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_disable_dashboard_access' => array(\n\t\t\t\t'title' => __( 'Disable Dashboard access for non-administrators', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_disable_dashboard_access',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_disable_wp_login' => array(\n\t\t\t\t'title' => __( 'Disable WP login form', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_disable_wp_login',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_enable_login_popup' => array(\n\t\t\t\t'title' => __( 'Enbable the login popup ', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_enable_login_popup',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_skip_verification' => array(\n\t\t\t\t'title' => __( 'Moderate new posts?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_skip_verification',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_mail_notifications' => array(\n\t\t\t\t'title' => __( 'Send mail to admin when new post/item was added?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_mail_notifications',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Lists Section ****************************************************** */\n\n\t\t'snax_settings_lists' => array(\n\t\t\t'snax_active_item_forms' => array(\n\t\t\t\t'title' => __( 'Item forms', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_active_item_forms',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_show_open_list_in_title' => array(\n\t\t\t\t'title' => __( 'Show list status in title', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_list_status_in_title',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Pages Section ***************************************************** */\n\n\t\t'snax_settings_pages' => array(\n\t\t\t// Frontend Submission.\n\t\t\t'snax_frontend_submission_page_id' => array(\n\t\t\t\t'title' => __( 'Frontend Submission', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_frontend_submission_page',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_published_post',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t// Terms & Conditions.\n\t\t\t'snax_legal_page_id' => array(\n\t\t\t\t'title' => __( 'Terms and Conditions', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_legal_page',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_published_post',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t// Report.\n\t\t\t'snax_report_page_id' => array(\n\t\t\t\t'title' => __( 'Report', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_report_page',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_published_post',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Voting Section **************************************************** */\n\n\t\t'snax_settings_voting' => array(\n\t\t\t'snax_voting_is_enabled' => array(\n\t\t\t\t'title' => __( 'Enable voting?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_voting_enabled',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_guest_voting_is_enabled' => array(\n\t\t\t\t'title' => __( 'Guests can vote?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_guest_voting_enabled',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_voting_post_types' => array(\n\t\t\t\t'title' => __( 'Allow users to vote on post types', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_voting_post_types',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_fake_vote_count_base' => array(\n\t\t\t\t'title' => __( 'Fake vote count base', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_fake_vote_count_base',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Limits Section **************************************************** */\n\n\t\t'snax_settings_limits' => array(\n\n\t\t\t/* IMAGES UPLOAD */\n\n\t\t\t'snax_limits_image_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Image upload', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_image_upload_allowed' => array(\n\t\t\t\t'title' => __( 'Allowed?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array( 'type' => 'image' ),\n\t\t\t),\n\t\t\t'snax_max_upload_size' => array(\n\t\t\t\t'title' => __( 'Maximum file size', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_max_size',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'type' => 'image' ),\n\t\t\t),\n\t\t\t'snax_image_allowed_types' => array(\n\t\t\t\t'title' => __( 'Allowed types', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed_types',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array( 'type' => 'image' ),\n\t\t\t),\n\n\t\t\t/* AUDIO UPLOAD */\n\n\t\t\t'snax_limits_audio_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Audio upload', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_audio_upload_allowed' => array(\n\t\t\t\t'title' => __( 'Allowed?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array( 'type' => 'audio' ),\n\t\t\t),\n\t\t\t'snax_audio_max_upload_size' => array(\n\t\t\t\t'title' => __( 'Maximum file size', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_max_size',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'type' => 'audio' ),\n\t\t\t),\n\t\t\t'snax_audio_allowed_types' => array(\n\t\t\t\t'title' => __( 'Allowed types', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed_types',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array( 'type' => 'audio' ),\n\t\t\t),\n\n\t\t\t/* VIDEO UPLOAD */\n\n\t\t\t'snax_limits_video_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Video upload', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_video_upload_allowed' => array(\n\t\t\t\t'title' => __( 'Allowed?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array( 'type' => 'video' ),\n\t\t\t),\n\t\t\t'snax_video_max_upload_size' => array(\n\t\t\t\t'title' => __( 'Maximum file size', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_max_size',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'type' => 'video' ),\n\t\t\t),\n\t\t\t'snax_video_allowed_types' => array(\n\t\t\t\t'title' => __( 'Allowed types', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_upload_allowed_types',\n\t\t\t\t'sanitize_callback' => 'snax_sanitize_text_array',\n\t\t\t\t'args' => array( 'type' => 'video' ),\n\t\t\t),\n\n\t\t\t/* POSTS */\n\n\t\t\t'snax_limits_posts_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Posts', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_items_per_page' => array(\n\t\t\t\t'title' => __( 'List items per page', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_items_per_page',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_user_posts_per_day' => array(\n\t\t\t\t'title' => __( 'User can submit', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_new_posts_limit',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_new_post_items_limit' => array(\n\t\t\t\t'title' => __( 'User can submit', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_new_post_items_limit',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_user_submission_limit' => array(\n\t\t\t\t'title' => __( 'User can submit', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_user_submission_limit',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_tags_limit' => array(\n\t\t\t\t'title' => __( 'Tags', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_tags_limit',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_post_title_max_length' => array(\n\t\t\t\t'title' => __( 'Title length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_post_title_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_post_description_max_length' => array(\n\t\t\t\t'title' => __( 'Description length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_post_description_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_post_content_max_length' => array(\n\t\t\t\t'title' => __( 'Content length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_post_content_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\n\t\t\t/* ITEMS */\n\n\t\t\t'snax_limits_items_header' => array(\n\t\t\t\t'title' => '<h2>' . __( 'Items', 'snax' ) . '</h2>',\n\t\t\t\t'callback' => '__return_empty_string',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_item_title_max_length' => array(\n\t\t\t\t'title' => __( 'Title length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_item_title_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_item_content_max_length' => array(\n\t\t\t\t'title' => __( 'Description length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_item_content_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_item_source_max_length' => array(\n\t\t\t\t'title' => __( 'Source length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_item_source_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_item_ref_link_max_length' => array(\n\t\t\t\t'title' => __( 'Referral link length', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_item_ref_link_max_length',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Auth Section ***************************************************** */\n\n\t\t'snax_settings_auth' => array(\n\t\t\t'snax_facebook_app_id' => array(\n\t\t\t\t'title' => __( 'Facebook App ID', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_facebook_app_id',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_login_recaptcha' => array(\n\t\t\t\t'title' => __( 'reCaptcha for login form', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_login_recaptcha',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_recaptcha_site_key' => array(\n\t\t\t\t'title' => __( 'reCaptcha Site Key', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_recaptcha_site_key',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_recaptcha_secret' => array(\n\t\t\t\t'title' => __( 'reCaptcha Secret', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_recaptcha_secret',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\n\t\t/** Demo Section ***************************************************** */\n\n\t\t'snax_settings_demo' => array(\n\t\t\t'snax_demo_mode' => array(\n\t\t\t\t'title' => __( 'Enable demo mode?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_mode',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_demo_image_post_id' => array(\n\t\t\t\t'title' => __( 'Image', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_post',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'format' => 'image' ),\n\t\t\t),\n\t\t\t'snax_demo_gallery_post_id' => array(\n\t\t\t\t'title' => __( 'Gallery', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_post',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'format' => 'gallery' ),\n\t\t\t),\n\t\t\t'snax_demo_embed_post_id' => array(\n\t\t\t\t'title' => __( 'Embed', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_post',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'format' => 'embed' ),\n\t\t\t),\n\t\t\t'snax_demo_list_post_id' => array(\n\t\t\t\t'title' => __( 'List', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_post',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'format' => 'list' ),\n\t\t\t),\n\t\t\t'snax_demo_meme_post_id' => array(\n\t\t\t\t'title' => __( 'Meme', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_demo_post',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array( 'format' => 'meme' ),\n\t\t\t),\n\t\t),\n\n\t\t/** Embedly Section ********************************************** */\n\n\t\t'snax_settings_embedly' => array(\n\t\t\t'snax_embedly_enable' => array(\n\t\t\t\t'title' => __( 'Enable Embedly support?', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_enable',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_embedly_dark_skin' => array(\n\t\t\t\t'title' => __( 'Dark skin', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_dark_skin',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_embedly_buttons' => array(\n\t\t\t\t'title' => __( 'Share buttons', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_buttons',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_embedly_width' => array(\n\t\t\t\t'title' => __( 'Width', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_width',\n\t\t\t\t'sanitize_callback' => 'intval',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_embedly_alignment' => array(\n\t\t\t\t'title' => __( 'Alignment', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_alignment',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_embedly_api_key' => array(\n\t\t\t\t'title' => __( 'Embedly cards API key', 'snax' ),\n\t\t\t\t'callback' => 'snax_admin_setting_callback_embedly_api_key',\n\t\t\t\t'sanitize_callback' => 'sanitize_text_field',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\t\t/** Permalinks Section ********************************************** */\n\n\t\t'snax_permalinks' => array(\n\t\t\t'snax_item_slug' => array(\n\t\t\t\t'title' => __( 'Item url', 'snax' ),\n\t\t\t\t'callback' => 'snax_permalink_callback_item_slug',\n\t\t\t\t'sanitize_callback' => 'sanitize_text',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t\t'snax_url_var_prefix' => array(\n\t\t\t\t'title' => __( 'URL variable', 'snax' ),\n\t\t\t\t'callback' => 'snax_permalink_callback_url_var_prefix',\n\t\t\t\t'sanitize_callback' => 'sanitize_text',\n\t\t\t\t'args' => array(),\n\t\t\t),\n\t\t),\n\t) );\n}", "public function optionsdemo_setup_fields() {\n\t\t\t\n\t\t\t$fields = array(\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Text field', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_textfield',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'placeholder' => esc_html__( 'Text field', 'optionsdemo' ),\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Email field', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_email',\n\t\t\t\t\t'type' => 'email',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'placeholder' => esc_html__( 'Email field', 'optionsdemo' ),\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Password field', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_password',\n\t\t\t\t\t'type' => 'password',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'placeholder' => esc_html__( 'Password field', 'optionsdemo' ),\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Number field', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_number',\n\t\t\t\t\t'type' => 'number',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'placeholder' => esc_html__( 'Number field', 'optionsdemo' ),\n\t\t\t\t\t'min' => 1,\n\t\t\t\t\t'max' => 5,\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'URL field', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_url',\n\t\t\t\t\t'type' => 'url',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'placeholder' => esc_html__( 'URL field', 'optionsdemo' ),\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Textarea', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_textarea',\n\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'placeholder' => esc_html__( 'Textarea', 'optionsdemo' ),\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Multiple Checkbox', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_checkbox',\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'countries' => array(\n\t\t\t\t\t\tesc_html__( 'Afghanistan', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Bangladesh', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Bhutan', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'India', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Maldives', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Nepal', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Pakistan', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Sri Lanka', 'optionsdemo' )\n\t\t\t\t\t),\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Radio', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_radio',\n\t\t\t\t\t'type' => 'radio',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\tesc_html__( 'Yes', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'No', 'optionsdemo' ),\n\t\t\t\t\t),\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Select', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_select',\n\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'countries' => array(\n\t\t\t\t\t\tesc_html__( 'Afghanistan', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Bangladesh', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Bhutan', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'India', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Maldives', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Nepal', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Pakistan', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Sri Lanka', 'optionsdemo' )\n\t\t\t\t\t),\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'Multiple Select', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_multi_select',\n\t\t\t\t\t'type' => 'multiple',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'countries' => array(\n\t\t\t\t\t\tesc_html__( 'Afghanistan', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Bangladesh', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Bhutan', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'India', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Maldives', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Nepal', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Pakistan', 'optionsdemo' ),\n\t\t\t\t\t\tesc_html__( 'Sri Lanka', 'optionsdemo' )\n\t\t\t\t\t),\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'File upload 1', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_image',\n\t\t\t\t\t'type' => 'file',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t),\n\t\t\t\t\n\t\t\t\tarray(\n\t\t\t\t\t'label' => esc_html__( 'File upload 2', 'optionsdemo' ),\n\t\t\t\t\t'id' => 'optionsdemo_image2',\n\t\t\t\t\t'type' => 'file',\n\t\t\t\t\t'section' => 'optionsdemo_section',\n\t\t\t\t\t'option_name' => 'optionsdemo_general'\n\t\t\t\t)\n\t\t\t);\n\t\t\t\n\t\t\tforeach ( $fields as $field ) {\n\t\t\t\tadd_settings_field( $field['id'], $field['label'],\n\t\t\t\t\tarray( $this, 'optionsdemo_field_callback' ),\n\t\t\t\t\t'optionsdemo_general', $field['section'], $field );\n\t\t\t}\n\t\t\t//Setting Register\n\t\t\tregister_setting( 'optionsdemo_general', 'optionsdemo_general' );\n\t\t}", "public function feed_settings_fields() {\n\t\t\n\t\treturn array(\n\t\t\tarray(\t\n\t\t\t\t'title' => '',\n\t\t\t\t'fields' => array(\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'feed_name',\n\t\t\t\t\t\t'label' => esc_html__( 'Feed Name', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'tooltip' => '<h6>'. esc_html__( 'Name', 'gravityformsicontact' ) .'</h6>' . esc_html__( 'Enter a feed name to uniquely identify this setup.', 'gravityformsicontact' ),\n\t\t\t\t\t\t'default_value' => $this->get_default_feed_name(),\n\t\t\t\t\t\t'class' => 'medium',\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'list',\n\t\t\t\t\t\t'label' => esc_html__( 'iContact List', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'select',\n\t\t\t\t\t\t'required' => true,\n\t\t\t\t\t\t'choices' => $this->lists_for_feed_setting(),\n\t\t\t\t\t\t'no_choices' => esc_html__( 'Unable to retrieve Lists.', 'gravityformsicontact' ),\n\t\t\t\t\t\t'tooltip' => '<h6>'. esc_html__( 'iContact List', 'gravityformsicontact' ) .'</h6>' . esc_html__( 'Select which iContact list this feed will add contacts to.', 'gravityformsicontact' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'fields',\n\t\t\t\t\t\t'label' => esc_html__( 'Map Fields', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'field_map',\n\t\t\t\t\t\t'field_map' => $this->fields_for_feed_mapping(),\n\t\t\t\t\t\t'tooltip' => '<h6>'. esc_html__( 'Map Fields', 'gravityformsicontact' ) .'</h6>' . esc_html__( 'Select which Gravity Form fields pair with their respective iContact fields.', 'gravityformsicontact' )\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'custom_fields',\n\t\t\t\t\t\t'label' => '',\n\t\t\t\t\t\t'type' => 'dynamic_field_map',\n\t\t\t\t\t\t'field_map' => version_compare( GFForms::$version, '2.5-dev-1', '<' ) ? $this->custom_fields_for_feed_setting() : array( $this, 'custom_fields_for_feed_setting' ),\n\t\t\t\t\t\t'save_callback' => array( $this, 'create_new_custom_fields' ),\n\t\t\t\t\t),\n\t\t\t\t\tarray(\n\t\t\t\t\t\t'name' => 'feed_condition',\n\t\t\t\t\t\t'label' => esc_html__( 'Opt-In Condition', 'gravityformsicontact' ),\n\t\t\t\t\t\t'type' => 'feed_condition',\n\t\t\t\t\t\t'checkbox_label' => esc_html__( 'Enable', 'gravityformsicontact' ),\n\t\t\t\t\t\t'instructions' => esc_html__( 'Export to iContact if', 'gravityformsicontact' ),\n\t\t\t\t\t\t'tooltip' => '<h6>'. esc_html__( 'Opt-In Condition', 'gravityformsicontact' ) .'</h6>' . esc_html__( 'When the opt-in condition is enabled, form submissions will only be exported to iContact when the condition is met. When disabled, all form submissions will be exported.', 'gravityformsicontact' )\n\t\t\t\t\t),\n\t\t\t\t)\t\n\t\t\t)\n\t\t);\n\t\t\n\t}", "protected function getOptionFieldsConfig()\n {\n $fields['custom_option_group'] = $this->getCustomOptionGroupFieldConfig();\n\n return $fields;\n }", "protected function getConfigFormAdvanced()\n {\n return [\n 'form' => [\n 'legend' => [\n 'title' => $this->l('Advanced Options'),\n 'icon' => 'icon-cogs',\n ],\n 'input' => [\n [\n 'type' => 'text',\n 'label' => $this->l('Doofinder Api Key'),\n 'name' => 'DF_API_KEY',\n ],\n [\n 'type' => 'text',\n 'label' => $this->l('Region'),\n 'name' => 'DF_REGION',\n ],\n [\n 'type' => (version_compare(_PS_VERSION_, '1.6.0', '>=') ? 'switch' : 'radio'),\n 'label' => $this->l('Enable v9 layer (Livelayer)'),\n 'name' => 'DF_ENABLED_V9',\n 'is_bool' => true,\n 'values' => $this->getBooleanFormValue(),\n ],\n [\n 'type' => (version_compare(_PS_VERSION_, '1.6.0', '>=') ? 'switch' : 'radio'),\n 'label' => $this->l('Debug Mode. Write info logs in doofinder.log file'),\n 'name' => 'DF_DEBUG',\n 'is_bool' => true,\n 'values' => $this->getBooleanFormValue(),\n ],\n [\n 'type' => (version_compare(_PS_VERSION_, '1.6.0', '>=') ? 'switch' : 'radio'),\n 'label' => $this->l('CURL disable HTTPS check'),\n 'name' => 'DF_DSBL_HTTPS_CURL',\n 'desc' => $this->l('CURL_DISABLE_HTTPS_EXPLANATION'),\n 'is_bool' => true,\n 'values' => $this->getBooleanFormValue(),\n ],\n [\n 'type' => (version_compare(_PS_VERSION_, '1.6.0', '>=') ? 'switch' : 'radio'),\n 'label' => $this->l('Debug CURL error response'),\n 'name' => 'DF_DEBUG_CURL',\n 'desc' => $this->l('To debug if your server has symptoms of connection problems'),\n 'is_bool' => true,\n 'values' => $this->getBooleanFormValue(),\n ],\n ],\n 'submit' => [\n 'title' => $this->l('Save Internal Search Options'),\n 'name' => 'submitDoofinderModuleAdvanced',\n ],\n ],\n ];\n }", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Twispay settings'),\n 'icon' => 'icon-cogs',\n ),\n /** Form fields */\n 'input' => array(\n array(\n 'type' => 'switch',\n 'label' => $this->l('Live mode'),\n 'name' => 'TWISPAY_LIVE_MODE',\n 'is_bool' => false,\n 'desc' => $this->l('Select \"YES\" if you wish to use the payment gateway in Production or \"No\" if you want to use it in staging mode.'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-lock\"></i>',\n 'desc' => $this->l('Enter the SITE ID for staging mode'),\n 'name' => 'TWISPAY_SITEID_STAGING',\n 'label' => $this->l('Staging Site ID'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-key\"></i>',\n 'desc' => $this->l('Enter the Private key for staging mode'),\n 'name' => 'TWISPAY_PRIVATEKEY_STAGING',\n 'label' => $this->l('Staging Private key'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-lock\"></i>',\n 'desc' => $this->l('Enter the SITE ID for live mode'),\n 'name' => 'TWISPAY_SITEID_LIVE',\n 'label' => $this->l('Live Site ID'),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-key\"></i>',\n 'desc' => $this->l('Enter the Private key for live mode'),\n 'name' => 'TWISPAY_PRIVATEKEY_LIVE',\n 'label' => $this->l('Live Private key'),\n ),\n array(\n 'type' => 'switch',\n 'label' => $this->l('Enable iframe payment form'),\n 'name' => 'TWISPAY_IFRAME_FORM',\n 'is_bool' => false,\n 'desc' => $this->l('Select \"YES\" if you wish to use the iframe payment form.'),\n 'values' => array(\n array(\n 'id' => 'active_on',\n 'value' => true,\n 'label' => $this->l('Enabled')\n ),\n array(\n 'id' => 'active_off',\n 'value' => false,\n 'label' => $this->l('Disabled')\n )\n ),\n ),\n array(\n 'col' => 3,\n 'type' => 'text',\n 'prefix' => '<i class=\"icon icon-link\"></i>',\n 'desc' => $this->l('Put this URL in your twispay account'),\n 'name' => 'TWISPAY_NOTIFICATION_URL',\n 'label' => $this->l('Server-to-server notification URL'),\n 'readonly' => true,\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }", "static function get_settings(){\n\t\t\t\treturn array(\t\n\t\t\t\t\t'icon' => GDLR_CORE_URL . '/framework/images/page-builder/nav-template.png', \n\t\t\t\t\t'title' => esc_html__('Templates', 'goodlayers-core')\n\t\t\t\t);\n\t\t\t}", "function render_field_settings( $field ) {\n\t\t$templateKeys=array_keys(Context::current()->ui->setting('content/templates',[]));\n\n\t\t$choices=[];\n\t\tforeach($templateKeys as $key)\n\t\t\t$choices[$key] = $key;\n\n\n\t\tacf_render_field_setting( $field, array(\n\t\t\t'label' => __('Content Type','stem-content'),\n\t\t\t'instructions' => __('Select the content type to display alternate templates for.','stem-content'),\n\t\t\t'type' => 'select',\n\t\t\t'name' => 'content_type',\n\t\t\t'layout' => 'horizontal',\n\t\t\t'multiple' => 0,\n\t\t\t'choices' => $choices\n\t\t));\n\t}", "function init_form_fields() {\n\n $default_site_name = home_url() ;\n\n\t\t\t$this->form_fields = array(\n\n\t\t\t\t'enabled' => array(\n\t\t\t\t\t'title' => __( 'Enable/Disable', 'woothemes' ),\n\t\t\t\t\t'type' => 'checkbox',\n\t\t\t\t\t'label' => __( 'Enable Payment Express', 'woothemes' ),\n\t\t\t\t\t'default' => 'yes'\n\t\t\t\t),\n\n\t\t\t\t'title' => array(\n\t\t\t\t\t'title' => __( 'Title', 'woothemes' ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'description' => __( 'This controls the title which the user sees during checkout.', 'woothemes' ),\n\t\t\t\t\t'default' => __( 'Payment Express', 'woothemes' ),\n\t\t\t\t\t'css' => 'width: 400px;'\n\t\t\t\t),\n\n\t\t\t\t'description' => array(\n\t\t\t\t\t'title' => __( 'Description', 'woothemes' ),\n\t\t\t\t\t'type' => 'textarea',\n\t\t\t\t\t'description' => __( 'This controls the description which the user sees during checkout.', 'woothemes' ),\n\t\t\t\t\t'default' => __(\"Allows credit card payments by Payment Express PX-Pay method\", 'woothemes')\n\t\t\t\t),\n\n\t\t\t\t'site_name' => array(\n\t\t\t\t\t//'title' => __( 'Px-Pay Access Key', 'woothemes' ),\n 'title' => 'Merchant Reference',\n 'description' => 'A name (or URL) to identify this site in the \"Merchant Reference\" field (shown when viewing transactions in the site\\'s Digital Payment Express back-end). This name <b>plus</b> the longest Order/Invoice Number used by the site must be <b>no longer than 53 characters</b>.',\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => $default_site_name,\n\t\t\t\t\t'css' => 'width: 400px;',\n 'custom_attributes' => array( 'maxlength' => '53' )\n ),\n\n\t\t\t\t'access_userid' => array(\n\t\t\t\t\t//'title' => __( 'Access User Id', 'woothemes' ),\n\t\t\t\t\t'title' => __( 'Px-Pay Access User ID', 'woothemes' ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'css' => 'width: 400px;'\n\t\t\t\t),\n\n\t\t\t\t'access_key' => array(\n\t\t\t\t\t//'title' => __( 'Access Key', 'woothemes' ),\n\t\t\t\t\t'title' => __( 'Px-Pay Access Key', 'woothemes' ),\n\t\t\t\t\t'type' => 'text',\n\t\t\t\t\t'default' => '',\n\t\t\t\t\t'css' => 'width: 400px;'\n\t\t\t\t)\n\n\t\t\t);\n\n\t\t}", "protected function getConfigForm()\n {\n return array(\n 'form' => array(\n 'legend' => array(\n 'title' => $this->l('Settings'),\n 'icon' => 'icon-cogs',\n ),\n 'input' => array(\n array(\n 'type' => 'textarea',\n 'label' => $this->l('CGV'),\n 'name' => 'MYETICKETS_CGV',\n 'desc' => $this->l('Set the CGV that will be print to e-tckets.'),\n ),\n array(\n 'type' => 'text',\n 'label' => $this->l('Number of days to use e-tickets'),\n 'name' => 'MYETICKETS_PERIOD',\n 'class' => 'fixed-width-xs',\n 'desc' => $this->l('Set the number of days to use and check e-tckets.'),\n ),\n ),\n 'submit' => array(\n 'title' => $this->l('Save'),\n ),\n ),\n );\n }" ]
[ "0.76471496", "0.67804855", "0.65752053", "0.6542611", "0.6516883", "0.6471955", "0.64517903", "0.6407626", "0.6317888", "0.6291372", "0.6283711", "0.62689734", "0.6260548", "0.62224627", "0.6182933", "0.61812454", "0.61769915", "0.61704165", "0.6169526", "0.61485046", "0.6139677", "0.61364806", "0.61095095", "0.60918707", "0.6076809", "0.6058777", "0.60477567", "0.6034203", "0.60229427", "0.6017084" ]
0.725489
1
Find whether a handled notification code supports categories. (Content types, for example, will define notifications on specific categories, not just in general. The categories are interpreted by the hook and may be complex. E.g. it might be like a regexp match, or like FORUM:3 or TOPIC:100)
public function supports_categories($notification_code) { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasCategories() {\n return $this->_has(16);\n }", "public function is_category($category = '')\n {\n }", "function _getNotificationSettingCategories() {\n\t\treturn array(\n\t\t\t'submissions' => array('categoryKey' => 'notification.type.submissions',\n\t\t\t\t'settings' => array(NOTIFICATION_TYPE_ARTICLE_SUBMITTED, NOTIFICATION_TYPE_METADATA_MODIFIED, NOTIFICATION_TYPE_SUPP_FILE_MODIFIED)),\n\t\t\t'reviewing' => array('categoryKey' => 'notification.type.reviewing',\n\t\t\t\t'settings' => array(NOTIFICATION_TYPE_REVIEWER_COMMENT, NOTIFICATION_TYPE_REVIEWER_FORM_COMMENT, NOTIFICATION_TYPE_EDITOR_DECISION_COMMENT)),\n\t\t\t'editing' => array('categoryKey' => 'notification.type.editing',\n\t\t\t\t'settings' => array(NOTIFICATION_TYPE_GALLEY_MODIFIED, NOTIFICATION_TYPE_SUBMISSION_COMMENT, NOTIFICATION_TYPE_LAYOUT_COMMENT, NOTIFICATION_TYPE_COPYEDIT_COMMENT, NOTIFICATION_TYPE_PROOFREAD_COMMENT)),\n\t\t\t'site' => array('categoryKey' => 'notification.type.site',\n\t\t\t\t'settings' => array(NOTIFICATION_TYPE_USER_COMMENT, NOTIFICATION_TYPE_PUBLISHED_ISSUE, NOTIFICATION_TYPE_NEW_ANNOUNCEMENT)),\n\t\t);\n\t}", "function get_supports() {\n\t\t$supports = array(\n\t\t\t'footer' => 'page footer'\n\t\t);\n\n\t\t$link_categories = get_terms( 'link_category', array(\n\t\t\t\t'hide_empty' => 0\n\t\t\t) );\n\n\t\tforeach ( $link_categories as $link_category ) {\n\t\t\t$supports['link_category_' . $link_category->term_id] = strtolower( $link_category->name );\n\t\t}\n\n\t\treturn $supports;\n\t}", "public function validCategory($data) {\n $categories = $this->categories();\n return array_key_exists(current($data), $categories);\n }", "function vscu_block_categories_callback( $categories = array() ) {\n\n\t$category_slug = 'vs-cgb';\n\t$category_slugs = wp_list_pluck( $categories, 'slug' );\n\n\treturn in_array( $category_slug, $category_slugs, true ) ? $categories : array_merge(\n\t\t$categories,\n\t\tarray(\n\t\t\tarray(\n\t\t\t\t'slug' => $category_slug,\n\t\t\t\t'title' => apply_filters( 'vscgb_gutenberg_block_category', __( 'Vape & Smoke', 'vape-smoke' ) ),\n\t\t\t\t'icon' => 'smiley',\n\t\t\t),\n\t\t)\n\t);\n\n}", "public function hasCategory(): bool;", "public function supportsCourseCatalogNotification() {\n \treturn $this->manager->supportsCourseCatalogNotification();\n\t}", "function vsau_block_categories_callback( $categories = array() ) {\n\n\t$category_slug = 'vs-cgb';\n\t$category_slugs = wp_list_pluck( $categories, 'slug' );\n\n\treturn in_array( $category_slug, $category_slugs, true ) ? $categories : array_merge(\n\t\t$categories,\n\t\tarray(\n\t\t\tarray(\n\t\t\t\t'slug' => $category_slug,\n\t\t\t\t'title' => apply_filters( 'vscgb_gutenberg_block_category', __( 'Vape & Smoke', 'vape-smoke' ) ),\n\t\t\t\t'icon' => 'smiley',\n\t\t\t),\n\t\t)\n\t);\n\n}", "public static function checkCategory($aCont) {\n if(strpos($aCont['layout'], 'nutri') > -1) return TRUE;\n \n $lSql = 'SELECT c.`content_id` FROM `al_cms_ref_category` rc INNER JOIN `al_cms_content` c ON c.content_id=rc.content_id ';\n $lSql.= 'WHERE c.`content`='.esc($aCont['content']).' AND rc.`category`='.esc($aCont['category']).' AND `mand`='.intval(MID);\n $lRes = CCor_Qry::getInt($lSql);\n \n return ($lRes > 0) ? TRUE : FALSE;\n }", "public function isCategory($category): bool;", "public function isInvalidCategoryCode(): bool\n {\n return strpos(\"[CATEGORY-NOT-MATCH]\", trim($this->getBody())) !== false;\n }", "function in_comic_category() {\n\tglobal $post, $category_tree;\n\t\n\t$comic_categories = array();\n\tforeach ($category_tree as $node) {\n\t\t$comic_categories[] = end(explode(\"/\", $node));\n\t}\n\treturn (count(array_intersect($comic_categories, wp_get_post_categories($post->ID))) > 0);\n}", "public function get_categories() {\n\t\t\t\treturn ['trx_addons-support'];\n\t\t\t}", "public function get_categories() {\n\t\t\t\treturn ['trx_addons-support'];\n\t\t\t}", "public function get_categories() {\n\t\t\t\treturn ['trx_addons-support'];\n\t\t\t}", "private function categories()\n\t{\n\t\t$categories = ORM::factory('forum_cat')->find_all();\n\t\tif(0 == $categories->count())\n\t\t\treturn FALSE;\n\t\t\t\n\t\treturn $categories;\n\t}", "function has_category($category = '', $post = \\null)\n {\n }", "function delivery_categorized_blog() {\n\tif ( false === ( $all_the_cool_cats = get_transient( 'delivery_categories' ) ) ) {\n\t\t// Create an array of all the categories that are attached to posts.\n\t\t$all_the_cool_cats = get_categories( array(\n\t\t\t'fields' => 'ids',\n\t\t\t'hide_empty' => 1,\n\n\t\t\t// We only need to know if there is more than one category.\n\t\t\t'number' => 2,\n\t\t) );\n\n\t\t// Count the number of categories that are attached to the posts.\n\t\t$all_the_cool_cats = count( $all_the_cool_cats );\n\n\t\tset_transient( 'delivery_categories', $all_the_cool_cats );\n\t}\n\n\tif ( $all_the_cool_cats > 1 ) {\n\t\t// This blog has more than 1 category so delivery_categorized_blog should return true.\n\t\treturn true;\n\t} else {\n\t\t// This blog has only 1 category so delivery_categorized_blog should return false.\n\t\treturn false;\n\t}\n}", "function ppo_categorized_blog() {\n if (false === ( $all_the_cool_cats = get_transient('ppo_category_count') )) {\n // Create an array of all the categories that are attached to posts\n $all_the_cool_cats = get_categories(array(\n 'hide_empty' => 1,\n ));\n\n // Count the number of categories that are attached to the posts\n $all_the_cool_cats = count($all_the_cool_cats);\n\n set_transient('ppo_category_count', $all_the_cool_cats);\n }\n\n if (1 !== (int) $all_the_cool_cats) {\n // This blog has more than 1 category so ppo_categorized_blog should return true\n return true;\n } else {\n // This blog has only 1 category so ppo_categorized_blog should return false\n return false;\n }\n}", "function smart_foundation_categorized_blog() {\n\tif ( false === ( $all_the_cool_cats = get_transient( 'smart_foundation_categories' ) ) ) {\n\t\t// Create an array of all the categories that are attached to posts.\n\t\t$all_the_cool_cats = get_categories( array(\n\t\t\t'fields' => 'ids',\n\t\t\t'hide_empty' => 1,\n\n\t\t\t// We only need to know if there is more than one category.\n\t\t\t'number' => 2,\n\t\t) );\n\n\t\t// Count the number of categories that are attached to the posts.\n\t\t$all_the_cool_cats = count( $all_the_cool_cats );\n\n\t\tset_transient( 'smart_foundation_categories', $all_the_cool_cats );\n\t}\n\n\tif ( $all_the_cool_cats > 1 ) {\n\t\t// This blog has more than 1 category so smart_foundation_categorized_blog should return true.\n\t\treturn true;\n\t} else {\n\t\t// This blog has only 1 category so smart_foundation_categorized_blog should return false.\n\t\treturn false;\n\t}\n}", "private function validate_product_categories() {\n\t\tif ( sizeof( $this->product_categories ) > 0 ) {\n\t\t\t$valid_for_cart = false;\n\t\t\tif ( ! WC()->cart->is_empty() ) {\n\t\t\t\tforeach( WC()->cart->get_cart() as $cart_item_key => $cart_item ) {\n\t\t\t\t\t$product_cats = wc_get_product_cat_ids( $cart_item['product_id'] );\n\n\t\t\t\t\t// If we find an item with a cat in our allowed cat list, the coupon is valid\n\t\t\t\t\tif ( sizeof( array_intersect( $product_cats, $this->product_categories ) ) > 0 ) {\n\t\t\t\t\t\t$valid_for_cart = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( ! $valid_for_cart ) {\n\t\t\t\tthrow new Exception( self::E_WC_COUPON_NOT_APPLICABLE );\n\t\t\t}\n\t\t}\n\t}", "function UnbHookInactiveUsersAddCPCategory(&$data)\r\n{\r\n\tif (UnbCheckRights('is_admin'))\r\n\t{\r\n\t\t$data[] = array(\r\n\t\t\t'title' => '_inactiveusers.cpcategory',\r\n\t\t\t'link' => UnbLink('@cp', 'cat=inactiveusers', true),\r\n\t\t\t'cpcat' => 'inactiveusers');\r\n\t}\r\n\r\n\treturn true;\r\n}", "public function isNotifyTypeAvailableForCategory( $category, $notifyType ) {\n\t\treturn $this->getNotifyTypeAvailabilityForCategory( $category )[$notifyType];\n\t}", "public function supportsCourseNotification() {\n \treturn $this->manager->supportsCourseNotification();\n\t}", "public function get_categories() {\n return [ 'custom-category' ];\n }", "function categoryCheck($cond = array())\n\t{\n\t\t$select = 'addoncategory_id';\n\t\treturn $this->CI->AdminModel->getCondSelectedData($cond,$select,$this->tableName);\n\t}", "function has_categorys()\n\t{\n\t\t\t$categorias = $this->combofiller->categorias();\t\t\t\n\t\t\tforeach($categorias as $key => $value)\n\t\t\t{\n\t\t\t\tif ($this->input->post('' . $key . ''))\n\t\t\t\t{\n\t\t\t\t\treturn TRUE;\t\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn FALSE;\t\n\t}", "function bt_categorized_blog() {\n\tif ( false === ( $all_the_cool_cats = get_transient( 'all_the_cool_cats' ) ) ) {\n\t\t// Create an array of all the categories that are attached to posts\n\t\t$all_the_cool_cats = get_categories( array(\n\t\t\t'hide_empty' => 1,\n\t\t) );\n\n\t\t// Count the number of categories that are attached to the posts\n\t\t$all_the_cool_cats = count( $all_the_cool_cats );\n\n\t\tset_transient( 'all_the_cool_cats', $all_the_cool_cats );\n\t}\n\n\tif ( '1' != $all_the_cool_cats ) {\n\t\t// This blog has more than 1 category so _s_categorized_blog should return true\n\t\treturn true;\n\t} else {\n\t\t// This blog has only 1 category so _s_categorized_blog should return false\n\t\treturn false;\n\t}\n}", "public function get_categories()\n {\n return ['akash-addons'];\n }" ]
[ "0.5860655", "0.5794245", "0.5691196", "0.5650265", "0.56381476", "0.5637379", "0.5634113", "0.560038", "0.5579383", "0.55618674", "0.55477655", "0.55303836", "0.55199057", "0.5513825", "0.5513825", "0.5513825", "0.53819495", "0.53174084", "0.52835166", "0.52485025", "0.52383476", "0.52302235", "0.5194545", "0.516674", "0.5160931", "0.51607853", "0.51446754", "0.51300764", "0.51133555", "0.5106788" ]
0.72142065
0
Find the initial setting that members have for a notification code (only applies to the member_could_potentially_enable members).
public function get_initial_setting($notification_code, $category = null) { return A_NA; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _getNotificationSettingsMap() {\n\t\treturn array(\n\t\t\tNOTIFICATION_TYPE_ARTICLE_SUBMITTED => array('settingName' => 'notificationArticleSubmitted',\n\t\t\t\t'emailSettingName' => 'emailNotificationArticleSubmitted',\n\t\t\t\t'settingKey' => 'notification.type.articleSubmitted'),\n\t\t\tNOTIFICATION_TYPE_METADATA_MODIFIED => array('settingName' => 'notificationMetadataModified',\n\t\t\t\t'emailSettingName' => 'emailNotificationMetadataModified',\n\t\t\t\t'settingKey' => 'notification.type.metadataModified'),\n\t\t\tNOTIFICATION_TYPE_SUPP_FILE_MODIFIED => array('settingName' => 'notificationSuppFileModified',\n\t\t\t\t'emailSettingName' => 'emailNotificationSuppFileModified',\n\t\t\t\t'settingKey' => 'notification.type.suppFileModified'),\n\t\t\tNOTIFICATION_TYPE_GALLEY_MODIFIED => array('settingName' => 'notificationGalleyModified',\n\t\t\t\t'emailSettingName' => 'emailNotificationGalleyModified',\n\t\t\t\t'settingKey' => 'notification.type.galleyModified'),\n\t\t\tNOTIFICATION_TYPE_SUBMISSION_COMMENT => array('settingName' => 'notificationSubmissionComment',\n\t\t\t\t'emailSettingName' => 'emailNotificationSubmissionComment',\n\t\t\t\t'settingKey' => 'notification.type.submissionComment'),\n\t\t\tNOTIFICATION_TYPE_LAYOUT_COMMENT => array('settingName' => 'notificationLayoutComment',\n\t\t\t\t'emailSettingName' => 'emailNotificationLayoutComment',\n\t\t\t\t'settingKey' => 'notification.type.layoutComment'),\n\t\t\tNOTIFICATION_TYPE_COPYEDIT_COMMENT => array('settingName' => 'notificationCopyeditComment',\n\t\t\t\t'emailSettingName' => 'emailNotificationCopyeditComment',\n\t\t\t\t'settingKey' => 'notification.type.copyeditComment'),\n\t\t\tNOTIFICATION_TYPE_PROOFREAD_COMMENT => array('settingName' => 'notificationProofreadComment',\n\t\t\t\t'emailSettingName' => 'emailNotificationProofreadComment',\n\t\t\t\t'settingKey' => 'notification.type.proofreadComment'),\n\t\t\tNOTIFICATION_TYPE_REVIEWER_COMMENT => array('settingName' => 'notificationReviewerComment',\n\t\t\t\t'emailSettingName' => 'emailNotificationReviewerComment',\n\t\t\t\t'settingKey' => 'notification.type.reviewerComment'),\n\t\t\tNOTIFICATION_TYPE_REVIEWER_FORM_COMMENT => array('settingName' => 'notificationReviewerFormComment',\n\t\t\t\t'emailSettingName' => 'emailNotificationReviewerFormComment',\n\t\t\t\t'settingKey' => 'notification.type.reviewerFormComment'),\n\t\t\tNOTIFICATION_TYPE_EDITOR_DECISION_COMMENT => array('settingName' => 'notificationEditorDecisionComment',\n\t\t\t\t'emailSettingName' => 'emailNotificationEditorDecisionComment',\n\t\t\t\t'settingKey' => 'notification.type.editorDecisionComment'),\n\t\t\tNOTIFICATION_TYPE_USER_COMMENT => array('settingName' => 'notificationUserComment',\n\t\t\t\t'emailSettingName' => 'emailNotificationUserComment',\n\t\t\t\t'settingKey' => 'notification.type.userComment'),\n\t\t\tNOTIFICATION_TYPE_PUBLISHED_ISSUE => array('settingName' => 'notificationPublishedIssue',\n\t\t\t\t'emailSettingName' => 'emailNotificationPublishedIssue',\n\t\t\t\t'settingKey' => 'notification.type.issuePublished'),\n\t\t\tNOTIFICATION_TYPE_NEW_ANNOUNCEMENT => array('settingName' => 'notificationNewAnnouncement',\n\t\t\t\t'emailSettingName' => 'emailNotificationNewAnnouncement',\n\t\t\t\t'settingKey' => 'notification.type.newAnnouncement'),\n\t\t);\n\t}", "public function defaultSettings()\n\t{\n\t\treturn [\n\t\t\t'notifications' => [\n\t\t\t\t'team_event_create' => 1,\n\t\t\t\t'team_event_update' => 2,\n\t\t\t\t'team_event_delete' => 2,\n\t\t\t\t'team_stats' \t\t=> 1,\n\t\t\t\t'team_post' \t\t=> 1,\n\t\t\t\t'user_post' \t\t=> 2,\n\t\t\t\t'user_stats'\t\t=> 1,\n\t\t\t],\n\t\t];\n\t}", "function getUsersNotificationsPreferences($notification_types, $members)\n{\n\t$db = database();\n\n\t$notification_types = (array) $notification_types;\n\t$query_members = (array) $members;\n\t$defaults = [];\n\tforeach (getConfiguredNotificationMethods('*') as $notification => $methods)\n\t{\n\t\t$return = [];\n\t\tforeach ($methods as $k => $level)\n\t\t{\n\t\t\tif ($level == Notifications::DEFAULT_LEVEL)\n\t\t\t{\n\t\t\t\t$return[] = $k;\n\t\t\t}\n\t\t}\n\t\t$defaults[$notification] = $return;\n\t}\n\n\t$results = [];\n\t$db->fetchQuery('\n\t\tSELECT \n\t\t\tid_member, notification_type, mention_type\n\t\tFROM {db_prefix}notifications_pref\n\t\tWHERE id_member IN ({array_int:members_to})\n\t\t\tAND mention_type IN ({array_string:mention_types})',\n\t\t[\n\t\t\t'members_to' => $query_members,\n\t\t\t'mention_types' => $notification_types,\n\t\t]\n\t)->fetch_callback(\n\t\tfunction ($row) use (&$results) {\n\t\t\tif (!isset($results[$row['id_member']]))\n\t\t\t{\n\t\t\t\t$results[$row['id_member']] = [];\n\t\t\t}\n\n\t\t\t$results[$row['id_member']][$row['mention_type']] = json_decode($row['notification_type']);\n\t\t}\n\t);\n\n\t// Set the defaults\n\tforeach ($query_members as $member)\n\t{\n\t\tforeach ($notification_types as $type)\n\t\t{\n\t\t\tif (empty($results[$member]) && !empty($defaults[$type]))\n\t\t\t{\n\t\t\t\tif (!isset($results[$member]))\n\t\t\t\t{\n\t\t\t\t\t$results[$member] = [];\n\t\t\t\t}\n\n\t\t\t\tif (!isset($results[$member][$type]))\n\t\t\t\t{\n\t\t\t\t\t$results[$member][$type] = [];\n\t\t\t\t}\n\n\t\t\t\t$results[$member][$type] = $defaults[$type];\n\t\t\t}\n\t\t}\n\t}\n\n\treturn $results;\n}", "private static function get_email_setting_defaults( $email_notification_key ) {\n\t\t$settings = self::get_email_setting_fields( $email_notification_key );\n\t\t$email_class = self::get_email_class( $email_notification_key );\n\n\t\t$defaults = array();\n\t\t$defaults[ self::EMAIL_SETTING_ENABLED ] = call_user_func( array( $email_class, 'is_default_enabled' ) ) ? '1' : '0';\n\n\t\tforeach ( $settings as $setting ) {\n\t\t\t$defaults[ $setting['name'] ] = null;\n\t\t\tif ( isset( $setting['std'] ) ) {\n\t\t\t\t$defaults[ $setting['name'] ] = $setting['std'];\n\t\t\t}\n\t\t}\n\n\t\treturn $defaults;\n\t}", "function testDefaultSettings() {\n $administrator = Users::findById(1);\n\n $member = new Member();\n\n $member->setCompanyId(1);\n $member->setEmail('[email protected]');\n $member->setPassword('123');\n $member->save();\n\n $client = new Client();\n\n $client->setCompanyId(1);\n $client->setEmail('[email protected]');\n $client->setPassword('123');\n $client->save();\n\n $email_channel = new EmailNotificationChannel();\n\n $this->assertTrue($email_channel->isEnabledByDefault());\n $this->assertTrue($email_channel->isEnabledFor($administrator));\n $this->assertTrue($email_channel->isEnabledFor($member));\n $this->assertTrue($email_channel->isEnabledFor($client));\n\n $this->assertEqual($email_channel->whoCanOverrideDefaultStatus(), array('Member', 'Manager'));\n\n $this->assertTrue($email_channel->canOverrideDefaultStatus($administrator));\n $this->assertTrue($email_channel->canOverrideDefaultStatus($member));\n $this->assertFalse($email_channel->canOverrideDefaultStatus($client));\n }", "public static function getStatusOptions() {\n\t\t$opt = array();\n\t\tforeach (self::$member_codes as $code=>$defs){\n\t\t\t$opt[$code] = $defs[0];\n\t\t}\n\t\treturn $opt;\n\t}", "function get_user_notification_settings($user_guid = 0) {\n\tglobal $NOTIFICATION_HANDLERS;\n\t\n\t$user_guid = sanitise_int($user_guid, false);\n\n\tif (empty($user_guid)) {\n\t\t$user_guid = elgg_get_logged_in_user_guid();\n\t}\n\n\tif(!empty($user_guid)) {\n\t\t// @todo: there should be a better way now that metadata is cached. E.g. just query for MD names, then\n\t\t// query user object directly\n\t\t$prefix = \"notification:method:\";\n\t\t$metadata_options = array(\n\t\t\t'guid' => $user_guid,\n\t\t\t'limit' => false,\n\t\t\t'metadata_names' => array()\n\t\t);\n\t\t\n\t\tforeach($NOTIFICATION_HANDLERS as $method => $function){\r\n\t\t\t$metadata_options[\"metadata_names\"][] = $prefix . $method;\r\n\t\t}\n\t\t\n\t\tif ($all_metadata = elgg_get_metadata($metadata_options)) {\n\t\t\t$return = new stdClass;\n\t\n\t\t\tforeach ($all_metadata as $meta) {\n\t\t\t\t$name = substr($meta->name, strlen($prefix));\n\t\t\t\t$value = $meta->value;\n\t\n\t\t\t\tif (strpos($meta->name, $prefix) === 0) {\n\t\t\t\t\t$return->$name = $value;\n\t\t\t\t}\n\t\t\t}\n\t\n\t\t\treturn $return;\n\t\t}\n\t}\n\n\treturn false;\n}", "function getInvitationMode() \n\t{\n\t\tinclude_once \"./Services/Administration/classes/class.ilSetting.php\";\n\t\t$surveySetting = new ilSetting(\"survey\");\n\t\t$unlimited_invitation = $surveySetting->get(\"unlimited_invitation\");\n\t\tif (!$unlimited_invitation && $this->invitation_mode == self::MODE_UNLIMITED)\n\t\t{\n\t\t\treturn self::MODE_PREDEFINED_USERS;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn ($this->invitation_mode) ? $this->invitation_mode : self::MODE_UNLIMITED;\n\t\t}\n\t}", "function special_notifications_init() {\n \t\n // register extra css\n elgg_extend_view('elgg.css', 'special_notifications/special_notifications.css');\n\n // register hook for checking event which are available this plugin\n $sn = array('profile_location');\n foreach ($sn as $item) {\n elgg_register_plugin_hook_handler('special_notifications:config', 'notify', \"snotify_$item\");\n }\n \n // get available active checking event and register a hook, so they can be triggered\n $special_notifications = elgg_trigger_plugin_hook('special_notifications:config', 'notify', null, []);\n foreach ($special_notifications as $key => $sn) {\n if ($sn['active']) {\n elgg_register_plugin_hook_handler('special_notifications', 'user', \"special_notification_\".$sn['hook']);\n }\n }\n\n}", "function onInit(&$man) {\r\n\t\t$config = $man->getConfig();\r\n\r\n\t\t// Override option\r\n\t\t$config['somegroup.someoption'] = true;\r\n\r\n\t\treturn true;\r\n\t}", "public function getMCMinSyncDateFlag()\r\n {\r\n return Mage::getStoreConfig(Ebizmarts_MailChimp_Model_Config::GENERAL_MCMINSYNCDATEFLAG);\r\n }", "private static function default_settings() {\n\t\treturn array(\n\t\t\t'module_ga' => true,\n\t\t\t'module_ip' => true,\n\t\t\t'module_log' => true,\n\t\t\t'sent_data' => false,\n\t\t\t'api_key' => '',\n\t\t\t'mark_as_approved' => true,\n\t\t);\n\t}", "private function _initBootingSetting(){\n $settingModel = MooCore::getInstance()->getModel('Setting');\n\n $setting = $settingModel->findByName('chat_disable');\n if ($setting)\n {\n $settingModel->id = $setting['Setting']['id'];\n $settingModel->save(array('is_boot'=>1));\n }\n $setting = $settingModel->findByName('chat_turn_on_notification');\n if ($setting)\n {\n $settingModel->id = $setting['Setting']['id'];\n $settingModel->save(array('is_boot'=>1));\n }else{\n $settingGroupModel = MooCore::getInstance()->getModel('SettingGroup');\n $settingGroup = $settingGroupModel->findByModuleId(\"Chat\");\n if($settingGroup){\n $settingModel->save(\n array(\n \"group_id\"=>$settingGroup['SettingGroup']['id'],\n \"label\"=>\"Turn on messages notifications\",\n \"name\"=>\"chat_turn_on_notification\",\n \"field\"=>\"\",\n \"value\"=>\"\",\n \"is_hidden\"=>0,\n \"version_id\"=>\"\",\n \"type_id\"=>\"radio\",\n \"value_actual\"=>\"[{\\\"name\\\":\\\"Yes\\\",\\\"value\\\":\\\"1\\\",\\\"select\\\":1},{\\\"name\\\":\\\"No\\\",\\\"value\\\":\\\"0\\\",\\\"select\\\":0}]\",\n \"value_default\"=>\"[{\\\"name\\\":\\\"Yes\\\",\\\"value\\\":\\\"1\\\",\\\"select\\\":\\\"0\\\"},{\\\"name\\\":\\\"No\\\",\\\"value\\\":\\\"0\\\",\\\"select\\\":\\\"1\\\"}]\",\n \"description\"=>\"Conversation notifications replaced by chat notifications\",\n \"ordering\"=>10,\n \"is_boot\"=>1\n )\n );\n\n }\n\n }\n }", "function email_settings()\r\n\t{\r\n\t\tglobal $ibforums, $std, $print;\r\n\r\n\t\tif ($ibforums->member['disable_mail'])\r\n\t\t{\r\n\t\t\t$ibforums->lang['no_mail'] = sprintf($ibforums->lang['no_mail'], $ibforums->member['disable_mail_reason']);\r\n\r\n\t\t\t$this->output .= View::make(\"global.warn_window\", ['message' => $ibforums->lang['no_mail']]);\r\n\t\t} else\r\n\t\t{\r\n\r\n\t\t\t// PM_REMINDER: First byte = Email PM when received new\r\n\t\t\t// \t\t\tSecond byte= Show pop-up when new PM received\r\n\r\n\t\t\t$info = array();\r\n\r\n\t\t\tforeach (array('hide_email', 'allow_admin_mails', 'email_full', 'email_pm', 'auto_track') as $k)\r\n\t\t\t{\r\n\t\t\t\tif (!empty($this->member[$k]))\r\n\t\t\t\t{\r\n\t\t\t\t\t$info[$k] = 'checked';\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t$info['key'] = $this->md5_check;\r\n\r\n\t\t\t$this->output .= View::make(\"ucp.email\", ['Profile' => $info]);\r\n\t\t}\r\n\r\n\t\t$this->page_title = $ibforums->lang['t_welcome'];\r\n\t\t$this->nav = array(\"<a href='\" . $this->base_url . \"act=UserCP&amp;CODE=00'>\" . $ibforums->lang['t_title'] . \"</a>\");\r\n\r\n\t}", "public function getEnableEAP()\n {\n if (array_key_exists(\"enableEAP\", $this->_propDict)) {\n return $this->_propDict[\"enableEAP\"];\n } else {\n return null;\n }\n }", "function notification_init() {\n\t// Register a notification handler for the default email method\n\tregister_notification_handler(\"email\", \"email_notify_handler\");\n\n\t// Add settings view to user settings & register action\n\telgg_extend_view('forms/account/settings', 'core/settings/account/notifications');\n\n\telgg_register_plugin_hook_handler('usersettings:save', 'user', 'notification_user_settings_save');\n}", "public function initSettingsData()\n {\n $this->maximum_users_per_group = 5;\n $this->maximum_user_group_memberships = 3;\n $this->maximum_groups_own_per_user = 3;\n $this->maximum_points_group = 200;\n //$this->mail_group_invite_template = 'dma.friends::mail.invite'; \n $this->reset_groups_every_day = $this->days;\n $this->reset_groups_time = '00:00';\n }", "public static function getDefaultFlags(): int\n {\n return static::$defaultFlags;\n }", "function init__notification_poller()\n{\n if (!defined('NOTIFICATION_POLL_FREQUENCY')) {\n define('NOTIFICATION_POLL_FREQUENCY', intval(get_option('notification_poll_frequency')));\n\n define('NOTIFICATION_POLL_SAFETY_LAG_SECS', 8); // Assume a request could have taken this long to happen, so we look back a little further even than NOTIFICATION_POLL_FREQUENCY\n }\n}", "public function activeRestrictions()\n\t{\n\t\t$return = array();\n\t\t\n\t\tif ( !$this->member->group['gbw_disable_tagging'] and $this->member->members_bitoptions['bw_disable_tagging'] )\n\t\t{\n\t\t\t$return[] = 'restriction_no_tagging';\n\t\t}\n\t\tif ( !$this->member->group['bw_disable_prefixes'] and $this->member->members_bitoptions['bw_disable_prefixes'] )\n\t\t{\n\t\t\t$return[] = 'restriction_no_prefixes';\n\t\t}\n\t\t\n\t\treturn $return;\n\t}", "function get_defaultsetting() {\n return $this->defaultsetting;\n }", "function testOverride() {\n $email_channel = new EmailNotificationChannel();\n $web_interface_channel = new WebInterfaceNotificationChannel();\n\n $new_comment_notification = new NewCommentNotification();\n $forgot_password_notification = new ForgotPasswordNotification();\n\n $member = new Member();\n\n $member->setCompanyId(1);\n $member->setEmail('[email protected]');\n $member->setPassword('123');\n $member->save();\n\n $this->assertTrue($email_channel->isEnabledFor($member));\n $this->assertTrue($email_channel->canOverrideDefaultStatus($member));\n\n $email_channel->setEnabledFor($member, false);\n\n $this->assertFalse($email_channel->isEnabledFor($member));\n\n // Show new comment in web interface, but skip email because user turned off email channel\n $this->assertTrue($new_comment_notification->isThisNotificationVisibleInChannel($web_interface_channel, $member));\n $this->assertFalse($new_comment_notification->isThisNotificationVisibleInChannel($email_channel, $member));\n\n // Default, forced behavior - never show in web interface, but always send email, regardless of user settings\n $this->assertFalse($forgot_password_notification->isThisNotificationVisibleInChannel($web_interface_channel, $member));\n $this->assertTrue($forgot_password_notification->isThisNotificationVisibleInChannel($email_channel, $member));\n }", "private function initNotificationSettingsForm()\n\t{\n\t\tif(null === $this->notificationSettingsForm)\n\t\t{\n\t\t\t$form = new ilPropertyFormGUI();\n\t\t\t$form->setFormAction($this->ctrl->getFormAction($this, 'updateNotificationSettings'));\n\t\t\t$form->setTitle($this->lng->txt('forums_notification_settings'));\n\n\t\t\t$radio_grp = new ilRadioGroupInputGUI('','notification_type');\n\t\t\t$radio_grp->setValue('default');\n\n\t\t\t$opt_default = new ilRadioOption($this->lng->txt(\"user_decides_notification\"), 'default');\n\t\t\t$opt_0 = new ilRadioOption($this->lng->txt(\"settings_for_all_members\"), 'all_users');\n\t\t\t$opt_1 = new ilRadioOption($this->lng->txt(\"settings_per_users\"), 'per_user');\n\n\t\t\t$radio_grp->addOption($opt_default, 'default');\n\t\t\t$radio_grp->addOption($opt_0, 'all_users');\n\t\t\t$radio_grp->addOption($opt_1, 'per_user');\n\n\t\t\t$chb_2 = new ilCheckboxInputGUI($this->lng->txt('user_toggle_noti'), 'usr_toggle');\n\t\t\t$chb_2->setValue(1);\n\n\t\t\t$opt_0->addSubItem($chb_2);\n\t\t\t$form->addItem($radio_grp);\n\n\t\t\t$form->addCommandButton('updateNotificationSettings', $this->lng->txt('save'));\n\n\t\t\t$this->notificationSettingsForm = $form;\n\n\t\t\treturn false;\n\t\t}\n\n\t\treturn true;\n\t}", "function getReminderWasAutomatic() {\n\t\treturn $this->getData('reminderWasAutomatic')==1?1:0;\n\t}", "public function init() {\n\t\t\tglobal $prefix;\n\t\t\t$WPFC_active = $this->checkForManager();\n\n\t\t\t// if not already done\n\t\t\tif ( ! get_option( $prefix . 'manager_done', '0' ) ) {\n\t\t\t\t// if the plugin is already there, show a notice that it should be activated\n\t\t\t\tif ( $WPFC_active === true ) {\n\t\t\t\t\trequire_once( ABSPATH . 'wp-admin/includes/plugin.php' );\n\t\t\t\t\tactivate_plugin( $this->wpfcm_path . '/wpfc-manager.php' );\n\t\t\t\t} else if ( $WPFC_active === false ) {\n\t\t\t\t\t$this->downloadWPFCM();\n\t\t\t\t}\n\n\t\t\t\tupdate_option( $prefix . 'manager_done', '1', true );\n\t\t\t} else {\n\t\t\t\tif ( $WPFC_active === true ) {\n\t\t\t\t\t$this->noticeWPFCMNotActive();\n\t\t\t\t} else if ( $WPFC_active === false ) {\n\t\t\t\t\t$this->noticeWPFCMNotInstalled();\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function settings()\n\t{\n\t\t$settings = array();\n\n\t\t$settings['early_global'] = array('c', array(\n\t\t 'member_id' => \"global_member_id\",\n\t\t 'group_id' => \"global_group_id\",\n\t\t // defaults\n\t\t), array('member_id','group_id'));\n\n\t $settings['early_logged_in'] = array('c', array(\n\t\t 'member_id' => \"logged_in_member_id\",\n\t\t 'group_id' => \"logged_in_group_id\",\n\t\t // defaults\n\t\t), array('member_id','group_id'));\n\n\t // for demo, include some others\n\t $settings['include_other'] = array('c', array(\n\t\t 'include_other' => \"Include other member variables\",\n\t\t), array());\n\t\t\n \t\t$settings['others'] = array('ms', array(\n\t\t 'username' => 'username',\n\t\t 'screen_name' => 'screen_name',\n\t\t 'email' => 'email',\n\t\t // 'last_visit' => 'last_visit',\n\t\t 'access_cp' => 'access_cp',\n\t\t // defaults\n\t\t), array());\n\n\t\t$settings['handy'] = array('c', array(\n\t\t 'comment_edit_time_limit' => \"comment_edit_time_limit\",\n\t\t), array('comment_edit_time_limit'));\n\n\t\treturn $settings;\n\t}", "public function getMessageAndCallSetFlag() : string\n {\n $this->setFlag();\n\n return $this->configProvider->getMessage();\n }", "public static function get_allowed_settings()\n {\n }", "public function getEnableRestriction()\n {\n return $this->enable_restriction;\n }", "public function getCampaignExtensionSettingResult()\n {\n return $this->readOneof(26);\n }" ]
[ "0.5604965", "0.52011174", "0.5119234", "0.5007001", "0.49854013", "0.49307632", "0.49038061", "0.4860217", "0.4830116", "0.4828151", "0.47871506", "0.47715014", "0.47662607", "0.47631186", "0.47241667", "0.47213748", "0.46924117", "0.46796", "0.46478423", "0.4646224", "0.46181265", "0.4612216", "0.46081743", "0.45995107", "0.45994565", "0.4584028", "0.45772055", "0.4535103", "0.45265123", "0.4526198" ]
0.57416373
0
Get a list of all the notification codes this hook can handle. (Addons can define hooks that handle whole sets of codes, so hooks are written so they can take wide authority)
public function list_handled_codes() { $list = array(); $list['filedump'] = array(do_lang('CONTENT'), do_lang('filedump:NOTIFICATION_TYPE_filedump')); return $list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getAllCodes() {\n \t$codes = array();\n \t$config = Mage::getConfig()->getNode('crontab/jobs'); /* @var $config Mage_Core_Model_Config_Element */\n\t\tif ($config instanceof Mage_Core_Model_Config_Element) {\n\t\t\tforeach ($config->children() as $key => $tmp) {\n\t\t\t\tif (!in_array($key, $codes)) {\n\t\t\t\t\t$codes[] = $key;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsort($codes);\n \treturn $codes;\n }", "public static function getCodes()\n\t{\n\t\treturn [\n\t\t\tBase::Mail,\n\t\t\tBase::Call,\n\t\t\tBase::Imol,\n\t\t\tBase::Site,\n\t\t\tBase::Site24,\n\t\t\tBase::Shop24,\n\t\t\tBase::SiteDomain,\n\t\t\tBase::Button,\n\t\t\tBase::Form,\n\t\t\tBase::Callback,\n\t\t\tBase::FbLeadAds,\n\t\t\tBase::VkLeadAds,\n\t\t\tBase::Rest,\n\t\t\tBase::Order,\n\t\t\tBase::SalesCenter,\n\t\t];\n\t}", "protected function getAllCodes() {\n\t\t$codes = array();\n\t\t$config = Mage::getConfig()->getNode('crontab/jobs'); \n\t\tif ($config instanceof Mage_Core_Model_Config_Element) {\n\t\t\tforeach ($config->children() as $key => $tmp) {\n\t\t\t\tif (!in_array($key, $codes)) {\n\t\t\t\t\t$codes[] = $key;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t$config = Mage::getConfig()->getNode('default/crontab/jobs');\n\t\tif ($config instanceof Mage_Core_Model_Config_Element) {\n\t\t\tforeach ($config->children() as $key => $tmp) {\n\t\t\t\tif (!in_array($key, $codes)) {\n\t\t\t\t\t$codes[] = $key;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tsort($codes);\n\t\treturn $codes;\n\t}", "public static function getExcludedChannelCodes()\n {\n if (!static::canUse()) {\n return array();\n }\n\n static $codes = null;\n if ($codes === null) {\n $codes = ImConnector\\Connector::getListConnectorNotNewsletter();\n }\n\n return $codes;\n }", "public function getCodes () {\n $list = [\n '' => '全部',\n 'optask' => '任务',\n 'patientrecord' => '运营备注',\n 'patientstage' => '患者阶段',\n 'patientgroup' => '患者分组',\n 'patientremark' => '患者文本备注',\n ];\n\n return $list;\n }", "public static function codes()\n {\n return static::CODES;\n }", "public function codes()\n {\n return $this->codes;\n }", "public function getPreCommitHookList() {}", "static function getCodes() {\n $oClass = new ReflectionClass(__CLASS__);\n return $oClass->getConstants();\n }", "public function getBackupCodes();", "static public function getDeclaredNotifications(): array\n {\n return static::$declared_notifications;\n }", "static public function __hx__list () {\n\t\treturn [\n\t\t\t0 => 'BackOff',\n\t\t\t3 => 'Clog',\n\t\t\t1 => 'Finish',\n\t\t\t2 => 'Resume',\n\t\t];\n\t}", "public function getNotificationNids(): array;", "public function getNotifications()\n\t{\n\t\t$arrReturn = array();\n\t\t\n\t\t$arrTypes = array_keys($GLOBALS['NOTIFICATION_CENTER']['NOTIFICATION_TYPE']['pct_customcatalog_frontedit']);\n\t\t\n\t\t$objNotifications = \\NotificationCenter\\Model\\Notification::findBy(array('FIND_IN_SET(type,?)'),implode(',',$arrTypes));\n\t\tif($objNotifications === null)\n\t\t{\n\t\t\treturn array();\n\t\t}\n\t\t\n\t\tforeach($objNotifications as $objModel)\n\t\t{\n\t\t\t$arrReturn[ $objModel->id ] = $objModel->title;\n\t\t}\n\t\t\n\t\treturn $arrReturn;\n\t}", "public function getNotificationCommands()\n {\n return $this->getCommandList(1);\n }", "public function getAppCodes() {\n return $this->api('appcodes')->getRows();\n }", "public function list_bbcodes()\r\n\t{\r\n\t\treturn array_keys($this->bbcodes);\r\n\t}", "public static function mainCodes()\n {\n return static::MAIN_CODES;\n }", "public function getPostCommitHookList() {}", "public static function availableHooks() {\n\t\t$data = array(\n\t\t\t'form',\n\t\t\t'input',\n\t\t\t'fieldset',\n\t\t\t'legen',\n\t\t\t'label',\n\t\t\t'select',\n\t\t\t'_token',\n\t\t\t'_edit',\n\t\t\t'_create',\n\t\t\t'_email',\n\t\t\t'extension',\n\t\t\t'_instance'\n\t\t);\n\n\t\treturn $data;\n\t}", "public function getList()\n {\n $_params = array();\n return $this->master->call('webhooks/list', $_params);\n }", "abstract public function getReceptionCodes();", "abstract public function getReceptionCodes();", "public function getAllHooks() {\n\t\t$this->hooks = $this->getConfig('hooks');\n\t\tif (empty($this->hooks)) {\n\t\t\t$this->hooks = $this->updateBMOHooks();\n\t\t}\n\t\treturn $this->hooks;\n\t}", "public function getNoticeCodes()\n {\n return static::NOTICE_CODES;\n }", "private function getCoreHokkCallbacks() {\n\n\t\tglobal $wp_filter;\n\t\tif (isset($wp_filter[$this->hookName]))\n\t\t\treturn $wp_filter[$this->hookName];\n\t\telse {\n\t\t\t\treturn array();\n\t\t}\n\t}", "static public function getCodes(){\n return array(\n 200 => 'OK',\n 201 => 'Created',\n 202 => 'Accepted',\n 300 => 'Multiple Choices',\n 301 => 'Moved Permanently',\n 302 => 'Moved Temporarily',\n 307 => 'Temporary Redirect',\n 310 => 'Too many Redirects',\n 400 => 'Bad Request',\n 401 => 'Unauthorized',\n 402 => 'Payment Required',\n 403 => 'Forbidden',\n 404 => 'Not Found',\n 405 => 'Method Not',\n 406 => 'Not Acceptable',\n 407 => 'Proxy Authentication Required',\n 408 => 'Request Time-out',\n 409 => 'Conflict',\n 410 => 'Gone',\n 411 => 'Length Required',\n 412 => 'Precondition Failed',\n 413 => 'Request Entity Too Large',\n 414 => 'Request-URI Too Long',\n 415 => 'Unsupported Media Type',\n 416 => 'Requested range unsatisfiable',\n 417 => 'Expectation failed',\n 500 => 'Internal Server Error',\n 501 => 'Not Implemented',\n 502 => 'Bad Gateway',\n 503 => 'Service Unavailable',\n 504 => 'Gateway Time-out',\n 508 => 'Loop detected',\n );\n }", "function getSpecialRegistrationCodes() {\n // authenticate as the firebase service account\n global $gServiceAccountCredentialsFilepath;\n $firebaseServiceAccount = Firebase\\ServiceAccount::fromJsonFile( $gServiceAccountCredentialsFilepath );\n $firebase = (new Firebase\\Factory)->withServiceAccount( $firebaseServiceAccount )->create();\n $fireDatabase = $firebase->getDatabase();\n $regCodes = $fireDatabase->getReference( 'registration-codes' )->getValue();\n return $regCodes;\n}", "function _getNotificationSettingCategories() {\n\t\treturn array(\n\t\t\t'submissions' => array('categoryKey' => 'notification.type.submissions',\n\t\t\t\t'settings' => array(NOTIFICATION_TYPE_ARTICLE_SUBMITTED, NOTIFICATION_TYPE_METADATA_MODIFIED, NOTIFICATION_TYPE_SUPP_FILE_MODIFIED)),\n\t\t\t'reviewing' => array('categoryKey' => 'notification.type.reviewing',\n\t\t\t\t'settings' => array(NOTIFICATION_TYPE_REVIEWER_COMMENT, NOTIFICATION_TYPE_REVIEWER_FORM_COMMENT, NOTIFICATION_TYPE_EDITOR_DECISION_COMMENT)),\n\t\t\t'editing' => array('categoryKey' => 'notification.type.editing',\n\t\t\t\t'settings' => array(NOTIFICATION_TYPE_GALLEY_MODIFIED, NOTIFICATION_TYPE_SUBMISSION_COMMENT, NOTIFICATION_TYPE_LAYOUT_COMMENT, NOTIFICATION_TYPE_COPYEDIT_COMMENT, NOTIFICATION_TYPE_PROOFREAD_COMMENT)),\n\t\t\t'site' => array('categoryKey' => 'notification.type.site',\n\t\t\t\t'settings' => array(NOTIFICATION_TYPE_USER_COMMENT, NOTIFICATION_TYPE_PUBLISHED_ISSUE, NOTIFICATION_TYPE_NEW_ANNOUNCEMENT)),\n\t\t);\n\t}", "protected function get_deprecated_hooks() {\n\n\t\treturn array(\n\t\t\t// TODO remove by January 2020 or by version 4.0.0, whichever comes first {FN 2018-12-11]\n\t\t\t'wc_pip_sort_order_items' => array(\n\t\t\t\t'version' => '3.3.5',\n\t\t\t\t'replacement' => 'wc_pip_sort_order_item_rows',\n\t\t\t\t'removed' => true,\n\t\t\t\t'map' => false,\n\t\t\t),\n\t\t\t// TODO remove by December 2019 or by version 4.0.0, whichever comes first {FN 2018-12-11]\n\t\t\t'wc_pip_pick_list_document_table_row_cells' => array(\n\t\t\t\t'version' => '3.6.2',\n\t\t\t\t'replacement' => 'wc_pip_pick_list_grouped_by_category_table_rows',\n\t\t\t\t'removed' => true,\n\t\t\t\t'map' => true,\n\t\t\t),\n\t\t);\n\t}" ]
[ "0.6726171", "0.66064316", "0.6601019", "0.6216556", "0.6199188", "0.60930735", "0.6081675", "0.60282975", "0.601612", "0.585455", "0.5851668", "0.5848004", "0.5815001", "0.58126533", "0.5779163", "0.5748517", "0.5744446", "0.5688069", "0.56798387", "0.5676644", "0.56759083", "0.56642324", "0.56642324", "0.5635719", "0.5574455", "0.5570933", "0.55637795", "0.5533749", "0.5533233", "0.55276257" ]
0.7120404
0
Check create person validation.
public function check_create_person_validation() { $person = []; $this->signInAsRelationshipsManager('api'); $response = $this->json('POST','api/v1/person/', $person); $response->assertStatus(422) ->assertJson( [ 'message' => 'The given data was invalid.', 'errors' => [ 'givenName' => [ 'The given name field is required.' ], "surname1" => [ "The surname1 field is required." ], "identifier" => [ "The identifier field is required." ], "identifier_type" => [ "The identifier type field is required." ] ] ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkIsValidForCreate() {\n $errors = array();\n if (strlen($this->email) < 5) {\n $errors[\"email\"] = i18n(\"You must write your email\");\n }\n if (sizeof($errors)>0){\n throw new ValidationException($errors, \"user is not valid\");\n }\n }", "function ctr_validateDetails(&$ctx)\n{\n $reservation = $ctx['reservation'];\n\n // tables exist *AND* are not empty\n if (!empty($_POST['fullnames']) AND !empty($_POST['ages']))\n {\n $ages = $_POST['ages'];\n $fullnames = $_POST['fullnames'];\n $persons = array();\n\n for ($i = 0; $i < count($fullnames); $i++)\n {\n // age in [1;120] and fullname is set\n if (1 <= $ages[$i] AND $ages[$i] <= 120 AND $fullnames[$i])\n {\n array_push($persons, new Person($fullnames[$i], $ages[$i]));\n }\n else\n {\n $ctx['warning'] .= \"Veuillez remplir le(s) \".\n \"participant(s) correctement.\\n\";\n return false;\n }\n }\n\n $reservation->persons = $persons;\n $reservation->save();\n \n return true;\n }\n\n // Bypass checks if datas were already filled\n if ($reservation->persons)\n return true;\n\n $ctx['warning'] .= \"Veuillez remplir tous les champs correctement.\\n\";\n\n return false;\n}", "function validate_on_create() {}", "public function checkIsValidForCreate() {\n $errors = array();\n /*if (strlen($this->email) < 5) {\n $errors[\"register-email\"] = \"You must write your email\";\n }*/\n if (sizeof($errors)>0){\n throw new ValidationException($errors, \"Notification is not valid\");\n }\n }", "public function testCreatePerson()\n {\n }", "public function create() {\n $response = $this->sendRequest(\n 'GET', '/api/v1/persons/create'\n );\n\n return $this->validate($response);\n }", "public function validateCreate(){\n $currentUser=$this->getCurrentUser();\n /** @noinspection PhpMethodParametersCountMismatchInspection */\n $this->input->field('miner')\n ->addRule(IValidator::REQUIRED,'Miner ID is required!')\n ->addRule(IValidator::CALLBACK,'Requested miner is not available!',function($value)use($currentUser){\n try{\n $miner=$this->minersFacade->findMiner($value);\n }catch(\\Exception $e){\n return false;\n }\n if (!($miner->getUserId()==$currentUser->userId)){return false;}\n return $miner->metasource->state==Metasource::STATE_AVAILABLE;\n });\n /** @noinspection PhpMethodParametersCountMismatchInspection */\n $this->input->field('minSupport')\n ->addRule(IValidator::REQUIRED,'Min value of support is required!')\n ->addRule(IValidator::RANGE,'Min value of support has to be in interval [0;1]!',[0,1]);\n }", "function ValidateRegistrationSubmissionPerson()\n {\n \n $validator = new FormValidator();\n $validator->addValidation(\"naam\",\"req\",\"Vul een naam in\");\n $validator->addValidation(\"emailadres\",\"email\",\"De invoer meot bestaan uit een gelding e-mail adres\");\n $validator->addValidation(\"emailadres\",\"req\",\"Vul een e-mail adres in\");\n $validator->addValidation(\"gebruikersnaam\",\"req\",\"Vul een gebruikersnaam in \");\n $validator->addValidation(\"wachtwoord\",\"req\",\"Vul een wachtwoord in\");\n $validator->addValidation(\"telefoon\",\"req\",\"Vul een telefoonnummer in\");\n $validator->addValidation(\"zorgverlenersnummer\",\"req\",\"Vul een zorgnummer in\");\n\n \n if(!$validator->ValidateForm())\n {\n $error='';\n $error_hash = $validator->GetErrors();\n foreach($error_hash as $inpname => $inp_err)\n {\n $error .= $inpname.':'.$inp_err.\"\\n\";\n }\n $this->HandleErrors($error);\n return false;\n } \n return true;\n }", "function RegisterPerson()\n {\n if(!isset($_POST['submitted']))\n {\n return false;\n }\n // Maak een Array\n $formvars = array();\n \n $this->CollectRegistrationSubmissionPerson($formvars);\n \n \n if(!$this->SaveToDatabasePerson($formvars))\n {\n return false;\n }\n \n return true;\n }", "public function test_canCreate_Returns_True_If_Personnel_Have_No_Access() {\n\n\t\t$check_returns_false = $this->authorization_service4->canCreate(2,2);\n\n\t\t$this->assertFalse($check_returns_false);\n\t}", "public function test_canCreate_Returns_True_If_Personnel_Have_Access() {\n\n\t\t$check_returns_true = $this->authorization_service3->canCreate(1,1);\n\n\t\t$this->assertTrue($check_returns_true);\n\t}", "public function postCreate()\n\t{\n\t\t$person = new Person;\n\t\t$admin = new Admin;\n\t\t$data = Input::all();\n\t\tif($admin->isValid($data)){\n\t\t\t$person->name = Input::get('name');\n\t\t\t$person->first_surname = Input::get('first_surname');\n\t\t\t$person->second_surname = Input::get('second_surname');\n\t\t\t$person->email = Input::get('email');\n\t\t\t$person->phone_number = Input::get('phone_number');\n\n\t\t\t$person->save();\n\n\t\t\t$admin->people_id = $person->id;\n\t\t\t$admin->username = Input::get('username');\n\t\t\t$admin->password = Hash::make('12345');\n\n\t\t\t$admin->save();\n\t\t\treturn Redirect::To('admin/admins');\n\t\t}\n\t\telse{\n return Redirect::back()->withInput()->withErrors($admin->errors);\n\t\t}\n\t}", "public function canCreate();", "public function canCreate();", "protected function canCreate() {}", "function verify_person () {\n $bh=new gs_base_handler($this->data,$this->params);\n $f=$bh->validate();\n if (!is_object($f) || !is_a($f,'g_forms')) return $f;\n $d=$f->clean();\n\n $rec=person($this->params['role']);\n if (!$rec) {\n $f->trigger_error('FORM_ERROR','REC_NOTFOUND');\n return $bh->showform($f);\n }\n\n $fname=$this->params['field_name'].'_secret';\n $ga=new GoogleAuthenticator;\n $code=$ga->getCode($rec->$fname);\n\n\n if ($code!=$d['ga_code']) {\n $f->trigger_error('FORM_ERROR','GA_INCORRECT_CODE');\n return $bh->showform($f);\n }\n\n $person=person();\n $fname=$this->params['field_name'].'_verified';\n $person->$fname=TRUE;\n return true;\n }", "public function create(){\n $fields = request()->validate([\n 'name' => 'string|min:3|required',\n 'sex' => 'string|required|in:M,F',\n 'cellphone' => 'required|regex:/^9[0-9]{8}+$/',\n 'dni' => 'required|regex:/^[0-9]{8}+$/|unique:App\\Models\\Person,dni',\n 'first_lastname' => 'string|required',\n 'second_lastname' => 'string|required',\n 'birthday' => 'date|required',\n 'email' => 'email|required|unique:App\\Models\\Person,email',\n 'address' => 'required|string',\n 'type_people_id' => 'numeric|required|min:2|max:3',\n 'ruc' => 'required_if:type_people_id,2|regex:/^[0-9]{11}+$/|unique:App\\Models\\Person,ruc',\n 'business_name' => 'required_if:type_people_id,2|string'\n ]);\n\n\n\n //Creando persona\n $person = Person::create($fields);\n\n // CREANDO EMPLEADO\n Client::create([\"people_id\" => $person->id]);\n\n //CREANDO USUARIO\n User::create([\n \"password\" => Hash::make($fields['dni']),\n \"user_name\" => $person->email,\n \"people_id\" => $person->id,\n ]);\n\n return response()->json([\n 'res' => true,\n 'message' => \"el cliente {$person->name} ha sido creado correctamente\"\n ]);\n }", "public static function validateCreateRequest() {\n $errors = array();\n $data = array();\n self::checkName($errors, $data);\n if (count($errors) > 0 && count($data) > 0) {\n redirect(url(['_page' => 'home']));\n } else if (count($errors) == 0){\n return $data;\n }\n return null;\n }", "function canCreate(){\n\t\t\tif(!isset($_POST['action'])) return false;\n\t\t\tif($_POST['action'] !== 'create_profile') return false;\n\t\t\tif($_POST['profile_folder'] === '') return false;\n\t\t\tif($_POST['profile_name'] === '') return false;\n\t\t\treturn true;\n\t\t}", "function create_person($personRec = \"\", $personID = \"\")\n\t{\n\t\t//throw new exception(\"create_person - this function is not implemented\");\n\n\t}", "public function create(): bool\n {\n return $this->isAllowed(self::CREATE);\n }", "protected function onCreating()\n {\n return $this->isDataOnCreateValid();\n }", "public function isValidCreateData($form){\n return true;\n }", "public function doCreate() {\n if(\n isset($_POST['email']) &&\n isset($_POST['password']) &&\n isset($_POST['lastName']) &&\n isset($_POST['firstName']) &&\n isset($_POST['address']) &&\n isset($_POST['postalCode']) &&\n isset($_POST['city'])\n ) {\n $alreadyExist = $this->userManager->findByEmail($_POST['email']);\n\n if(!$alreadyExist) {\n $newUser = new User($_POST);\n $this->userManager->create($newUser);\n $page = 'login';\n }\n else {\n $error = \"ERROR : This email (\".$_POST['email'].\") is used by another user\";\n $page = 'create';\n }\n }\n\n require('./View/default.php');\n }", "public function testValidateSurname_ReturnsPleaseEnterAValidSurname_GivenGenerationRequiredTrue()\n {\n $person = new StdPerson;\n\n $this->assertEquals(\n 'valid',\n $person->validateSurname('Gates III', true)\n );\n }", "public function validates($person){\n $people=$this->all();\n //check that there are less then 10 entries\n if (10<=$people->rowCount()){\n return false; \n }\n //check that there are 4 or less of the same job\n $same_job=0;\n foreach($people as $p){\n if($p['job_role']==$person['job_role']){\n $same_job++;\n }\n }\n if (4<=$same_job){\n return false; \n }\n //return true if validation passes\n return true;\n }", "public function canAddUnknownPerson();", "public static function validateCreateRequest() {\n $errors = array();\n $data = array();\n self::checkTitle($errors, $data);\n self::checkDescription($errors, $data);\n self::checkGoal($errors, $data);\n self::checkStartDate($errors, $data);\n self::checkDuration($errors, $data);\n self::checkCategories($errors, $data);\n if (count($errors) > 0 && count($data) > 0) {\n redirect(url(['_page' => 'create_project']));\n } else if (count($errors) == 0){\n return $data;\n }\n return null;\n }", "public function canCreateAUser ()\n {\n\n $faker = Factory::create();\n\n $this->withoutExceptionHandling();\n\n\n $response = $this->json('POST', 'api/users', [\n 'name' => $name = $faker->company,\n 'surName' => $surName = $faker->company,\n 'email' => $email = $faker->company,\n 'password' => $password = $faker->company,\n 'entity' => $entity = $faker->company,\n 'street' => $street = $faker->company,\n 'number' => $number = random_int(0,9999),\n 'city' => $city = $faker->company,\n 'CP' => $CP = random_int(0,9999),\n ])\n ->assertStatus(201);\n\n $this->assertDatabaseHas('users', [\n 'name'=> $name,\n 'surName'=> $surName,\n 'email'=>$email,\n 'password'=>$password,\n 'entity'=>$entity,\n 'street'=>$street,\n 'number'=>$number,\n 'city'=>$city,\n 'CP'=>$CP,\n ]);\n }", "public function testNewPersonsOwnershipExistingCustomers() {\n $this->addProductToCart($this->product);\n $this->goToCheckout();\n $this->assertCheckoutProgressStep('Event registration');\n\n // Save first registrant.\n $this->clickLink('Add registrant');\n $this->submitForm([\n 'person[field_name][0][value]' => 'Person 1',\n 'person[field_email][0][value]' => '[email protected]',\n 'field_comments[0][value]' => 'No commments',\n ], 'Save');\n\n // Assert that this person profile is now owned by the current logged in\n // user.\n $person = Profile::load(1);\n // Assert that we are checking the expected person.\n $this->assertEquals('Person 1', $person->field_name->value);\n $this->assertEquals($this->adminUser->id(), $person->getOwnerId());\n }" ]
[ "0.70678824", "0.6912674", "0.6803462", "0.67670065", "0.67114013", "0.6701259", "0.6678954", "0.66605467", "0.66580576", "0.66430044", "0.66178644", "0.6581013", "0.6515533", "0.6515533", "0.6514173", "0.6509381", "0.64894927", "0.637923", "0.63351506", "0.6283792", "0.62376994", "0.62174875", "0.61996675", "0.61869186", "0.6177499", "0.6151062", "0.61150265", "0.60979134", "0.6094047", "0.60857946" ]
0.83110464
0
Check authorization uri to show a person.
public function check_authorization_uri_to_show_a_person() { $person = create_person_with_nif_array(); $this->check_json_api_uri_authorization('api/v1/person/','post', $person); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize() {\n\t\tif (Auth::user()->user_type == \"S\" || Auth::user()->user_type == \"O\") {\n\t\t\treturn true;\n\t\t} else {\n\t\t\tabort(404);\n\t\t}\n\t}", "abstract public function url_authorize();", "public function authorize()\n {\n return $this->route('address')->userCanView($this->user());\n }", "public function authorize()\n {\n $id = Auth::id();\n $livro = $this->route('livro');\n if ($livro!=NULL) {\n $author = $livro->user_id;\n return $author == $id ? true : false;\n }\n else\n return true;\n }", "public function authorize()\n {\n // this was my best guess\n return $this->user()->id === $this->route('user')->id;\n }", "public function authorize()\n {\n return auth()->user()->is_author($this->route('board'));\n }", "public function authorize()\n {\n if($this->path() == 'profile/create')\n {\n return true;\n } else {\n return false;\n }\n }", "public function authorize()\n {\n // dd($this->route('file')->name_id);\n return $this->auth->check();\n // return $this->route('file')->name_id === $this->auth->user()->id;\n }", "public function show($id)\n {\n $user = Auth::user();\n $interaction = Interaction::find($id);\n if (is_null($user) || is_null($interaction))\n {\n abort(404);\n }\n\n if ($user->can('see-all-interactions') || ($user->can('see-new-interactions') && $interaction->user_id == $user->id))\n {\n return redirect('person/'.$interaction->person_id);\n }\n abort(403);\n }", "function hasPermission($uriPermission){\n\tif(Auth::check() && Auth::user()->hasAnyPermission($uriPermission))\n return true;\n else\n return false;\n}", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n return $this->user()->id === $this->route('report')->user_id;\n }", "public function authorize()\n {\n $organizationId = (string) $this->route('id');\n\n $this->organization = Organization::findByUuidOrFail($organizationId);\n\n return $this->user()->can('show', [Organization::class, $this->organization]);\n }", "public function authorize()\n {\n $user = auth('web')->user();\n\n $uuidTenant = isset($user) ? $user->tenant->uuid : $this->segment(4);\n\n if(!app(TenantRepository::class)->getTenantByUuid($uuidTenant)) {\n return false; // 404\n }\n\n return true;\n }", "public function authorize()\n {\n $person = $this->findFromUrl('person');\n\n return $this->user()->can('update', $person);\n }", "public function authorize()\n {\n $this->id = $this->route('admin');\n return auth('admin')->check();\n }", "abstract protected function auth_url();", "public function openAuthorizationUrl()\n {\n header('Location: ' . $this->getAuthorizationUrl());\n exit(1);\n }", "public function authorize()\n {\n $user = JWTAuth::parseToken()->authenticate();\n $organisation = Organization::findOrFail($this->route('organizations'));\n return $organisation->admin_id == $user->id;\n }", "public function show($params){\n if( $_SESSION[\"username\"] ){\n // check if user has one of the permited roles\n // TODO: check if user was deleted\n $user_id = $_SESSION[\"user_id\"];\n $user = User::findBy(\"id\", $user_id);\n $roles = $user->roles;\n $role_page = \"PAGE_\".$params;\n\n if( $user->hasRole($role_page) ){\n $GLOBALS['page_name'] = $params;\n render('pages', 'show');\n }\n else{\n header('HTTP/1.0 401 Unauthorized');\n render('errors', '401');\n }\n }\n else{\n $_SESSION['PAGE_REFERER'] = $_SERVER['REQUEST_URI'];\n header('Location: /sign_in');\n }\n\n }", "function custom_rules_is_during_oauth(){\n\treturn (\n\t\t// on oauth route itself\n\t\targ(0) == 'oauth2' ||\n\t\t// or logging in using the form\n\t\t( isset( $_GET['destination'] ) &&\n\t\t stripos( $_GET['destination'], 'oauth2' ) !== FALSE )\n\t);\n}", "public function isAuthorized() {}", "private function processAuthorization($uri) {\n\t\tif (isset($_SESSION['user'])) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "protected function check_auth( )\n\t{\n\t\t$page = $this->uri->segment( 2);\n\t\t$section = $this->uri->segment(1);\t\t\n\t\t$function = $this->uri->segment(3);\n\t\t\n\t\tif( $section == 'api' and $page == 'users' and $function == 'login' )\n\t\t\treturn;\n\n\t\t$logged_in = $this->is_logged_in();\n\t\t$excused_uri = array('login' , 'recover_password' , 'auth_help' , 'token_login');\n\t\tif( ! $logged_in )\n\t\t{\n\t\t\t//if in app mode\n\t\t\tif( $this->_app_mode == 'json' and $section != 'admin' )\n\t\t\t{\n\t\t\t\t\n\t\t\t\t$this->output->set_status_header('401');\n\t\t\t\texit;\n\t\t\t}\n\t\t\t//check if is login page\n\t\t\tif( $section == 'admin' and ( ! in_array($page, $excused_uri) ) )\n\t\t\t{\n\t\t\t\theader('Location: /admin/login');\n\t\t\t\texit;\n\t\t\t}\n\t\t}\n\n\t\t\n\n\t\treturn;\n\t}", "function canViewButton($uri,$type=false)\n{\n if(isset($type) && $type != null)\n {\n if($type='route')\n {\n if(\\App\\Permission::where('route_name',$uri)->exists()) {\n $permission = \\App\\Permission::where('route_name', $uri)->first();\n $uri = $permission->route_uri;\n }\n }\n }\n $mdl=new \\App\\Http\\Middleware\\UserizationMiddleware();\n if($mdl->checkAccessibility($uri))\n {\n return true;\n }\n return false;\n}", "public function authorize()\n {\n //Get the 'mark' id\n switch ((int) request()->segment(6)) {\n case 0:\n return access()->allow('deactivate-users');\n break;\n\n case 1:\n return access()->allow('reactivate-users');\n break;\n }\n\n return false;\n }", "public function testGetAuthorizationUrl()\n {\n $uri = parse_url($this->provider->getAuthorizationUrl());\n parse_str($uri['query'], $query);\n\n $this->assertEquals('oauth.mail.ru', $uri['host']);\n $this->assertEquals('/login', $uri['path']);\n\n $this->assertArrayHasKey('client_id', $query);\n $this->assertArrayHasKey('response_type', $query);\n $this->assertArrayHasKey('state', $query);\n $this->assertEquals('code', $query['response_type']);\n\n $this->assertNotNull($this->provider->getState());\n }", "private function requiresAuthorization($uri) {\n\t\tif (array_key_exists($uri, $this->routes))\t {\n\t\t\treturn true;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function people_show()\n {\n if(Auth::user()->access != 1 )\n {\n abort(403);\n }\n return view('hact.reports.people');\n }", "public function hasAuthorization(): bool;" ]
[ "0.6208289", "0.619818", "0.61616457", "0.6037186", "0.60190815", "0.591433", "0.58267933", "0.578252", "0.576901", "0.5762709", "0.5741984", "0.5741984", "0.5696148", "0.56688863", "0.5667511", "0.5658546", "0.5647978", "0.56392956", "0.5636935", "0.561792", "0.56166047", "0.56081516", "0.559889", "0.55955464", "0.5586525", "0.55834854", "0.55776757", "0.5559427", "0.5558692", "0.5557442" ]
0.80825865
0
Return monthly instalment rate
public function getMonthlyInstalment();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getOutletDiscountRate()\n {\n $dayOfMonth = date('j');\n return 20 + $dayOfMonth;\n }", "public function getMonthlyInstalment(): float\n {\n return $this->monthlyInstalment;\n }", "function get_installment($rate, $pricipal, $installment, $interest_method = 1, $interval = 1) {\n\n $amount = 0;\n $rate_required = 0;\n if ($interval == 1) {\n //monthly\n $rate_required = (($rate / 12) / 100);\n }else if($interval == 2){\n //weekly\n $rate_required = (($rate / 52) / 100); \n }\n\n if ($interest_method == 1) {\n $up = pow((1 + $rate_required), $installment);\n\n $down = (pow((1 + $rate_required), $installment) - 1);\n\n $amount = (($pricipal * ($up / $down)) * $rate_required);\n } else if ($interest_method == 2) {\n $interest_per_month = $rate_required * $pricipal;\n $amount = ($pricipal / $installment) + $interest_per_month;\n }\n\n return round($amount, 2);\n }", "public function getMonthlyFee();", "protected function frequency()\n {\n return 'monthly';\n }", "public function getMonthlyFee(): float { return 2.0; }", "function total_monthly_cost($sum, $months, $monthfee, $rate, $startfee, $cur)\n{\n\t$sum_j_to_N = 0;\n\t// reference: Avbetalningsplaner.pdf\n\t$K0 = $sum;\n\t$A = $monthfee;\n\t$S = $startfee;\n\t$R = (pow(1.0+$rate/10000, 1.0/12.0));\n\t$N = $months;\n\tif ($rate == 0)\n\t$T = (1 / $N)*($K0 + ($N * $A) + $S);\n\telse\n\t{\n\t\t// the total cost of fees plus the cost of paying off the monthly fee first and after that amortize\n\t\tfor ($j = 2; $j < $N+1; $j++)\n\t\t{\n\t\t\t$sum_j_to_N = $sum_j_to_N + pow($R, $N - $j) * $A;\n\t\t}\n\t\t$T = (($R - 1) / (pow($R, $N) - 1)) * (pow($R, $N) * $K0 + $sum_j_to_N + pow($R, $N - 1) * ($A + $S));\n\t}\n\n\treturn round($T, 0);\n}", "public function getCurrentMonthTotalRevenue() : float;", "public function getAnnualPrice(): float\n {\n $ratio = $this->getMonths() / 12;\n return $this->getPrice() / $ratio;\n }", "public function reporteMensualTotal(){\n\n }", "public function viewMonthlyRpt()\n {\n return view('Activities.Reports.monthlyRpt(PNL)');\n }", "function getMonthTotal(){\n\t\t$total = $this->hhRentAmount;\n\t\tforeach ($this->members as $member){\n\t\t\tforeach ($member->getBills() as $bill){\n\t\t\t\t$total += $bill->getBillAmount();\n\t\t\t}\n\t\t}\n\t\treturn $total;\n\t}", "public function perMonth (){\n $data = Auction::totalPreMonth();\n return view(\"welcome\")->with('totalPerMonth',$data); \n }", "public function monthly()\n {\n $submenu_code = 'monthly';\n $permits = $this->_check_menu_access( $submenu_code, 'view');//kalau tidak ada permission untuk view langsung redirect & return permits\n $this->_set_title('Monthly');\n\n //SET VARIABLE\n $from = set_var($this->input->get('from'), date('Y-m-d', strtotime('-1 day')));\n $to = set_var($this->input->get('to'), date('Y-m-d'));\n\n $cst_status = $this->config->item('order')['status']['completed'];\n $cst_delivery_type = $this->config->item('order')['delivery_type'];\n $ios = $this->config->item('user_download')['usrd_type']['ios'];\n $android = $this->config->item('user_download')['usrd_type']['android'];\n\n $url_query = '&from='.$from.'&to='.$to;\n\n //ADDITIONAL FILTER\n\n $arr_data = [\"from_date\" => $from, \"to_date\" => $to.' 23:59:59', \"negation\" => true, \"status\" => $cst_status];\n $arr_data_usrd_android = $arr_data;\n $arr_data_usrd_ios = $arr_data;\n $arr_data_usrd_android['usrd_type'] = $android;\n $arr_data_usrd_ios['usrd_type'] = $ios;\n\n $arr_data_negation = $arr_data;\n $arr_data_pickup = $arr_data;\n $arr_data_delivery = $arr_data;\n $arr_data_negation[\"negation\"] = false;\n $arr_data_pickup['delivery_type'] = $cst_delivery_type['pickup'];\n $arr_data_delivery['delivery_type'] = $cst_delivery_type['delivery'];\n\n\n $total_android = $this->reportdb->get_total_download_apps($arr_data_usrd_android);\n $total_ios = $this->reportdb->get_total_download_apps($arr_data_usrd_ios);\n $total_download = (int) $total_android->total + (int) $total_ios->total;\n\n //--------------------------------------------------------------------------------------------------------------------------\n $data_total_order = $this->reportdb->get_total_complete($arr_data);\n $data_total_pickup = $this->reportdb->get_total_complete($arr_data_pickup);\n $data_total_delivery = $this->reportdb->get_total_complete($arr_data_delivery);\n //-------------------------------------------------------------------------------------------------------------------------------------------------\n $user = $this->reportdb->get_total_user($arr_data);\n $user_not_order = $this->reportdb->get_total_user_not_order($arr_data);\n $user_topup_in_same_month = $this->reportdb->get_total_user_topup_month($arr_data);\n $user_topup_not_in_same_month = $this->reportdb->get_total_user_topup_month($arr_data_negation);\n $user_have_balance = $this->reportdb->get_total_user_have_balance_in_end_month($arr_data);\n //-------------------------------------------------------------------------------------------------------------------------------------------------\n $user_reff = $this->reportdb->get_total_user_referral($arr_data);\n $user_reff_not_claim = $this->reportdb->get_total_user_referral_claim($arr_data_negation);\n $user_reff_claim = $this->reportdb->get_total_user_referral_claim($arr_data);\n $user_reff_claim_not_repeat = $this->reportdb->get_total_user_referral_claim_repeat($arr_data_negation);\n $user_reff_claim_repeat = $this->reportdb->get_total_user_referral_claim_repeat($arr_data);\n $user_reff_not_free = $this->reportdb->get_total_user_referral_not_free($arr_data);\n //--------------------------------------------------------------------------------------------------------------------------\n $claim_free = $this->reportdb->get_total_claim_free($arr_data);\n $claim_free_repeat = $this->reportdb->get_total_claim_free_repeat($arr_data);\n $claim_free_not_order = $this->reportdb->get_total_claim_free_repeat($arr_data_negation);\n $not_claim_free = $this->reportdb->get_not_claim_free($arr_data);\n //--------------------------------------------------------------------------------------------------------------------------\n $user_topup = $this->reportdb->get_total_user_topup($arr_data);\n\n // SELECT DATA & ASSIGN VARIABLE $DATA\n $config['base_url'] = ADMIN_URL.'report/monthly'.($url_query != '' ? '?'.$url_query : '');\n $data['form_url'] = $config['base_url'];\n $data['page_url'] = str_replace($url_query, '', $config['base_url']);\n $data['permits'] = $permits;\n $data['from'] = $from;\n $data['to'] = $to;\n //-----------------------------------------------------------------------\n $data['total_order'] = $data_total_order->total;\n $data['total_pickup'] = $data_total_pickup->total;\n $data['total_delivery'] = $data_total_delivery->total;\n //-----------------------------------------------------------------------\n $data['user'] = $user;\n $data['user_not_order'] = $user_not_order;\n $data['user_topup_in_same_month'] = $user_topup_in_same_month;\n $data['user_topup_not_in_same_month'] = $user_topup_not_in_same_month;\n $data['user_have_balance'] = $user_have_balance;\n //----------------------------------------------------------------------\n $data['user_reff'] = $user_reff;\n $data['reff_not_claim'] = $user_reff_not_claim;\n $data['reff_claim'] = $user_reff_claim;\n $data['reff_claim_not_repeat'] = $user_reff_claim_not_repeat;\n $data['reff_claim_repeat'] = $user_reff_claim_repeat;\n $data['reff_not_free'] = $user_reff_not_free;\n //----------------------------------------------------------------------\n $data['claim_free'] = $claim_free;\n $data['claim_free_repeat'] = $claim_free_repeat;\n $data['claim_free_not_order'] = $claim_free_not_order;\n $data['not_claim_free'] = $not_claim_free;\n //----------------------------------------------------------------------\n $data['user_topup'] = $user_topup;\n $data['total_download'] = $total_download;\n $data['total_android'] = $total_android->total;\n $data['total_ios'] = $total_ios->total;\n\n if($this->input->get('export') == 'xls'){\n $permits = $this->_check_menu_access( $submenu_code, 'export');\n //mulai dari set header dan filename\n $filename = 'monthly.xls';\n $this->set_header_xls($filename);\n\n $this->_render('report/monthly_xls', $data);\n\n }else{\n $this->_render('report/monthly', $data);\n }\n }", "public function getProfitMonth(){\n\t\tglobal $db;\n\t\t$date_now = date('Y-m').'-01';\n\t\t$last_month = date('Y-m', strtotime('-1 month')).'-01';\n\n\t\t$sql = $db->prepare(\"SELECT SUM(price) FROM project01_report WHERE date_init BETWEEN '$last_month' AND '$date_now' \");\n\t\t$sql->execute();\n\t\tif ($sql->rowCount()>0) {\n\t\t\t$profit = $sql->fetch();\n\t\t\treturn $profit;\n\t\t}\n\t}", "public function getVirusPerMonth() {\n\t\treturn parent::getVirusPerMonth();\n\t}", "public function getCurrentMonthTotalOrder() : int;", "function get_payment_rate($subtotal) {}", "public function rate()\n {\n\n }", "function monthlyBalancedData(){\n\t\t//results to be returned\n\t\t$results= [];\n\t\t//the total expense of all the month of all users\n\t\t$results['total'] = $this->getMonthTotal();\n\t\t//the fair amount to be paid by each member\n\t\t// total/number of members on household\n\t\t$results['fairAmount'] = $results['total']/$this->getNumberOfMembers();\n\t\tforeach ($this->members as $member) {\n\t\t\t//retrieves the individual expenses\n\t\t\t$name = $member->getUserFirstName();\n\t\t\t$results['members'][$name] = $member->billsDistribution();\n\t\t}\n\t\treturn $results;\n\t}", "public function takePostBaseOnMonth();", "public function getStoreToOrderRate();", "public function iN_CurrentMonthTotalSubscriptionEarning() {\n\t\t$query = mysqli_query($this->db, \"SELECT SUM(admin_earning) AS MonthTotalEarnSubscription FROM i_user_subscriptions WHERE status = 'active' AND MONTH(created) = MONTH(CURDATE()) \") or die(mysqli_error($this->db));\n\t\t$row = mysqli_fetch_array($query, MYSQLI_ASSOC);\n\t\treturn isset($row['MonthTotalEarnSubscription']) ? $row['MonthTotalEarnSubscription'] : '0.00';\n\t}", "public static function getMonthlySales()\n\t{\n\t\tTools::displayAsDeprecated();\n\t\t$result = Db::getInstance(_PS_USE_SQL_SLAVE_)->getRow('\n\t\tSELECT SUM(`total_paid`) as nb\n\t\tFROM `'._DB_PREFIX_.'orders`\n\t\tWHERE MONTH(`date_add`) = MONTH(NOW())\n\t\tAND YEAR(`date_add`) = YEAR(NOW())');\n\n\t\treturn isset($result['nb']) ? $result['nb'] : 0;\n\t}", "function get_totals(){\r\n $this_month = date('n', time()) - 1;\r\n\r\n $this->payments_this_month = $this->payment_totals_by_month[$this_month];\r\n\r\n $last_month = $this_month > 0 ? $this_month - 1 : false;\r\n if($last_month){\r\n $payments_last_month = $this->payment_totals_by_month[$last_month];\r\n\r\n if($payments_last_month > 0)\r\n $this->payments_this_month_change_percentage = (($this->payments_this_month/$payments_last_month) - 1) * 100;\r\n else $this->payments_this_month_change_percentage = 0;\r\n }\r\n }", "public function get_month_permastruct()\n {\n }", "public function getPricePerMonth($_product) {\n $price = $_product->getResource()->getAttribute('santanderpricemonth')->getFrontend()->getValue($_product);\n return Mage::helper('core')->currency(round($price, 2));\n }", "public function rate()\n {\n return $this->rate;\n }", "public function rate()\n {\n return $this->rate;\n }", "public function monthly()\n {\n return $this->cron('0 0 1 * * *');\n }" ]
[ "0.67783415", "0.67077565", "0.6666368", "0.6613046", "0.65895265", "0.64917725", "0.645638", "0.6337947", "0.6155035", "0.6042495", "0.59195554", "0.58932734", "0.58229834", "0.5814813", "0.5804146", "0.5789161", "0.57754105", "0.57588935", "0.5720379", "0.57112706", "0.5679862", "0.5663307", "0.5662081", "0.5654582", "0.5648555", "0.55804384", "0.55764335", "0.5570489", "0.5570489", "0.5549426" ]
0.69513094
0
\ Content functions \ Displays meta information for a post
function boom_post_meta() { if ( get_post_type() == 'post' ) { echo sprintf( __( 'Posted %s in %s%s by %s. ', 'boom' ), get_the_time( get_option( 'date_format' ) ), get_the_category_list( ', ' ), get_the_tag_list( __( ', <b>Tags</b>: ', 'boom' ), ', ' ), get_the_author_link() ); } edit_post_link( __( ' (edit)', 'boom' ), '<span class="edit-link">', '</span>' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function et_divi_post_meta() {\n\t\t$pages = array(\n\t\t\tintval( \\SermonManager::getOption( 'smp_archive_page', 0 ) ),\n\t\t\tintval( \\SermonManager::getOption( 'smp_tax_page', 0 ) ),\n\t\t);\n\t\tif ( in_array( get_the_ID(), $pages ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$postinfo = is_single() ? et_get_option( 'divi_postinfo2' ) : et_get_option( 'divi_postinfo1' );\n\n\t\tif ( $postinfo ) :\n\t\t\techo '<p class=\"post-meta\">';\n\t\t\techo et_pb_postinfo_meta( $postinfo, et_get_option( 'divi_date_format', 'M j, Y' ), esc_html__( '0 comments', 'Divi' ), esc_html__( '1 comment', 'Divi' ), '% ' . esc_html__( 'comments', 'Divi' ) );\n\t\t\techo '</p>';\n\t\tendif;\n\t}", "function fumseck_pagemeta() {\n\t\n\t// Initialize\n\t\n\t$output = '';\n\tglobal $post;\n\t$post_id = $post->ID;\n\t\n\t\n\t// Get metadata for the page from WordPress\n\t\n\t$post_title = get_the_title($post_id);\n\t$post_permalink = get_permalink($post_id);\n\t\n\t$post_has_featured_image = has_post_thumbnail( $post_id );\n\t\n\tif( $post_has_featured_image ) {\n\t\t$post_featured_image_large = wp_get_attachment_image_src( get_post_thumbnail_id($post->ID), 'large'); // [URL, w, h, resized?]\n\t};\n\t\n\t$post_summary = wp_strip_all_tags( get_field( '_summary', $post_id, true ));\n\t\n\t\n\tif ( ! $post_summary ) {\t\t// if no summary, try a manual excerpt\n\t\t$post_summary = $post->post_excerpt;\n\t};\t// TODO: do something if there's no manual excerpt either\n\n\t\n\t// Static metadata\n\t\n\t$output .= '<meta name=\"twitter:site\" content=\"@gpaumier\"><meta name=\"twitter:creator\" content=\"@gpaumier\">';\t\n\t$output .= '<meta name=\"twitter:domain\" content=\"guillaumepaumier.com\">';\t\n\t$output .= '<meta property=\"fb:admins\" content=\"710543474\" />';\n\t//$output .= '<meta property=\"fb:admins\" content=\"579323492087704\" />';\n\t$output .= '<meta property=\"article:author\" content=\"https://www.facebook.com/gllmpmr\" />';\n\t$output .= '<meta property=\"article:publisher\" content=\"https://www.facebook.com/gllmpmr\" />';\n\t\n\t$output .= '<meta property=\"og:type\" content=\"article\" />'; // TODO: be more specific\n\t\n\t// Common metadata\n\t\n\t$output .= '<meta property=\"og:site_name\" content=\"' . get_bloginfo( 'name' ) . '\"/>';\n\t\n\t$output .= '<meta name=\"twitter:title\" content=\"' . $post_title . '\">';\n\t$output .= '<meta property=\"og:title\" content=\"' . $post_title . '\"/>';\n\t\n\t\n\t$output .= '<meta property=\"og:url\" content=\"' . $post_permalink . '\" />';\n\t\n\t\n\t$output .= '<meta property=\"og:description\" content=\"' . $post_summary . '\" />';\n\t\n\t// TODO: add locale\n\t\n\tif ( get_post_format( $post_id ) === 'image' ) {\n\t\t\n\t\t$output .= '<meta name=\"twitter:card\" content=\"photo\">';\n\t\t$output .= '<meta name=\"twitter:image\" content=\"' . $post_featured_image_large[0] . '\">';\n\t\t$output .= '<meta name=\"twitter:image:width\" content=\"' . $post_featured_image_large[1] . '\">';\n\t\t$output .= '<meta name=\"twitter:image:height\" content=\"' . $post_featured_image_large[2] . '\">';\n\t\t$output .= '<meta property=\"og:image:width\" content=\"' . $post_featured_image_large[1] . '\" />';\n\t\t$output .= '<meta property=\"og:image:height\" content=\"' . $post_featured_image_large[2] . '\" />';\n\t\t\n\t} else {\t// Not a photo\n\t\t\n\t\t$output .= '<meta name=\"twitter:description\" content=\"' . $post_summary . '\">';\n\t\t\n\t\tif( $post_has_featured_image ) {\n\t\t\t\n\t\t\t$output .= '<meta name=\"twitter:card\" content=\"summary_large_image\">';\n\t\t\t$output .= '<meta name=\"twitter:image:src\" content=\"' . $post_featured_image_large[0] . '\">';\n\t\t\t$output .= '<meta property=\"og:image\" content=\"' . $post_featured_image_large[0] . '\" />';\n\t\t\t$output .= '<meta property=\"og:image:width\" content=\"' . $post_featured_image_large[1] . '\" />';\n\t\t\t$output .= '<meta property=\"og:image:height\" content=\"' . $post_featured_image_large[2] . '\" />';\n\t\t\t\n\t\t} else {\n\t\t\t\n\t\t\t$output .= '<meta name=\"twitter:card\" content=\"summary\">';\n\t\t}\n\t\t\n\t};\n\t\n\n\techo $output;\n}", "function tcsn_post_meta() {\n\n\tglobal $post;\n\tif ( ! is_page() && 'page' != $post->post_type ) {\n\t\t$post_footer_metadata = ( get_post_format() ? '<a class=\"post-format-meta\" href=\"' . get_post_format_link( get_post_format() ) . '\">' . get_post_format_string( get_post_format() ) . '</a>' : '' \t\t);\n\t} \n\t\techo '<span class=\"post-meta\">' . $post_footer_metadata. '</span>'; \n\t\t\n\t// Post author\n\tif ( 'post' == get_post_type() ) {\n\t\tprintf( 'By <span class=\"author vcard margin-less\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span><span class=\"text-sep\">/</span>',\n\t\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\t\tesc_attr( sprintf( __( 'View all posts by %s', 'tcsn_theme' ), get_the_author() ) ),\n\t\t\tget_the_author()\n\t\t);\n\t}\n\t\n\t// Post date\n\tif ( ! has_post_format( 'link' ) && 'post' == get_post_type() )\n\t\ttcsn_post_date();\n\t\t\n\t// Categories\n\t$categories_list = get_the_category_list( __( ', ', 'tcsn_theme' ) );\n\tif ( $categories_list ) {\n\t\techo 'in <span class=\"categories-links\">' . $categories_list . '</span>';\n\t}\n\t\n\t// Tags\n\tif ( ! is_single() ) {\n\t\t$tag_list = get_the_tag_list( '', __( ', ', 'tcsn_theme' ) );\n\t\tif ( $tag_list ) {\n\t\t\techo '<span class=\"text-sep\">/</span> tags <span class=\"tags-links\">' . $tag_list . '</span>';\n\t\t}\n\t}\n\t\n\telse {\n\t\t$tag_list = get_the_tag_list( '', __( ', ', 'tcsn_theme' ) );\n\t if ( $tag_list ) {\n\t\techo '<span class=\"text-sep\">/</span> tags <span class=\"tags-links\">' . $tag_list . '</span>';\n\t } \n\t}\n}", "function meta_html($post)\n {\n $view = new Xby2BaseView(get_post_meta($post->ID));\n $view->addInput('text', 'link-label', 'Label: ', 'label', 'regular-text');\n $view->addInput('text', 'link-link', 'Link: ', 'link', 'large-text');\n $view->addInput('text', 'link-priority', 'Priority: ', 'priority', 'regular-text');\n $view->displayForm();\n }", "function gos_post_meta() {\n if ( get_post_type() == 'post' ) {\n echo sprintf(\n __( 'Posted %s in %s%s by %s. ', 'gos' ),\n get_the_time( get_option( 'date_format' ) ),\n get_the_category_list( ', ' ),\n get_the_tag_list( __( ', <b>Tags</b>: ', 'gos' ), ', ' ),\n get_the_author_link()\n );\n }\n edit_post_link( __( ' (edit)', 'gos' ), '<span class=\"edit-link\">', '</span>' );\n}", "function fl_blog_post_meta() {\n\tif(is_page()) return; // don't do post-meta on pages\n?>\t\t\n<div class=\"content-bar iconfix\">\n\t<p class=\"meta\">\n\t\t<span><i class=\"icon-calendar\"></i><?php echo get_the_date(get_option('date_format')); ?></span>\n\t\t<span><i class=\"icon-folder-open\"></i><?php the_category(', '); ?></span>\n\t</p>\n\t<p class=\"comment-count\"><i class=\"icon-comments\"></i><?php comments_popup_link( __( '0 Comments', APP_TD ), __( '1 Comment', APP_TD ), __( '% Comments', APP_TD ) ); ?></p>\n</div>\n<?php\n}", "function absolvution_post_meta() {\n if ( get_post_type() == 'post' ) {\n echo sprintf(\n __( '<div class=\"meta-container date-posted\">Posted %s </div><div class=\"meta-container cat\"><span class=\"sep cat\"></span> %s </div><div class=\"meta-container tag \"><span class=\"sep tag\"></span> %s </div>', 'absolvution' ),\n get_the_time( get_option( 'date_format' ) ),\n get_the_category_list( ', ' ),\n get_the_tag_list( __( '', 'absolvution' ), ', ' )\n );\n }\n edit_post_link( __( ' (edit)', 'absolvution' ), '<span class=\"edit-link\">', '</span>' );\n}", "function tc_post_metas() {\r\n global $post;\r\n //when do we display the metas ?\r\n //1) we don't show metas on home page, 404, search page by default\r\n //2) +filter conditions\r\n $post_metas_bool = ( tc__f('__is_home') || is_404() || 'page' == $post -> post_type ) ? false : true ;\r\n $post_metas_bool = apply_filters('tc_show_post_metas', $post_metas_bool ); \r\n \r\n if ( ! $post_metas_bool )\r\n return;\r\n\r\n ob_start();\r\n ?>\r\n\r\n <div class=\"entry-meta\">\r\n <?php\r\n if ( 'attachment' == $post -> post_type ) {\r\n $metadata = wp_get_attachment_metadata();\r\n printf( '%1$s <span class=\"entry-date\"><time class=\"entry-date updated\" datetime=\"%2$s\">%3$s</time></span> %4$s %5$s',\r\n '<span class=\"meta-prep meta-prep-entry-date\">'.__('Published' , 'customizr').'</span>',\r\n apply_filters('tc_use_the_post_modified_date' , false ) ? esc_attr( get_the_date( 'c' ) ) : esc_attr( get_the_modified_date('c') ),\r\n esc_html( get_the_date() ),\r\n ( isset($metadata['width']) && isset($metadata['height']) ) ? __('at dimensions' , 'customizr').'<a href=\"'.esc_url( wp_get_attachment_url() ).'\" title=\"'.__('Link to full-size image' , 'customizr').'\"> '.$metadata['width'].' &times; '.$metadata['height'].'</a>' : '',\r\n __('in' , 'customizr').'<a href=\"'.esc_url( get_permalink( $post->post_parent ) ).'\" title=\"'.__('Return to ' , 'customizr').esc_attr( strip_tags( get_the_title( $post->post_parent ) ) ).'\" rel=\"gallery\"> '.get_the_title( $post->post_parent ).'</a>.'\r\n );\r\n }\r\n\r\n else {\r\n\r\n $categories_list = $this -> tc_category_list();\r\n\r\n $tag_list = $this -> tc_tag_list();\r\n\r\n $date = apply_filters( 'tc_date_meta',\r\n sprintf( '<a href=\"%1$s\" title=\"%2$s\" rel=\"bookmark\"><time class=\"entry-date updated\" datetime=\"%3$s\">%4$s</time></a>' ,\r\n esc_url( get_day_link( get_the_time( 'Y' ), get_the_time( 'm' ), get_the_time( 'd' ) ) ),\r\n esc_attr( get_the_time() ),\r\n apply_filters('tc_use_the_post_modified_date' , false ) ? esc_attr( get_the_date( 'c' ) ) : esc_attr( get_the_modified_date('c') ),\r\n esc_html( get_the_date() )\r\n )\r\n );//end filter\r\n\r\n $author = apply_filters( 'tc_author_meta',\r\n sprintf( '<span class=\"author vcard\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span>' ,\r\n esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\r\n esc_attr( sprintf( __( 'View all posts by %s' , 'customizr' ), get_the_author() ) ),\r\n get_the_author()\r\n )\r\n );//end filter\r\n\r\n // Translators: 1 is category, 2 is tag, 3 is the date and 4 is the author's name.\r\n $utility_text = '';\r\n if ( $tag_list ) {\r\n $utility_text = __( 'This entry was posted in %1$s and tagged %2$s on %3$s<span class=\"by-author\"> by %4$s</span>.' , 'customizr' );\r\n } elseif ( $categories_list ) {\r\n $utility_text = __( 'This entry was posted in %1$s on %3$s<span class=\"by-author\"> by %4$s</span>.' , 'customizr' );\r\n } else {\r\n $utility_text = __( 'This entry was posted on %3$s<span class=\"by-author\"> by %4$s</span>.' , 'customizr' );\r\n }\r\n $utility_text = apply_filters( 'tc_meta_utility_text', $utility_text );\r\n\r\n //echoes every metas components\r\n printf(\r\n $utility_text,\r\n $categories_list,\r\n $tag_list,\r\n $date,\r\n $author\r\n );\r\n }//endif attachment\r\n ?>\r\n\r\n </div><!-- .entry-meta -->\r\n\r\n <?php\r\n $html = ob_get_contents();\r\n if ($html) ob_end_clean();\r\n echo apply_filters( 'tc_post_metas', $html );\r\n }", "function cosmetics_post_meta() {\n?>\n\n <div class=\"site-post-meta\">\n <span class=\"site-post-author\">\n <?php echo esc_html__('Author:','cosmetics');?>\n <a href=\"<?php echo get_author_posts_url( get_the_author_meta('ID') );?>\">\n <?php the_author();?>\n </a>\n </span>\n\n <span class=\"site-post-date\">\n <?php esc_html_e( 'Post date: ','cosmetics' ); the_date(); ?>\n </span>\n\n <span class=\"site-post-comments\">\n <?php\n comments_popup_link( '0 '. esc_html__('Comment','cosmetics'),'1 '. esc_html__('Comment','cosmetics'), '% '. esc_html__('Comments','cosmetics') );\n ?>\n </span>\n </div>\n\n<?php\n }", "function roots_entry_meta() {\n echo '<em class=\"meta-entry\"><i class=\"icon-calendar pull-left\"></i><time class=\"updated pull-left\" datetime=\"'. get_the_time('c') .'\" pubdate>'. sprintf(__('Posted on %s at %s.', 'roots'), get_the_date(), get_the_time()) .'</time><span class=\"pull-right\">' .comments_number( 'No comments', 'One comment', '% comment' ) .'</span></em>';\n\n //echo '<p class=\"byline author vcard\">'. __('Written by', 'roots') .' <a href=\"'. get_author_posts_url(get_the_author_meta('ID')) .'\" rel=\"author\" class=\"fn\">'. get_the_author() .'</a></p>';\n}", "function thememount_entry_meta($echo = true) {\n\t$return = '';\n\t\n\tglobal $post;\n\t\n\tif( isset($post->post_type) && $post->post_type=='page' ){\n\t\treturn;\n\t}\n\t\n\t\n\t$postFormat = get_post_format();\n\t\n\t// Post author\n\t$categories_list = get_the_category_list( __( ', ', 'howes' ) ); // Translators: used between list items, there is a space after the comma.\n\t$tag_list = get_the_tag_list( '', __( ', ', 'howes' ) ); // Translators: used between list items, there is a space after the comma.\n\t$num_comments = get_comments_number();\n\t\n\t$return .= '<div class=\"thememount-meta-details\">';\n\t\t// Date\n\t\t$return .= '<span class=\"tm-date-wrapper\"><i class=\"tmicon-fa-clock-o\"></i> ' . get_the_date() . '</span>';\n\n\t\tif ( 'post' == get_post_type() ) {\n\t\t\tif( !is_single() ){\n\t\t\t\t$return .= sprintf( '<div class=\"thememount-post-user\"><span class=\"author vcard\"><i class=\"tmicon-fa-user\"></i> <a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span></div>',\n\t\t\t\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\t\t\t\tesc_attr( sprintf( __( 'View all posts by %s', 'howes' ), get_the_author() ) ),\n\t\t\t\t\tget_the_author()\n\t\t\t\t);\n\t\t\t}\n\t\t}\n\t\tif ( $tag_list ) { $return .= '<span class=\"tags-links\"><i class=\"tmicon-fa-tags\"></i> ' . $tag_list . '</span>'; };\n\t\tif ( $categories_list ) { $return .= '<span class=\"categories-links\"><i class=\"tmicon-fa-folder-open\"></i> ' . $categories_list . '</span>'; };\n\t\tif( !is_sticky() && comments_open() && ($num_comments>0) ){\n\t\t\t$return .= '<span class=\"comments\"><i class=\"tmicon-fa-comments\"></i> ';\n\t\t\t$return .= $num_comments;\n\t\t\t$return .= '</span>';\n\t\t}\n\n\t$return .= '</div>';\n\t\n\tif( $echo == true ){\n\t\techo $return;\n\t} else {\n\t\treturn $return;\n\t}\n\t\n\t\n}", "function _themename_post_meta() {\n printf(\n esc_html__('Published on %s', '_themename'),\n '<a href=\"' . esc_url(get_permalink()) . '\"><time datetime=\"' . esc_attr(get_the_date('c')) . '\">' . esc_html(get_the_date()) . '</time></a>'\n );\n /* translators: %s: Post Author */\n printf(\n esc_html__(' by %s', '_themename'),\n esc_html(get_the_author())\n );\n}", "function the_meta()\n {\n }", "public static function display_meta_box($post) {\r\n\t\t\t$force_hide = get_post_meta($post->ID, self::FORCE_HIDE_KEY, true);\r\n\t\t\t$moderation_url = self::_get_moderation_url($post->ID);\r\n\t\t\t$results_url = self::_get_results_url($post->ID);\r\n\r\n\t\t\tinclude('views/backend/meta-boxes/meta-box.php');\r\n\t\t}", "function jn_post_meta() {\n printf( __( 'Posted on <time class=\"entry-date\" datetime=\"%3$s\" pubdate>%4$s</time><span class=\"byline\"> by <span class=\"author vcard\"><a class=\"url fn n\" href=\"%5$s\" title=\"%6$s\" rel=\"author\">%7$s</a></span></span>', 'jn' ),\n esc_url( get_permalink() ),\n esc_attr( get_the_time() ),\n esc_attr( get_the_date( 'c' ) ),\n esc_html( get_the_date() ),\n esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n esc_attr( sprintf( __( 'View all posts by %s', 'jn' ), get_the_author() ) ),\n esc_html( get_the_author() )\n );\n}", "public static function metaDate($post = null)\n {\n echo __METHOD__;\n $meta = get_post_meta($post->ID);\n echo '<pre>';\n print_r($meta);\n echo '</pre>';\n /*\n * repeat_start\n * repeat_end\n */\n print_r($post);\n }", "public function getMeta($post, $additional=array())\n {\n if(!is_array($additional))\n throw new \\Exception(\"Error in Content::getMeta(), additional meta tags must be an array\");\n\n // Get description\n if(!empty($post->post_excerpt))\n $description = $post->post_excerpt;\n elseif(!empty($post->custom_fields['erdiko_seo_description'][0]))\n $description = $post->custom_fields['erdiko_seo_description'][0];\n else\n $description = $post->post_title;\n\n // Get formatted post dates\n $postDate = date('c', strtotime($post->post_date));\n $updateDate = date('c', strtotime($post->post_modified));\n \n // Description & author\n $meta['description'] = $description;\n $meta['author'] = $post->author->display_name;\n\n // Open Graph\n // $meta['og:locale'] = 'en_US'; // coming from application.json now\n $meta['og:type'] = 'blog';\n $meta['og:title'] = $post->post_title;\n $meta['og:description'] = $description;\n // @todo remove 'http://' and set dynamically somehow\n $meta['og:url'] = \"http://\".$_SERVER['SERVER_NAME'].$_SERVER['REQUEST_URI'];\n $meta['og:updated_time'] = $updateDate;\n $meta['og:image'] = $post->feat_image;\n\n // Article\n // $meta['article:publisher'] = \"https://www.facebook.com/yoast\";\n // $meta['article:author'] = \"https://www.facebook.com/jdevalk\";\n $meta['article:section'] = 'Blog';\n $meta['article:published_time'] = $postDate;\n $meta['article:modified_time'] = $updateDate;\n\n // Article Tags\n $tags = array();\n\t if(!empty($post->tags)) {\n\t\t foreach ( $post->tags as $tag ) {\n\t\t\t $tags[] = $tag->name;\n\t\t } // $tag->slug\n\t\t if ( count( $tags ) > 0 ) {\n\t\t\t $meta['article:tag'] = $tags;\n\t\t }\n\t }\n\n // Twitter Card\n $meta['twitter:card'] = \"summary_large_image\";\n $meta['twitter:description'] = $description;\n $meta['twitter:title'] = $post->post_title;\n $meta['twitter:image'] = $post->feat_image;\n // $meta['twitter:creator'] = \"@erdiko\";\n\n // Override any default meta values (from post) with $additional meta supplied\n $meta = array_merge($meta, $additional);\n\n return $meta;\n }", "public function print_metadata_box($post) {\n // presses save, the application will check that the nonce field is still declared and\n // that is the same that the one provided here. If they don't match, probably something\n // nasty happened (or maybe just there was a bug).\n wp_nonce_field('makigas_metabox_video', 'makigas_metabox_nonce');\n\n // Put the fields.\n $this->print_field( $post, '_video_id', __( 'Video ID', 'makigas-videoman' ) );\n $this->print_field( $post, '_episode', __( 'Episode Number', 'makigas-videoman' ) );\n $this->print_field( $post, '_length', __( 'Length', 'makigas-videoman' ) );\n }", "function _display_unitinfo_meta( $post ) {\n\t\tinclude( 'includes/metaboxes/unit-info.php' );\n\t}", "public function video_meta_information( $post ) {\n wp_nonce_field( 'video_meta_save', 'video_meta_box' );\n\n $provider = get_post_meta($post->ID, 'provider', true);\n $videoid = get_post_meta($post->ID, 'videoid', true);\n $season = get_post_meta($post->ID, 'season', true);\n $episode = get_post_meta($post->ID, 'episode', true);\n\n require_once(PLUGIN_ROOT. 'includes/tpl/video-meta.tpl.php');\n }", "function agilespirit_entry_meta() {\n if ( is_sticky() && is_home() && ! is_paged() )\n echo '<span class=\"featured-post\">' . __( 'Sticky', 'agilespirit' ) . '</span>';\n\n if ( ! has_post_format( 'link' ) && 'post' == get_post_type() )\n agilespirit_entry_date();\n\n // Translators: used between list items, there is a space after the comma.\n $categories_list = get_the_category_list( __( ', ', 'agilespirit' ) );\n if ( $categories_list ) {\n echo ' ' . __('in', 'agilespirit') . ' <span class=\"categories-links\">' . $categories_list . '</span>';\n }\n\n // Translators: used between list items, there is a space after the comma.\n $tag_list = get_the_tag_list( '', __( ', ', 'agilespirit' ) );\n if ( $tag_list ) {\n echo '<span class=\"tags-links\">' . ' ' . __(' concerning ', 'agilespirit') . ' ' . $tag_list . '</span>';\n }\n\n // Post author\n if ( 'post' == get_post_type() ) {\n _e(' by ', 'agilespirit');\n printf( '<span class=\"author\"><a class=\"url fn n\" href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span>',\n esc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n esc_attr( sprintf( __( 'View all posts by %s', 'agilespirit' ), get_the_author() ) ),\n get_the_author()\n );\n }\n}", "public function meta($name = \"\", $content =\"\") {\n echo \"<meta name='\" . $name . \"' content ='\" . $content . \"'>\";\n }", "function __themename_post_meta(){\n printf(\n esc_html__( 'posted on %s', 'Cypher Nex' ),\n '<a href=\"' . esc_url(get_permalink()) . '\" >\n <time datetime=\"' . esc_attr(get_the_date('c')) .'\"> '. get_the_date() .'</time></a>'\n );\n /* translators: %s Post Author */\n printf(\n esc_html__( ' By %s', 'Cypher Nex' ),\n '<a href=\"'. esc_url(get_author_posts_url(get_the_author_meta('ID'))) . '\"> '. esc_html(get_the_author()) .'</a>'\n );\n}", "function cosmo_get_site_meta() {\n\n ob_start();\n ob_clean();\n\n if( is_single() || is_page() ){ \n global $post; ?>\n <meta name=\"description\" content=\"<?php echo strip_tags( post::get_excerpt( $post, $ln=150 ) ); ?>\" /> \n <meta property=\"og:title\" content=\"<?php the_title() ?>\" />\n <meta property=\"og:site_name\" content=\"<?php echo get_bloginfo('name'); ?>\" />\n <meta property=\"og:url\" content=\"<?php the_permalink() ?>\" />\n <meta property=\"og:type\" content=\"article\" />\n <meta property=\"og:locale\" content=\"en_US\" /> \n <meta property=\"og:description\" content=\"<?php echo get_bloginfo('description'); ?>\"/>\n <?php\n\n } else { ?>\n <meta name=\"description\" content=\"<?php echo get_bloginfo('description'); ?>\" /> \n <meta property=\"og:title\" content=\"<?php echo get_bloginfo('name'); ?>\"/>\n <meta property=\"og:site_name\" content=\"<?php echo get_bloginfo('name'); ?>\"/>\n <meta property=\"og:url\" content=\"<?php echo home_url() ?>/\"/>\n <meta property=\"og:type\" content=\"blog\"/>\n <meta property=\"og:locale\" content=\"en_US\"/>\n <meta property=\"og:description\" content=\"<?php echo get_bloginfo('description'); ?>\"/>\n <?php\n }\n\n return ob_get_clean();\n\n }", "function hybrid_entry_meta() {\n\n\t$meta = '';\n\n\tif ( 'post' == get_post_type() )\n\t\t$meta = '<p class=\"entry-meta\">' . __( '[entry-terms taxonomy=\"category\" before=\"Posted in \"] [entry-terms taxonomy=\"post_tag\" before=\"| Tagged \"] [entry-comments-link before=\"| \"]', 'hybrid' ) . '</p>';\n\n\telseif ( is_page() && current_user_can( 'edit_page', get_the_ID() ) )\n\t\t$meta = '<p class=\"entry-meta\">[entry-edit-link]</p>';\n\n\techo apply_atomic_shortcode( 'entry_meta', $meta );\n}", "function wprt_entry_meta() {\n\t// Get meta items from theme mod\n\t$meta_item = wprt_get_mod( 'blog_entry_meta_items', array( 'date', 'author', 'comments' ) );\n\n\t// If blocks are 100% empty return defaults\n\t$meta_item = $meta_item ? $meta_item : 'date,author,comments';\n\n\t// Turn into array if string\n\tif ( $meta_item && ! is_array( $meta_item ) ) {\n\t\t$meta_item = explode( ',', $meta_item );\n\t}\n\n\t// Set keys equal to values\n\t$meta_item = array_combine( $meta_item, $meta_item );\n\n\t// Loop through items\n\tforeach ( $meta_item as $item ) :\n\t\tif ( 'author' == $item ) { \n\t\t\tprintf( '<span class=\"post-by-author item\"><span class=\"inner\">By <a href=\"%s\" title=\"%s\" rel=\"author\">%s</a></span></span>',\n\t\t\t\tesc_url( get_author_posts_url( get_the_author_meta( 'ID' ) ) ),\n\t\t\t\tesc_attr( sprintf( esc_html__( 'View all posts by %s', 'fundrize' ), get_the_author() ) ),\n\t\t\t\tget_the_author()\n\t\t\t\t);\n\t\t}\n\t\telseif ( 'date' == $item ) {\n\t\t\tprintf( '<span class=\"post-date item\"><span class=\"inner\"><span class=\"entry-date\">%1$s</span></span></span>',\n\t\t\t\tget_the_date()\n\t\t\t);\n\t\t}\n\t\telseif ( 'comments' == $item ) {\n\t\t\tif ( comments_open() || get_comments_number() ) {\n\t\t\t\techo '<span class=\"post-comment item\"><span class=\"inner\">';\n\t\t\t\tcomments_popup_link( esc_html__( '0 comment', 'fundrize' ), esc_html__( '1 Comment', 'fundrize' ), esc_html__( '% Comments', 'fundrize' ) );\n\t\t\t\techo '</span></span>';\n\t\t\t}\n\t\t}\n\t\telseif ( 'categories' == $item ) {\n\t\t\techo '<span class=\"post-meta-categories item\"><span class=\"inner\">';\n\t\t\tthe_category( ', ', get_the_ID() );\n\t\t\techo '</span></span>';\n\t\t}\n\tendforeach;\n}", "function addMeta() {\n\t\n\tif( class_exists('acf') ) {\n\n\t$meta_description = get_field('meta_description', 'option');\n\t$meta_keywords = get_field('meta_keywords', 'option');\n\t$meta_author = get_field('meta_author', 'option');\n\t$meta_og_image = get_field('meta_og_img', 'option');\n\t$meta_img_full = $meta_og_image['url'];\n\n\t}\n\n\tif ( $meta_description ) {\n\t\techo '<meta name=\"description\" content=\"'.$meta_description.'\">'; \n\t}\n\n\tif ( $meta_keywords ) {\n\t\techo '<meta name=\"keywords\" content=\"'.$meta_keywords.'\">'; \n\t}\n\n\tif ( $meta_author ) {\n\t\techo '<meta name=\"author\" content=\"'.$meta_author.'\">'; \n\t}\n\n\tif ( $meta_og_image ) {\n\t\techo '<meta name=\"twitter:card\" content=\"summary\" />';\n\t\techo '<meta property=\"og:image\" content=\"'.$meta_img_full.'\" />';\n\t}\n\n}", "function acitpo_entry_meta() {\n\tglobal $post;\n\tif (is_page()) { return; }\n\t$categories = get_the_category_list(__(', ', 'acitpo'));\n\n\tprintf('<span class=\"date-link\"><a href=\"%1$s\" title=\"%2$s\" rel=\"bookmark\"><time class=\"entry-date\" datetime=\"%3$s\">%4$s</time></a></span>', esc_attr(get_permalink()), esc_attr(get_the_time()), esc_attr(get_the_time('c')), esc_html(get_the_date()));\n\tif ($categories) {\n\t\tprintf('<span class=\"category-links\">%s</span>', $categories);\n\t}\n\tprintf('<span class=\"author-link vcard\"><a href=\"%1$s\" title=\"%2$s\" rel=\"author\">%3$s</a></span>', esc_attr(get_author_posts_url(get_the_author_meta('ID'))), esc_attr(sprintf(__('View all posts by %s', 'acitpo'), get_the_author())), esc_html(get_the_author()));\n}", "function generate_post_meta()\n {\n $post_types = apply_filters('generate_entry_meta_post_types', array(\n 'post',\n ));\n\n if (in_array(get_post_type(), $post_types)): ?>\n<div class=\"entry-meta\">\n <?php generate_posted_on();?>\n</div><!-- .entry-meta -->\n<?php endif;\n }", "public function post_metabox_display( $post ) {\n\n\t\t$sailthru_post_expiration = get_post_meta( $post->ID, 'sailthru_post_expiration', true );\n\t\t$sailthru_meta_tags = get_post_meta( $post->ID, 'sailthru_meta_tags', true );\n\n\t\twp_nonce_field( plugin_basename( __FILE__ ), $this->nonce );\n\n\t\t// post expiration\n\t\t$html = '<p><strong>Sailthru Post Expiration</strong></p>';\n\t\t$html .= '<input id=\"sailthru_post_expiration\" type=\"text\" placeholder=\"YYYY-MM-DD\" name=\"sailthru_post_expiration\" value=\"' . esc_attr( $sailthru_post_expiration ) . '\" size=\"25\" class=\"datepicker\" />';\n\t\t$html .= '<p class=\"description\">';\n\t\t$html .= 'Flash sales, events and some news stories should not be recommended after a certain date and time. Use this Sailthru-specific meta tag to prevent Horizon from suggesting the content at the given point in time. <a href=\"http://docs.sailthru.com/documentation/products/horizon-data-collection/horizon-meta-tags\" target=\"_blank\">More information can be found here</a>.';\n\t\t$html .= '</p><!-- /.description -->';\n\n\t\t// post meta tags\n\t\t$html .= '<p>&nbsp;</p>';\n\t\t$html .= '<p><strong>Sailthru Meta Tags</strong></p>';\n\t\t$html .= '<input id=\"sailthru_meta_tags\" type=\"text\" name=\"sailthru_meta_tags\" value=\"' . esc_attr( $sailthru_meta_tags ) . '\" size=\"25\" />';\n\t\t$html .= '<p class=\"description\">';\n\t\t$html .= 'Tags are used to measure user interests and later to send them content customized to their tastes.';\n\t\t$html .= '</p><!-- /.description -->';\n\t\t$html .= '<p class=\"howto\">Separate tags with commas</p>';\n\n\t\techo esc_html( $html );\n\n\t}" ]
[ "0.7678935", "0.76153183", "0.75185114", "0.73106444", "0.7301531", "0.72853297", "0.72778004", "0.7268532", "0.7203399", "0.710013", "0.7057284", "0.70221335", "0.69878346", "0.6981914", "0.695175", "0.692633", "0.690987", "0.6854962", "0.6841516", "0.6817306", "0.68082416", "0.6806152", "0.6791687", "0.6788581", "0.67451644", "0.6737397", "0.673371", "0.6709686", "0.6686698", "0.6682117" ]
0.770635
0
filter the tags from the images and iFrame
function filter_ptags_on_images($content){ $content = preg_replace('/<p>\s*(<a .*>)?\s*(<img .* \/>)\s*(<\/a>)?\s*<\/p>/iU', '\1\2\3', $content); return preg_replace('/<p>\s*(<iframe .*>*.<\/iframe>)\s*<\/p>/iU', '\1', $content); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filter_ptags_on_images($content) {\n $content = preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n return preg_replace('/<p>\\s*(<iframe .*>*.<\\/iframe>)\\s*<\\/p>/iU', '\\1', $content);\n}", "function filter_ptags_on_images($content) {\n $content = preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n return preg_replace('/<p>\\s*(<iframe .*>*.<\\/iframe>)\\s*<\\/p>/iU', '\\1', $content);\n}", "function thinkup_extract_images_filter( $tu_post ) {\n $regex = '/<img[^>]+>/i';\n\n if ( $tu_post->body && preg_match_all($regex, $tu_post->body, $matches) ) {\n\n $matches = $matches[0];\n\n foreach ( $matches as $match ) {\n\n $regex = '/(src)=(\"[^\"]*\")/i';\n if ( preg_match_all($regex, $match, $src, PREG_SET_ORDER) ) {\n $src = $src[0];\n $tu_post->images[] = trim($src[2], '\"');\n }\n\n }\n\n }\n\n return $tu_post;\n\n}", "function zero_filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n }", "function wpgrade_filter_ptags_on_images($content){\r\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\r\n}", "function filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function baindesign324_filter_ptags_on_images($content){\n\t return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n\t}", "function cardealer_filter_ptags_on_images($content){\r\n\treturn preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\r\n}", "function custom_filter_ptags_on_images($content){\n\treturn preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function po_filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function mdwpfp_filter_ptags_on_images($content){\n\treturn preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function quadro_filter_ptags_on_portfimages($content) {\n\tglobal $post;\n\tif ( $post->post_type != 'quadro_portfolio') return $content;\n\treturn preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function spartan_filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function theme_filter_ptags_on_images($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function bones_filter_ptags_on_images($content)\n{\n\treturn preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function tlh_filter_ptags_on_images( $content ) {\n\treturn preg_replace( '/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(<\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content );\n}", "function filter_ptags_on_images($content) {\n // do a regular expression replace...\n // find all p tags that have just\n // <p>maybe some white space<img all stuff up to /> then maybe whitespace </p>\n // replace it with just the image tag...\n return preg_replace('/<p>(\\s*)(<img .* \\/>)(\\s*)<\\/p>/iU', '\\2', $content);\n}", "function filter_ptags_on_images($content) {\n return preg_replace('/<p[^>]*>\\\\s*?(<a .*?><img.*?><\\\\/a>|<img.*?>)?\\\\s*<\\/p>/', '<div class=\"post-image\">$1</div>', $content);\n}", "function tdd_oembed_filter($html, $url, $attr, $post_ID) {\n $return = '<figure class=\"video_container\">'.$html.'</figure>';\n return $return;\n}", "function tac_oembed_filter( $html, $url, $attr, $post_id ) {\n\t$return = '<figure class=\"flexible-container item-margin\">' . $html . '</figure>';\n\treturn $return;\n}", "function images_for_tag($tag=\"global\")\n{\n global $header_images;\n $ret=array();\n foreach($header_images as $img => $tags){\n if(in_array($tag, $tags))\n $ret[] = $img;\n }\n return $ret;\n}", "function wpfme_remove_img_ptags($content){\n return preg_replace('/<p>\\s*(<a .*>)?\\s*(<img .* \\/>)\\s*(\\/a>)?\\s*<\\/p>/iU', '\\1\\2\\3', $content);\n}", "function wp_filter_content_tags($content, $context = \\null)\n {\n }", "function jpk_remove_unwanted_tags() {\n\tremove_filter( 'jetpack_open_graph_tags', 'wpcom_twitter_cards_tags' );\n\tremove_filter( 'jetpack_open_graph_tags', 'change_twitter_site_param' );\n}", "function wiziapp_cincopa_filter($content){\n //cincopa\n if(function_exists('WpMediaCincopa_init') || function_exists('_cpmp_WpMediaCincopa_init')){\n $matches = array();\n preg_match_all('/\\[\\s*cincopa\\s*([a-zA-Z0-9_-]*)\\s*\\]/', $content, $matches);\n \n if(empty($matches[1])) {\n return $content;\n }\n \n foreach($matches[1] as $match_key=>$code) {\n $out = $video_out = '';\n\n// $xml_string = file_get_contents(wiziapp_cincopaUrl('rss') . urlencode($code));\n $xml_string = wiziapp_general_http_request('', wiziapp_cincopaUrl('rss') . urlencode($code), 'GET');\n $xml_string = str_replace('jwplayer:', 'jwplayer_', $xml_string);\n $xml = simplexml_load_string($xml_string['body']);\n// $images = wiziapp_cincopaJson($code);\n $images = $xml->channel;\n $counter = 1;\n if ($images) {\n foreach ($images->item as $image){\n $link = $image->enclosure->attributes()->url;\n // $image->content_url = htmlspecialchars_decode($image->content_url);\n // $image->thumbnail_url = htmlspecialchars_decode($image->thumbnail_url);\n if($image->jwplayer_type != 'image'){\n $video_class = ' class=\"unsupported_video_format\" data-wiziapp-type=video';\n $link = $image->jwplayer_image;\n }\n // $out.='<a href=\"http://'.(string)$image->filename.'\">';\n // $out.='<img src=\"http://'.(string)$image->filename.'\" '.($counter == 1?'data-wiziapp-cincopa-id=\"'.$code.'\"':'').' />';\n // $out.='</a>';\n \n else {\n /** We dont resize images anymore!!! Only thumbnails, on demand.\n $image = new WiziappImageHandler($link);\n $size = wiziapp_getImageSize('full_image');\n $url_to_full_sized_image = $image->getResizedImageUrl($link, $size['width'], $size['height'], 'resize');\n\n $size = wiziapp_getImageSize('multi_image');\n $urlToMultiSizedImage = $image->getResizedImageUrl($link, $size['width'], $size['height'], 'resize');\n \n $width = $image->getNewWidth();\n $height = $image->getNewHeight(); */ \n\n $out .= '<a href=\"' . $link . '\" class=\"wiziapp_gallery wiziapp_cincopa_plugin\">';\n $out .= '<img src=\"' . $link . '\" data-wiziapp-cincopa-id=\"' . $code . '\"' . $video_class . ' />';\n $out .= '</a>';\n } \n \n // }elseif($image->jwplayer_type == 'audio'){\n // }else{\n // $video_out .='\n // <object width=\"512\" height=\"430\">\n // <embed width=\"512\" height=\"430\" flashvars=\"&amp;file='.urlencode($link).'&amp;controlbar=bottom&amp;icons=true&amp;playlist=none&amp;autostart=false&amp;linktarget=_blank&amp;repeat=none&amp;stretching=fill\" allowscriptaccess=\"always\" allowfullscreen=\"true\" bgcolor=\"#C0C0C0\" wmode=\"transparent\" src=\"http://www.cincopa.com/media-platform/runtime/player44/player44c.swf\">\n // </object>';\n // ;\n // $video_out .='\n // <object src=\"'.$link.'\" width=\"300\">\n // <param name=\"thumb\" value=\"'.$thumb.'\" />\n // <param name=\"title\" value=\"'.(string)$image->title.'\" />\n // <param name=\"description\" value=\"'.(string)$image->description.'\" />\n // <embed src=\"'.$link.'\" type=\"application/x-shockwave-flash\"></embed>\n // </object>';\n // ;\n // }\n }\n } \n $content = str_replace($matches[0][$match_key], '<p>' . $out . '</p>', $content);\n// $content = str_replace($matches[0][$match_key], '<p>' . $out . '</p><p>' . $video_out . '</p>', $content);\n }\n }\n return $content;\n}" ]
[ "0.72098565", "0.72098565", "0.66952026", "0.6674728", "0.66632783", "0.66617215", "0.66617215", "0.66617215", "0.66617215", "0.66617215", "0.66617215", "0.6661173", "0.66301674", "0.65832156", "0.6579503", "0.65528077", "0.6528508", "0.65041566", "0.6501746", "0.6442931", "0.63922536", "0.6157264", "0.6100989", "0.5864195", "0.58446413", "0.57830036", "0.5740115", "0.5714813", "0.5615303", "0.5608016" ]
0.7472433
0
Wraps Images content on a DIV element
function content_addDivToImage( $content ) { $pattern = '/(<img([^>]*)>)/i'; $replacement = '<div class="image_wrapper">$1</div>'; $content = preg_replace( $pattern, $replacement, $content ); return $content; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function image_wrap() {\r\n add_filter('the_content', array('cwp', 'filter_images'));\r\n }", "public function asHtml(): string {\n\n $resultsHtml = \"<div class='img-grid'>\";\n $count = 0;\n\n foreach ($this->results as $image) {\n $count++;\n $title = $image->getTitle();\n $alt = $image->getAlt();\n $displayText = ($title) ? $title : ($alt) ? $alt : $image->getImageUrl();\n\n $resultsHtml .= \"\n <div class='item image{$count}'>\n <a href='{$image->getImageUrl()}' data-fancybox data-caption='{$displayText}' data-siteurl='{$image->getSiteUrl()}'>\n <script >\n $(document).ready(function() {\n loadImage(\\\"{$image->getImageUrl()}\\\", \\\"image{$count}\\\")\n });\n </script>\n <span class='details'>$displayText</span>\n </a>\n </div>\";\n }\n\n $resultsHtml .= \"</div>\";\n return $resultsHtml;\n }", "function pendrell_image_wrap_inner( $html, $width, $height ) {\n $padding = ubik_imagery_sizes_percent( $width, $height );\n if ( !empty( $padding ) )\n $html = '<div class=\"ubik-wrap-inner\" style=\"padding-bottom: ' . $padding . '%;\">' . $html . '</div>';\n return $html;\n}", "protected function fetchImagesInContent(){\n if(isset($this->images)){\n return;\n }\n $texts = array(\n 'text' => $this->Article->text, \n 'full' => $this->Article->fulltext, \n 'intro' => $this->Article->introtext);\n $images = array();\n foreach ($texts as $key => $text) {\n if($text != ''){\n $fetchedImages = $this->extractImageFromHTML($text, $key);\n if($fetchedImages){\n $images = array_merge($images, $fetchedImages);\n }\n }\n }\n if(!empty($images)){\n $this->images = $images;\n }\n }", "function buildHtmlPhotos($data) {\r\n $photos = null;\r\n foreach ($data as $photo) {\r\n $image = '<img src=\"' . $photo['square_image_url'] .'\" title=\"' . $photo['title'] . '\" alt=\"' . $photo['title'] .'\" />';\r\n $photos .= '<div class=\"image-container\"><div class=\"image\">' . '<a href=\"/view-photo/' . $photo['id'] . '\" target=\"_blank\">' . $image . '</a></div></div>';\r\n }\r\n return $photos;\r\n }", "function kalium_image_placeholder_wrap_element( $image ) {\n\tif ( false !== strpos( $image, '<img' ) ) {\n\t\treturn kalium()->images->get_image( $image );\n\t}\n\n\treturn $image;\n}", "function extract_embedded_images_from_post_content() {\n // be consistent with media_images.\n // http://stackoverflow.com/a/20861974/6763239\n $embedded_images = array();\n\n $img_nodes = $this->dom->getElementsByTagName('img');\n\n foreach ( $img_nodes as $img_node ) {\n $embedded_images[] = new EmbeddedImage($img_node, $this);\n }\n\n return $embedded_images;\n }", "function outputWrappedImage( $row, $wrapperClass, $linkBase, $size ) {\n\tglobal $CFG;\n\n\tif( isset( $CFG->thumbSize ))\n\t\t$thumbMax = $CFG->thumbSize;\n\telse\n\t\t$thumbMax = 120;\n\n\t$maxChars = 20;\n\t$ellipses = \" ...\";\n\t$eLen = strlen($ellipses);\n\t$imageOutput = \"<div class=\\\"\".$wrapperClass.\"\\\"><div class=\\\"thumb_img_wrapper\".$size.\"\\\">\";\n\tif( $size <= $thumbMax )\n\t\t$pathToImg = $CFG->image_thumb . \"/\" . $row['img_path'];\n\telse\n\t\t$pathToImg = $CFG->image_medium . \"/\" . $row['img_path'];\n\t$pathToDetails = $linkBase.$row['id'];\n\n\tif( $row['img_ar'] <= 0 ) {\n\t\t$imageOutput .= \"<a href=\\\"\".$pathToDetails.\"\\\"><img src=\\\"\".$pathToImg.\"\\\" \"\n\t\t\t\t\t\t\t\t\t\t\t.\" class=\\\"thumb_unk\".$size.\"\\\" \"\n\t\t\t\t\t\t\t\t\t\t\t.\" alt=\\\"\".$row['name'].\"\\\" /></a>\";\n\t} else {\n\t\t$imageOutput .= \"<div class=\\\"shift\\\" style=\\\"position:relative;\";\n\t\tif( $row['img_ar'] > 1 ) {\t// Horizontal/landscape\n\t\t\t// y offset = ($size-(height))/2 == ($size-($size/img_ar))/2\n\t\t\t$imageOutput .= \"left:0px;top:\".(($size-$size/$row['img_ar'])/2).\"px;\\\">\";\n\t\t\t$imageOutput .= \"<a href=\\\"\".$pathToDetails.\"\\\"><img width=\\\"$size\\\"\";\n\t\t} else { // Vertical/portrait\n\t\t\t// x offset = ($size-(width))/2 == ($size-($size*img_ar))/2\n\t\t\t$imageOutput .= \"top:0px;left:\".(($size-$size*$row['img_ar'])/2).\"px;\\\">\";\n\t\t\t$imageOutput .= \"<a href=\\\"\".$pathToDetails.\"\\\"><img height=\\\"$size\\\"\";\n\t\t}\n\t\t$imageOutput .= \" src=\\\"\".$pathToImg.\"\\\" class=\\\"thumb\\\" \"\n\t\t\t\t\t\t\t\t\t\t.\" alt=\\\"\".$row['name'].\"\\\" /></a></div>\";\n\t}\n\t$imageOutput .= \"</div>\"; // close shift wrapper divs\n\n\tif( isset($row['name']) ) {\n\t\t$text = $row['name'];\n\n\t\tif (strlen($text) > $maxChars) {\n\t\t\t$text = substr($text,0,$maxChars-$eLen);\n\t\t\t$text = substr($text,0,strrpos($text,' '));\n\t\t\t$text .= $ellipses;\n\t\t}\n\n\t\t$textOutput = \"<div class=\\\"thumbLabel\\\"><a href=\\\"\"\n\t\t\t\t\t\t\t\t\t\t.$pathToDetails.\"\\\"><abbr title=\\\"\".$row['name'].\"\\\">\"\n\t\t\t\t\t\t\t\t\t\t.$text.\"</abbr></a></div>\";\n\t\t$imageOutput .= $textOutput;\n\t}\n\n\tif( isset($row['owner']) ) {\n\t\t$text = $row['owner'];\n\n\t\tif (strlen($text) > $maxChars) {\n\t\t\t$text = substr($text,0,$maxChars-$eLen);\n\t\t\t$text = substr($text,0,strrpos($text,' '));\n\t\t\t$text .= $ellipses;\n\t\t}\n\n\t\t$textOutput = \"<div class=\\\"ownerLabel\\\">Created by <span class=\\\"ownerName\\\">\"\n\t\t\t\t\t\t\t\t\t\t.$text.\"</span></div>\";\n\t\t$imageOutput .= $textOutput;\n\t}\n\n\t$imageOutput .= \"</div>\"; // close wrapper div\n\n\treturn $imageOutput;\n\n}", "function gallery_image($element)\n\t\t{\n\t\t\t$prevImg = $extraClass = \"\";\n\t\t\t$real_id = explode('-__-', $element['id']);\n\t\t\t$real_id = $real_id[0];\n\t\t\t\n\t\t\tglobal $post_ID;\n\t\t\tif(empty($post_ID) && isset($element['apply_all'])) $post_ID = $element['apply_all'];\n\t\t\t\n\t\t\tif(!is_numeric($element['std']) || $element['std'] == '')\n\t\t\t{\n\t\t\t\t$prevImg = '<img src=\"'.ACE_IMG_URL.'icons/video_insert_image.png\" alt=\"\" />';\n\t\t\t\t$extraClass = \" ace_gallery_image_vid\";\n\t\t\t}\n\t\t\telse if($element['std'] != '')\n\t\t\t{\n\t\t\t\t$prevImg = wp_get_attachment_image($element['std'], array(100,100));\n\t\t\t\t$extraClass = \" ace_gallery_image_img\";\n\t\t\t}\n\t\t\t\n\t\t\n\t\t\t$output =\"\";\n\t\t\t$output .=' <div class=\"ace_gallery_image'.$extraClass.'\">';\n\t\t\t\n\t\t\t\t//generate the upload link\n\t\t\t\t\t$output .= '<a href=\"#\" class=\"ace_gallery_uploader\" title=\"'.$element['name'].'\" id=\"ace_gallery_image '.$element['id'].'\"';\n\t\t\t\t\t$output .= 'data-label=\"'.$element['label'].'\" ';\n\t\t\t\t\t$output .= 'data-this-id=\"'.$element['id'].'\" ';\n\t\t\t\t\t$output .= 'data-attach-to-post = \"'.$post_ID.'\" ';\n\t\t\t\t\t$output .= 'data-real-id=\"'.$real_id.'\" ';\n\t\t\t\t\t$output .= 'data-overwrite=\"true\" ';\n\t\t\t\t\t$output .= '>'.$prevImg.'</a>';\n\t\t\t\t\t$output .= '<input type=\"text\" class=\"ace_gallery_image_value '.$element['class'].'\" value=\"'.$element['std'].'\" name=\"'.$element['id'].'\" id=\"'.$element['id'].'\" />';\n\t\t\t\t//end link\n\t\t\t\n\t\t\t$output .= '</div>';\n\t\t\treturn $output;\n\t\t}", "public static function make_gallery_container( $html ) {\n global $post;\n\n if ( isset( $post ) ) {\n $blog_id = (int) get_current_blog_id();\n\n $extra_data = array(\n 'data-carousel-extra' => array(\n 'blog_id' => $blog_id,\n 'permalink' => get_permalink( $post->ID ),\n )\n );\n foreach ( (array) $extra_data as $data_key => $data_values ) {\n $html = str_replace( '<div ', '<div ' . esc_attr( $data_key ) . \"='\" . json_encode( $data_values ) . \"' \", $html );\n }\n }\n\n return $html;\n }", "function pd_img_unautop($imgWrap)\n{\n $imgWrap = preg_replace('/<p>\\\\s*?(<a .*?><img.*?><\\\\/a>|<img.*?>)?\\\\s*<\\\\/p>/s', '<figure>$1</figure>', $imgWrap);\n return $imgWrap;\n}", "function pendrell_image_wrap_attributes( $attributes, $html, $id, $caption, $class, $align, $contents, $context, $width, $height ) {\n if ( ubik_imagery_context( $context, 'related' ) && isset( $attributes['schema'] ) )\n $attributes['schema'] = str_replace( ' itemprop=\"image\"', '', $attributes['schema'] );\n if ( !empty( $width ) )\n $attributes['style'] = 'style=\"width: ' . $width . 'px;\"'; // Setting an explicit width for use with the intrinsic ratio technique\n return $attributes;\n}", "function outputImages($collectionObject) {\r\n\t$results = $collectionObject->getArray();\r\n\r\n\tfor($i=0;$i<$collectionObject->getCount();$i++){\r\n\t\techo '<div class=\"col-md-3\">';\r\n\t\techo '<a href=\"single-image.php?id=' . $results[$i]->getImageID() . '\">';\r\n\t\techo '<img src=\"travel-images/square-medium/'. $results[$i]->getPath() . '\" title=\"\" class=\"thumbnail\" />';\r\n\t\techo '</a>';\r\n\t\techo \"</div>\";\r\n\t}\r\n}", "public function wrap($source)\n\t{\n\t\treturn $this->_wrap_div($this->_wrap_pre($source));\n\t}", "function ppom_generate_html_for_images( $images ) {\n\t\n\t\n\t$ppom_html\t= '<table class=\"table table-bordered\">';\n\tforeach($images as $id => $images_meta) {\n\t\t\n\t\t$images_meta\t= json_decode(stripslashes($images_meta), true);\n\t\t$image_url\t\t= stripslashes($images_meta['link']);\n\t\t$image_label\t= $images_meta['title'];\n\t\t$image_html \t= '<img class=\"img-thumbnail\" style=\"width:'.esc_attr(ppom_get_thumbs_size()).'\" src=\"'.esc_url($image_url).'\" title=\"'.esc_attr($image_label).'\">';\n\t\t\n\t\t$ppom_html\t.= '<tr><td><a href=\"'.esc_url($image_url).'\" class=\"lightbox\" itemprop=\"image\" title=\"'.esc_attr($image_label).'\">' . $image_html . '</a></td>';\n\t\t$ppom_html\t.= '<td>' .esc_attr(ppom_files_trim_name( $image_label )) . '</td>';\n\t\t$ppom_html\t.= '</tr>';\n\t\t\n\t}\n\t\n\t$ppom_html .= '</table>';\n\t\n\treturn apply_filters('ppom_images_html', $ppom_html);\n}", "public static function add_image_placeholders( $content ) {\n\t\tif( is_preview() || is_feed() || is_attachment() || ( function_exists( 'jetpack_is_mobile' ) && ! jetpack_is_mobile() ) )\n\t\t\treturn $content;\n\n\t\t// In case you want to change the placeholder image\n\t\t$placeholder_image = apply_filters( 'responsive_images_placeholder_image', self::get_url( 'images/1x1.trans.gif' ) );\n\n\t\tpreg_match_all( '#<img[^>]+?[\\/]?>#', $content, $images, PREG_SET_ORDER );\n\n\t\tif ( empty( $images ) )\n\t\t\treturn $content;\n\n\t\tforeach ( $images as $image ) {\n\t\t\t$attributes = wp_kses_hair( $image[0], array( 'http', 'https' ) );\n\t\t\t$new_image = '<img';\n\t\t\t$new_image_src = '';\n\n\t\t\tforeach ( $attributes as $attribute ) {\n\t\t\t\t$name = $attribute['name'];\n\t\t\t\t$value = $attribute['value'];\n\n\t\t\t\t// Remove the width and height attributes\n\t\t\t\tif ( in_array( $name, array( 'width', 'height' ) ) )\n\t\t\t\t\tcontinue;\n\n\t\t\t\t// Move the src to a data attribute and replace with a placeholder\n\t\t\t\tif ( 'src' == $name ) {\n\t\t\t\t\t$new_image_src = html_entity_decode( urldecode( $value ) );\n\n\t\t\t\t\tparse_str( parse_url( $new_image_src, PHP_URL_QUERY ), $image_args );\n\n\t\t\t\t\t$new_image_src = remove_query_arg( 'h', $new_image_src );\n\t\t\t\t\t$new_image_src = remove_query_arg( 'w', $new_image_src );\n\t\t\t\t\t$new_image .= sprintf( ' data-full-src=\"%s\"', esc_url( $new_image_src ) );\n\n\t\t\t\t\tif ( isset( $image_args['w'] ) )\n\t\t\t\t\t\t$new_image .= sprintf( ' data-full-width=\"%s\"', esc_attr( $image_args['w'] ) );\n\t\t\t\t\tif ( isset( $image_args['h'] ) )\n\t\t\t\t\t\t$new_image .= sprintf( ' data-full-height=\"%s\"', esc_attr( $image_args['h'] ) );\n\n\t\t\t\t\t// replace actual src with our placeholder\n\t\t\t\t\t$value = $placeholder_image;\n\t\t\t\t}\n\n\t\t\t\t$new_image .= sprintf( ' %s=\"%s\"', $name, esc_attr( $value ) );\n\t\t\t}\n\t\t\t$new_image .= '/>';\n\t\t\t$new_image .= sprintf( '<noscript><img src=\"%s\" /></noscript>', $new_image_src ); // compat for no-js and better crawling\n\n\t\t\t$content = str_replace( $image[0], $new_image, $content );\n\t\t}\n\n\t\treturn $content;\n\t}", "function lazy_imgs($html, $id, $caption, $title, $align, $url, $size, $alt) {\n\n $imgNew = '<img data-original=\"' . $url . '\" ';\n $html = str_replace('<img ', $imgNew, $html);\n return $html;\n}", "function spiplistes_corrige_img_pack ($img) {\n\tif(preg_match(\",^<img src='dist/images,\", $img)) {\n\t\t$img = preg_replace(\",^<img src='dist/images,\", \"<img src='../dist/images\", $img);\n\t}\n\treturn($img);\n}", "protected function combineImages() {}", "function druplex_field__field_blog_images($variables) {\n\n $output = '<div class=\"flexslider\"><ul class=\"slides\">';\n\n foreach ($variables['items'] as $delta => $item) {\n $output .= '<li>' . drupal_render($item) . '</li>';\n }\n\n $output .= '</ul></div>';\n \n return $output;\n}", "function addImage($path,$title,$description,$thumb,$lightbox,$uniqueID,$limitImages=0) {\n\t // count of images\n\t if ($limitImages > 1 || $limitImages==0) {\n $this->config['count']++;\n\t }\n // just add the wraps if there is a text for it\n $title = (!$title) ? '' : \"<h3>$title</h3>\";\n $description = (!$description) ? '' : \"<p>$description</p>\";\n \n // generate images\n if ($this->config['watermark']) {\n $imgTSConfigBig = $this->conf['big2.'];\n $imgTSConfigBig['file.']['10.']['file'] = $path;\n $imgTSConfigLightbox = $this->conf['lightbox2.'];\n $imgTSConfigLightbox['file.']['10.']['file'] = $path; \n } else {\n $imgTSConfigBig = $this->conf['big.'];\n $imgTSConfigBig['file'] = $path;\n $imgTSConfigLightbox = $this->conf['lightbox.'];\n $imgTSConfigLightbox['file'] = $path; \n } \n $bigImage = $this->cObj->IMG_RESOURCE($imgTSConfigBig);\n\n $lightbox = ($lightbox=='#' || $lightbox=='' || $this->config['showLightbox']!=1) ? 'javascript:void(0)' : $this->cObj->IMG_RESOURCE($imgTSConfigLightbox);\n \t$lightBoxImage='<a href=\"'.$lightbox.'\" title=\"'.$this->pi_getLL('textOpenImage').'\" class=\"open\"></a>';\n\n if ($thumb) {\n $imgTSConfigThumb = $this->conf['thumb.'];\n $imgTSConfigThumb['file'] = $path; \n $thumbImage = '<img src=\"'.$this->cObj->IMG_RESOURCE($imgTSConfigThumb).'\" class=\"thumbnail\" />';\n }\n\n\t // if just 1 image should be returned\n if ($limitImages==1) {\n \treturn '<img src=\"'.$bigImage.'\" class=\"full\" />';\n }\n\n // build the image element \n $singleImage .= '\n <div class=\"imageElement\">'.$title.$description.\n $lightBoxImage.'\n <img src=\"'.$bigImage.'\" class=\"full\" />\n '.$thumbImage.'\n </div>';\n\n\t\t// Adds hook for processing the image\n\t\t$config['path'] = $path;\n $config['title'] = $title;\n\t\t$config['description'] = $description;\n\t\t$config['uniqueID'] = $uniqueID;\n\t\t$config['thumb'] = $thumb;\n\t\t$config['large'] = $large;\n\t\t$config['lightbox'] = $lightbox;\n\t\t$config['limitImages'] = $limitImages;\n\t\t$config['lightBoxCode'] = $lightBoxImage;\n\t\tif (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraImageHook'])) {\n\t\t\tforeach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraImageHook'] as $_classRef) {\n\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\n\t\t\t\t$singleImage = $_procObj->extraImageProcessor($singleImage,$config, $this);\n\t\t\t}\n\t\t} \n \n return $singleImage;\n }", "public static function buildContent($attachments) {\r\n $args = foogallery_gallery_template_arguments();\r\n\r\n echo '<div class=\"gallery\">';\r\n\r\n $ind = 1;\r\n\r\n foreach ($attachments as $attachment) {\r\n $url = static::getURL($attachment, $args);\r\n\r\n if ($url !== '') {\r\n echo '<a';\r\n echo ' href=\"', esc_url($url), '\" ';\r\n echo ' data-pswp-width=\"', esc_attr($attachment->width), '\"';\r\n echo ' data-pswp-height=\"', esc_attr($attachment->height), '\"';\r\n echo ' data-cropped=\"true\"';\r\n echo '>';\r\n }\r\n \r\n $alt = $attachment->alt;\r\n\r\n if ($alt === '')\r\n $alt = \"Bild $ind\";\r\n\r\n $title = $attachment->caption;\r\n\r\n echo '<img src=\"', foogallery_attachment_html_image_src($attachment, $args), '\"';\r\n echo ' alt=\"', esc_attr($alt), '\"';\r\n\r\n if ($title !== '' && $title !== $alt)\r\n echo ' title=\"', esc_attr($title), '\"';\r\n\r\n if (!empty($args['width']) && !empty($args['height']))\r\n echo \" style=\\\"width: {$args['width']}px; height: {$args['height']}px\\\"\";\r\n\r\n echo '>';\r\n\r\n if ($url !== '')\r\n echo '</a>';\r\n\r\n ++$ind;\r\n }\r\n\r\n echo '</div>';\r\n }", "function getImageDifferentPlaces($limitImages=0) {\n \tif ($this->config['mode']=='DIRECTORY') {\n \t\t$content.=$this->getImagesDirectory($limitImages);\n \t} elseif ($this->config['mode']=='RECORDS') {\n \t\t$content.=$this->getImagesRecords($limitImages);\n } elseif ($this->config['mode']=='DAM') {\n \t\t$content.=$this->getImagesDam($limitImages);\n } elseif ($this->config['mode']=='DAMCAT') {\n \t\t$content.=$this->getImagesDamCat($limitImages);\n } \n \n // hook\n if (is_array($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraDifferentPlaces'])) {\n foreach($GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['rgsmoothgallery']['extraDifferentPlaces'] as $_classRef) {\n\t\t\t\t$_procObj = & t3lib_div::getUserObj($_classRef);\n\t\t\t\t$content = $_procObj->extraBeginGalleryProcessor($content, $limitImages,$this);\n }\n } \n \treturn $content;\n }", "function new_img_shortcode_filter($val, $attr, $content = null) {\n\n\textract(shortcode_atts(array(\n\t\t'id'\t=> '',\n\t\t'align'\t=> '',\n\t\t'width'\t=> '',\n\t\t'caption' => '',\n\t\t'src' => ''\n\t), $attr));\n\n $find = 'attachment_';\n $cust_id = str_replace($find, '', $id);\n $post_custom = get_post_custom($cust_id);\n // print_r($content);\n // $isrc = $src;\n\n\n\tif ( 1 > (int) $width || empty($caption) )\n\t\treturn $val;\n\n\t$capid = '';\n\tif ( $id ) {\n\t\t$id = esc_attr($id);\n\t\t$capid = 'id=\"figcaption_'. $id . '\" ';\n\t\t$id = 'id=\"' . $id . '\"';\n\t}\n\n\n\n\tif ($width == 60 || $width == 140 || $width == 300 ){ // if image is circle\n\t return '<div class=\"circle photo w'.(0 + (int) $width).'\">' . do_shortcode( $content ) . '<p class=\"caption\">' . $caption . '</p></div>';\n } else if ($width == 30) { // if image doesn't need a caption\n return '<div class=\"photo w'.(0 + (int) $width).'\">' . do_shortcode( $content ) . '</div>';\n } else { // all other images\n return '<div class=\"photo w'.(0 + (int) $width).'\">' . do_shortcode( $content ) . '<p class=\"caption\">' . $caption . '</p></div>';\n }\n}", "public static function filter_the_content( $content ) {\n\t\t$images = static::parse_images_from_html( $content );\n\n\t\tif ( ! empty( $images ) ) {\n\t\t\t$content_width = isset( $GLOBALS['content_width'] ) ? $GLOBALS['content_width'] : false;\n\n\t\t\t$image_sizes = self::image_sizes();\n\t\t\t$upload_dir = wp_upload_dir();\n\t\t\t$attachment_ids = [];\n\n\t\t\tforeach ( $images[0] as $tag ) {\n\t\t\t\tif ( preg_match( '/wp-image-([0-9]+)/i', $tag, $class_id ) && absint( $class_id[1] ) ) {\n\t\t\t\t\t// Overwrite the ID when the same image is included more than once.\n\t\t\t\t\t$attachment_ids[ $class_id[1] ] = true;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( count( $attachment_ids ) > 1 ) {\n\t\t\t\t/*\n\t\t\t\t * Warm the object cache with post and meta information for all found\n\t\t\t\t * images to avoid making individual database calls.\n\t\t\t\t */\n\t\t\t\t_prime_post_caches( array_keys( $attachment_ids ), false, true );\n\t\t\t}\n\n\t\t\tforeach ( $images[0] as $index => $tag ) {\n\t\t\t\t// Default to resize, though fit may be used in certain cases where a dimension cannot be ascertained.\n\t\t\t\t$transform = 'resize';\n\n\t\t\t\t// Start with a clean size and attachment ID each time.\n\t\t\t\t$attachment_id = false;\n\t\t\t\tunset( $size );\n\n\t\t\t\t// Flag if we need to munge a fullsize URL.\n\t\t\t\t$fullsize_url = false;\n\n\t\t\t\t// Identify image source.\n\t\t\t\t$src = $src_orig = $images['img_url'][ $index ];\n\n\t\t\t\t/**\n\t\t\t\t * Allow specific images to be skipped by Tachyon.\n\t\t\t\t *\n\t\t\t\t * @since 2.0.3\n\t\t\t\t *\n\t\t\t\t * @param bool false Should Tachyon ignore this image. Default to false.\n\t\t\t\t * @param string $src Image URL.\n\t\t\t\t * @param string $tag Image Tag (Image HTML output).\n\t\t\t\t */\n\t\t\t\tif ( apply_filters( 'tachyon_skip_image', false, $src, $tag ) ) {\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t// Support Automattic's Lazy Load plugin.\n\t\t\t\t// Can't modify $tag yet as we need unadulterated version later.\n\t\t\t\tif ( preg_match( '#data-lazy-src=[\"|\\'](.+?)[\"|\\']#i', $images['img_tag'][ $index ], $lazy_load_src ) ) {\n\t\t\t\t\t$placeholder_src = $placeholder_src_orig = $src;\n\t\t\t\t\t$src = $src_orig = $lazy_load_src[1];\n\t\t\t\t} elseif ( preg_match( '#data-lazy-original=[\"|\\'](.+?)[\"|\\']#i', $images['img_tag'][ $index ], $lazy_load_src ) ) {\n\t\t\t\t\t$placeholder_src = $placeholder_src_orig = $src;\n\t\t\t\t\t$src = $src_orig = $lazy_load_src[1];\n\t\t\t\t}\n\n\t\t\t\t// Check if image URL should be used with Tachyon.\n\t\t\t\tif ( self::validate_image_url( $src ) ) {\n\t\t\t\t\t// Find the width and height attributes.\n\t\t\t\t\t$width = $height = false;\n\n\t\t\t\t\t// First, check the image tag.\n\t\t\t\t\tif ( preg_match( '#width=[\"|\\']?([\\d%]+)[\"|\\']?#i', $images['img_tag'][ $index ], $width_string ) ) {\n\t\t\t\t\t\t$width = $width_string[1];\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( preg_match( '#height=[\"|\\']?([\\d%]+)[\"|\\']?#i', $images['img_tag'][ $index ], $height_string ) ) {\n\t\t\t\t\t\t$height = $height_string[1];\n\t\t\t\t\t}\n\n\t\t\t\t\t// If image tag lacks width or height arguments, try to determine from strings WP appends to resized image filenames.\n\t\t\t\t\tif ( ! $width || ! $height ) {\n\t\t\t\t\t\t$size_from_file = static::parse_dimensions_from_filename( $src );\n\t\t\t\t\t\t$width = $width ?: $size_from_file[0];\n\t\t\t\t\t\t$height = $height ?: $size_from_file[1];\n\t\t\t\t\t}\n\n\t\t\t\t\t// Can't pass both a relative width and height, so unset the height in favor of not breaking the horizontal layout.\n\t\t\t\t\tif ( false !== strpos( $width, '%' ) && false !== strpos( $height, '%' ) ) {\n\t\t\t\t\t\t$width = $height = false;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Detect WP registered image size from HTML class.\n\t\t\t\t\tif ( preg_match( '#class=[\"|\\']?[^\"\\']*size-([^\"\\'\\s]+)[^\"\\']*[\"|\\']?#i', $images['img_tag'][ $index ], $matches ) ) {\n\t\t\t\t\t\t$size = array_pop( $matches );\n\n\t\t\t\t\t\tif ( false === $width && false === $height && isset( $size ) && array_key_exists( $size, $image_sizes ) ) {\n\t\t\t\t\t\t\t$size_from_wp = wp_get_attachment_image_src( $attachment_id, $size );\n\t\t\t\t\t\t\t$width = $size_from_wp[1];\n\t\t\t\t\t\t\t$height = $size_from_wp[2];\n\t\t\t\t\t\t\t$transform = $image_sizes[ $size ]['crop'] ? 'resize' : 'fit';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// WP Attachment ID, if uploaded to this site.\n\t\t\t\t\tif (\n\t\t\t\t\t\tpreg_match( '#class=[\"|\\']?[^\"\\']*wp-image-([\\d]+)[^\"\\']*[\"|\\']?#i', $images['img_tag'][ $index ], $class_attachment_id ) &&\n\t\t\t\t\t\t(\n\t\t\t\t\t\t\t0 === strpos( $src, $upload_dir['baseurl'] ) ||\n\t\t\t\t\t\t\t/**\n\t\t\t\t\t\t\t * Filter whether an image using an attachment ID in its class has to be uploaded to the local site to go through Tachyon.\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * @since 2.0.3\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * @param bool false Was the image uploaded to the local site. Default to false.\n\t\t\t\t\t\t\t * @param array $args {\n\t\t\t\t\t\t\t * Array of image details.\n\t\t\t\t\t\t\t *\n\t\t\t\t\t\t\t * @type $src Image URL.\n\t\t\t\t\t\t\t * @type tag Image tag (Image HTML output).\n\t\t\t\t\t\t\t * @type $images Array of information about the image.\n\t\t\t\t\t\t\t * @type $index Image index.\n\t\t\t\t\t\t\t * }\n\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\tapply_filters( 'tachyon_image_is_local', false, compact( 'src', 'tag', 'images', 'index' ) )\n\t\t\t\t\t\t)\n\t\t\t\t\t) {\n\t\t\t\t\t\t$class_attachment_id = intval( array_pop( $class_attachment_id ) );\n\n\t\t\t\t\t\tif ( $class_attachment_id ) {\n\t\t\t\t\t\t\t$attachment = get_post( $class_attachment_id );\n\t\t\t\t\t\t\t// Basic check on returned post object.\n\t\t\t\t\t\t\tif ( is_object( $attachment ) && ! is_wp_error( $attachment ) && 'attachment' === $attachment->post_type ) {\n\t\t\t\t\t\t\t\t$attachment_id = $attachment->ID;\n\n\t\t\t\t\t\t\t\t// If we still don't have a size for the image, use the attachment_id\n\t\t\t\t\t\t\t\t// to lookup the size for the image in the URL.\n\t\t\t\t\t\t\t\tif ( ! isset( $size ) ) {\n\t\t\t\t\t\t\t\t\t$meta = wp_get_attachment_metadata( $attachment_id );\n\t\t\t\t\t\t\t\t\tif ( $meta['sizes'] ) {\n\t\t\t\t\t\t\t\t\t\t$sizes = wp_list_filter( $meta['sizes'], [ 'file' => basename( $src ) ] );\n\t\t\t\t\t\t\t\t\t\tif ( $sizes ) {\n\t\t\t\t\t\t\t\t\t\t\t$size_names = array_keys( $sizes );\n\t\t\t\t\t\t\t\t\t\t\t$size = array_pop( $size_names );\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t// If we still don't have a size for the image but know the dimensions,\n\t\t\t\t\t\t\t\t// use the attachment sources to determine the size. Tachyon modifies\n\t\t\t\t\t\t\t\t// wp_get_attachment_image_src() to account for sizes created after upload.\n\t\t\t\t\t\t\t\tif ( ! isset( $size ) && $width && $height ) {\n\t\t\t\t\t\t\t\t\t$sizes = array_keys( $image_sizes );\n\t\t\t\t\t\t\t\t\tforeach ( $sizes as $size ) {\n\t\t\t\t\t\t\t\t\t\t$size_per_wp = wp_get_attachment_image_src( $attachment_id, $size );\n\t\t\t\t\t\t\t\t\t\tif ( $width === $size_per_wp[1] && $height === $size_per_wp[2] ) {\n\t\t\t\t\t\t\t\t\t\t\t$transform = $image_sizes[ $size ]['crop'] ? 'resize' : 'fit';\n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\tunset( $size ); // Prevent loop from polluting $size if it's incorrect.\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\tif ( isset( $size ) && false === $width && false === $height && array_key_exists( $size, $image_sizes ) ) {\n\t\t\t\t\t\t\t\t\t$width = (int) $image_sizes[ $size ]['width'];\n\t\t\t\t\t\t\t\t\t$height = (int) $image_sizes[ $size ]['height'];\n\t\t\t\t\t\t\t\t\t$transform = $image_sizes[ $size ]['crop'] ? 'resize' : 'fit';\n\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t/*\n\t\t\t\t\t\t\t\t * If size is still not set the dimensions were not provided by either\n\t\t\t\t\t\t\t\t * a class or by parsing the URL. Only the full sized image should return\n\t\t\t\t\t\t\t\t * no dimensions when returning the URL so it's safe to assume the $size is full.\n\t\t\t\t\t\t\t\t */\n\t\t\t\t\t\t\t\t$size = isset( $size ) ? $size : 'full';\n\n\t\t\t\t\t\t\t\t$src_per_wp = wp_get_attachment_image_src( $attachment_id, $size );\n\n\t\t\t\t\t\t\t\tif ( self::validate_image_url( $src_per_wp[0] ) ) {\n\t\t\t\t\t\t\t\t\t$src = $src_per_wp[0];\n\t\t\t\t\t\t\t\t\t$fullsize_url = true;\n\n\t\t\t\t\t\t\t\t\t// Prevent image distortion if a detected dimension exceeds the image's natural dimensions.\n\t\t\t\t\t\t\t\t\tif ( ( false !== $width && $width > $src_per_wp[1] ) || ( false !== $height && $height > $src_per_wp[2] ) ) {\n\t\t\t\t\t\t\t\t\t\t$width = false === $width ? false : min( $width, $src_per_wp[1] );\n\t\t\t\t\t\t\t\t\t\t$height = false === $height ? false : min( $height, $src_per_wp[2] );\n\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t// If no width and height are found, max out at source image's natural dimensions.\n\t\t\t\t\t\t\t\t\t// Otherwise, respect registered image sizes' cropping setting.\n\t\t\t\t\t\t\t\t\tif ( false === $width && false === $height ) {\n\t\t\t\t\t\t\t\t\t\t$width = $src_per_wp[1];\n\t\t\t\t\t\t\t\t\t\t$height = $src_per_wp[2];\n\t\t\t\t\t\t\t\t\t\t$transform = 'fit';\n\t\t\t\t\t\t\t\t\t} elseif ( isset( $size ) && array_key_exists( $size, $image_sizes ) && isset( $image_sizes[ $size ]['crop'] ) ) {\n\t\t\t\t\t\t\t\t\t\t$transform = (bool) $image_sizes[ $size ]['crop'] ? 'resize' : 'fit';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tunset( $attachment );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// If width is available, constrain to $content_width.\n\t\t\t\t\tif ( false !== $width && false === strpos( $width, '%' ) && is_numeric( $content_width ) ) {\n\t\t\t\t\t\tif ( $width > $content_width && false !== $height && false === strpos( $height, '%' ) ) {\n\t\t\t\t\t\t\t$height = round( ( $content_width * $height ) / $width );\n\t\t\t\t\t\t\t$width = $content_width;\n\t\t\t\t\t\t} elseif ( $width > $content_width ) {\n\t\t\t\t\t\t\t$width = $content_width;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Set a width if none is found and $content_width is available.\n\t\t\t\t\t// If width is set in this manner and height is available, use `fit` instead of `resize` to prevent skewing.\n\t\t\t\t\tif ( false === $width && is_numeric( $content_width ) ) {\n\t\t\t\t\t\t$width = (int) $content_width;\n\n\t\t\t\t\t\tif ( false !== $height ) {\n\t\t\t\t\t\t\t$transform = 'fit';\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t// Detect if image source is for a custom-cropped thumbnail and prevent further URL manipulation.\n\t\t\t\t\tif ( ! $fullsize_url && preg_match_all( '#-e[a-z0-9]+(-\\d+x\\d+)?\\.(' . implode( '|', self::$extensions ) . '){1}$#i', basename( $src ), $filename ) ) {\n\t\t\t\t\t\t$fullsize_url = true;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Build URL, first maybe removing WP's resized string so we pass the original image to Tachyon.\n\t\t\t\t\tif ( ! $fullsize_url ) {\n\t\t\t\t\t\t$src = self::strip_image_dimensions_maybe( $src );\n\t\t\t\t\t}\n\n\t\t\t\t\t// Build array of Tachyon args and expose to filter before passing to Tachyon URL function.\n\t\t\t\t\t$args = [];\n\n\t\t\t\t\tif ( false !== $width && false !== $height && false === strpos( $width, '%' ) && false === strpos( $height, '%' ) ) {\n\t\t\t\t\t\tif ( ! isset( $size ) || $size !== 'full' ) {\n\t\t\t\t\t\t\t$args[ $transform ] = $width . ',' . $height;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Set the gravity from the registered image size.\n\t\t\t\t\t\t// Crop weight array values are in x, y order but the value `westsouth` will\n\t\t\t\t\t\t// cause Sharp to error and Tachyon to return a 404, it needs to be `southwest`\n\t\t\t\t\t\t// so we reverse the crop array to y, x order.\n\t\t\t\t\t\tif ( 'resize' === $transform && isset( $size ) && $size !== 'full' && array_key_exists( $size, $image_sizes ) && is_array( $image_sizes[ $size ]['crop'] ) ) {\n\t\t\t\t\t\t\t$args['gravity'] = implode( '', array_map( function ( $v ) {\n\t\t\t\t\t\t\t\t$map = [\n\t\t\t\t\t\t\t\t\t'top' => 'north',\n\t\t\t\t\t\t\t\t\t'center' => '',\n\t\t\t\t\t\t\t\t\t'bottom' => 'south',\n\t\t\t\t\t\t\t\t\t'left' => 'west',\n\t\t\t\t\t\t\t\t\t'right' => 'east',\n\t\t\t\t\t\t\t\t];\n\t\t\t\t\t\t\t\treturn $map[ $v ];\n\t\t\t\t\t\t\t}, array_reverse( $image_sizes[ $size ]['crop'] ) ) );\n\t\t\t\t\t\t}\n\t\t\t\t\t} elseif ( false !== $width ) {\n\t\t\t\t\t\t$args['w'] = $width;\n\t\t\t\t\t} elseif ( false !== $height ) {\n\t\t\t\t\t\t$args['h'] = $height;\n\t\t\t\t\t}\n\n\t\t\t\t\t// Final logic check to determine the size for an unknown attachment ID.\n\t\t\t\t\tif ( ! isset( $size ) ) {\n\t\t\t\t\t\tif ( $width ) {\n\t\t\t\t\t\t\t$filter['width'] = $width;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif ( $height ) {\n\t\t\t\t\t\t\t$filter['height'] = $height;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( ! empty( $filter ) ) {\n\t\t\t\t\t\t\t$sizes = wp_list_filter( $image_sizes, $filter );\n\t\t\t\t\t\t\tif ( empty( $sizes ) ) {\n\t\t\t\t\t\t\t\t$sizes = wp_list_filter( $image_sizes, $filter, 'OR' );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif ( ! empty( $sizes ) ) {\n\t\t\t\t\t\t\t\t$size = reset( $sizes );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( ! isset( $size ) ) {\n\t\t\t\t\t\t// Custom size, send an array.\n\t\t\t\t\t\t$size = [ $width, $height ];\n\t\t\t\t\t}\n\n\t\t\t\t\t/**\n\t\t\t\t\t * Filter the array of Tachyon arguments added to an image when it goes through Tachyon.\n\t\t\t\t\t * By default, only includes width and height values.\n\t\t\t\t\t *\n\t\t\t\t\t * @see https://developer.wordpress.com/docs/photon/api/\n\t\t\t\t\t *\n\t\t\t\t\t * @param array $args Array of Tachyon Arguments.\n\t\t\t\t\t * @param array $args {\n\t\t\t\t\t * Array of image details.\n\t\t\t\t\t *\n\t\t\t\t\t * @type $tag Image tag (Image HTML output).\n\t\t\t\t\t * @type $src Image URL.\n\t\t\t\t\t * @type $src_orig Original Image URL.\n\t\t\t\t\t * @type $width Image width.\n\t\t\t\t\t * @type $height Image height.\n\t\t\t\t\t * @type $attachment_id Attachment ID.\n\t\t\t\t\t * }\n\t\t\t\t\t */\n\t\t\t\t\t$args = apply_filters( 'tachyon_post_image_args', $args, compact( 'tag', 'src', 'src_orig', 'width', 'height', 'attachment_id', 'size' ) );\n\n\t\t\t\t\t$tachyon_url = tachyon_url( $src, $args );\n\n\t\t\t\t\t// Modify image tag if Tachyon function provides a URL\n\t\t\t\t\t// Ensure changes are only applied to the current image by copying and modifying the matched tag, then replacing the entire tag with our modified version.\n\t\t\t\t\tif ( $src !== $tachyon_url ) {\n\t\t\t\t\t\t$new_tag = $tag;\n\n\t\t\t\t\t\t// If present, replace the link href with a Tachyoned URL for the full-size image.\n\t\t\t\t\t\tif ( ! empty( $images['link_url'][ $index ] ) && self::validate_image_url( $images['link_url'][ $index ] ) ) {\n\t\t\t\t\t\t\t$new_tag = preg_replace( '#(href=[\"|\\'])' . $images['link_url'][ $index ] . '([\"|\\'])#i', '\\1' . tachyon_url( $images['link_url'][ $index ] ) . '\\2', $new_tag, 1 );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Supplant the original source value with our Tachyon URL.\n\t\t\t\t\t\t$tachyon_url = esc_url( $tachyon_url );\n\t\t\t\t\t\t$new_tag = str_replace( $src_orig, $tachyon_url, $new_tag );\n\n\t\t\t\t\t\t// If Lazy Load is in use, pass placeholder image through Tachyon.\n\t\t\t\t\t\tif ( isset( $placeholder_src ) && self::validate_image_url( $placeholder_src ) ) {\n\t\t\t\t\t\t\t$placeholder_src = tachyon_url( $placeholder_src );\n\n\t\t\t\t\t\t\tif ( $placeholder_src !== $placeholder_src_orig ) {\n\t\t\t\t\t\t\t\t$new_tag = str_replace( $placeholder_src_orig, esc_url( $placeholder_src ), $new_tag );\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tunset( $placeholder_src );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Remove the width and height arguments from the tag to prevent distortion.\n\t\t\t\t\t\tif ( apply_filters( 'tachyon_remove_size_attributes', true ) ) {\n\t\t\t\t\t\t\t$new_tag = preg_replace( '#(?<=\\s)(width|height)=[\"|\\']?[\\d%]+[\"|\\']?\\s?#i', '', $new_tag );\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// Tag an image for dimension checking.\n\t\t\t\t\t\t$new_tag = preg_replace( '#(\\s?/)?>(\\s*</a>)?$#i', ' data-recalc-dims=\"1\"\\1>\\2', $new_tag );\n\n\t\t\t\t\t\t// Replace original tag with modified version.\n\t\t\t\t\t\t$content = str_replace( $tag, $new_tag, $content );\n\t\t\t\t\t}\n\t\t\t\t} elseif ( preg_match( '#^http(s)?://i[\\d]{1}.wp.com#', $src ) && ! empty( $images['link_url'][ $index ] ) && self::validate_image_url( $images['link_url'][ $index ] ) ) {\n\t\t\t\t\t$new_tag = preg_replace( '#(href=[\"|\\'])' . $images['link_url'][ $index ] . '([\"|\\'])#i', '\\1' . tachyon_url( $images['link_url'][ $index ] ) . '\\2', $tag, 1 );\n\n\t\t\t\t\t$content = str_replace( $tag, $new_tag, $content );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $content;\n\t}", "function _putimages() {\n parent::_putimages();\n $this->_putformxobjects();\n }", "function embed_wrap( $cache ) {\n\treturn '<div class=\"entry-content-asset\">' . $cache . '</div>';\n}", "function editor_insert_image($html, $id, $caption, $title, $align, $url, $size) {\r\n\tlist($imgsrc) = image_downsize($id, 'hero-review');\r\n//\tlist($imgsrc) = image_downsize($id, $size);\r\n\r\n\t$html = \"<div class=\\\"photo-gallery\\\">\";\r\n\t$html .= \"<img src=\\\"$imgsrc\\\" alt=\\\"$caption\\\">\";\r\n\tif ($caption) {\r\n\t\t$html .= \"<div class=\\\"caption\\\">$caption</div>\";\r\n\t}\r\n\t$html .= \"</div><!-- photo-gallery -->\";\r\n\treturn $html;\r\n}", "public function addContentGallery($image_folders, $image_base_dir = '', $image_base_url = '', $gallery_class = ''){\n\n // Include the gallery markup generator and collect output\n ob_start();\n include(LEGACY_MMRPG_ROOT_DIR.'markup/image-gallery.php');\n $html_markup = ob_get_clean();\n\n // Add generated gallery markup to the page\n $this->addContentMarkup($html_markup);\n\n }", "function adapt_image( $id=0, $width=0, $height=0, $link=false, $attr=null, $circle=false, $blank=false ) {\n\n $html = '';\n\n if ( $circle !== false ) :\n if ( $width > $height ) : \n $width = $height;\n elseif ( $width <= $height ) : \n $height = $width;\n endif;\n\n $html .= '<div class=\"is-circle\">';\n endif;\n\n $link_attrs = $link ? \"href='{$link}'\" : \"href='#.'\";\n $link_attrs .= $blank ? \" target='_blank'\" : '';\n\n $html .= $link ? \"<a {$link_attrs}>\" : '';\n $html .= wp_get_attachment_image( $id, array( $width, $height ), true, $attr );\n $html .= $link ? '</a>' : '';\n\n if ( $circle !== false )\n $html .= '</div>'; \n\n}" ]
[ "0.70296353", "0.62475896", "0.6192706", "0.61710554", "0.60392153", "0.5983281", "0.58517945", "0.5844741", "0.57071084", "0.5691835", "0.5685138", "0.56612575", "0.56366354", "0.56049633", "0.5560673", "0.55400383", "0.55104524", "0.55083305", "0.5495247", "0.54838276", "0.5476866", "0.54665107", "0.5464913", "0.54628134", "0.5456346", "0.5453455", "0.5450661", "0.5449952", "0.543047", "0.5412088" ]
0.7396228
0
/////////////////////////////////////////////////////////////////////////////// Adds a metarefresh tag in the header of the site to redirect all traffic to a specific URL every X seconds. ///////////////////////////////////////////////////////////////////////////////
function add_metarefresh() { $post_url; // Redirects to a custom URL if(METAREFRESH_CUSTOM_URL){ $post_url = METAREFRESH_URL ? METAREFRESH_URL : get_bloginfo('url'); // Redirects to a random address within an array or URL } else if(METAREFRESH_CUSTOM_URL_ARRAY){ $url_array = unserialize(METAREFRESH_URL_ARRAY); $post_url = $url_array[ rand(0, count($url_array)-1) ]; // Redirects to 'previous post' } else { $prev_post = get_previous_post(true); if (!empty( $prev_post )){ $post_url = get_permalink($prev_post->ID); } else { $recent_post = wp_get_recent_posts( array('numberposts' => 1), ARRAY_A ); $post_url = get_permalink($recent_post[0]['ID']); } } // Print Refresh HTML tag echo '<meta http-equiv="refresh" content="' . METAREFRESH_LENGTH . '; url=' . $post_url . '">'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function app_auto_refresh(int $delay)\n{\n header('Refresh: ' . $delay . '; ' . $_SERVER['REQUEST_URI']);\n}", "function meta_refresh($time, $url, $disable_cd_check = false)\n{\n\tglobal $template;\n\n\t$url = redirect($url, true, $disable_cd_check);\n\t$url = str_replace('&', '&amp;', $url);\n\n\t// For XHTML compatibility we change back & to &amp;\n\t$template->assign_vars(array(\n\t\t'META' => '<meta http-equiv=\"refresh\" content=\"' . $time . ';url=' . $url . '\" />')\n\t);\n\n\treturn $url;\n}", "function redirect($url)\n{\n echo '<meta http-equiv=\"Refresh\" content=\"0; URL=' . $url . '\">';\n}", "function redirect($url,$delay) {\n\t\techo '<meta http-equiv=\"refresh\" content=\"'.$delay.';url='.$url.'\">'; \n\t}", "function refreshPage($tiempo,$url)\n{\n print \"<META HTTP-EQUIV=\\\"Refresh\\\" CONTENT=\\\"$tiempo; URL=$url\\\">\";\n if($tiempo==0)\n exit();\n}", "function DvRedirect($url, $time)\n{\n header('refresh:'.$time.';url='.$url);\n}", "function refresh($cooldown){\r\n\t\techo(\"<meta http-equiv='refresh' content='0'>\"); \r\n\r\n\t}", "public static function refresh(int $interval): MetaTag {\n return static::httpEquiv('refresh', $interval);\n }", "function send_future_expire_header($offset=2600000)\n{\n if (headers_sent())\n return;\n\n header(\"Expires: \".gmdate(\"D, d M Y H:i:s\", mktime()+$offset).\" GMT\");\n header(\"Cache-Control: max-age=$offset\");\n header(\"Pragma: \");\n}", "public static function custom_page($page)\n {\n $page_to_redirect = HTTPS_SERVER.$page;\n echo '<meta http-equiv=\"refresh\" content=\"1;url='. $page_to_redirect .'\" />';\n header('Refresh: 1;url=' . $page_to_redirect);\n }", "function print_redirect_header($redirect_url) {\n?><!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 TRANSITIONAL//EN\" \"http://www.w3.org/TR/html4/loose.dtd\">\n<html>\n<head>\n\t<title>lint_php</title>\n\t<meta http-equiv=\"refresh\" content=\"0;url=<?php echo $redirect_url; ?>\" />\n</head>\n<body>\n</body>\n</html>\n<?php\n}", "public function refresh() {\n\t\t$this->redirect( isset( $_SERVER['REQUEST_URI'] ) ? $_SERVER['REQUEST_URI'] : '/' );\n\t}", "public static function refresh($seconds, $route)\n {\n return header(\"refresh:{$seconds}; url='{$route}'\");\n }", "function refreshIntervalHeader() {\n\t\techo \"<h3>\".__('Adjust cache update interval (student)', lepress_textdomain).\"</h3>\";\n\t}", "function forwardJSP($newPage,$title) {\r\n echo \"<html>\";\r\n echo \"<head>\";\r\n echo \"<meta http-equiv=refresh content=1;url=\".$newPage.\" >\";\r\n echo \"<link rel=stylesheet type=\\\"text/css\\\" href=\\\"/css/site.css\\\">\";\r\n echo \"<title>\".$title.\"</title>\";\r\n echo \"</head>\";\r\n echo \"<h1>The page &quot;\".$title.\"&quot; has been converted to JSP</h1>\";\r\n echo \"<body >I am redirecting you to the new version at <A href=\".$newPage.\" >\".$newPage.\"</A>\";\r\n echo \"</body>\";\r\n echo \"</html>\";\r\n}", "function genMetaRefresh($jobId) {\n $this->printDebugMessage('genMetaRefresh', 'Begin', 2);\n $statusUrl = \"?jobId=$jobId\";\n $retVal = \"<meta http-equiv=\\\"refresh\\\" content=\\\"10;url=$statusUrl\\\">\";\n $this->printDebugMessage('genMetaRefresh', 'Begin', 2);\n return $retVal;\n }", "function redirectPage($Msg ,$url = null,$seconds = 3){\n if($url === null){\n $url = \"index.php\";\n $link = \"Home Page\";\n }else{\n if(isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] !== '' ){\n $url = $_SERVER['HTTP_REFERER'];\n $link = 'previes Page';\n }else{\n $url = \"index.php\";\n $link = \"Home Page\";\n }\n }\n echo $Msg ;\n echo \"<div class = 'alert alert-info'> You will be redirect to $link after $seconds Seconds </div>\";\n header(\"Refresh:$seconds ; url=$url\");\n exit();\n}", "function boink_it($url)\n\t{\n\t\t// Ensure &amp;s are taken care of\n\t\t\n\t\t$url = str_replace( \"&amp;\", \"&\", $url );\n\t\t\n\t\tif ($this->vars['header_redirect'] == 'refresh')\n\t\t{\n\t\t\t@header(\"Refresh: 0;url=\".$url);\n\t\t}\n\t\telse if ($this->vars['header_redirect'] == 'html')\n\t\t{\n\t\t\t$url = str_replace( '&', '&amp;', str_replace( '&amp;', '&', $url ) );\n\t\t\techo(\"<html><head><meta http-equiv='refresh' content='0; url=$url'></head><body></body></html>\");\n\t\t\texit();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t@header(\"Location: \".$url);\n\t\t}\n\t\texit();\n\t}", "private function refreshCache()\n {\n\n\t\t// any valid date in the past\n\t\theader(\"Expires: Mon, 26 Jul 1997 05:00:00 GMT\");\n\t\t// always modified right now\n\t\theader(\"Last-Modified: \" . gmdate(\"D, d M Y H:i:s\") . \" GMT\");\n\t\t// HTTP/1.1\n\t\theader(\"Cache-Control: private, no-store, max-age=0, no-cache, must-revalidate, post-check=0, pre-check=0\");\n\t\t// HTTP/1.0\n\t\theader(\"Pragma: no-cache\");\n\t}", "function refresh($loc = null) {\n header('Location: ' . ($loc != null ? $loc : 'showAllPlaylists.php'));\n die();\n}", "function redirect($url,$time=0) {\r\n\techo \"<p>Transaction en cours</p>\";\r\n\techo \"<img src=\\\"images/ajax-loader.gif\\\" alt=\\\"loader\\\">\";\r\n\r\n\t// message de confirmation\r\n\techo(\"<script>alert(\\\"Commande effectuée !\\\")</script>\");\r\n\techo \"<meta http-equiv=\\\"refresh\\\" content=\\\"$time; URL=$url\\\" />\";\r\n\r\n\texit();\r\n}", "function redirectTo($theMsg, $url = null, $seconds = 3) {\n\n if ($url === null) {\n $url = 'index.php';\n } else {\n if (isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] !== '' ) {\n $url = $_SERVER['HTTP_REFERER'];\n } else {\n $url = 'index.php';\n }\n }\n echo '<div class=\"container\">';\n echo $theMsg;\n echo \"<div class='alert alert-info'>Redirect After $seconds Seconds</div>\";\n echo '</div>';\n header(\"refresh:$seconds;url=$url\");\n\n exit();\n}", "private function reload() {\r\n\r\n \t\t$timestamp = (int) (microtime(true) * 1000);\r\n\r\n \t\t// if the value is empty\r\n \t\tif ($this->NEXT_REQUEST_TIMESTAMP > $timestamp) {\r\n \t\t\treturn;\r\n \t\t}\r\n\r\n \t\t$this->load();\r\n \t}", "public function gheader($url) \n\t{\n\t//echo '<!DOCTYPE HTML>\n//<html lang=\"en-US\">\n//<head>\n // <meta charset=\"UTF-8\">\n //<title></title>\n//</head>\n//<body>\n // <a id=\"links\" href=\"#\" style=\"display:none;\"></a>\n // <script type=\"text/javascript\">\n // var obj = document.getElementById(\"links\");\n // obj.href = \"'.$url.'\";\n // obj.click();\n // </script>\n//</body>\n//</html>';\t\n\techo '<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">\n<html xmlns=\"http://www.w3.org/1999/xhtml\">\n<head>\n<meta http-equiv=\"refresh\" content=\"0;url='.$url.'\"/> \n<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\" />\n<title></title>\n<style type=\"text/css\">\n\n</style>\n</head>\n<body>\n</body>\n</html>';\n\texit(); \n\t}", "function redirect($pagePath){\n\theader(\"Location: \" . $pagePath);\n\techo '<META HTTP-EQUIV=\"Refresh\" Content=\"0; URL='.$pagePath.'\">';\n\techo \"<script type='text/javascript'>window.location = '\".$pagePath.\"'</script>\";\n}", "public function incrementExpiresAt();", "function redirect ($url)\n{\n\t// Behave as per HTTP/1.1 spec for cool webservers\n\theader('Location: ' . $url);\n\n\t// Redirect via an HTML form for un-cool webservers\n\tprint(\n\t\t'<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.01 Transitional//EN\">'\n\t\t. '<html>'\n\t\t\t. '<head>'\n\t\t\t\t. '<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">'\n\t\t\t\t. '<meta http-equiv=\"refresh\" content=\"0; url=' . $url . '\">'\n\t\t\t\t. '<title>Redirecting...</title>'\n\t\t\t. '</head>'\n\t\t\t. '<body>'\n\t\t\t\t. 'If you are not redirected in 5 seconds, please click <a href=\"' . $url . '\">here</a>.'\n\t\t\t. '</body>'\n\t\t. '</html>'\n\t);\n\t\n\t// Exit\n\texit;\n}", "public static function expires($date)\n {\n $expires = 60*60*24*14;\n header(\"Pragma: public\");\n header(\"Cache-Control: maxage=\".$expires);\n header('Expires: ' . gmdate('D, d M Y H:i:s', time()+$expires) . ' GMT');\n }", "function aggregator_refresh($feed) {\n global $channel, $image, $db;\n\n // Generate conditional GET headers.\n $headers = array();\n if ($feed->etag) {\n $headers['If-None-Match'] = $feed->etag;\n }\n if ($feed->modified) {\n $headers['If-Modified-Since'] = gmdate('D, d M Y H:i:s', $feed->modified) .' GMT';\n }\n\n // Request feed.\n $result = http_request($feed->category_feed, $headers);\n\n // Process HTTP response code.\n switch ($result->code) {\n case 304:\n // No new syndicated content from site\n $db->query('UPDATE feed_data SET checked = ' . time() . ' WHERE id = '. $feed->id);\n break;\n case 301:\n // Updated URL for feed\n $feed->category_feed = $result->redirect_url;\n $db->query(\"UPDATE feed_data SET category_feed='\" . $feed->category_feed . \"' WHERE category_id=\" . $feed->id);\n break;\n\n case 200:\n case 302:\n case 307:\n // Filter the input data:\n if (aggregator_parse_feed($result->data, $feed)) {\n\n if ($result->headers['Last-Modified']) {\n $modified = strtotime($result->headers['Last-Modified']);\n }\n\n /*\n ** Prepare the channel data:\n */\n\n foreach ($channel as $key => $value) {\n $channel[$key] = trim(strip_tags($value));\n }\n\n /*\n ** Prepare the image data (if any):\n */\n\n foreach ($image as $key => $value) {\n $image[$key] = trim($value);\n }\n\n if ($image['LINK'] && $image['URL'] && $image['TITLE']) {\n $image = '<a href=\"'. $image['LINK'] .'\"><img src=\"'. $image['URL'] .'\" alt=\"'. $image['TITLE'] .'\" /></a>';\n }\n else {\n $image = NULL;\n }\n\n /*\n ** Update the feed data:\n */\n\n $db->query(\"UPDATE feed_data SET checked = \". time() .\", link = '\". $channel['LINK'] .\"', description = '\". $channel['DESCRIPTION'] .\"', image = '\". $image .\"', etag = '\". $result->headers['ETag'] .\"', modified = '\". $modified .\"' WHERE id = \". $feed->id);\n\n }\n break;\n default:\n echo 'Failed to parse RSS feed ' . $feed->category_name . ' : ' . $result->code .' '. $result->error . \"\\n\";\n }\n}", "function redirectHome($theMsg, $url = null, $seconds = 3){\n \n if($url === null)\n {\n $url = 'dashboard.php';\n \n } \n \n else\n {\n $url = isset($_SERVER['HTTP_REFERER']) && $_SERVER['HTTP_REFERER'] !== '' ? $_SERVER['HTTP_REFERER'] : 'dashboard.php';\n }\n \n \n echo $theMsg;\n echo \"<div class='alert alert-info'>You Will Be Redirected To $url After $seconds Seconds.</div>\";\n \n header(\"refresh:$seconds;url=$url\");\n exit();\n \n}" ]
[ "0.70994556", "0.7004533", "0.67559975", "0.6361787", "0.6313741", "0.6174323", "0.6157777", "0.5926107", "0.5807808", "0.5794741", "0.5689044", "0.5571267", "0.5521268", "0.55022466", "0.5429606", "0.53721493", "0.5361081", "0.5300412", "0.52998793", "0.5299391", "0.52809626", "0.52319026", "0.5215207", "0.5214017", "0.5147972", "0.5126009", "0.5116245", "0.51043695", "0.5067775", "0.50677425" ]
0.7339435
0
/ this way it works well only for orthogonal lines imagesetthickness($image, $thick); return imageline($image, $x1, $y1, $x2, $y2, $color);
function imagelinethick($image, $x1, $y1, $x2, $y2, $color, $thick = 1) { if ($thick == 1) { return imageline($image, $x1, $y1, $x2, $y2, $color); } $t = $thick / 2 - 0.5; if ($x1 == $x2 || $y1 == $y2) { return imagefilledrectangle($image, round(min($x1, $x2) - $t), round(min($y1, $y2) - $t), round(max($x1, $x2) + $t), round(max($y1, $y2) + $t), $color); } $k = ($y2 - $y1) / ($x2 - $x1); //y = kx + q $a = $t / sqrt(1 + pow($k, 2)); $points = array( round($x1 - (1+$k)*$a), round($y1 + (1-$k)*$a), round($x1 - (1-$k)*$a), round($y1 - (1+$k)*$a), round($x2 + (1+$k)*$a), round($y2 - (1-$k)*$a), round($x2 + (1-$k)*$a), round($y2 + (1+$k)*$a), ); imagefilledpolygon($image, $points, 4, $color); return imagepolygon($image, $points, 4, $color); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function imagelinethick($image, $x1, $y1, $x2, $y2, $color, $thick = 1)\n {\n if ($thick == 1) {\n return imageline($image, $x1, $y1, $x2, $y2, $color);\n }\n $t = $thick / 2 - 0.5;\n if ($x1 == $x2 || $y1 == $y2) {\n return imagefilledrectangle($image, round(min($x1, $x2) - $t), round(min($y1, $y2) - $t), round(max($x1, $x2) + $t), round(max($y1, $y2) + $t), $color);\n }\n $k = ($y2 - $y1) / ($x2 - $x1); //y = kx + q\n $a = $t / sqrt(1 + pow($k, 2));\n $points = array(\n round($x1 - (1+$k)*$a), round($y1 + (1-$k)*$a),\n round($x1 - (1-$k)*$a), round($y1 - (1+$k)*$a),\n round($x2 + (1+$k)*$a), round($y2 - (1-$k)*$a),\n round($x2 + (1-$k)*$a), round($y2 + (1+$k)*$a),\n );\n imagefilledpolygon($image, $points, 4, $color);\n return imagepolygon($image, $points, 4, $color);\n }", "function imagelinethick($image, $x1, $y1, $x2, $y2, $color, $thick = 1)\n{\n if ($thick == 1) {\n return imageline($image, $x1, $y1, $x2, $y2, $color);\n }\n $t = $thick / 2 - 0.5;\n if ($x1 == $x2 || $y1 == $y2) {\n return imagefilledrectangle($image, round(min($x1, $x2) - $t), round(min($y1, $y2) - $t), round(max($x1, $x2) + $t), round(max($y1, $y2) + $t), $color);\n }\n $k = ($y2 - $y1) / ($x2 - $x1); //y = kx + q\n $a = $t / sqrt(1 + pow($k, 2));\n $points = array(\n round($x1 - (1+$k)*$a), round($y1 + (1-$k)*$a),\n round($x1 - (1-$k)*$a), round($y1 - (1+$k)*$a),\n round($x2 + (1+$k)*$a), round($y2 - (1-$k)*$a),\n round($x2 + (1-$k)*$a), round($y2 + (1+$k)*$a),\n );\n imagefilledpolygon($image, $points, 4, $color);\n return imagepolygon($image, $points, 4, $color);\n}", "function drawThickLine($img, $startX, $startY, $endX, $endY, $colour, $thickness) \n{\n\t$angle = (atan2(($startY - $endY), ($endX - $startX))); \n\n\t$dist_x = $thickness * (sin($angle));\n\t$dist_y = $thickness * (cos($angle));\n\t\n\t$p1x = ceil(($startX + $dist_x));\n\t$p1y = ceil(($startY + $dist_y));\n\t$p2x = ceil(($endX + $dist_x));\n\t$p2y = ceil(($endY + $dist_y));\n\t$p3x = ceil(($endX - $dist_x));\n\t$p3y = ceil(($endY - $dist_y));\n\t$p4x = ceil(($startX - $dist_x));\n\t$p4y = ceil(($startY - $dist_y));\n\t\n\t$array = array(0=>$p1x, $p1y, $p2x, $p2y, $p3x, $p3y, $p4x, $p4y);\n\timagefilledpolygon($img, $array, (count($array)/2), $colour);\n}", "function zbx_imageline($image, $x1, $y1, $x2, $y2, $color) {\n\t\timageline($image, round($x1), round($y1), round($x2), round($y2), $color);\n}", "private function drawThickLine($im, $x1, $y1, $x2, $y2, $thickness, $col)\n {\n $dx = $x2 - $x1;\n $dy = $y2 - $y1;\n\n $d = sqrt($dx * $dx + $dy * $dy);\n\n if ($d == 0)\n return;\n\n $dx /= $d;\n $dy /= $d;\n\n $t = $thickness * 0.5;\n\n $p = array();\n\n $p[] = array($x1 + $dy * $t, $y1 - $dx * $t);\n $p[] = array($x2 + $dy * $t, $y2 - $dx * $t);\n $p[] = array($x2 - $dy * $t, $y2 + $dx * $t);\n $p[] = array($x1 - $dy * $t, $y1 + $dx * $t);\n\n $this->drawShadedConvexPolygon($im, $p, $col);\n }", "public function drawLine(int $x1, int $y1, int $x2, int $y2, int $thick = 1, int $r = 255, int $g = 255, int $b = 255, int $alpha = 0) {\r\n $colour = imagecolorallocatealpha($this->image, $r, $g, $b, $alpha);\r\n\r\n if ($thick == 1) {\r\n return imageline($this->image, $x1, $y1, $x2, $y2, $colour);\r\n }\r\n $t = $thick / 2 - 0.5;\r\n if ($x1 == $x2 || $y1 == $y2) {\r\n return imagefilledrectangle($this->image, round(min($x1, $x2) - $t), round(min($y1, $y2) - $t), round(max($x1, $x2) + $t), round(max($y1, $y2) + $t), $colour);\r\n }\r\n $k = ($y2 - $y1) / ($x2 - $x1); //y = kx + q\r\n $a = $t / sqrt(1 + pow($k, 2));\r\n $points = array(\r\n round($x1 - (1 + $k) * $a), round($y1 + (1 - $k) * $a),\r\n round($x1 - (1 - $k) * $a), round($y1 - (1 + $k) * $a),\r\n round($x2 + (1 + $k) * $a), round($y2 - (1 - $k) * $a),\r\n round($x2 + (1 - $k) * $a), round($y2 + (1 + $k) * $a),\r\n );\r\n imagefilledpolygon($this->image, $points, 4, $colour);\r\n imagepolygon($this->image, $points, 4, $colour);\r\n }", "function imagesmoothline ( $image , $x1 , $y1 , $x2 , $y2 , $color )\n {\n $colors = imagecolorsforindex ( $image , $color );\n if ( $x1 == $x2 )\n {\n imageline ( $image , $x1 , $y1 , $x2 , $y2 , $color ); // Vertical line\n }\n else\n {\n $m = ( $y2 - $y1 ) / ( $x2 - $x1 );\n $b = $y1 - $m * $x1;\n if ( abs ( $m ) <= 1 )\n {\n $x = min ( $x1 , $x2 );\n $endx = max ( $x1 , $x2 );\n while ( $x <= $endx )\n {\n $y = $m * $x + $b;\n $y == floor ( $y ) ? $ya = 1 : $ya = $y - floor ( $y );\n $yb = ceil ( $y ) - $y;\n $tempcolors = imagecolorsforindex ( $image , imagecolorat ( $image , $x , floor ( $y ) ) );\n $tempcolors['red'] = $tempcolors['red'] * $ya + $colors['red'] * $yb;\n $tempcolors['green'] = $tempcolors['green'] * $ya + $colors['green'] * $yb;\n $tempcolors['blue'] = $tempcolors['blue'] * $ya + $colors['blue'] * $yb;\n if ( imagecolorexact ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] ) == -1 ) imagecolorallocate ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] );\n imagesetpixel ( $image , $x , floor ( $y ) , imagecolorexact ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] ) );\n $tempcolors = imagecolorsforindex ( $image , imagecolorat ( $image , $x , ceil ( $y ) ) );\n $tempcolors['red'] = $tempcolors['red'] * $yb + $colors['red'] * $ya;\n $tempcolors['green'] = $tempcolors['green'] * $yb + $colors['green'] * $ya;\n $tempcolors['blue'] = $tempcolors['blue'] * $yb + $colors['blue'] * $ya;\n if ( imagecolorexact ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] ) == -1 ) imagecolorallocate ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] );\n imagesetpixel ( $image , $x , ceil ( $y ) , imagecolorexact ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] ) );\n $x ++;\n }\n }\n else\n {\n $y = min ( $y1 , $y2 );\n $endy = max ( $y1 , $y2 );\n while ( $y <= $endy )\n {\n $x = ( $y - $b ) / $m;\n $x == floor ( $x ) ? $xa = 1 : $xa = $x - floor ( $x );\n $xb = ceil ( $x ) - $x;\n $tempcolors = imagecolorsforindex ( $image , imagecolorat ( $image , floor ( $x ) , $y ) );\n $tempcolors['red'] = $tempcolors['red'] * $xa + $colors['red'] * $xb;\n $tempcolors['green'] = $tempcolors['green'] * $xa + $colors['green'] * $xb;\n $tempcolors['blue'] = $tempcolors['blue'] * $xa + $colors['blue'] * $xb;\n if ( imagecolorexact ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] ) == -1 ) imagecolorallocate ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] );\n imagesetpixel ( $image , floor ( $x ) , $y , imagecolorexact ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] ) );\n $tempcolors = imagecolorsforindex ( $image , imagecolorat ( $image , ceil ( $x ) , $y ) );\n $tempcolors['red'] = $tempcolors['red'] * $xb + $colors['red'] * $xa;\n $tempcolors['green'] = $tempcolors['green'] * $xb + $colors['green'] * $xa;\n $tempcolors['blue'] = $tempcolors['blue'] * $xb + $colors['blue'] * $xa;\n if ( imagecolorexact ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] ) == -1 ) imagecolorallocate ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] );\n imagesetpixel ( $image , ceil ( $x ) , $y , imagecolorexact ( $image , $tempcolors['red'] , $tempcolors['green'] , $tempcolors['blue'] ) );\n $y ++;\n }\n }\n }\n }", "function drawLine(&$im, $x1, $y1, $x2, $y2, $c1, $c2)\n\t{\n\t\timageline($im, $x1+1, $y1, $x2+1, $y2, $c1);\n\t\timageline($im, $x1-1, $y1, $x2-1, $y2, $c1);\n\t\timageline($im, $x1, $y1+1, $x2, $y2+1, $c1);\n\t\timageline($im, $x1, $y1-1, $x2, $y2-1, $c1);\n\t\timageline($im, $x1, $y1, $x2, $y2, $c2);\n\t}", "function drawBorder(&$img, &$color, $thickness = 1) \n{\n $x1 = 0; \n $y1 = 0; \n $x2 = ImageSX($img) - 1; \n $y2 = ImageSY($img) - 1; \n\n for($i = 0; $i < $thickness; $i++) \n { \n ImageRectangle($img, $x1++, $y1++, $x2--, $y2--, $color); \n } \n}", "private function _addLines() {\r\n\t\t// Reset line thickness to one pixel.\r\n\t\timagesetthickness($this->_resource, 1);\r\n\t\t\r\n\t\t// Reset foreground color to default. \r\n\t\t$foreground = imagecolorallocate($this->_resource, $this->_fg_color['R'], $this->_fg_color['G'], $this->_fg_color['B']);\r\n\t\t\r\n\t\t// Get dimension of image\r\n\t\t$width = imagesx($this->_resource);\r\n\t\t$height = imagesy($this->_resource);\r\n\t\t\r\n\t\tfor ($i = 0; $i < abs($this->_linesModifier); $i++) {\r\n\t\t\t// Set random foreground color if desired.\r\n\t\t\t($this->useRandomColorLines) ? $foreground = $this->_setRandomColor() : null;\r\n\t\t\t\r\n\t\t\t// Add some randomly colored lines.\r\n\t\t\timageline($this->_resource, 0, rand(0, $height), $width, rand(0, $height), $foreground); // horizontal\r\n\t\t\timageline($this->_resource, rand(0, $width), 0, rand(0, $width), $height, $foreground); // vertical\r\n\t\t}\r\n\t}", "private function getLine(Point $point1, Point $point2, $color, $thickness)\n {\n $line = new SVGLine($point1->x, $point1->y, $point2->x, $point2->y);\n $line->setStyle('stroke', $color);\n $line->setStyle('stroke-width', $thickness);\n $line->setStyle('fill', 'none');\n\n return $line;\n }", "public function createLine($x1, $y1, $x2, $y2){\n imageline($this->img, $x1, $y1, $x2, $y2, $this->color);\t\n }", "abstract protected function renderStroke($image, $params, int $color, float $strokeWidth): void;", "public function setLineWidth($lineWidth = 1) {}", "private function addLines()\n {\n\n $lines = rand(1, 3);\n for ($i = 0; $i < $lines; $i++) {\n imageline($this->imageResource, rand(0, 200), rand(0, -77), rand(0, 200), rand(77, 144), imagecolorallocate($this->imageResource, rand(0, 240), rand(0, 240), rand(0, 240)));\n }\n\n for ($i = 0; $i < 5 - $lines; $i++) {\n imageline($this->imageResource, rand(0, -200), rand(0, 77), rand(200, 400), rand(0, 77), imagecolorallocate($this->imageResource, rand(0, 240), rand(0, 240), rand(0, 240)));\n }\n }", "public function setUnderlineThickness($thickness) {}", "public function setLineWidth($lineWidth) {}", "function draw_average_line($average, $max_w, $min_w, $im){\r\n \r\n global $width, $height, $offset_w, $offset_h;\r\n $red = imagecolorallocate($im, 220, 0, 200);\r\n $y = $height - ($average - $min_w) * $height / ($max_w - $min_w) + $offset_h;\r\n imageline($im, $offset_w, $y, $offset_w + $width, $y, $red); \r\n imagestring($im, 2, $offset_w+$width+10, $y, round($average,2), $red);\r\n}", "function draw_boxes2 ($image, $colorid=0, $offset=0) {\r\n \r\n $color[0]= imagecolorallocate($image, 0, 0, 0);\r\n $color[1]= imagecolorallocate($image, 255, 0, 0);\r\n $color[2]= imagecolorallocate($image, 0, 255, 0);\r\n $color[3]= imagecolorallocate($image, 0, 0, 255);\r\n $color[4]= imagecolorallocate($image, 255, 255, 0);\r\n \r\n $linecolor=$color[$colorid];\r\n \r\n foreach($this->text_blocks as $text_block) {\r\n imageline ( $image , $text_block->ordered['x1'] -$offset, $text_block->ordered['y1'] -$offset, $text_block->ordered['x2'] +$offset, $text_block->ordered['y2'] -$offset, $linecolor);\r\n imageline ( $image , $text_block->ordered['x2'] +$offset, $text_block->ordered['y2'] -$offset, $text_block->ordered['x3'] +$offset, $text_block->ordered['y3']+$offset , $linecolor);\r\n imageline ( $image , $text_block->ordered['x3'] +$offset, $text_block->ordered['y3'] +$offset, $text_block->ordered['x4'] -$offset, $text_block->ordered['y4']+$offset , $linecolor);\r\n imageline ( $image , $text_block->ordered['x4'] -$offset, $text_block->ordered['y4'] +$offset, $text_block->ordered['x1'] -$offset, $text_block->ordered['y1']-$offset , $linecolor);\r\n }\r\n $this->image_drawn=$image;\r\n }", "function setLineStyle($thickness = 4, $dot_size = 7)\n {\n if ($dot_size < 0) {\n $dot_size = 0;\n }\n if ($thickness < 0) {\n $thickness = 0;\n }\n\n if ($dot_size < $thickness) {\n $dot_size = $thickness;\n }\n\n $this->line_thickness = $thickness;\n $this->line_dot_size = $dot_size;\n\n $this->data[$this->series]['line_dot_size'] = $dot_size;\n $this->data[$this->series]['line_thickness'] = $thickness;\n }", "public function line($x1, $y1, $x2, $y2) {}", "public function border(string $color = '#000', int $thickness = 5): Image\n\t{\n\t\t$this->processor->border($color, $thickness);\n\n\t\treturn $this;\n\t}", "function arrow($im, $x1, $y1, $x2, $y2, $alength, $awidth, $color) \n\t{\n\t\tif( $alength > 1 )\n\t\t\tarrow( $im, $x1, $y1, $x2, $y2, $alength - 1, $awidth - 1, $color );\n\n\t\t$distance = sqrt(pow($x1 - $x2, 2) + pow($y1 - $y2, 2));\n\n\t\t$dx = $x2 + ($x1 - $x2) * $alength / $distance;\n\t\t$dy = $y2 + ($y1 - $y2) * $alength / $distance;\n\n\t\t$k = $awidth / $alength;\n\n\t\t$x2o = $x2 - $dx;\n\t\t$y2o = $dy - $y2;\n\t\t\n\t\t$x3 = $y2o * $k + $dx;\n\t\t$y3 = $x2o * $k + $dy;\n\n\t\t$x4 = $dx - $y2o * $k;\n\t\t$y4 = $dy - $x2o * $k;\n\n\t\timageline($im, $x1, $y1, $dx, $dy, $color);\n\t\timageline($im, $x3, $y3, $x4, $y4, $color);\n\t\timageline($im, $x3, $y3, $x2, $y2, $color);\n\t\timageline($im, $x2, $y2, $x4, $y4, $color);\n\t}", "function drawLine($lineRange, $type, $colour = 'D9D9D9') {\n $border_style = array('borders' => array($type =>\n array('style' =>\n \\PHPExcel_Style_Border::BORDER_THIN,\n 'color' => array('rgb' => $colour)\n )));\n $this->objWorksheet->getStyle($lineRange)->applyFromArray($border_style);\n }", "function build_grid($rows, $columns, $image){\r\n\r\n global $width, $height, $offset_w, $offset_h;\r\n \r\n $grid_color = imagecolorallocate($image, 90, 90, 90);\r\n $grid_light_color = imagecolorallocate($image, 120, 120, 120);\r\n // vertical grid\r\n for($i=0;$i<$rows+1;$i++){\r\n $x = $offset_w + $i/$rows*$width;\r\n if($i%10==0){\r\n imageline($image, $x, $offset_h, $x, $offset_h+$height, $grid_light_color);\r\n }else{\r\n imageline($image, $x, $offset_h, $x, $offset_h+$height, $grid_color);\r\n }\r\n }\r\n \r\n for($i=0;$i<$columns+1;$i++){\r\n $y = $offset_h + $i/$columns*$height;\r\n imageline($image, $offset_w, $y, $offset_w+$width, $y, $grid_color);\r\n }\r\n}", "public function generatePictureLine()\n {\n $values = $this->data;\n\n // Get the total number of columns we are going to plot\n $columns = count($values);\n\n // Get the height and width of the diagram itself\n $width = round($this->w*0.75);\n $height = round($this->h*0.75);\n\n //$padding = 0;\n //$padding_l = 5;\n $padding_h = round(($this->w - $width) / 2);\n $padding_v = round(($this->h - $height) / 2); \n\n // Get the width of 1 column\n $column_width = round ($width / $columns) ;\n \n \n // Fill in the background of the image\n imagefilledrectangle($this->im,0,0,$this->w,$this->h,$this->white);\n\n $maxv = 0;\n\n // Calculate the maximum value we are going to plot\n\n foreach($values as $key => $value) \n {\n $maxv = max($value,$maxv); \n }\n \n $this->drawAxesLabels($width, $height, $column_width, $padding_h,$padding_v, $maxv);\n \n //diagram itself\n $i=0;\n //for ($i = 0;$i<count($values);)\n foreach ($values as $key => $value)\n {\n //if ($i==count($values))\n // break;\n $column_height1 = ($height / 100) * (( $value / $maxv) *100);\n $x1 = $i*$column_width + $padding_h + $column_width/2;\n $y1 = $height-$column_height1 + $padding_v;\n $i++;\n if ($i<2)\n {\n $column_height2 = ($height / 100) * (( $value / $maxv) *100);\n $x2 = (($i)*$column_width) + $padding_h + $column_width/2;\n $y2 = $height-$column_height2 + $padding_v;\n }\n if ($i>1)\n imageline($this->im,$x1,$y1,$x2,$y2,$this->color_helper->img_colorallocate($this->im, $this->color_helper->nextColor()));\n $x2 = $x1; \n\t\t$y2 = $y1;\n }\n \n return $this->im;\n }", "function svgline($x1,$y1,$x2,$y2,$xmul,$ymul)\n{\n global $colors;\n $str=\"\";\n $strokew=$xmul*0.1;\n \n $col=$colors[$y1%count($colors)];\n\n if((abs($x2-$x1)>1)&&($y1!=$y2)){\n $str.=\"<line x1='\".($x1*$xmul).\"' y1='\".($y1*$ymul).\"' x2='\".(($x2-1)*$xmul).\"' y2='\".($y1*$ymul).\"' stroke='\".$col.\"' style='stroke-width:\".$strokew.\"' />\";\n $str.=\"<line x1='\".(($x2-1)*$xmul).\"' y1='\".($y1*$ymul).\"' x2='\".($x2*$xmul).\"' y2='\".($y2*$ymul).\"' stroke='\".$col.\"' style='stroke-width:\".$strokew.\"' />\";\n }else{\n $str.=\"<line x1='\".($x1*$xmul).\"' y1='\".($y1*$ymul).\"' x2='\".($x2*$xmul).\"' y2='\".($y2*$ymul).\"' stroke='\".$col.\"' style='stroke-width:\".$strokew.\"' />\";\n }\n\n return($str);\n}", "function line($x1, $y1, $x2, $y2)\r\n {\r\n $this->forcePen();\r\n echo \"$this->_canvas.drawLine($x1, $y1, $x2, $y2);\\n\";\r\n }", "function StrokeFascia($img) {\n\t$r = $this->iRadius;\n\n\t// If the border width > 1 we have no choice but to\n\t// draw to filled circles since GD 1.x at does not support\n\t// a width for a circle. For the special case with a border\n\t// of width==1 it looks aestethically better to just draw a \n\t// normal circle.\n\tif( $this->iBorderWidth > 1 ) {\n\t $this->FilledCircle($img,\n\t $this->xc,$this->yc,$r,\n\t $this->iColor);\n\t $this->FilledCircle($img,\n\t $this->xc,$this->yc,$r-$this->iBorderWidth,\n\t $this->iFillColor);\n\t}\n\telse {\n\t $this->FilledCircle($img,$this->xc,$this->yc,$r,$this->iFillColor);\n\t}\n\t$doarcborder = $this->iBorderWidth == 1 ;\n\n\t// Stroke colored indicator band\n\t$n = count($this->iInd);\n\t$r = $this->iRadius - ($this->iBorderWidth == 1 ? 0 : $this->iBorderWidth);\n\tfor( $i=0; $i<$n; ++$i) {\n\t $ind = $this->iInd[$i];\n\t $as = 360-$this->scale->Translate($ind[0])*180/M_PI;\n\t $ae = 360-$this->scale->Translate($ind[1])*180/M_PI;\n\t $img->PushColor($ind[2]);\n\t $img->FilledArc($this->xc,$this->yc,$r*2,$r*2,$as,$ae);\n\t $img->PopColor();\t\n\t}\n $this->FilledCircle($img,\n\t $this->xc,$this->yc,$this->iCenterAreaWidth*$this->iRadius,\n\t $this->iFillColor); \n\tif( $doarcborder ) \n\t $img->Arc($this->xc,$this->yc, 2*$r, 2*$r, $this->iStyle==ODO_HALF ? 180 : 0 , 360);\n\n\t// Finally draw bottom line if ODO_HALF\n\tif( $this->iStyle == ODO_HALF && $this->iBorderWidth > 0 ) {\n\t $img->SetLineWeight($this->iBorderWidth);\n\t $img->PushColor($this->iColor);\n\t $img->Line($this->xc-$this->iRadius,$this->yc,$this->xc+$this->iRadius,$this->yc);\n\t $img->PopColor();\n\t}\n }", "function Line($x1, $y1, $x2, $y2, $style = null) {\r\n if ($style)\r\n $this->SetLineStyle($style);\r\n parent::Line($x1, $y1, $x2, $y2);\r\n }" ]
[ "0.8573647", "0.8501134", "0.79354656", "0.74994016", "0.72305226", "0.7107917", "0.6801208", "0.66063446", "0.65580803", "0.63726324", "0.60559034", "0.60532975", "0.5880996", "0.58563715", "0.5822639", "0.5817805", "0.57569975", "0.56424606", "0.56362456", "0.5605013", "0.5576288", "0.5561501", "0.5544325", "0.5422016", "0.5367705", "0.53018916", "0.52764344", "0.5257183", "0.5219612", "0.52192175" ]
0.85506845
1
registration_button. This method is used to show connect with loyaltybox button which will open registration / login popup if session is already runnig for logged in user it will show users account details with available loyalty points.
public function registration_button() { $rewardProgrammeName = Mage::getStoreConfig('lbconfig_section/lb_settings_group/reward_programme_name_field'); Lb_Points_Helper_Data::$rewardProgrammeName = $rewardProgrammeName; if(isset($_SESSION['LB_Session'])) { if(!empty($_SESSION['LB_Session'])) { $LB_Session = $_SESSION['LB_Session']; Lb_Points_Helper_Data::debug_log("Rendered session user with his LB Points", true); ?> <div class="connectlbbtn lb-box"> <span class="h2"><?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?></span> <div class="loyaltybox-info-contain"> <?php if(isset($_SESSION['LB_Session']['totalRedeemPoints'])) $remainingPoints = $LB_Session['lb_points'] - $_SESSION['LB_Session']['totalRedeemPoints']; else $remainingPoints = $LB_Session['lb_points']; ?> <?php echo "<strong>Hi ".$LB_Session['Customer Name']."</strong> | <a id='lbLogout' href='javascript:void(0);'>Logout(".Lb_Points_Helper_Data::$rewardProgrammeName.")</a></br>You have ".$remainingPoints." Points in your <strong>".Lb_Points_Helper_Data::$rewardProgrammeName."</strong> account."; ?> </div> <div class="lbMsg"></div> </div> <?php } else { Lb_Points_Helper_Data::debug_log("Rendered Connect with Loyalty Box button", true); ?> <div class="connectlbbtn registrationBtn lb-box"> <button class="button btn-cart" onclick="return showForm('popup_form_registration')" title="Connect with <?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?>" type="button"><span><span>Connect with <?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?></span></span></button> <div class="lbMsg"></div> </div> <script type="text/javascript"> function showForm(id){ win = new Window({ title: "Connect with Loyalty Box", zIndex:3000, destroyOnClose: true, recenterAuto:true, resizable: false, width:400, height:'auto', minimizable: true, maximizable: false, draggable: true}); win.setContent(id, false, false); win.showCenter(); } </script> <?php Lb_Points_Helper_Data::debug_log("End: Rendered Connect with Loyalty Box button", true); } } else { Lb_Points_Helper_Data::debug_log("Rendered Connect with Loyalty Box button", true); ?> <div class="connectlbbtn registrationBtn lb-box"> <button class="button btn-cart" onclick="return showForm('popup_form_registration')" title="Connect with <?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?>" type="button"><span><span>Connect with <?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?></span></span></button> <div class="lbMsg"></div> </div> <script type="text/javascript"> function showForm(id){ win = new Window({ title: "Connect with <?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?>", zIndex:3000, destroyOnClose: true, recenterAuto:true, resizable: false, width:400, height:'auto', minimizable: true, maximizable: false, draggable: true}); win.setContent(id, false, false); win.showCenter(); } </script> <?php Lb_Points_Helper_Data::debug_log("End: Rendered Connect with Loyalty Box button", true); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function registration_popup() {\n ?>\n <div style=\"display:none;\">\n <div id=\"popup_form_registration\" class=\"main\">\n <div class=\"col-main\" style=\"float: none;width:100%;\">\n <div class=\"page-title\">\n <h1>Connect with <?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?></h1>\n </div>\n <div id=\"registerLB\">\n <form id=\"registrationForm\">\n <div class=\"fieldset\">\n <h2 class=\"legend\">Registration</h2>\n <p class=\"required\">* Required Fields</p>\n <div id=\"formRegisterSuccess\" ></div>\n <ul class=\"form-list\">\n <li class=\"fields\">\n <div class=\"field\">\n <label class=\"required\" for=\"name\"><em>*</em>Name</label>\n <div class=\"input-box\">\n <input type=\"text\" class=\"input-text required-entry\" value=\"\" title=\"Name\" id=\"name\" name=\"name\">\n </div>\n </div>\n <div class=\"field\">\n <label class=\"required\" for=\"email\"><em>*</em>Email Address</label>\n <div class=\"input-box\">\n <input type=\"email\" spellcheck=\"false\" autocorrect=\"off\" autocapitalize=\"off\" class=\"input-text required-entry validate-email\" value=\"\" title=\"Email\" id=\"email\" name=\"email\">\n </div>\n </div>\n </li>\n <li>\n <label class=\"required\" for=\"phonenumber\"><em>*</em>Phone number</label>\n <div class=\"input-box\">\n <input type=\"tel\" class=\"input-text required-entry validate-number IsValidCellNumber\" value=\"\" title=\"Phone number\" id=\"phonenumber\" name=\"phonenumber\">\n </div>\n </li>\n </ul>\n </div>\n <div class=\"buttons-set lb-btn-register\">\n <button class=\"button\" title=\"Submit\" type=\"submit\"><span><span>Submit</span></span></button>\n </div>\n <div class=\"lb-links\">\n <div >\n Or <a href=\"javascript:void(0);\" id=\"lnkLBLogin\" style=\"color:burlywood;\">login</a> if already registered.\n </div>\n <div>\n download our <a href=\"javascript:void(0);\" id=\"lnkDownloadApp\" style=\"color:burlywood;\">mobile application</a>\n </div>\n </div>\n </form>\n </div>\n <div style=\"display:none;\" id=\"loginLB\">\n <form id=\"loginForm\">\n <div class=\"fieldset\">\n <h2 class=\"legend\">Login</h2>\n <p class=\"required\">* Required Fields</p>\n <div id=\"formLoginLowestSuccess\" ></div>\n <ul class=\"form-list\">\n <li>\n <label class=\"required\" for=\"txtCardNumber\"><em>*</em>Card Number / Phone number / OTP</label>\n <div class=\"input-box\">\n <input type=\"tel\" class=\"input-text required-entry validate-number IsValidCartNumber\" value=\"\" title=\"Telephone\" id=\"txtCardNumber\" name=\"txtCardNumber\" >\n </div>\n </li>\n </ul>\n </div>\n <div class=\"buttons-set lb-btn-register\">\n <button class=\"button\" title=\"Submit\" type=\"submit\"><span><span>Submit</span></span></button>\n </div>\n <div class=\"lb-links\">\n <div>\n Or <a href=\"javascript:void(0);\" id=\"lnkLBRegister\" style=\"color:burlywood;\">click here</a> to register.\n </div>\n <div>\n download our <a href=\"javascript:void(0);\" id=\"lnkDownloadApp\" style=\"color:burlywood;\">mobile application</a>\n </div>\n </div>\n </form>\n </div>\n <span id=\"formLoader\" >\n <img src=\"<?php echo $this->getSkinUrl(\"images/opc-ajax-loader.gif\") ?>\">\n </span>\n </div>\n </div>\n </div>\n <style>\n .frm_error{\n color:red;\n font-size: 13px;\n margin: 5px 0 0;\n }\n .frm_success{\n color:green;\n font-size: 13px;\n margin: 5px 0 0;\n }\n #formLoader{\n display:none;\n }\n .lb-btn-register{\n margin-bottom: 5px;\n }\n .lb-btn-register::after {\n clear: none;\n content: \"\";\n display: table;\n }\n .lb-links{\n color: #636363;\n font-family: \"Helvetica Neue\",Verdana,Arial,sans-serif;\n font-size: 13px;\n line-height: 1.5;\n margin-top: -10px;\n }\n \n @media screen and (max-width: 479px) {\n .lb-btn-register::after {\n clear: both;\n content: \"\";\n display: table;\n }\n }\n #popup_form_registration {\n width: auto;\n }\n .connectlbbtn.lb-box {\n clear: both;\n padding:5px;\n }\n\n .registrationBtn h2 {\n font-size: 12px;\n font-weight: bold;\n margin: 0 0 5px;\n }\n \n #formRegisterSuccess{\n font-size: 13px;\n margin: 5px 0 0;\n color: green;\n }\n \n .dialog_content {\n background-color: #F4F4F4;\n color: #636363;\n font-family: Tahoma,Arial,sans-serif;\n font-size: 10px;\n overflow: auto;\n padding-bottom: 5px!important;\n }\n \n .redeem_lbpoints input {\n margin-bottom: 5px;\n }\n .lb-redeem-wrapper{\n margin-top: 5px;\n display: none;\n }\n <?php if(strpos($_SERVER['REQUEST_URI'], '/checkout/cart/') !== false){?>\n .registrationBtn{\n background-color: #f4f4f4;\n border: 1px solid #cccccc;\n padding: 10px;\n margin-bottom: 20px;\n }\n <?php }?>\n \n </style>\n <script type=\"text/javascript\">\n \n jQuery(\"#loginLB\").hide();\n jQuery(\"#lnkLBLogin\").click(function(){\n jQuery(\"#loginLB\").show();\n jQuery(\"#registerLB\").hide();\n jQuery(\".dialog_content\").css('height','auto');\n });\n\n jQuery(\"#lnkLBRegister\").click(function(){\n jQuery(\"#loginLB\").hide();\n jQuery(\"#registerLB\").show();\n jQuery(\".dialog_content\").css('height','auto');\n });\n \n Validation.add('IsValidCartNumber', 'Only 10 or 15 digits are allowed.', function(v) {\n return (v.length == 10 || v.length == 15); // || /^\\s+$/.test(v));\n }); \n \n Validation.add('IsValidCellNumber', 'Only 10 digits are allowed.', function(v) {\n return (v.length == 10); // || /^\\s+$/.test(v));\n }); \n \n \n //var dataForm = new VarienForm('lowest-form-validate', true);\n var formId = 'registrationForm';\n var myForm = new VarienForm(formId, true);\n var handleSubmit = true;\n function doAjax() {\n var postUrl = \"<?php echo Mage::getBaseUrl() . 'lb/index/register' ?>\";\n jQuery(\".dialog_content\").css('height','auto');\n if (myForm.validator.validate()) {\n var txtName = jQuery(\"#name\");\n var txtEmail = jQuery(\"#email\");\n var txtPhoneNumber = jQuery(\"#phonenumber\");\n var tips = jQuery(\"#formRegisterSuccess\");\n tips.text('');\n var data = {\n 'txtName': txtName.val(),\n 'txtEmail': txtEmail.val(),\n 'txtPhoneNumber': txtPhoneNumber.val()\n };\n if(handleSubmit){\n handleSubmit = false;\n jQuery(\"#formLoader\").show();\n jQuery.post(postUrl, data, function(response) {\n handleSubmit = true;\n if(response.status == '1'){\n jQuery(\"#formLoader\").hide();\n tips.text(response.message).addClass( \"frm_success\" );\n txtName.val('');\n txtEmail.val('');\n txtPhoneNumber.val('');\n jQuery(\".dialog_close\").trigger('click');\n window.location.reload();\n }\n else{\n tips.text(response.message).addClass( \"frm_error\" );\n jQuery(\"#formLoader\").hide();\n }\n },'JSON');\n }\n }\n }\n // REGISTRATION CALL BACK\n new Event.observe('registrationForm', 'submit', function(e){\n e.stop();\n doAjax();\n });\n \n \n // login js\n var loginFormId = 'loginForm';\n var loginForm = new VarienForm(loginFormId, true);\n jQuery(\"#loginForm button\").click(function(){\n var postUrl = \"<?php echo Mage::getBaseUrl() . 'lb/index/login' ?>\";\n var txtCardNumber = jQuery(\"#txtCardNumber\").val();\n jQuery(\".dialog_content\").css('height','auto');\n if (loginForm.validator.validate()) {\n jQuery(\"#formLoader\").show();\n jQuery.post(postUrl,{'txtCardNumber':txtCardNumber}, function(response) {\n if(response.status == '1'){\n jQuery(\"#formLoader\").hide();\n jQuery(\".dialog_close\").trigger('click');\n Element.show('formLoginLowestSuccess');\n jQuery(\"#formLoginLowestSuccess\").html(response.message).addClass( \"frm_success\" );\n jQuery(\".connectlbbtn\").html(response.replaceBtn);\n window.location.reload();\n }\n else{\n jQuery(\"#formLoader\").hide();\n Element.show('formLoginLowestSuccess');\n jQuery(\"#formLoginLowestSuccess\").html(response.message).addClass( \"frm_error\" );\n }\n },'JSON');\n }\n return false;\n });\n \n \n // Add connect with loyaltybox button to right side bar\n /*if(jQuery(\".cart-forms\").length == 1)\n {\n var btnHtml = jQuery(\".connectlbbtn\").html();\n jQuery(\".connectlbbtn\").html('');\n jQuery(\".cart-forms\").prepend(\"<div class='discount connectlbbtn'>\"+btnHtml+\"</div>\");\n\n }*/\n // End : Add connect with loyaltybox button to right side bar.\n \n // LOGOUT CALL BACK\n jQuery(\"#lbLogout\").click(function(){\n var postUrl = \"<?php echo Mage::getBaseUrl() . 'lb/index/logout' ?>\";\n jQuery.post(postUrl, function(response) {\n if(response.status == '1'){\n window.location.reload();\n }\n else{\n jQuery(\"lbMsg\").html(response.message).addClass( \"frm_error\" );\n }\n },'JSON');\n });\n // end of logout\n //end of javascript code\n <?php if(strpos($_SERVER['REQUEST_URI'], '/checkout/cart/') !== false){?>\n jQuery(\".connectlbbtn\").parent().addClass('cart-forms');\n <?php }else{?>\n var regBox = jQuery(\".connectlbbtn\");\n jQuery(\".add-to-cart\").append(regBox);\n jQuery(\".add-to-cart\").css(\"clear\",\"both\");\n <?php }?>\n </script>\n <?php \n }", "private function show_connect_button() {\n\t\t?>\n\t\t<div class=\"text-center wp-core-ui rank-math-ui\" style=\"margin-top: 30px;\">\n\t\t\t<button type=\"submit\" class=\"button button-primary button-animated\" name=\"rank_math_activate\"><?php echo esc_attr__( 'Connect Your Account', 'rank-math' ); ?></button>\n\t\t</div>\n\t\t<?php\n\t}", "public function displayGoogleRegisterLink()\n {\n if ($this->use_google_login === true) {\n $client = $this->newGoogleClient($this->getGoogleOptions());\n $auth_url = $client->createAuthUrl();\n \n if (isset($auth_url)) {\n echo '<p class=\"google-register oauth-login\"><a href=\"'.$auth_url.'\">'.__('Register with Google', 'okv-oauth').'</a></p>';\n }\n \n if (isset($_REQUEST['error'])) {\n $this->googleRegisterError($_REQUEST['error'], true);\n return false;\n }\n \n if (isset($_COOKIE['google_access_token']) && !empty($_COOKIE['google_access_token'])) {\n $check_user_result = $this->googleRegisterCheckUser();\n if ($check_user_result === false) {\n return false;\n } elseif (is_array($check_user_result)) {\n // check user passed. now it is ready to prepare register form.\n echo '<script>'.\"\\n\";\n echo 'var okvoauth_google_register_got_code = true;'.\"\\n\";\n echo 'var okvoauth_google_wp_user_login = \\''.(isset($check_user_result['wp_user_login']) ? $check_user_result['wp_user_login'] : '').'\\';'.\"\\n\";\n echo 'var okvoauth_google_wp_user_email = \\''.(isset($check_user_result['wp_user_email']) ? $check_user_result['wp_user_email'] : '').'\\';'.\"\\n\";\n echo 'var okvoauth_google_wp_user_avatar = \\''.(isset($check_user_result['wp_user_avatar']) ? $check_user_result['wp_user_avatar'] : '').'\\';'.\"\\n\";\n echo '</script>'.\"\\n\";\n }\n unset($check_user_result);\n }\n \n unset($auth_url, $client);\n return true;\n } else {\n return false;\n }\n }", "function dp_signup_button() { \n\tif(!is_user_logged_in() && get_option('users_can_register') && get_option('dp_header_signup')) {\n\t\techo '<a class=\"btn btn-green btn-signup\" href=\"'.site_url('wp-login.php?action=register', 'login').'\">'.__('Sign up', 'dp').'</a>';\n\t}\n\t\n\treturn;\n}", "public function registration()\n {\n $view = new View('login_registration');\n $view->title = 'Bilder-DB';\n $view->heading = 'Registration';\n $view->display();\n }", "public static function my_account_links_newButton()\n {\n //let other method do all the checks and stuff\n return self::geoCart_cartDisplay_newButton(true);\n }", "public function display_account_register( ){\n\t\tif( $this->is_page_visible( \"register\" ) ){\n\t\t\tif( file_exists( WP_PLUGIN_DIR . '/wp-easycart-data/design/layout/' . get_option( 'ec_option_base_layout' ) . '/ec_account_register.php' ) )\t\n\t\t\t\tinclude( WP_PLUGIN_DIR . '/wp-easycart-data/design/layout/' . get_option( 'ec_option_base_layout' ) . '/ec_account_register.php' );\n\t\t\telse\n\t\t\t\tinclude( WP_PLUGIN_DIR . \"/\" . EC_PLUGIN_DIRECTORY . '/design/layout/' . get_option( 'ec_option_latest_layout' ) . '/ec_account_register.php' );\n\t\t}\n\t}", "public function showRegistrationForm()\n {\n return view('skins.' . config('pilot.SITE_SKIN') . '.auth.register');\n }", "public function RegistrationUnderApproval() {\n $this->Render();\n }", "public function actionRegister()\n\t{\n\t\tUtilities::updateCallbackURL();\n\t\t$this->render('registration');\n\t}", "function show_register_message_on_login()\n {\n echo '<div>Si no tienes cuenta <a href=\"'.get_permalink(ConstantBD::BD_POST_SIGNUP).'\">registrate</a> en un solo paso. </div>';\n }", "public function gluu_sso_form()\n {\n // add taskbar button\n\n $boxTitle = html::div(array('id' => \"prefs-title\", 'class' => 'boxtitle'), $this->gettext('hederGluu'));\n $this->include_stylesheet('GluuOxd_Openid/css/gluu-oxd-css.css');\n $this->include_script('GluuOxd_Openid/js/scope-custom-script.js');\n\n $tableHtml=$this->admin_html();\n unset($_SESSION['message_error']);\n unset($_SESSION['message_success']);\n return html::div(array('class' => ''),$boxTitle . html::div(array('class' => \"boxcontent\"), $tableHtml ));\n }", "public function signup(){\n \n $this->data[\"title_tag\"]=\"Lobster | Accounts | Signup\";\n \n $this->view(\"accounts/signup\",$this->data);\n }", "public function regNewCommercialUser()\n {\n $this->view('Registration/commercial_user_registration');\n }", "function display() {\n\n\t\t$model = $this->getModel('provider');\n\n\t\t$usersConfig = &JComponentHelper::getParams( 'com_users' );\n\t\tif (!$usersConfig->get( 'allowUserRegistration' )) {\n\t\t\tJError::raiseError( 403, JText::_( 'Access Forbidden' ));\n\t\t\treturn;\n\t\t}\n\n\t\t$user \t=& JFactory::getUser();\n\n\t\tif ( $user->get('guest')) {\n\t\t\tJRequest::setVar('view', 'provider_request');\n\t\t} else {\n\t\t\t$this->setredirect('index.php?option=com_users&task=edit',JText::_('You are already registered.'));\n\t\t}\n\n\n if( !JRequest::getVar( 'view' )) {\n\t\t JRequest::setVar('view', 'provider_request' );\n }\n\n\t\t$view = $this->getView( 'provider_request', 'html' );\n\t\t$view->setModel( $this->getModel( 'provider', 'providerModel' ), true );\n\t\t$view->display();\n\t\t//parent::display();\n\t}", "public function activationAction()\n {\n View::renderBlade('register/activation');\n }", "function show_add_button(){\n if($this->session->system_admin){\n return true;\n }\n \n }", "function DisplayLoginPopup()\n\t{\n\t\t$this->LoadPage('generic_popup');\n\t\t$this->Page->SetName(\"Login\");\n\t\t$this->Page->AddObject('UserLogin', COLUMN_ONE, HTML_CONTEXT_POPUP);\n\t\treturn TRUE;\n\t}", "public function register_show_2()\n {\n return view('fontend.user.verify');\n }", "public function auth_modal()\n\t{\n get_template_part('bbpress/auth-modal'); \n\t}", "public function partner_registration() {\n $logged_in_user_details = $this->session->userdata('logged_in_user_data');\n if ($logged_in_user_details->is_logged_in == 1) {\n $data['title'] = \"Zinguplife Customer Support|Partner Registration\";\n $data['logged_in_user_details'] = $logged_in_user_details;\n $data['url'] = 'customer_support/vendors';\n $data['services'] = $this->Cs_vendor->get_business_services();\n $data['main_content'] = 'admin/cs/partner_registration';\n $data['locations'] = $this->Cs_vendor->get_locations();\n $this->load->view('admin/includes/template', $data);\n } else {\n $this->session->set_flashdata('login_required_message', 'Please login to continue !!!.');\n redirect(\"/admin\");\n }\n }", "public function register() {\n\t\t$result = $this->Member_Model->get_max_id();\n\t\t$current_next_id = $result + 1;\n\n\t\t$this->breadcrumbs->set(['Register' => 'members/register']);\n\t\t$data['api_reg_url'] = base64_encode(FINGERPRINT_API_URL . \"?action=register&member_id=$current_next_id\");\n\n\t\tif ($this->session->userdata('current_finger_data')) {\n\t\t\t$this->session->unset_userdata('current_finger_data');\n\t\t}\n\n\t\t$this->render('register', $data);\n\t}", "public function AddCheckboxToBpRegistrationPage()\n\t{\n\t\t$bp_checked = get_option($this->GrOptionDbPrefix . 'bp_registration_checked');\n\t\t?>\n\t\t<div class=\"gr_bp_register_checkbox\">\n\t\t\t<label>\n\t\t\t\t<input class=\"input-checkbox GR_bpbox\" value=\"1\" id=\"gr_bp_checkbox\" type=\"checkbox\"\n\t\t\t\t name=\"gr_bp_checkbox\" <?php if ($bp_checked)\n\t\t\t\t{ ?> checked=\"checked\"<?php } ?> />\n\t\t\t\t<span\n\t\t\t\t\tclass=\"gr_bp_register_label\"><?php echo get_option($this->GrOptionDbPrefix . 'bp_registration_label'); ?></span>\n\t\t\t</label>\n\t\t</div>\n\t\t<?php\n\t}", "function NeedToRegister(){\n \t$HTML = '';\n\n \t$HTML .= _JNEWS_REGISTER_REQUIRED . '<br />';\n\n\t\t $text = _NO_ACCOUNT.\" \";\n\t\t if ( isset( $GLOBALS[JNEWS.'cb_integration'] ) && $GLOBALS[JNEWS.'cb_integration'] ) {\n\t\t\t $linkme = 'option=com_comprofiler&task=registers';\n\t\t } else {\n\t\t \tif( version_compare(JVERSION,'1.6.0','>=') ){ //j16\n\t\t \t\t$linkme = 'option=com_users&view=registration';\n\t\t \t} else {\n\t\t \t\t$linkme = 'option=com_user&task=register';\n\t\t \t}\n\t\t }\n\n\t\t $linkme = jNews_Tools::completeLink($linkme,false);\n\n\t\t $text .= '<a href=\"'. $linkme.'\">';\n\t\t $text .= _CREATE_ACCOUNT.\"</a>\";\n\t\t $HTML .= jnews::printLine( $this->linear, $text );\n\n \treturn $HTML;\n }", "public function logInRegisterPage();", "public function showSignUpForm() {\n if(!config('springintoaction.signup.allow')) {\n return view('springintoaction::frontend.signup_closed');\n }\n\n return view('springintoaction::frontend.signup');\n }", "public function course_bank_conncheck() {\n global $CFG;\n\n $html = $this->box_start();\n $html .= $this->heading(\n get_string('connchecktitle', 'tool_coursebank'),\n 3\n );\n // Hide the button, and then show it with js if it is enabled.\n $html .= html_writer::start_tag('div',\n array('class' => 'conncheckbutton-div hide')\n );\n $buttonattr = array(\n 'id' => 'conncheck',\n 'type' => 'button',\n 'class' => 'conncheckbutton',\n 'value' => get_string('conncheckbutton', 'tool_coursebank')\n );\n $html .= html_writer::tag('input', '', $buttonattr);\n $html .= html_writer::end_tag('div');\n\n // Display ordinary link, and hide it with js if it is enabled.\n $html .= html_writer::start_tag('div',\n array('class' => 'conncheckurl-div')\n );\n $nonjsparams = array('action' => 'conncheck');\n $nonjsurl = new moodle_url(\n $CFG->wwwroot.'/admin/tool/coursebank/check_connection.php',\n $nonjsparams\n );\n $html .= html_writer::link(\n $nonjsurl,\n get_string('conncheckbutton', 'tool_coursebank'),\n array('class' => 'conncheckurl')\n );\n $html .= html_writer::end_tag('div');\n\n $html .= html_writer::start_tag('div',\n array('class' => 'check-div hide'));\n $imgattr = array(\n 'class' => 'hide',\n 'src' => $CFG->wwwroot.'/pix/i/loading_small.gif',\n 'alt' => get_string('checking', 'tool_coursebank')\n );\n\n $html .= html_writer::empty_tag('img', $imgattr);\n $inputattr = array(\n 'type' => 'hidden',\n 'name' => 'wwwroot',\n 'value' => $CFG->wwwroot,\n 'class' => 'wwwroot'\n );\n $html .= html_writer::tag('input', '', $inputattr);\n $html .= html_writer::end_tag('div');\n\n // Success notification.\n $urltarget = isset($this->get_config()->url) ? $this->get_config()->url : null;\n $html .= $this->course_bank_check_notification(\n 'conncheck',\n 'success',\n get_string('connchecksuccess', 'tool_coursebank', $urltarget)\n );\n\n // Failure notification.\n $html .= $this->course_bank_check_notification(\n 'conncheck',\n 'fail',\n get_string('conncheckfail', 'tool_coursebank', $urltarget)\n );\n\n $html .= $this->box_end();\n\n return $html;\n }", "function _renren_login_form() {\n global $RR_config, $user;\n //$backurl = url('user', array('absolute' => true));\n $xd_receiver = url(\"user/renren_receiver\", array('absolute' => true));\n return\n '<xn:login-button autologoutlink=\"true\"></xn:login-button>\n <script type=\"text/javascript\" src=\"http://static.connect.renren.com/js/v1.0/FeatureLoader.jsp\"></script>\n <script type=\"text/javascript\">\n XN_RequireFeatures([\"EXNML\"], function()\n {\n XN.Main.init(\"'.$RR_config->APIKey.'\", \"'.$xd_receiver.'\");\n });\n </script>';\n}", "public function showRegistrationForm()\n {\n return redirect()->route('frontend.account.register');\n //return theme_view('account.register');\n }", "public function signup() {\n $this->template->content = View::instance(\"v_users_signup\");\n \n # Render the view\n echo $this->template;\n }" ]
[ "0.67709357", "0.67042327", "0.62745816", "0.6193503", "0.6124903", "0.5984627", "0.59040767", "0.58807456", "0.58584887", "0.58158845", "0.58122087", "0.57709104", "0.57471806", "0.5720803", "0.5713735", "0.5680387", "0.56651187", "0.56461066", "0.56364346", "0.5614515", "0.55509645", "0.554328", "0.5530374", "0.55265224", "0.55246896", "0.5494878", "0.54826546", "0.5464126", "0.54507375", "0.54370403" ]
0.82411844
0
registration_popup. This method is used to render registration/login dialog box.
public function registration_popup() { ?> <div style="display:none;"> <div id="popup_form_registration" class="main"> <div class="col-main" style="float: none;width:100%;"> <div class="page-title"> <h1>Connect with <?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?></h1> </div> <div id="registerLB"> <form id="registrationForm"> <div class="fieldset"> <h2 class="legend">Registration</h2> <p class="required">* Required Fields</p> <div id="formRegisterSuccess" ></div> <ul class="form-list"> <li class="fields"> <div class="field"> <label class="required" for="name"><em>*</em>Name</label> <div class="input-box"> <input type="text" class="input-text required-entry" value="" title="Name" id="name" name="name"> </div> </div> <div class="field"> <label class="required" for="email"><em>*</em>Email Address</label> <div class="input-box"> <input type="email" spellcheck="false" autocorrect="off" autocapitalize="off" class="input-text required-entry validate-email" value="" title="Email" id="email" name="email"> </div> </div> </li> <li> <label class="required" for="phonenumber"><em>*</em>Phone number</label> <div class="input-box"> <input type="tel" class="input-text required-entry validate-number IsValidCellNumber" value="" title="Phone number" id="phonenumber" name="phonenumber"> </div> </li> </ul> </div> <div class="buttons-set lb-btn-register"> <button class="button" title="Submit" type="submit"><span><span>Submit</span></span></button> </div> <div class="lb-links"> <div > Or <a href="javascript:void(0);" id="lnkLBLogin" style="color:burlywood;">login</a> if already registered. </div> <div> download our <a href="javascript:void(0);" id="lnkDownloadApp" style="color:burlywood;">mobile application</a> </div> </div> </form> </div> <div style="display:none;" id="loginLB"> <form id="loginForm"> <div class="fieldset"> <h2 class="legend">Login</h2> <p class="required">* Required Fields</p> <div id="formLoginLowestSuccess" ></div> <ul class="form-list"> <li> <label class="required" for="txtCardNumber"><em>*</em>Card Number / Phone number / OTP</label> <div class="input-box"> <input type="tel" class="input-text required-entry validate-number IsValidCartNumber" value="" title="Telephone" id="txtCardNumber" name="txtCardNumber" > </div> </li> </ul> </div> <div class="buttons-set lb-btn-register"> <button class="button" title="Submit" type="submit"><span><span>Submit</span></span></button> </div> <div class="lb-links"> <div> Or <a href="javascript:void(0);" id="lnkLBRegister" style="color:burlywood;">click here</a> to register. </div> <div> download our <a href="javascript:void(0);" id="lnkDownloadApp" style="color:burlywood;">mobile application</a> </div> </div> </form> </div> <span id="formLoader" > <img src="<?php echo $this->getSkinUrl("images/opc-ajax-loader.gif") ?>"> </span> </div> </div> </div> <style> .frm_error{ color:red; font-size: 13px; margin: 5px 0 0; } .frm_success{ color:green; font-size: 13px; margin: 5px 0 0; } #formLoader{ display:none; } .lb-btn-register{ margin-bottom: 5px; } .lb-btn-register::after { clear: none; content: ""; display: table; } .lb-links{ color: #636363; font-family: "Helvetica Neue",Verdana,Arial,sans-serif; font-size: 13px; line-height: 1.5; margin-top: -10px; } @media screen and (max-width: 479px) { .lb-btn-register::after { clear: both; content: ""; display: table; } } #popup_form_registration { width: auto; } .connectlbbtn.lb-box { clear: both; padding:5px; } .registrationBtn h2 { font-size: 12px; font-weight: bold; margin: 0 0 5px; } #formRegisterSuccess{ font-size: 13px; margin: 5px 0 0; color: green; } .dialog_content { background-color: #F4F4F4; color: #636363; font-family: Tahoma,Arial,sans-serif; font-size: 10px; overflow: auto; padding-bottom: 5px!important; } .redeem_lbpoints input { margin-bottom: 5px; } .lb-redeem-wrapper{ margin-top: 5px; display: none; } <?php if(strpos($_SERVER['REQUEST_URI'], '/checkout/cart/') !== false){?> .registrationBtn{ background-color: #f4f4f4; border: 1px solid #cccccc; padding: 10px; margin-bottom: 20px; } <?php }?> </style> <script type="text/javascript"> jQuery("#loginLB").hide(); jQuery("#lnkLBLogin").click(function(){ jQuery("#loginLB").show(); jQuery("#registerLB").hide(); jQuery(".dialog_content").css('height','auto'); }); jQuery("#lnkLBRegister").click(function(){ jQuery("#loginLB").hide(); jQuery("#registerLB").show(); jQuery(".dialog_content").css('height','auto'); }); Validation.add('IsValidCartNumber', 'Only 10 or 15 digits are allowed.', function(v) { return (v.length == 10 || v.length == 15); // || /^\s+$/.test(v)); }); Validation.add('IsValidCellNumber', 'Only 10 digits are allowed.', function(v) { return (v.length == 10); // || /^\s+$/.test(v)); }); //var dataForm = new VarienForm('lowest-form-validate', true); var formId = 'registrationForm'; var myForm = new VarienForm(formId, true); var handleSubmit = true; function doAjax() { var postUrl = "<?php echo Mage::getBaseUrl() . 'lb/index/register' ?>"; jQuery(".dialog_content").css('height','auto'); if (myForm.validator.validate()) { var txtName = jQuery("#name"); var txtEmail = jQuery("#email"); var txtPhoneNumber = jQuery("#phonenumber"); var tips = jQuery("#formRegisterSuccess"); tips.text(''); var data = { 'txtName': txtName.val(), 'txtEmail': txtEmail.val(), 'txtPhoneNumber': txtPhoneNumber.val() }; if(handleSubmit){ handleSubmit = false; jQuery("#formLoader").show(); jQuery.post(postUrl, data, function(response) { handleSubmit = true; if(response.status == '1'){ jQuery("#formLoader").hide(); tips.text(response.message).addClass( "frm_success" ); txtName.val(''); txtEmail.val(''); txtPhoneNumber.val(''); jQuery(".dialog_close").trigger('click'); window.location.reload(); } else{ tips.text(response.message).addClass( "frm_error" ); jQuery("#formLoader").hide(); } },'JSON'); } } } // REGISTRATION CALL BACK new Event.observe('registrationForm', 'submit', function(e){ e.stop(); doAjax(); }); // login js var loginFormId = 'loginForm'; var loginForm = new VarienForm(loginFormId, true); jQuery("#loginForm button").click(function(){ var postUrl = "<?php echo Mage::getBaseUrl() . 'lb/index/login' ?>"; var txtCardNumber = jQuery("#txtCardNumber").val(); jQuery(".dialog_content").css('height','auto'); if (loginForm.validator.validate()) { jQuery("#formLoader").show(); jQuery.post(postUrl,{'txtCardNumber':txtCardNumber}, function(response) { if(response.status == '1'){ jQuery("#formLoader").hide(); jQuery(".dialog_close").trigger('click'); Element.show('formLoginLowestSuccess'); jQuery("#formLoginLowestSuccess").html(response.message).addClass( "frm_success" ); jQuery(".connectlbbtn").html(response.replaceBtn); window.location.reload(); } else{ jQuery("#formLoader").hide(); Element.show('formLoginLowestSuccess'); jQuery("#formLoginLowestSuccess").html(response.message).addClass( "frm_error" ); } },'JSON'); } return false; }); // Add connect with loyaltybox button to right side bar /*if(jQuery(".cart-forms").length == 1) { var btnHtml = jQuery(".connectlbbtn").html(); jQuery(".connectlbbtn").html(''); jQuery(".cart-forms").prepend("<div class='discount connectlbbtn'>"+btnHtml+"</div>"); }*/ // End : Add connect with loyaltybox button to right side bar. // LOGOUT CALL BACK jQuery("#lbLogout").click(function(){ var postUrl = "<?php echo Mage::getBaseUrl() . 'lb/index/logout' ?>"; jQuery.post(postUrl, function(response) { if(response.status == '1'){ window.location.reload(); } else{ jQuery("lbMsg").html(response.message).addClass( "frm_error" ); } },'JSON'); }); // end of logout //end of javascript code <?php if(strpos($_SERVER['REQUEST_URI'], '/checkout/cart/') !== false){?> jQuery(".connectlbbtn").parent().addClass('cart-forms'); <?php }else{?> var regBox = jQuery(".connectlbbtn"); jQuery(".add-to-cart").append(regBox); jQuery(".add-to-cart").css("clear","both"); <?php }?> </script> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showRegistrationForm()\n {\n return view('skins.' . config('pilot.SITE_SKIN') . '.auth.register');\n }", "function DisplayLoginPopup()\n\t{\n\t\t$this->LoadPage('generic_popup');\n\t\t$this->Page->SetName(\"Login\");\n\t\t$this->Page->AddObject('UserLogin', COLUMN_ONE, HTML_CONTEXT_POPUP);\n\t\treturn TRUE;\n\t}", "public function RegistrationUnderApproval() {\n $this->Render();\n }", "public function showRegistrationForm()\n {\n abort_unless(config('access.registration'), 404);\n\n return view('frontend.auth.register');\n }", "public function displayGoogleRegisterLink()\n {\n if ($this->use_google_login === true) {\n $client = $this->newGoogleClient($this->getGoogleOptions());\n $auth_url = $client->createAuthUrl();\n \n if (isset($auth_url)) {\n echo '<p class=\"google-register oauth-login\"><a href=\"'.$auth_url.'\">'.__('Register with Google', 'okv-oauth').'</a></p>';\n }\n \n if (isset($_REQUEST['error'])) {\n $this->googleRegisterError($_REQUEST['error'], true);\n return false;\n }\n \n if (isset($_COOKIE['google_access_token']) && !empty($_COOKIE['google_access_token'])) {\n $check_user_result = $this->googleRegisterCheckUser();\n if ($check_user_result === false) {\n return false;\n } elseif (is_array($check_user_result)) {\n // check user passed. now it is ready to prepare register form.\n echo '<script>'.\"\\n\";\n echo 'var okvoauth_google_register_got_code = true;'.\"\\n\";\n echo 'var okvoauth_google_wp_user_login = \\''.(isset($check_user_result['wp_user_login']) ? $check_user_result['wp_user_login'] : '').'\\';'.\"\\n\";\n echo 'var okvoauth_google_wp_user_email = \\''.(isset($check_user_result['wp_user_email']) ? $check_user_result['wp_user_email'] : '').'\\';'.\"\\n\";\n echo 'var okvoauth_google_wp_user_avatar = \\''.(isset($check_user_result['wp_user_avatar']) ? $check_user_result['wp_user_avatar'] : '').'\\';'.\"\\n\";\n echo '</script>'.\"\\n\";\n }\n unset($check_user_result);\n }\n \n unset($auth_url, $client);\n return true;\n } else {\n return false;\n }\n }", "public function displayRegisterForm()\n {\n // charger le HTML de notre template\n require OPROFILE_TEMPLATES_DIR . 'register-form.php';\n }", "public function auth_modal()\n\t{\n get_template_part('bbpress/auth-modal'); \n\t}", "public function showRegistrationForm() {\n //parent::showRegistrationForm();\n $data = array();\n\n $data = $this->example_of_user();\n $data['title'] = 'RegisterForm';\n\n return view('frontend.auth.register', $data);\n }", "public function showRegistrationForm()\n {\n return view('privato.auth.register');\n }", "public function registration_button() {\n\n $rewardProgrammeName = Mage::getStoreConfig('lbconfig_section/lb_settings_group/reward_programme_name_field');\n Lb_Points_Helper_Data::$rewardProgrammeName = $rewardProgrammeName;\n if(isset($_SESSION['LB_Session']))\n {\n if(!empty($_SESSION['LB_Session'])) \n {\n $LB_Session = $_SESSION['LB_Session'];\n Lb_Points_Helper_Data::debug_log(\"Rendered session user with his LB Points\", true);\n ?>\n <div class=\"connectlbbtn lb-box\">\n <span class=\"h2\"><?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?></span>\n <div class=\"loyaltybox-info-contain\">\n <?php \n if(isset($_SESSION['LB_Session']['totalRedeemPoints']))\n $remainingPoints = $LB_Session['lb_points'] - $_SESSION['LB_Session']['totalRedeemPoints'];\n else\n $remainingPoints = $LB_Session['lb_points'];\n ?>\n <?php echo \"<strong>Hi \".$LB_Session['Customer Name'].\"</strong> | <a id='lbLogout' href='javascript:void(0);'>Logout(\".Lb_Points_Helper_Data::$rewardProgrammeName.\")</a></br>You have \".$remainingPoints.\" Points in your <strong>\".Lb_Points_Helper_Data::$rewardProgrammeName.\"</strong> account.\"; ?>\n </div>\n <div class=\"lbMsg\"></div>\n </div>\n <?php\n } \n else \n {\n Lb_Points_Helper_Data::debug_log(\"Rendered Connect with Loyalty Box button\", true);\n ?>\n <div class=\"connectlbbtn registrationBtn lb-box\">\n <button class=\"button btn-cart\" onclick=\"return showForm('popup_form_registration')\" title=\"Connect with <?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?>\" type=\"button\"><span><span>Connect with <?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?></span></span></button>\n <div class=\"lbMsg\"></div>\n </div>\n \n <script type=\"text/javascript\">\n function showForm(id){\n win = new Window({ title: \"Connect with Loyalty Box\", zIndex:3000, destroyOnClose: true, recenterAuto:true, resizable: false, width:400, height:'auto', minimizable: true, maximizable: false, draggable: true});\n win.setContent(id, false, false);\n win.showCenter();\n }\n </script>\n <?php\n Lb_Points_Helper_Data::debug_log(\"End: Rendered Connect with Loyalty Box button\", true);\n }\n }\n else \n {\n Lb_Points_Helper_Data::debug_log(\"Rendered Connect with Loyalty Box button\", true);\n ?>\n <div class=\"connectlbbtn registrationBtn lb-box\">\n <button class=\"button btn-cart\" onclick=\"return showForm('popup_form_registration')\" title=\"Connect with <?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?>\" type=\"button\"><span><span>Connect with <?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?></span></span></button>\n <div class=\"lbMsg\"></div>\n </div>\n <script type=\"text/javascript\">\n function showForm(id){\n win = new Window({ title: \"Connect with <?php echo Lb_Points_Helper_Data::$rewardProgrammeName;?>\", zIndex:3000, destroyOnClose: true, recenterAuto:true, resizable: false, width:400, height:'auto', minimizable: true, maximizable: false, draggable: true});\n win.setContent(id, false, false);\n win.showCenter();\n }\n </script>\n <?php\n Lb_Points_Helper_Data::debug_log(\"End: Rendered Connect with Loyalty Box button\", true);\n }\n }", "function popUpWindow($msg = '', $data = array())\n{\n$module = new sociallogin();\n$style = 'style=\"padding:10px 11px 10px 30px;overflow-y:auto;height:auto;\"';\n$left = 'left:44%';\nif (_PS_VERSION_ >= 1.6)\n\t$left = 'left:50%;';\n$top_style = 'style=top:50%;'.$left.'';\n$profilefield = unserialize(Configuration::get('profilefield'));\nif (empty($profilefield))\n\t$profilefield[] = '3';\nif (Configuration::get('user_require_field') == '1')\n{\n\t$top_style_value = 50;\n\t$count_profile_field = count($profilefield);\n\tfor ($i = 1; $i < $count_profile_field - 1; $i++)\n\t\t$top_style_value -= 5;\n\t$top_style = 'style=top:'.$top_style_value.'%;'.$left.'';\n\t$style = 'style=\"padding:10px 11px 10px 30px;\"';\n}\n$profilefield = implode(';', $profilefield);\n$context = Context::getContext();\n$context->controller->addCSS(__PS_BASE_URI__.'modules/sociallogin/css/sociallogin_style.css');\n$context->controller->addjquery();\n$context->controller->addJS(__PS_BASE_URI__.'modules/sociallogin/js/popupjs.js');\n$cookie = $context->cookie;\n$cookie->sl_hidden = microtime();\n?>\n<div id=\"fade\" class=\"LoginRadius_overlay\">\n<div id=\"popupouter\" <?php echo $top_style; ?>>\n<div id=\"popupinner\" <?php echo $style; ?>>\n<div id=\"textmatter\"><strong>\n\t\t<?php\n\t\tif ($msg == '')\n\t\t{\n\t\t\t//echo \"Please fill the following details to complete the registration\";\n\t\t\t$show_msg = Configuration::get('POPUP_TITLE');\n\t\t\techo $msg = (!empty($show_msg) ? $show_msg : $module->l('Please fill the following details to complete the registration', 'sociallogin_functions'));\n\t\t}\n\t\telse\n\t\t\techo $msg;\n\t\t?>\n\t</strong></div>\n<form method=\"post\" name=\"validfrm\" id=\"validfrm\" action=\"\" onsubmit=\"return popupvalidation();\">\n<?php\n$html = '';\nif (Configuration::get('user_require_field') == '1')\n{\n\tif (strpos($profilefield, '1') !== false && (empty($data['fname']) || isset($data['firstname'])))\n\t{\n\t\t$html .= '<div>\n\t\t\t<span class=\"spantxt\">'.$module->l('First Name', 'sociallogin_functions').'</span>\n\t\t\t<input type=\"text\" name=\"SL_FNAME\" id=\"SL_FNAME\" placeholder=\"FirstName\"\n\t\t\tvalue= \"'.((Tools::getValue('SL_FNAME')) ? htmlspecialchars(Tools::getValue('SL_FNAME')) : '').'\" class=\"inputtxt\" />\n\t\t\t</div>';\n\t}\n\tif (strpos($profilefield, '2') !== false && (empty($data['lname']) || isset($data['lastname'])))\n\t{\n\t\t$html .= '<div>\n\t\t\t<span class=\"spantxt\">'.$module->l('Last Name', 'sociallogin_functions').'</span>\n\t\t\t<input type=\"text\" name=\"SL_LNAME\" id=\"SL_LNAME\" placeholder=\"LastName\"\n\t\t\tvalue= \"'.((Tools::getValue('SL_LNAME')) ? htmlspecialchars(Tools::getValue('SL_LNAME')) : '').'\" class=\"inputtxt\" />\n\t\t\t</div>';\n\t}\n}\nif (empty($data['email']) || $data['send_verification_email'] == 'yes')\n{\n\t$width = '';\n\tif (Configuration::get('user_require_field') != '1' || (Configuration::get('user_require_field') == '1' && count(Configuration::get('profilefield')) == 0))\n\t\t$width = 'width:60px;';\n\t$html .= '<div><span class=\"spantxt\" style='.$width.'>'.$module->l('Email', 'sociallogin_functions').'</span>\n\t\t\t<input type=\"text\" name=\"SL_EMAIL\" id=\"SL_EMAIL\" placeholder=\"Email\"\n\t\t\tvalue= \"'.((Tools::getValue('SL_EMAIL')) ? htmlspecialchars(Tools::getValue('SL_EMAIL')) : '').'\" class=\"inputtxt\" />\n\t\t\t</div>';\n}\nif (Configuration::get('user_require_field') == '1')\n{\n\tif (strpos($profilefield, '6') !== false)\n\t{\n\t\t$html .= '<div><span class=\"spantxt\">'.$module->l('Address', 'sociallogin_functions').'</span>\n\t\t\t<input type=\"text\" name=\"SL_ADDRESS\" id=\"SL_ADDRESS\" placeholder=\"Address\"\n\t\t\tvalue= \"'.((Tools::getValue('SL_ADDRESS')) ? htmlspecialchars(Tools::getValue('SL_ADDRESS')) : $data['address']).'\" class=\"inputtxt\" />\n\t\t\t</div>';\n\t}\n\tif (strpos($profilefield, '8') !== false)\n\t{\n\t\t$html .= '<div><span class=\"spantxt\">'.$module->l('ZIP code', 'sociallogin_functions').'</span>\n\t\t\t<input type=\"text\" name=\"SL_ZIP_CODE\" id=\"SL_ZIP_CODE\" placeholder=\"Zip Code\"\n\t\t\tvalue= \"'.((Tools::getValue('SL_ZIP_CODE')) ? htmlspecialchars(Tools::getValue('SL_ZIP_CODE')) : '').'\" class=\"inputtxt\" />\n\t\t\t</div>';\n\t}\n\tif (strpos($profilefield, '4') !== false)\n\t{\n\t\t$html .= '<div>\n\t\t\t<span class=\"spantxt\">'.$module->l('City', 'sociallogin_functions').'</span><input type=\"text\" name=\"SL_CITY\" id=\"SL_CITY\" placeholder=\"City\"\n\t\t\tvalue= \"'.((Tools::getValue('SL_CITY')) ? htmlspecialchars(Tools::getValue('SL_CITY')) : $data['city']).'\" class=\"inputtxt\" />\n\t\t\t</div>';\n\t}\n\t$countries = Db::getInstance()->executeS('\n\t\tSELECT *\n\t\tFROM '._DB_PREFIX_.'country c WHERE c.active =1');\n\tif (strpos($profilefield, '3') !== false)\n\t{\n\t\tif (is_array($countries) && !empty($countries))\n\t\t{\n\t\t\t$html .= '<div id=\"location-country-div\">\n\t\t\t\t\t<span class=\"spantxt\">'.$module->l('Country', 'sociallogin_functions').'</span>\n\t\t\t\t\t<select id=\"location-country\" name=\"location_country\" class=\"inputtxt\"><option value=\"0\">None</option>';\n\t\t\tforeach ($countries as $country)\n\t\t\t{\n\t\t\t\t$country_name = new Country($country['id_country']);\n\t\t\t\t$html .= '<option value=\"'.($country['iso_code']).'\"'.((Tools::getValue('location_country'))\n\t\t\t\t\t&& (Tools::getValue('location_country') == $country['iso_code']) ? ' selected=\"selected\"' : '').'>\n\t\t\t\t\t'.$country_name->name['1'].'</option>'.\"\\n\";\n\t\t\t}\n\t\t\t$html .= '</select></div>';\n\t\t}\n\t}\n\t$value = true;\n\tif (Tools::getValue('location_country') && strpos($profilefield, '3') !== false)\n\t{\n\t\t$country = new Country(Tools::getValue('location_country'));\n\t\t$value = $country->contains_states;\n\t}\n\tif (strpos($profilefield, '3') !== false && $value)\n\t{\n\t\t$html .= '<div id=\"location-state-div\" style=\"display:none;\">\n\t\t<input id=\"location-state\" type=\"text\" name=\"location-state\" value=\"empty\" />\n\t\t</div>';\n\t}\n\telseif (strpos($profilefield, '3') !== false)\n\t{\n\t\t$country_id = Db::getInstance()->executeS('\n\t\t\tSELECT *\n\t\t\tFROM '._DB_PREFIX_.'country c WHERE c.iso_code= \"'.Tools::getValue('location_country').'\"');\n\t\t$states = State::getStatesByIdCountry($country_id['0']['id_country']);\n\t\tif (is_array($states))\n\t\t{\n\t\t\t$style = '';\n\t\t\tif (empty($states))\n\t\t\t\t$style = 'style=\"display:none;\"';\n\t\t\t$html .= '<div id=\"location-state-div\" '.$style.'>\n\t\t\t\t<span class=\"spantxt\">'.$module->l('State', 'sociallogin_functions').'</span>\n\t\t\t\t<select id=\"location-state\" name=\"location-state\" class=\"inputtxt\">';\n\t\t\tif (empty($states))\n\t\t\t\t$html .= '<option value=\"empty\">None</option>';\n\t\t\tforeach ($states as $state)\n\t\t\t{\n\t\t\t\t$state_name = new State($state['id_state']);\n\t\t\t\t$html .= '<option value=\"'.($state['iso_code']).'\"'.(Tools::getValue('location-state')\n\t\t\t\t\t&& (Tools::getValue('location-state') == $state['iso_code']) ? ' selected=\"selected\"' : '').'>'.$state_name->name.'</option>'.\"\\n\";\n\t\t\t}\n\t\t\t$html .= '</select></div>';\n\t\t}\n\t}\n\tif (strpos($profilefield, '5') !== false)\n\t{\n\t\t$html .= '<div><span class=\"spantxt\">'.$module->l('Mobile Number', 'sociallogin_functions').'</span>\n\t\t\t<input type=\"text\" name=\"SL_PHONE\" id=\"SL_PHONE\" placeholder=\"Mobile Number\"\n\t\t\tvalue= \"'.((Tools::getValue('SL_PHONE')) ? htmlspecialchars(Tools::getValue('SL_PHONE')) : $data['phonenumber']).'\" class=\"inputtxt\" />\n\t\t\t</div>';\n\t}\n\n\n\tif (strpos($profilefield, '7') !== false)\n\t{\n\t\t$html .= '<div><span class=\"spantxt\">'.$module->l('Address Title').'</span><input type=\"text\" name=\"SL_ADDRESS_ALIAS\"\n\t\tid=\"SL_ADDRESS_ALIAS\" placeholder=\"Please assign an address title for future reference\"\n\t\tvalue= \"'.((Tools::getValue('SL_ADDRESS_ALIAS')) ? htmlspecialchars(Tools::getValue('SL_ADDRESS_ALIAS')) : '').'\" class=\"inputtxt\" />\n\t\t</div>';\n\t}\n}\nif ($html == '')\n\treturn 'noshowpopup';\n$html .= '<div><input type=\"hidden\" name=\"hidden_val\" value=\"'.$cookie->sl_hidden.'\" />\n\t<input type=\"submit\" id=\"LoginRadius\" name=\"LoginRadius\" value=\"'.$module->l('Submit', 'sociallogin_functions').'\"\n\tclass=\"inputbutton\">\n\t<input type=\"button\" value=\"'.$module->l('Cancel', 'sociallogin_functions').'\"\n\tclass=\"inputbutton\" onclick=\"window.location.href=window.location.href;\" />\n\t</div></div>\n\t</form>\n\t</div>\n\t</div>\n\t</div>';\necho $html;\n}", "public function showRegistrationForm()\n {\n return view('laboratorio.auth.register');\n \n }", "public function showRegistrationForm()\n {\n return view('frontend.user_registration');\n }", "public function showRegistrationForm()\n {\n return redirect()->route('frontend.account.register');\n //return theme_view('account.register');\n }", "public function showRegistrationForm()\n {\n return view('adminlte::auth.register');\n }", "public function showRegistrationForm()\n {\n return view('user.auth.login');\n }", "public function showRegistrationForm()\n {\n $askForAccount = false;\n return view('client.auth.register',compact(\"askForAccount\"));\n }", "public function registration()\n {\n $view = new View('login_registration');\n $view->title = 'Bilder-DB';\n $view->heading = 'Registration';\n $view->display();\n }", "public function getRegistrationForm()\n\t{\n\n\t}", "public function qode_membership_render_login_form() {\n\t\techo qode_membership_get_widget_template_part( 'login-widget', 'login-modal-template' );\n\t}", "public function showRegistrationForm()\n {\n //Custom code here\n return view('auth.register')->with('packages', Package::all()->where('status', 1));\n }", "public function showRegistrationForm()\n {\n return view('admin.auth.register');\n }", "function casano_login_modal() {\r\n\t\tif ( ! shortcode_exists( 'woocommerce_my_account' ) ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\tif ( is_user_logged_in() ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t// Don't load login popup on real mobile when header mobile is enabled\r\n\t\t$enable_header_mobile = casano_get_option( 'enable_header_mobile', false );\r\n\t\tif ( $enable_header_mobile && casano_is_mobile() ) {\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t?>\r\n <div id=\"login-popup\" class=\"woocommerce-account md-content mfp-with-anim mfp-hide\">\r\n <div class=\"casano-modal-content\">\r\n\t\t\t\t<?php echo do_shortcode( '[woocommerce_my_account]' ); ?>\r\n </div>\r\n </div>\r\n\t\t<?php\r\n\t}", "public function showRegistrationForm()\n {\n $navList = Nav::getMenuTree(Nav::orderBy('sort', 'asc')->get()->toArray());\n $categories = Category::getMenuTree(Category::orderBy('sort', 'asc')->select('id', 'name', 'pid')->get()->toArray());\n View::share([\n 'nav_list' => $navList,\n 'category_list' => $categories,\n ]);\n return view('auth.register');\n }", "protected function page_popup () {\n\t\t$skeleton = make::tpl ('skeleton.basic');\n\n\t\t/**\n\t\t * Fetch the body content template\n\t\t */\n\t\t$body = make::tpl ('body.login-widget.popup');\n\n\t\t/**\n\t\t * Fetch the page details\n\t\t */\n\t\t/*$page = new page('terms');*/\n\n\t\t/**\n\t\t * Build the output\n\t\t */\n\t\t$skeleton->assign (\n\t\t\tarray (\n\t\t\t\t'title'\t\t\t=> /*$page->title()*/'Login Widget',\n\t\t\t\t'keywords'\t\t=> /*$page->keywords()*/'',\n\t\t\t\t'description'\t=> /*$page->description()*/'',\n\t\t\t\t'body'\t\t\t=> $body\n\t\t\t)\n\t\t);\n\n\t\toutput::as_html($skeleton,true);\n\n\t}", "public function showRegistrationForm()\n {\n return view('auth.officer-register');\n }", "public function showRegistrationForm()\n {\n return view('auth.register');\n }", "public function actionRegister()\n\t{\n\t\tUtilities::updateCallbackURL();\n\t\t$this->render('registration');\n\t}", "public function showRegistrationForm()\n\t{\n\t\t$data = [];\n\t\t\n\t\t// References\n\t\t$data['countries'] = CountryLocalizationHelper::transAll(CountryLocalization::getCountries());\n\t\t$data['genders'] = Gender::trans()->get();\n\t\t\n\t\t// Meta Tags\n\t\tMetaTag::set('title', getMetaTag('title', 'register'));\n\t\tMetaTag::set('description', strip_tags(getMetaTag('description', 'register')));\n\t\tMetaTag::set('keywords', getMetaTag('keywords', 'register'));\n\t\t\n\t\t// return view('auth.register.indexFirst', $data);\n\t\treturn view('auth.register.index', $data);\n\n\t}", "public function showSignUpForm() {\n if(!config('springintoaction.signup.allow')) {\n return view('springintoaction::frontend.signup_closed');\n }\n\n return view('springintoaction::frontend.signup');\n }" ]
[ "0.6570414", "0.651452", "0.6450565", "0.64338094", "0.63390696", "0.6301324", "0.62267715", "0.62121123", "0.61955094", "0.6168004", "0.6158292", "0.6154698", "0.61509985", "0.6123401", "0.61215955", "0.6116056", "0.60746676", "0.6066945", "0.6065777", "0.6047308", "0.60373676", "0.6033634", "0.60259676", "0.60127515", "0.6011206", "0.59849125", "0.5983473", "0.59768194", "0.5958762", "0.5958426" ]
0.7435636
0
redeem_points. This method is used to render Redeem Points form
public function redeem_points() { $rewardProgrammeName = Mage::getStoreConfig('lbconfig_section/lb_settings_group/reward_programme_name_field'); Lb_Points_Helper_Data::$rewardProgrammeName = $rewardProgrammeName; if(isset($_SESSION['LB_Session'])) { if(!empty($_SESSION['LB_Session'])) { $LB_Session = $_SESSION['LB_Session']; Lb_Points_Helper_Data::debug_log("Rendered session user with his LB Points", true); ?> <div class="redeem_lbpoints lb-box"> <form id="frmRedeemPoints" onsubmit=" return false;"> <label> Want to Redeem Loyalty Points? <a class="btnShowRedeem" href="javascript:void(0);" >Click here</a> to redeem. </label> <div class="lb-redeem-wrapper"> <label>Enter Loyalty Points</label> <input type="text" class="input-text required-entry lb-double" value="" title="Enter Loyalty points" placeholder="Enter Loyalty points" id="txtRedeemPoints" name="txtRedeemPoints"> <div class="redeemMsg"></div> <div class="button-wrapper"> <button id="btnRedeemPoints" value="Redeem" class="button" title="Redeem" type="button"><span><span>Redeem</span></span></button> <!-- button value="Cancel" class="button btnShowRedeem" title="Cancel" type="button"><span><span>Cancel</span></span></button --> </div> </div> </form> </div> <script> // Redeem points jQuery(".btnShowRedeem").click(function(){ jQuery(".lb-redeem-wrapper").toggle('display'); }); var frmRedeemPoints = 'frmRedeemPoints'; var redeemPoints = new VarienForm(frmRedeemPoints, true); Validation.add('lb-double', 'Please enter a number greater than 0 in this field.', function(v) { return (v > 0); // || /^\s+$/.test(v)); }); jQuery("#btnRedeemPoints").click(function(){ if (redeemPoints.validator.validate()) { jQuery(this).attr('disabled','disabled'); var postUrl = "<?php echo Mage::getBaseUrl() . 'lb/index/redeem' ?>"; var txtRedeemPoints = jQuery("#txtRedeemPoints").val(); jQuery.post(postUrl,{'txtRedeemPoints':txtRedeemPoints},function(response) { if(response.status == '1'){ jQuery(".redeemMsg").html(response.message).addClass( "frm_success" ); window.location.reload(); } else{ jQuery(".redeemMsg").html(response.message).addClass( "frm_error" ); jQuery("#btnRedeemPoints").removeAttr('disabled'); } },'JSON'); } }); </script> <style> .lb-box { background-color: #f4f4f4; border: 1px solid #cccccc; padding: 10px; margin-bottom: 20px; } .lb-redeem-wrapper label,.redeemMsg{ padding-bottom: 5px; } </style> <?php } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function redeemAction(){\n $txtRedeemPoints = $_POST['txtRedeemPoints'];\n $quoteData = Mage::getSingleton('checkout/session')->getQuote();\n \n $CartContentsTotal = $quoteData['subtotal'];\n $CartTotal = $quoteData['grand_total'];\n \n if(!empty($txtRedeemPoints)){\n $LB_Session = $_SESSION['LB_Session'];\n if (!empty($LB_Session)) {\n // confirm loyalty points available or not and update to session if available.\n $CardOrPhoneNumber = $LB_Session['Phone Number'];\n $CardPoints = Lb_Points_Helper_Data::getCardPoints($CardOrPhoneNumber);\n $InquiryResult = $CardPoints->InquiryResult;\n $balances = $InquiryResult->balances;\n $Balance = $balances->balance;\n foreach ($Balance as $balValue) {\n if ($balValue->valueCode == 'Discount') {\n $_SESSION['LB_Session']['lb_discount'] = $balValue->amount;\n $_SESSION['LB_Session']['lb_discount_difference'] = $balValue->difference;\n $_SESSION['LB_Session']['lb_discount_exchangeRate'] = $balValue->exchangeRate;\n } elseif ($balValue->valueCode == 'Points') {\n $_SESSION['LB_Session']['lb_points'] = $balValue->amount;\n $_SESSION['LB_Session']['lb_points_difference'] = $balValue->difference;\n $_SESSION['LB_Session']['lb_points_exchangeRate'] = $balValue->exchangeRate;\n } elseif ($balValue->valueCode == 'ZAR') {\n $_SESSION['LB_Session']['lb_zar'] = $balValue->amount;\n $_SESSION['LB_Session']['lb_zar_difference'] = $balValue->difference;\n $_SESSION['LB_Session']['lb_zar_exchangeRate'] = $balValue->exchangeRate;\n }\n }\n Lb_Points_Helper_Data::debug_log(\"LB API called : Inquiry to check Points Balance\", true);\n \n $totalRedeemPoints = 0;\n if(isset($_SESSION['LB_Session']['totalRedeemPoints']))\n {\n if($_SESSION['LB_Session']['totalRedeemPoints'] > 0){\n $totalRedeemPoints = $_SESSION['LB_Session']['totalRedeemPoints'] + $txtRedeemPoints;\n }\n }\n \n if($totalRedeemPoints == 0){\n $totalRedeemPoints = $txtRedeemPoints;\n }\n \n if ($txtRedeemPoints > 0 && $totalRedeemPoints <= $CartTotal && is_numeric($txtRedeemPoints)) {\n \n if ($_SESSION['LB_Session']['lb_points'] >= $totalRedeemPoints) {\n //self::generate_discount_coupon($txtRedeemPoints, 'fixed_cart', 'REDEEM');\n if(isset($_SESSION['LB_Session']['totalRedeemPoints']))\n {\n if($_SESSION['LB_Session']['totalRedeemPoints'] > 0){\n $_SESSION['LB_Session']['totalRedeemPoints'] = $_SESSION['LB_Session']['totalRedeemPoints'] + $txtRedeemPoints;\n }\n else\n $_SESSION['LB_Session']['totalRedeemPoints'] = $txtRedeemPoints;\n }\n else\n {\n $_SESSION['LB_Session']['totalRedeemPoints'] = $txtRedeemPoints;\n }\n $message = \"You have redeemed \".$_SESSION['LB_Session']['totalRedeemPoints'].\" Loyalty Points successfully and applied discount to your cart.\";\n $messageJson = \"You have redeemed \".$_SESSION['LB_Session']['totalRedeemPoints'].\" Loyalty Points successfully and discount is being applied to your cart.\";\n Mage::getSingleton('core/session')->addSuccess($message);\n echo json_encode(array('status' => 1, 'message' => $messageJson));\n }else {\n echo json_encode(array('status' => 0, 'message' => \"You don't have sufficient Loyalty Points to redeem.\"));\n }\n } else {\n echo json_encode(array('status' => 0, 'message' => \"Please enter valid Loyalty Points.\"));\n }\n }\n else\n echo json_encode(array('status' => 0, 'message' => Lb_Points_Helper_Data::$rewardProgrammeName.\" session expired.\"));\n }\n else\n echo json_encode(array('status' => 0, 'message' => \"Please enter loyalty points.\"));\n die;\n }", "function points_vouchers()\n\t\t{\n\t\t\tif ( ! $this->data['user'])\n\t\t\t{\n\t\t\t\t$this->flexi_cart_admin->set_error_message('You must login to view reward points and vouchers.', 'public', TRUE);\n\t\t\t\tredirect('login');\n\t\t\t}\n\n\t\t\t$user_id = $this->data['user']->id;\n\n\t\t\t$this->load->library('flexi_cart_admin');\n\n\t\t\t$this->load->model('demo_cart_admin_model');\n\n\t\t\t// Check if POST data has been submitted, if so, call the custom demo model function to handle the submitted data.\n\t\t\tif ($this->input->post('convert_reward_points'))\n\t\t\t{\n\t\t\t\t$this->demo_cart_admin_model->demo_convert_reward_points($user_id);\n\t\t\t\t// Set a message to the CI flashdata so that it is available after the page redirect.\n\t\t\t\t$this->session->set_flashdata('message', $this->flexi_cart->get_messages());\n\t\t\t\tredirect(current_url());\n\t\t\t}\n\n\t\t\t$this->load->model('users_model');\n\n\t\t\t// Variable \"person\" is used because \"user\" is already being used for currently signed in user.\n\t\t\t$this->data['person'] = $this->users_model->get_details($user_id);\n\n\t\t\t// Get an array of all the reward vouchers filtered by the id in the url.\n\t\t\t// Using flexi cart SQL functions, join the demo user table with the discount table.\n\t\t\t$sql_where = array($this->flexi_cart_admin->db_column('discounts', 'user') => $user_id);\n\t\t\t// $this->flexi_cart_admin->sql_join('demo_users', 'user_id = '.$this->flexi_cart_admin->db_column('discounts', 'user'));\n\t\t\t$this->data['voucher_data_array'] = $this->flexi_cart_admin->get_db_voucher_query(FALSE, $sql_where)->result_array();\n\n\t\t\t// Get user remaining reward points.\n\t\t\t$summary_data = $this->flexi_cart_admin->get_db_reward_point_summary($user_id);\n\t\t\t$this->data['points_data'] = array(\n\t\t\t\t'total_points' => $summary_data[$this->flexi_cart_admin->db_column('reward_points', 'total_points')],\n\t\t\t\t'total_points_pending' => $summary_data[$this->flexi_cart_admin->db_column('reward_points', 'total_points_pending')],\n\t\t\t\t'total_points_active' => $summary_data[$this->flexi_cart_admin->db_column('reward_points', 'total_points_active')],\n\t\t\t\t'total_points_active' => $summary_data[$this->flexi_cart_admin->db_column('reward_points', 'total_points_active')],\n\t\t\t\t'total_points_expired' => $summary_data[$this->flexi_cart_admin->db_column('reward_points', 'total_points_expired')],\n\t\t\t\t'total_points_converted' => $summary_data[$this->flexi_cart_admin->db_column('reward_points', 'total_points_converted')],\n\t\t\t\t'total_points_cancelled' => $summary_data[$this->flexi_cart_admin->db_column('reward_points', 'total_points_cancelled')]\n\t\t\t);\n\n\t\t\t// Get an array of a demo user and their related reward points from a custom demo model function, filtered by the id in the url.\n\t\t\t$reward_data = $this->demo_cart_admin_model->demo_reward_point_summary($user_id);\n\t\t\t\n\t\t\t// Note: The custom function returns a multi-dimensional array, of which we only need the first array, so get the first row '$user_data[0]'.\n\t\t\t$this->data['reward_data'] = $reward_data[0];\n\n\t\t\t// Get the conversion tier values for converting reward points to vouchers.\n\t\t\t$conversion_tiers = $this->data['reward_data'][$this->flexi_cart_admin->db_column('reward_points', 'total_points_active')];\n\t\t\t$this->data['conversion_tiers'] = $this->flexi_cart_admin->get_reward_point_conversion_tiers($conversion_tiers);\n\n\t\t\t// Get an array of all reward points for a user.\n\t\t\t$sql_select = array(\n\t\t\t\t$this->flexi_cart_admin->db_column('reward_points', 'order_number'),\n\t\t\t\t$this->flexi_cart_admin->db_column('reward_points', 'description'),\n\t\t\t\t$this->flexi_cart_admin->db_column('reward_points', 'order_date')\n\t\t\t);\t\n\t\t\t$sql_where = array($this->flexi_cart_admin->db_column('reward_points', 'user') => $user_id);\n\t\t\t$this->data['points_awarded_data'] = $this->flexi_cart_admin->get_db_reward_points_query($sql_select, $sql_where)->result_array();\n\t\t\t\n\t\t\t// Call a custom function that returns a nested array of reward voucher codes and the reward point data used to create the voucher.\n\t\t\t$this->data['points_converted_data'] = $this->demo_cart_admin_model->demo_converted_reward_point_history($user_id);\n\n\t\t\t// Get any status message that may have been set.\n\t\t\t$this->data['message'] = $this->session->flashdata('message');\n\n\t\t\t$this->load->view('public/dashboard/points_and_vouchers_view', $this->data);\n\t\t}", "function addpoints(){\n\t\t$this->autoRender = false;\n\t\t\n\t\t//Login Check\n\t\tif (!$this->Session->read('userData')){\n\t\t\t$this->redirect(array('controller' => 'user', 'action' => 'login'));\n\t\t\t$this->set('loggedIn',false);\n\t\t}else{\n\t\t\t$this->set('loggedIn',true);\n\t\t}\n\t\tif ($this->request->is('post')) {\n\t\t\t$data = $this->request->data;\n\t\t\t\n\t\t\t//Validation of input data\n\t\t\t$this->Player->set($this->request->data);\n\t\t\tif ($this->Player->validates(array('fieldList' => array('id', 'points')))) {\n\t\t\t\t// validated inputs\n\t\t\t\ttry {\n\t\t\t\t\t$updated = $this->Player->addPoints($data);\n\t\t\t\t\t$this->redirect(array('controller' => 'player', 'action' => 'index'));\n\t\t\t\t} catch (Exception $e) {\n\t\t\t\t\t$this->Session->setFlash('Error adding points', 'default', array('class' => 'bg-danger'));\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// invalid inputs\n\t\t\t\t$msg = '';\n\t\t\t\t$errors = $this->Player->validationErrors;\n\t\t\t\tforeach ($errors as $error){ $msg .= $error[0].'<br />'; };\n\t\t\t\t$this->Session->setFlash($msg, 'default', array('class' => 'bg-danger'));\n\t\t\t\t$this->redirect(array('controller' => 'player', 'action' => 'index'));\n\t\t\t}\n\t\t}\n\t}", "public function edit(Points $points)\n {\n //\n }", "function givePoints() {\n if ($this->is()) {\n // ponizsza funkcja jest dostarczona przez PayBack\n // pb_give_points($this->getPaybackLogin(),$this->calcPoints(),$_SESSION['global_order_id']);\n } else return false;\n }", "public function givePointsForRepost(User $user, $points, $state = 'new')\n {\n $person = $this->_em->getRepository('ZenomaniaCoreBundle:Person')->findPersonByUser($user);\n $season = $this->_em->getRepository('ZenomaniaCoreBundle:Season')->findCurrentSeason();\n\n $params = [\n 'season' => $season,\n 'person' => $person,\n 'user' => $user,\n 'points' => $points,\n 'type' => PersonPoints::TYPE_REPOST,\n 'state' => $state,\n 'dt' => new \\DateTime(),\n 'operation_type' => PersonPoints::OPERATION_TYPE_DEBIT\n ];\n\n $personPoints = PersonPoints::fromArray($params);\n $this->_em->persist($personPoints);\n\n $this->_em->flush();\n\n return $personPoints;\n }", "public function getPoints_post() {\n $this->form_validation->set_rules('PointsCategory', 'PointsCategory', 'trim|in_list[Normal,InPlay,Reverse]');\n $this->form_validation->validation($this); /* Run validation */\n\n $PointsData = $this->SnakeDrafts_model->getPoints($this->Post);\n if (!empty($PointsData)) {\n $this->Return['Data'] = $PointsData['Data'];\n }\n }", "public static function get_the_total_redeem_points_for_order($order) {\n $status = get_option('rs_order_status_control');\n global $wpdb;\n $table_name = $wpdb->prefix . 'rsrecordpoints';\n $orderid = $order->id;\n $gettotalredeempoints = $wpdb->get_results(\"SELECT redeempoints FROM $table_name WHERE orderid=$orderid\", ARRAY_A);\n $orderstatus = $order->post_status;\n if (is_array($status)) {\n foreach ($status as $statuses) {\n $statusstr = $statuses;\n }\n }\n $replacestatus = str_replace('wc-completed', $statusstr, $orderstatus);\n if (get_option('rs_enable_msg_for_redeem_points') == 'yes') {\n if (in_array($replacestatus, $status)) {\n $totalredeemvalue = \"\";\n $redeem_total = $gettotalredeempoints;\n if (is_array($redeem_total)) {\n foreach ($redeem_total as $key => $value) {\n $totalredeemvalue+=$value['redeempoints'];\n }\n $msgforredeempoints = get_option('rs_msg_for_redeem_points');\n $roundofftype = get_option('rs_round_off_type') == '1' ? '2' : '0';\n $replacemsgforredeempoints = str_replace('[redeempoints]', $totalredeemvalue != \"\" ? round($totalredeemvalue, $roundofftype) : \"0\", $msgforredeempoints);\n echo '<b>' . $replacemsgforredeempoints . '</b>';\n }\n }\n }\n }", "function point() {\n $item = filter($this->uri->segment(3), 'str', 40);\n\n if ($this->input->is_ajax_request() && $item) {\n return $this->_save($item);\n }\n \n if ( ! $item) {\n redirect(config_item('site_url'));\n }\n\n $point = $this->point->get_by_id($item);\n\n if ( ! $point || empty($point)) {\n log_write(LOG_WARNING, 'Point object not found, ID: ' . $item . ', USER: ' . $this->auth->get_user_id(), __METHOD__);\n redirect(config_item('site_url'));\n }\n\n if ($point->item_author != $this->auth->get_user_id() || $point->item_status != STATUS_DRAFT) {\n log_write(LOG_WARNING, 'Point object form access error, ID: ' . $item . ', USER: ' . $this->auth->get_user_id(), __METHOD__);\n redirect(config_item('site_url'));\n }\n\n $this->TPLVAR['title'] = 'Редактирование проблемы';\n $this->TPLVAR['data'] = $point;\n $this->TPLVAR['photos'] = $this->media->get_by_point($point->item_id);\n $this->TPLVAR['category'] = $this->category->get_all();\n \n $this->load->view('form', $this->TPLVAR);\n }", "public function makeGiftcard()\n\t{\n\t\t$user_id = Input::get('gc_user_id');\n\t\t$gc_points = Input::get('gc_points');\n\t\t$gc_price = Input::get('gc_price');\n\t\tAuth::user()->points_earned;\n\t\t$email_id = Auth::user()->email ;\n\t\t\n\t\t$set_giftcard_id = 0;\n\t\tif( $gc_points <= Auth::user()->points_earned-Auth::user()->points_spent ){\n\t\t\t\t//echo \"points avaiable\";\n\n\t\t\t\tDB::insert(\"insert into redeem_giftcard(user_id)values($user_id)\");\n\t\t\t\t$last_id = DB::select(\"select id from redeem_giftcard order by id desc limit 1\");\n\t\t\t\t$membership_query = DB::select(\"select attribute_value from user_attributes_varchar where user_id=$user_id limit 1\");\n\t\t\t\t//echo \"sad = \".$last_id;\n\t\t\t\t$getMembership_number = $membership_query[0]->attribute_value;\n\n\t\t\t\tif(empty($getMembership_number))\n\t\t\t\t{\n\t\t\t\t\t$membership_number = 'NULL';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$membership_number = $membership_query[0]->attribute_value;\n\t\t\t\t}\n\n\t\t\t\tif(empty($last_id)){\n\t\t\t\t\t$set_giftcard_id = 1;\n\t\t\t\t}else{\n\t\t\t\t\t$set_giftcard_id = $last_id[0]->id;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t\t\t$quantity = 1;\n\t\t\t\tif($gc_price == 500){\n\t\t\t\t\t$reward_id = 1;\n\t\t\t\t\t$description = \"Redeemed Rs.500 - GPRED\".sprintf(\"%04d\",$set_giftcard_id);\t\n\t\t\t\t}else if($gc_price == 1000){\n\t\t\t\t\t$reward_id = 2;\n\t\t\t\t\t$description = \"Redeemed Rs.1000 - GPRED\".sprintf(\"%04d\",$set_giftcard_id);\n\t\t\t\t}else if($gc_price == 1500){\n\t\t\t\t\t$reward_id = 3;\n\t\t\t\t\t$description = \"Redeemed Rs.1500 - GPRED\".sprintf(\"%04d\",$set_giftcard_id);\n\t\t\t\t}\n\t\t\t\t$pointsRedeemed = $quantity * $gc_points;\n\t\t\t\tDB::insert(\"insert into reward_points_redeemed(user_id,order_id,points_redeemed,description)\n\t\t\t\t\t\t\tvalues('$user_id','$reward_id','$pointsRedeemed','$description')\");\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t$spent = $gc_points * $quantity;\n\t\t\t\t\n\t\t\t\tDB::update('UPDATE users SET points_spent = points_spent + '.$spent.' WHERE id = '.$user_id);\n\t\t\t\t\n\t\t\t\t$sent = Mail::send('site.pages.rewards_request_mail',\n\t\t\t\t\t\t['quantity'=> $quantity,\n\t\t\t\t\t\t 'email_id'=> $email_id,\n\t\t\t\t\t\t 'membership_number'=> $membership_number,\n\t\t\t\t\t\t 'description'=> $description,\n\t\t\t\t\t\t 'points_spent'=> $spent,\n\t\t\t\t\t\t 'set_giftcard_id'=> $set_giftcard_id,], function($message) {\n\t\t\t\t\t\t$message->from('[email protected]', 'WowTables by GourmetItUp');\n\n\t\t\t\t\t\t$message->to('[email protected]')->subject('Rewards Request');\n\t\t\t\t\t\t$message->cc('[email protected]', '[email protected]');\n\t\t\t\t});\n\t\t\t\tif($sent)\n\t\t\t\t{\n\t\t\t\t\t$msg = 1;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$msg = 2;\n\t\t\t\t}\n\n\t\t\t\t Mail::send('site.pages.rewards_request_mail_user',\n\t\t\t\t\t\t['quantity'=> $quantity,\n\t\t\t\t\t\t 'email_id'=> $email_id,\n\t\t\t\t\t\t 'membership_number'=> $membership_number,\n\t\t\t\t\t\t 'description'=> $description,\n\t\t\t\t\t\t 'points_spent'=> $spent,\n\t\t\t\t\t\t 'set_giftcard_id'=> $set_giftcard_id,], function($message) use ($email_id) {\n\t\t\t\t\t\t$message->from('[email protected]', 'WowTables by GourmetItUp');\n\n\t\t\t\t\t\t$message->to($email_id)->subject('Your Gourmet Rewards redemption request was successful');\n\t\t\t\t\t\t//$message->cc('[email protected]', '[email protected]');\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t$msg = 3;\n\t\t\t}\n\t\t\techo json_encode ( array('message' => $msg,'giftcard_id' => 'GPRED'.sprintf(\"%04d\",$set_giftcard_id)));\n\t}", "public function redeembivapoints($orderId){\n\t\t$this->db->where('CustomerMail', $this->session->userdata('useremail'));\n\t\t$this->db->select_sum('EarnedPotint');\n\t\t$this->db->from('tbl_bvpoint_data');\n\t\t$query = $this->db->get();\n\t\t$sumvalue=$query->row()->EarnedPotint;\n\t\t//echo $sumvalue;\n\t\tif($sumvalue>100){\n\t\t\t$redeempoint=100;\n\t\t}\n\t\telse{\n\t\t\t$redeempoint=$sumvalue;\n\t\t}\n\n\t\t$redeempoint=-1*abs($redeempoint);\n\t\t$note=\"Purchased (#ORDBPH\".$orderId.\") And Redeemed \".$redeempoint.\" Biva Points\";\n\t\t$data=array(\n\t\t\t'CustomerMail' => $this->session->userdata('useremail'),\n\t\t\t'TrDate' => date('Y/m/d H:i:s'),\n\t\t\t'OrderId' => $orderId,\n\t\t\t'ReferedTo' => null,\n\t\t\t'EarnedPotint' => $redeempoint,\n\t\t\t'Note' => $note,\n\n\t\t);\n\t\t$this->db->insert('tbl_bvpoint_data', $data);\n\t}", "public static function update_reward_points_for_google_plus_share() {\n $userid = get_current_user_id();\n global $wpdb;\n $table_name = $wpdb->prefix . 'rspointexpiry'; \n $banning_type = FPRewardSystem::check_banning_type($userid);\n if ($banning_type != 'earningonly' && $banning_type != 'both') {\n if (get_option('timezone_string') != '') {\n $timezonedate = date_default_timezone_set(get_option('timezone_string'));\n } else {\n $timezonedate = date_default_timezone_set('UTC');\n }\n\n if (isset($_POST['state']) && ($_POST['postid']) && ($_POST['currentuserid'])) {\n $getregularprice = RSFunctionForSavingMetaValues::rewardsystem_get_post_meta($_POST['postid'], '_regular_price');\n $postid = $_POST['postid'];\n $currentuserid = $_POST['currentuserid']; \n $getarrayids[] = $_POST['postid'];\n $oldoption = RSFunctionForSavingMetaValues::rewardsystem_get_user_meta($_POST['currentuserid'], '_rsgoogleshares');\n if (!empty($oldoption)) {\n if (!in_array($_POST['postid'], $oldoption)) {\n $mergedata = array_merge((array) $oldoption, $getarrayids);\n RSFunctionForSavingMetaValues::rewardsystem_update_user_meta($_POST['currentuserid'], '_rsgoogleshares', $mergedata);\n if ($_POST['state'] == 'on') {\n $checklevel = self::checklevel_for_google_plus_share($postid);\n $orderid = '0';\n $totalearnedpoints = '0';\n $totalredeempoints= '0';\n $pointsredeemed = '0';\n $reasonindetail= '';\n self::rs_insert_google_plus_share_points($pointsredeemed,$getregularprice,$postid, $checklevel,$currentuserid,$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail); \n }\n }else {\n _e('You already Shared this post on Goole+1', 'rewardsystem');\n }\n }else {\n RSFunctionForSavingMetaValues::rewardsystem_update_user_meta($_POST['currentuserid'], '_rsgoogleshares', $getarrayids);\n if ($_POST['state'] == 'on') {\n $checklevel = self::checklevel_for_google_plus_share($postid);\n $orderid = '0';\n $totalearnedpoints = '0';\n $totalredeempoints= '0';\n $pointsredeemed = '0';\n $reasonindetail= '';\n self::rs_insert_google_plus_share_points($pointsredeemed,$getregularprice,$postid, $checklevel,$currentuserid,$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail); \n }\n }\n \n if ($_POST['state'] == 'off') {\n $getarrayunlikeids[] = $_POST['postid'];\n $oldunlikeoption = RSFunctionForSavingMetaValues::rewardsystem_get_user_meta($_POST['currentuserid'], '_rsgoogleplusunlikes');\n if (!empty($oldunlikeoption)) {\n if (!in_array($_POST['postid'], $oldunlikeoption)) {\n $mergedunlikedata = array_merge((array) $oldunlikeoption, $getarrayunlikeids);\n RSFunctionForSavingMetaValues::rewardsystem_update_user_meta($_POST['currentuserid'], '_rsgoogleplusunlikes', $mergedunlikedata);\n $checklevel = self::checklevel_for_google_plus_share($postid);\n $orderid = '0';\n $totalearnedpoints = '0';\n $totalredeempoints= '0';\n $pointsredeemed = '0';\n $reasonindetail= '';\n self::rs_insert_google_plus_share_revised_points($pointsredeemed,$getregularprice,$postid, $checklevel,$currentuserid,$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n }\n } else {\n RSFunctionForSavingMetaValues::rewardsystem_update_user_meta($_POST['currentuserid'], '_rsgoogleplusunlikes', $getarrayunlikeids);\n $checklevel = self::checklevel_for_google_plus_share($postid);\n $orderid = '0';\n $totalearnedpoints = '0';\n $totalredeempoints= '0';\n $pointsredeemed = '0';\n $reasonindetail= '';\n self::rs_insert_google_plus_share_revised_points($pointsredeemed,$getregularprice,$postid, $checklevel,$currentuserid,$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n }\n }\n echo \"Ajax Call Successfully Triggered\"; \n }\n do_action('fp_reward_point_for_google_plus_share');\n exit();\n }\n }", "public function gopointReedem($goPointsToken)\n\t{\n\t\t$ch = new Curl();\n\t\t\n\t\t$this->headers['Authorization'] = 'Bearer ' . $this->authToken;\n\t\t\n\t\t$data = [];\n\t\t\n\t\treturn $ch->post(GojekID::BASE_ENDPOINT . Action::gopointReedem . '?' . http_build_query([ 'points_token_id' => $goPointsToken ]), $data, $this->headers)->getResponse();\n\t}", "public function send_redeem_request(Request $request) {\n\n // Get admin configured - Minimum Provider Credit\n\n $minimum_redeem = Setting::get('minimum_redeem' , 1);\n\n // Get Provider Remaining Credits \n\n $redeem_details = Redeem::where('user_id' , $request->id)->first();\n\n if($redeem_details) {\n\n\n $remaining = $redeem_details->remaining;\n\n // check the provider have more than minimum credits\n\n if($remaining > $minimum_redeem) {\n\n $redeem_amount = abs($remaining - $minimum_redeem);\n\n // Check the redeems is not empty\n\n if($redeem_amount) {\n\n // Save Redeem Request\n\n $redeem_request = new RedeemRequest;\n\n $redeem_request->user_id = $request->id;\n\n $redeem_request->request_amount = $redeem_amount;\n\n $redeem_request->status = false;\n\n $redeem_request->save();\n\n // Update Redeems details \n\n $redeem_details->remaining = abs($redeem_details->remaining-$redeem_amount);\n\n $redeem_details->save();\n\n $response_array = ['success' => true];\n\n } else {\n\n $response_array = ['success' => false , 'error_messages' => Helper::error_message(159) , 'error_code' => 159];\n }\n\n } else {\n $response_array = ['success' => false , 'error_messages' => Helper::error_message(158) ,'error_code' => 158];\n }\n\n } else {\n $response_array = ['success' => false , 'error_messages' => Helper::error_message(161) , 'error_code' => 161];\n }\n\n\n return response()->json($response_array , 200);\n\n }", "public function redeembp(){\n\t\t$this->db->where('CustomerMail', $this->session->userdata('useremail'));\n\t\t$this->db->select_sum('EarnedPotint');\n\t\t$this->db->from('tbl_bvpoint_data');\n\t\t$query = $this->db->get();\n\t\t$sumvalue=$query->row()->EarnedPotint;\n\t\t//echo $sumvalue;\n\t\tif($sumvalue>100){\n\t\t\t$redeempoint=100;\n\t\t}\n\t\telse{\n\t\t\t$redeempoint=$sumvalue;\n\t\t}\n\t\treturn round($redeempoint*0.25);\n\t}", "public function index()\n {\n $user = Auth::user();\n $depositPoint = DB::table('deposits')->where('user_id', $user->id)->sum('deposit_club_point');\n\n if($depositPoint >= 10000){\n\n if(!$user->is_merchant == 1){\n\n //for normal customer\n $user->balance = $user->balance + ($depositPoint * (1/10000));\n $user->update();\n\n $wallet = new Wallet;\n $wallet->user_id = $user->id;\n $wallet->amount = $depositPoint * (1/10000);\n $wallet->payment_method = 'Club Point Convert';\n $wallet->payment_details = 'Club Point Convert';\n $wallet->approval = 1;\n $wallet->save();\n\n $convertpoint = new Deposit;\n $convertpoint->user_id = $user->id;\n $convertpoint->deposit_club_point = $depositPoint * (-1);\n if( $convertpoint->save() ){\n flash('Your points successfully Converted into BDH')->success();\n return redirect()->back();\n }\n } else {\n\n //for Merchent\n $convertpoint = new Deposit;\n $convertpoint->user_id = $user->id;\n $convertpoint->deposit_amount = $depositPoint * (1/10000);\n $convertpoint->deposit_club_point = $depositPoint * (-1);\n if( $convertpoint->save() ){\n flash('Your points successfully Converted into BDH')->success();\n return redirect()->back();\n }\n }\n }\n flash('You can Convert your point after earn 10,000 points')->error();\n return redirect()->back();\n }", "public function viewAction()\n {\n $points = new Facepalm_Model_Points();\n $this->_helper->assertHasParameter('id');\n\n $pointId = $this->_getParam('id');\n $point = $points->find($pointId)->current();\n\n $this->_helper->assertResourceExists($point);\n\n #var_dump($point->toArray()); exit();\n $form = new Facepalm_Form_Comment();\n $form->getElement('point_id')->setValue($pointId);\n\n $this->view->point = $point;\n $this->view->form = $form;\n }", "public function action()\n {\n $class = str_replace('hook_pointstore_', '', strtolower(get_class($this)));\n\n $id = get_param_integer('sub_id');\n $rows = $GLOBALS['SITE_DB']->query_select('pstore_customs', array('c_title', 'c_cost', 'c_one_per_member'), array('id' => $id, 'c_enabled' => 1));\n if (!array_key_exists(0, $rows)) {\n warn_exit(do_lang_tempcode('MISSING_RESOURCE'));\n }\n\n $c_title = get_translated_text($rows[0]['c_title']);\n $title = get_screen_title('PURCHASE_SOME_PRODUCT', true, array(escape_html($c_title)));\n\n $cost = $rows[0]['c_cost'];\n $next_url = build_url(array('page' => '_SELF', 'type' => 'action_done', 'id' => $class, 'sub_id' => $id), '_SELF');\n $points_left = available_points(get_member());\n\n // Check points\n if (($points_left < $cost) && (!has_privilege(get_member(), 'give_points_self'))) {\n return warn_screen($title, do_lang_tempcode('_CANT_AFFORD', escape_html(integer_format($cost)), escape_html(integer_format($points_left))));\n }\n\n return do_template('POINTSTORE_CUSTOM_ITEM_SCREEN', array('_GUID' => 'bc57d8775b5471935b08f85082ba34ec', 'TITLE' => $title, 'ONE_PER_MEMBER' => ($rows[0]['c_one_per_member'] == 1), 'COST' => integer_format($cost), 'REMAINING' => integer_format($points_left - $cost), 'NEXT_URL' => $next_url));\n }", "public static function update_reward_points_for_vk_like() {\n $userid = get_current_user_id();\n global $wpdb;\n $table_name = $wpdb->prefix . 'rspointexpiry'; \n $banning_type = FPRewardSystem::check_banning_type($userid);\n if ($banning_type != 'earningonly' && $banning_type != 'both') {\n if (get_option('timezone_string') != '') {\n $timezonedate = date_default_timezone_set(get_option('timezone_string'));\n } else {\n $timezonedate = date_default_timezone_set('UTC');\n }\n\n if (isset($_POST['state']) && ($_POST['postid']) && ($_POST['currentuserid'])) {\n $getregularprice = RSFunctionForSavingMetaValues::rewardsystem_get_post_meta($_POST['postid'], '_regular_price');\n $postid = $_POST['postid'];\n $currentuserid = $_POST['currentuserid']; \n $getarrayids[] = $_POST['postid'];\n $oldoption = RSFunctionForSavingMetaValues::rewardsystem_get_user_meta($_POST['currentuserid'], '_rsvklike');\n if (!empty($oldoption)) {\n if (!in_array($_POST['postid'], $oldoption)) {\n $mergedata = array_merge((array) $oldoption, $getarrayids);\n RSFunctionForSavingMetaValues::rewardsystem_update_user_meta($_POST['currentuserid'], '_rsvklike', $mergedata);\n if ($_POST['state'] == 'on') {\n $checklevel = self::checklevel_for_vk_like($postid);\n $orderid = '0';\n $totalearnedpoints = '0';\n $totalredeempoints = '0';\n $reasonindetail = '';\n $pointsredeemed= '0';\n self::rs_insert_vk_like_points($pointsredeemed,$getregularprice,$postid,$orderid, $checklevel,$currentuserid,$totalearnedpoints,$totalredeempoints,$reasonindetail); \n }\n }else {\n _e(\"You have already liked this post on VK.Com\",'rewardsystem');\n }\n }else {\n RSFunctionForSavingMetaValues::rewardsystem_update_user_meta($_POST['currentuserid'], '_rsvklike', $getarrayids);\n if ($_POST['state'] == 'on') {\n $checklevel = self::checklevel_for_vk_like($postid);\n $orderid = '0';\n $totalearnedpoints = '0';\n $totalredeempoints = '0';\n $pointsredeemed= '0';\n $reasonindetail = '';\n self::rs_insert_vk_like_points($pointsredeemed,$getregularprice,$postid, $checklevel,$currentuserid,$orderid,$totalearnedpoints,$totalredeempoints,$reasonindetail); \n }\n }\n \n if ($_POST['state'] == 'off') {\n $getarrayunlikeids[] = $_POST['postid'];\n $oldunlikeoption = RSFunctionForSavingMetaValues::rewardsystem_get_user_meta($_POST['currentuserid'], '_rsvkunlikes');\n if (!empty($oldunlikeoption)) {\n if (!in_array($_POST['postid'], $oldunlikeoption)) {\n $mergedunlikedata = array_merge((array) $oldunlikeoption, $getarrayunlikeids);\n RSFunctionForSavingMetaValues::rewardsystem_update_user_meta($_POST['currentuserid'], '_rsvkunlikes', $mergedunlikedata);\n $checklevel = self::checklevel_for_vk_like($postid);\n $orderid = '0';\n $totalearnedpoints = '0';\n $totalredeempoints = '0';\n $reasonindetail = '';\n $pointsredeemed= '0';\n self::rs_insert_vk_like_revised_points($pointsredeemed,$getregularprice,$postid,$orderid, $checklevel,$currentuserid,$totalearnedpoints,$totalredeempoints,$reasonindetail); \n }\n } else {\n RSFunctionForSavingMetaValues::rewardsystem_update_user_meta($_POST['currentuserid'], '_rsvkunlikes', $getarrayunlikeids);\n $checklevel = self::checklevel_for_vk_like($postid);\n $orderid = '0';\n $totalearnedpoints = '0';\n $totalredeempoints = '0';\n $reasonindetail = '';\n $pointsredeemed= '0';\n self::rs_insert_vk_like_revised_points($pointsredeemed,$getregularprice,$postid,$orderid, $checklevel,$currentuserid,$totalearnedpoints,$totalredeempoints,$reasonindetail);\n }\n }\n echo \"Ajax Call Successfully Triggered\"; \n }\n do_action('fp_reward_point_for_vk_like');\n exit();\n }\n }", "public function redeemGift(Request $request){\n\t\t$user = Auth::user();\n\t\t$user->load(['progression', 'rewards']); \n\t\t$reward_id = request('reward');\n\t\t$pivot_id = request('pivot');\n\t\tLog::info(\"here we go\");\n\t\t$info = $request->all();\n\t\tLog::info($info);\n\t\tLog::info($reward_id);\n\t\tLog::info($request->all());\n\t\tif($reward_id === 5){\n\t\t\t$user->progression->awardExperience(500);\n\t\t\t//announce\n\t\t}\n\t\t$reward = Reward::find($reward_id);\n\t\t//$user->rewards()->having('id', $reward_id)->update(['status' => 'redeemed']);\n\t\t$user->rewards()->wherePivot('id', $pivot_id)->updateExistingPivot($reward_id, ['status' => 'redeemed']);\n\t\t$return = User::find($user->id); \n\t\t$return->load(['progression', 'rewards']);\n\t\treturn $return;\n\n\t}", "public function getPoints_post() {\n $this->form_validation->set_rules('PointsCategory', 'PointsCategory', 'trim|in_list[Normal,InPlay,Reverse]');\n $this->form_validation->validation($this); /* Run validation */\n\n $PointsData = $this->Sports_model->getPoints($this->Post);\n if (!empty($PointsData)) {\n $this->Return['Data'] = $PointsData['Data'];\n }\n }", "public function render_post_pricing_form( $post ) {\n if ( ! LaterPay_Helper_User::can( 'laterpay_edit_individual_price', $post ) ) {\n return;\n }\n\n $post_prices = get_post_meta( $post->ID, 'laterpay_post_prices', true );\n\n if ( ! is_array( $post_prices ) ) {\n $post_prices = array();\n }\n\n $post_default_category = array_key_exists( 'category_id', $post_prices ) ? (int) $post_prices['category_id'] : 0;\n $post_revenue_model = array_key_exists( 'revenue_model', $post_prices ) ? $post_prices['revenue_model'] : 'ppu';\n $post_price_type = array_key_exists( 'type', $post_prices ) ? $post_prices['type'] : '';\n $post_status = $post->post_status;\n\n // category default price data\n $category_price_data = null;\n $category_default_price_revenue_model = null;\n $categories_of_post = wp_get_post_categories( $post->ID );\n\n if ( ! empty( $categories_of_post ) ) {\n\n $category_price_data = LaterPay_Helper_Pricing::get_category_price_data_by_category_ids( $categories_of_post );\n\n $new_category_data = LaterPay_Helper_Pricing::recalculate_post_price( $post->ID, $post_default_category, $post_price_type, $category_price_data, $categories_of_post );\n\n if ( false !== $new_category_data ) {\n $post_default_category = $new_category_data['category_id'];\n $category_default_price_revenue_model = $new_category_data['revenue_model'];\n }\n\n }\n\n // get price data\n $global_default_price = get_option( 'laterpay_global_price' );\n $global_default_price_revenue_model = get_option( 'laterpay_global_price_revenue_model' );\n\n $price = LaterPay_Helper_Pricing::get_post_price( $post->ID, true );\n $post_price_type = LaterPay_Helper_Pricing::get_post_price_type( $post->ID );\n\n // set post revenue model according to the selected price type\n if ( $post_price_type === LaterPay_Helper_Pricing::TYPE_CATEGORY_DEFAULT_PRICE ) {\n $post_revenue_model = $category_default_price_revenue_model;\n } elseif ( $post_price_type === LaterPay_Helper_Pricing::TYPE_GLOBAL_DEFAULT_PRICE ) {\n $post_revenue_model = $global_default_price_revenue_model;\n }\n\n // Get Data of all Categories.\n $category_price_model = LaterPay_Model_CategoryPriceWP::get_instance();\n $empty_all_category_default_prices = ( empty( $category_price_model->get_categories_with_defined_price() ) ? true : false );\n\n // get currency settings for current region\n $currency_settings = LaterPay_Helper_Config::get_currency_config();\n\n echo '<input type=\"hidden\" name=\"laterpay_pricing_post_content_box_nonce\" value=\"' . esc_attr( wp_create_nonce( $this->config->plugin_base_name ) ) . '\" />';\n $view_args = array(\n 'post_id' => $post->ID,\n 'post_price_type' => $post_price_type,\n 'post_status' => $post_status,\n 'post_revenue_model' => $post_revenue_model,\n 'price' => $price,\n 'global_price' => (float) get_option( 'laterpay_global_price' ),\n 'currency' => $currency_settings,\n 'category_prices' => $category_price_data,\n 'no_category_price_set' => $empty_all_category_default_prices,\n 'post_default_category' => (int) $post_default_category,\n 'global_default_price' => $global_default_price,\n 'global_default_price_revenue_model' => $global_default_price_revenue_model,\n 'category_default_price_revenue_model' => $category_default_price_revenue_model,\n 'price_ranges' => $currency_settings,\n );\n\n $this->assign( 'laterpay', $view_args );\n\n $this->render( 'backend/partials/post-pricing-form' );\n }", "public function action_done()\n {\n $class = str_replace('hook_pointstore_', '', strtolower(get_class($this)));\n\n post_param_integer('confirm'); // Make sure POSTed\n $id = get_param_integer('sub_id');\n $rows = $GLOBALS['SITE_DB']->query_select('pstore_customs', array('*'), array('id' => $id, 'c_enabled' => 1), '', 1);\n if (!array_key_exists(0, $rows)) {\n warn_exit(do_lang_tempcode('MISSING_RESOURCE'));\n }\n\n $row = $rows[0];\n\n $cost = $row['c_cost'];\n\n $c_title = get_translated_text($row['c_title']);\n $title = get_screen_title('PURCHASE_SOME_PRODUCT', true, array(escape_html($c_title)));\n\n // Check points\n $points_left = available_points(get_member());\n if (($points_left < $cost) && (!has_privilege(get_member(), 'give_points_self'))) {\n return warn_screen($title, do_lang_tempcode('_CANT_AFFORD', escape_html(integer_format($cost)), escape_html(integer_format($points_left))));\n }\n\n if ($row['c_one_per_member'] == 1) {\n // Test to see if it's been bought\n $test = $GLOBALS['SITE_DB']->query_select_value_if_there('sales', 'id', array('purchasetype' => 'PURCHASE_CUSTOM_PRODUCT', 'details2' => strval($row['id']), 'memberid' => get_member()));\n if (!is_null($test)) {\n warn_exit(do_lang_tempcode('ONE_PER_MEMBER_ONLY'));\n }\n }\n\n require_code('points2');\n charge_member(get_member(), $cost, $c_title);\n $sale_id = $GLOBALS['SITE_DB']->query_insert('sales', array('date_and_time' => time(), 'memberid' => get_member(), 'purchasetype' => 'PURCHASE_CUSTOM_PRODUCT', 'details' => $c_title, 'details2' => strval($row['id'])), true);\n\n require_code('notifications');\n $subject = do_lang('MAIL_REQUEST_CUSTOM', comcode_escape($c_title), null, null, get_site_default_lang());\n $username = $GLOBALS['FORUM_DRIVER']->get_username(get_member());\n $message_raw = do_notification_lang('MAIL_REQUEST_CUSTOM_BODY', comcode_escape($c_title), $username, null, get_site_default_lang());\n dispatch_notification('pointstore_request_custom', 'custom' . strval($id) . '_' . strval($sale_id), $subject, $message_raw, null, null, 3, true, false, null, null, '', '', '', '', null, true);\n\n $member = get_member();\n\n // Email member\n require_code('mail');\n $subject_line = get_translated_text($row['c_mail_subject']);\n if ($subject_line != '') {\n $message_raw = get_translated_text($row['c_mail_body']);\n $email = $GLOBALS['FORUM_DRIVER']->get_member_email_address($member);\n $to_name = $GLOBALS['FORUM_DRIVER']->get_username($member, true);\n mail_wrap($subject_line, $message_raw, array($email), $to_name, '', '', 3, null, false, null, true);\n }\n\n // Show message\n $url = build_url(array('page' => '_SELF', 'type' => 'browse'), '_SELF');\n return redirect_screen($title, $url, do_lang_tempcode('ORDER_GENERAL_DONE'));\n }", "function action()\n\t{\n\t\t$class=str_replace('hook_pointstore_','',strtolower(get_class($this)));\n\n\t\t$id=get_param_integer('sub_id');\n\t\t$rows=$GLOBALS['SITE_DB']->query_select('pstore_customs',array('c_title','c_cost','c_one_per_member'),array('id'=>$id,'c_enabled'=>1));\n\t\tif (!array_key_exists(0,$rows)) warn_exit(do_lang_tempcode('MISSING_RESOURCE'));\n\n\t\t$c_title=get_translated_text($rows[0]['c_title']);\n\t\t$title=get_page_title('PURCHASE_SOME_PRODUCT',true,array(escape_html($c_title)));\n\n\t\t$cost=$rows[0]['c_cost'];\n\t\t$next_url=build_url(array('page'=>'_SELF','type'=>'action_done','id'=>$class,'sub_id'=>$id),'_SELF');\n\t\t$points_left=available_points(get_member());\n\n\t\t// Check points\n\t\tif (($points_left<$cost) && (!has_specific_permission(get_member(),'give_points_self')))\n\t\t{\n\t\t\treturn warn_screen($title,do_lang_tempcode('_CANT_AFFORD',integer_format($cost),integer_format($points_left)));\n\t\t}\n\n\t\treturn do_template('POINTSTORE_CUSTOM_ITEM_SCREEN',array('_GUID'=>'bc57d8775b5471935b08f85082ba34ec','TITLE'=>$title,'COST'=>integer_format($cost),'REMAINING'=>integer_format($points_left-$cost),'NEXT_URL'=>$next_url));\n\t}", "public function actionOfferEstimation()\n {\n if( $formData = Yii::$app->session->get(\"formData\") )\n {\n $viewData['formData'] = $formData['ValuationForm'];\n return $this->render( 'offer-estimation-view' , $viewData );\n }\n // no data is saved to session (i.e. no form submitted)\n return Yii::$app->response->redirect(Yii::$app->params['baseUrl']);\n }", "function approve(){\n\t\t$points= $this->ref('currently_requested_to_id')->get('points_available');\n\t\tif($points < 3000)\n\t\t\t$this->api->js()->univ()->errorMessage(\"Not suficcient points available, [ $points ]\")->execute();\n\t\t// Send point to the requester and less from your self ... \n\n\t\t$purchaser= $this->add('Model_MemberAll')->addCondition(\"id\",$this['request_from_id'])->tryLoadAny();\n\t\t$purchaser['points_available'] = $purchaser['points_available'] + 3000;\n\t\t$purchaser->save();\n\n\t\t$seller=$this->add('Model_MemberAll')->addCondition(\"id\",$this['currently_requested_to_id'])->tryLoadAny();\n\t\t$seller['points_available'] = $seller['points_available'] - 3000;\n\t\t$seller->save();\n\n\t\tif($this->api->auth->model->id == 1)\n\t\t\t$this['status']='Approved By Admin';\n\t\telse\n\t\t\t$this['status']='Approved';\n\n\t\t$this->save();\n\n\n\t}", "function action_done()\n\t{\n\t\t$class=str_replace('hook_pointstore_','',strtolower(get_class($this)));\n\n\t\tpost_param_integer('confirm'); // Make sure POSTed\n\t\t$id=get_param_integer('sub_id');\n\t\t$rows=$GLOBALS['SITE_DB']->query_select('pstore_customs',array('id','c_title','c_cost','c_one_per_member'),array('id'=>$id,'c_enabled'=>1));\n\t\tif (!array_key_exists(0,$rows)) warn_exit(do_lang_tempcode('MISSING_RESOURCE'));\n\n\t\t$cost=$rows[0]['c_cost'];\n\n\t\t$c_title=get_translated_text($rows[0]['c_title']);\n\t\t$title=get_page_title('PURCHASE_SOME_PRODUCT',true,array(escape_html($c_title)));\n\n\t\t// Check points\n\t\t$points_left=available_points(get_member());\n\t\tif (($points_left<$cost) && (!has_specific_permission(get_member(),'give_points_self')))\n\t\t{\n\t\t\treturn warn_screen($title,do_lang_tempcode('_CANT_AFFORD',integer_format($cost),integer_format($points_left)));\n\t\t}\n\n\t\tif ($rows[0]['c_one_per_member']==1)\n\t\t{\n\t\t\t// Test to see if it's been bought\n\t\t\t$test=$GLOBALS['SITE_DB']->query_value_null_ok('sales','id',array('purchasetype'=>'PURCHASE_CUSTOM_PRODUCT','details2'=>strval($rows[0]['id']),'memberid'=>get_member()));\n\t\t\tif (!is_null($test))\n\t\t\t\twarn_exit(do_lang_tempcode('ONE_PER_MEMBER_ONLY'));\n\t\t}\n\n\t\trequire_code('points2');\n\t\tcharge_member(get_member(),$cost,$c_title);\n\t\t$sale_id=$GLOBALS['SITE_DB']->query_insert('sales',array('date_and_time'=>time(),'memberid'=>get_member(),'purchasetype'=>'PURCHASE_CUSTOM_PRODUCT','details'=>$c_title,'details2'=>strval($rows[0]['id'])),true);\n\n\t\trequire_code('notifications');\n\t\t$subject=do_lang('MAIL_REQUEST_CUSTOM',comcode_escape($c_title),NULL,NULL,get_site_default_lang());\n\t\t$username=$GLOBALS['FORUM_DRIVER']->get_username(get_member());\n\t\t$message_raw=do_lang('MAIL_REQUEST_CUSTOM_BODY',comcode_escape($c_title),$username,NULL,get_site_default_lang());\n\t\tdispatch_notification('pointstore_request_custom','custom'.strval($id).'_'.strval($sale_id),$subject,$message_raw,NULL,NULL,3,true);\n\n\t\t// Show message\n\t\t$url=build_url(array('page'=>'_SELF','type'=>'misc'),'_SELF');\n\t\treturn redirect_screen($title,$url,do_lang_tempcode('ORDER_GENERAL_DONE'));\n\t}", "public function ex_points(){\r\n $maps['is_on_sale'] = 1;\r\n $maps['type'] = 0;\r\n $info = D('goods')->where($maps)->select();\r\n // var_dump($info);die;\r\n $mapps['is_forbid'] = 0;\r\n $r = D('store')->where($mapps)->select();\r\n $this->assign('r',$r);\r\n $this->assign('info',$info);\r\n $this->display();\r\n }", "public function gainReputation($points)\n {\n $this->increment('reputation', $points);\n }", "public function actionNew()\n\t{\n\t\t$model=new Points;\n\n\t\t// Uncomment the following line if AJAX validation is needed\n\t\t// $this->performAjaxValidation($model);\n\t\t\n\t\t$_brands = Brands::model()->thisClient()->findAll(array(\n\t\t\t'select'=>'BrandId, BrandName', 'condition'=>'status=\\'ACTIVE\\''));\n\t\t$brands = array();\n\t\tforeach($_brands as $row) {\n\t\t\t$brands[$row->BrandId] = $row->BrandName;\n\n\t\t}\n\t\t\n\t\t$_campaigns = Campaigns::model()->findAll(array(\n\t\t\t'select'=>'CampaignId, BrandId, CampaignName', 'condition'=>'status=\\'ACTIVE\\''));\n\t\t$campaigns = array();\n\t\tforeach($_campaigns as $row) {\n\t\t\t$campaigns[$row->CampaignId] = $row->CampaignName;\n\n\t\t}\n\t\t\n\t\t$_channels = Channels::model()->findAll(array(\n\t\t\t'select'=>'ChannelId, BrandId, CampaignId, ChannelName', 'condition'=>'status=\\'ACTIVE\\''));\n\t\t$channels = array();\n\t\tforeach($_channels as $row) {\n\t\t\t$channels[$row->ChannelId] = $row->ChannelName;\n\n\t\t}\n\t\t\n\t\t$_rewardslist = RewardsList::model()->findAll(array(\n\t\t\t'select'=>'RewardId, Title', 'condition'=>'status=\\'ACTIVE\\''));\n\t\t$rewardslist = array();\n\t\tforeach($_rewardslist as $row) {\n\t\t\t$rewardslist[$row->RewardId] = $row->Title;\n\n\t\t}\n\n\t\tif(isset($_POST['Points']))\n\t\t{\n\t\t\t// echo \"<pre>\"; var_dump($_POST); exit;\n\t\t\t$model->attributes=$_POST['Points'];\n\t\t\t$model->setAttribute(\"DateCreated\", new CDbExpression('NOW()'));\n\t\t\t$model->setAttribute(\"CreatedBy\", Yii::app()->user->id);\n\t\t\t$model->setAttribute(\"DateUpdated\", new CDbExpression('NOW()'));\n\t\t\t$model->setAttribute(\"UpdatedBy\", Yii::app()->user->id);\n\t\t\t\n\t\t\tif($model->save())\n\t\t\t{\n\t\t\t\t$utilLog = new Utils;\n\t\t\t\t$utilLog->saveAuditLogs();\n\t\t\t\t$this->redirect(array('view','id'=>$model->PointsId));\n\t\t\t}\n\t\t}\n\n\t\t$this->render('create2',array(\n\t\t\t'model'=>$model,\n\t\t\t'brand_id'=>$brands,\n\t\t\t'channel_id'=>$channels,\n\t\t\t'campaign_list'=>$campaigns,\n\t\t\t'rewardlist_id'=>$rewardslist,\n\t\t));\n\t}" ]
[ "0.67140895", "0.66167986", "0.5845974", "0.5793979", "0.57863957", "0.57825184", "0.5688812", "0.5618296", "0.56000495", "0.55366266", "0.5496469", "0.549352", "0.5492733", "0.5475493", "0.54700106", "0.54416525", "0.5430484", "0.5411562", "0.5396062", "0.5374926", "0.53734684", "0.53182596", "0.5314186", "0.5306995", "0.52973807", "0.5294949", "0.5294812", "0.52667993", "0.5257058", "0.52366114" ]
0.77689725
0
Get token for current user and current session
public static function get_token() { global $USER; $sid = session_id(); return self::get_token_for_user($USER->id, $sid); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUserToken()\n {\n return !is_null($this->authToken) ? $this->authToken : $this->cookieHelper->getRequestCookie('auth');\n }", "protected function retrieveSessionToken() {}", "protected function retrieveSessionToken() {}", "protected function retrieveSessionToken() {}", "protected function retrieveSessionToken() {}", "function get_token()\n\t{\n\t\treturn session_id();\n\t}", "public static function getToken() {\n return session(\"auth_token\", \"\");\n }", "function token(){\n return Request::session('internal_token');\n}", "public function userByToken();", "abstract protected function retrieveSessionToken() ;", "public function getSessionAuthToken();", "protected function getToken()\n {\n // We have a stateless app without sessions, so we use the cache to\n // retrieve the temp credentials for man in the middle attack\n // protection\n $key = 'oauth_temp_'.$this->request->input('oauth_token');\n $temp = $this->cache->get($key, '');\n\n return $this->server->getTokenCredentials(\n $temp,\n $this->request->input('oauth_token'),\n $this->request->input('oauth_verifier')\n );\n }", "public function getSessionToken()\n {\n return $this->provider->accessToken;\n }", "public function getToken()\n {\n return $this->getApplication()->getSecurityContext()->getToken();\n }", "public static function get_token() {\n\t\t\t\n\t\t\t// Bring in the $session variable\n\t\t\tglobal $session;\n\t\t\t// Check if there is a csrf_token in the $_SESSION\n\t\t\tif(!$session->get('csrf_token')) {\n\t\t\t\t// Token doesn't exist, create one\n\t\t\t\tself::set_token();\n\t\t\t} \n\t\t\t// Return the token\n\t\t\treturn $session->get('csrf_token');\n\t\t}", "public function getToken()\n {\n return $this->getSecurityContext()->getToken();\n }", "public function get_current_user_token() {\n\t\t$user_id = $this->current_user->ID;\n\n\t\t$user_token = get_option( 'livechat_user_' . $user_id . '_token' );\n\t\tif ( ! $user_token ) {\n\t\t\treturn '';\n\t\t}\n\n\t\treturn $user_token;\n\t}", "private function getCurrentToken() {\n\t\tif(isset($_GET) && isset($_GET['token'])) {\n\t\t\t$sToken = $_GET['token'];\n\t\t} else {\n\t\t\techo $this->_translator->error_token;\n\t\t\texit();\n\t\t}\n\t\treturn $sToken;\n\t}", "function loadToken() {\r\n\t\treturn isset($_SESSION['token']) ? $_SESSION['token'] : null;\r\n\t}", "public function currentToken()\n {\n return $this->requestWithErrorHandling('get', '/api/current-token');\n }", "public function getAuthenticationTokenContext();", "public function get_request_token()\n {\n $sess_id = $_COOKIE[ini_get('session.name')];\n if (!$sess_id) $sess_id = session_id();\n $plugin = $this->plugins->exec_hook('request_token', array('value' => md5('RT' . $this->get_user_id() . $this->config->get('des_key') . $sess_id)));\n return $plugin['value'];\n }", "public function GetToken($data){ \n \n return $this->token;\n \n }", "public function getSessionToken()\n\t{\n\t\treturn \\Session::get('google.access_token');\n\t}", "public function getCurrentToken()\n {\n return $this->current_token;\n }", "public function getToken()\n {\n // if the user isn't authenticated simply return null\n $services = $this->services;\n if (!$services->get('permissions')->is('authenticated')) {\n return null;\n }\n\n // if we don't have a token; make one\n $session = $services->get('session');\n $container = new SessionContainer(static::CSRF_CONTAINER, $session);\n if (!$container['token']) {\n $session->start();\n $container['token'] = (string) new Uuid;\n $session->writeClose();\n }\n\n return $container['token'];\n }", "public function getToken() {\n return $this->accessToken;\n }", "public function actionGetToken() {\n\t\t$token = UserAR::model()->getToken();\n\t\t$this->responseJSON($token, \"success\");\n\t}", "function getUserFromToken() {\n\t\treturn $this->_storage->loadUserFromToken();\n\t}", "public function getToken();" ]
[ "0.7511241", "0.7504436", "0.7504436", "0.75041944", "0.75041944", "0.74776256", "0.7458744", "0.742556", "0.7403113", "0.7247412", "0.7232093", "0.72083265", "0.7151412", "0.71220917", "0.7072392", "0.7066118", "0.7050692", "0.7050453", "0.70492166", "0.7034856", "0.700692", "0.70013607", "0.6999547", "0.6995768", "0.69874686", "0.6965191", "0.6961545", "0.69587237", "0.695867", "0.69470316" ]
0.80625516
0
Delay between checks (or between short poll requests), ms
public function get_delay_between_checks(): int { $period = get_config('realtimeplugin_phppoll', 'checkinterval'); return max($period, 200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function delay()\n {\n if (!isset($this->headers['x-rate-limit-reset'])) {\n exit('Rate limited, but no rate limit header found');\n }\n\n $delay = $this->headers['x-rate-limit-reset'] - time();\n\n if ($delay < 10) {\n $delay = 60 * 15; // 15 minute delay if the given delay seems unreasonably small (can be due to server time differences)\n }\n \n print \"\\n\";\n\n do {\n print \"\\r\\e[K\";\n printf('Sleeping for %d seconds', $delay--);\n sleep(1);\n } while ($delay);\n }", "private function __sleep() {}", "private function __sleep() {}", "private function __sleep() {}", "private function __sleep() {}", "public function getDelayTime() {}", "public function waitWithBackoff()\n {\n $waitTime = $this->calculateSleepTime();\n if ($waitTime > 1000000) {\n sleep((int) ($waitTime / 1000000));\n } else {\n usleep($waitTime);\n }\n }", "public function wait($name, $delay = 30);", "public function __sleep();", "public static function getThrottleDelay() {}", "public function sleep();", "public function sleep() {}", "public function getDelay(): int;", "public static function sleep();", "private function _stepTimeout():void\n\t{\n\t\tif( $this->_timeout_queue[0]['call_at'] <= microtime( true ) )\n\t\t{\n\t\t\t[ 'task'=>$task, ]= array_shift( $this->_timeout_queue );\n\t\t\t\n\t\t\t$this->_runTask( $task );\n\t\t}\n\t\telse\n\t\t\tusleep( 1000 );\n\t}", "final public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "public function __sleep() {}", "function __sleep(){\n\n\t\t}" ]
[ "0.6671851", "0.6233737", "0.6233737", "0.6233737", "0.6233737", "0.6125437", "0.5979417", "0.5967411", "0.59566724", "0.5938162", "0.59212196", "0.59078735", "0.59006083", "0.5874492", "0.5859046", "0.58254164", "0.58228755", "0.58228755", "0.58228755", "0.58228755", "0.58228755", "0.58228755", "0.58228755", "0.58228755", "0.58224124", "0.5821766", "0.5821766", "0.5821766", "0.58213943", "0.5821348" ]
0.68932927
0
Defining a constructor accepting the Enum operand and two numberrs
function __construct($operand, $number1, $number2) { $this->operand = $operand; $this->number1 = $number1; $this->number2 = $number2; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct($o1, $o2) {\n if (!is_numeric($o1) || !is_numeric($o2)) {\n throw new Exception('Non-numeric operand.');\n }\n\n // Assign passed values to member variables\n $this->operand_1 = $o1;\n $this->operand_2 = $o2;\n }", "public function __construct($operand)\n {\n $this->operand = $operand;\n }", "public function __construct(string $enumClass)\n {\n parent::__construct(\"The enum $enumClass has empty case or you pass empty array as parameter\");\n }", "final private function __construct()\n {\n throw new Exception( 'Enum and Subclasses cannot be instantiated.' );\n }", "public function __construct($enum = null, $strict = false){\n\t\t\n\t\tif(!in_array($enum, $this->getConstantsList())) {\n\t\t\tthrow new \\InvalidArgumentException(sprintf(\"%s does not contain the enum value `%d`\", get_class($this), $enum));\n\t\t}\n\t\t\n\t\tif(is_null($enum) && !defined('static::__default')){\n\t\t\tthrow new \\InvalidArgumentException(sprintf(\"No argument was passed, %s does not contain a default value `static::__default`\", get_class($this)));\n\t\t}\n\t\t\n\t\t$this->enum = isset($enum)?$enum:static::__default;\n\t}", "public function __construct($value) {\n\t\tparent::__construct($value, 2);\n\n\t\t$valid = [\n\t\t\tself::CHECKING_DEPOSIT,\n\t\t\tself::CHECKING_CREDIT_PRENOTIFICATION,\n\t\t\tself::CHECKING_ZERO_DOLLAR,\n\t\t\tself::CHECKING_DEBIT,\n\t\t\tself::CHECKING_DEBIT_PRENOTIFICATION,\n\t\t\tself::CHECKING_DEBIT_ZERO_DOLLAR,\n\t\t\tself::SAVINGS_DEPOSIT,\n\t\t\tself::SAVINGS_CREDIT_PRENOTIFICATION,\n\t\t\tself::SAVINGS_CREDIT_ZERO_DOLLAR,\n\t\t\tself::SAVINGS_DEBIT,\n\t\t\tself::SAVINGS_DEBIT_PRENOTIFICATION,\n\t\t\tself::SAVINGS_DEBIT_ZERO_DOLLAR,\n\t\t];\n\n\t\tif (!in_array($value, $valid)) {\n\t\t\tthrow new InvalidFieldException('Invalid transaction code \"' . $value . '\".');\n\t\t}\n\t}", "public function __construct(string $value) //constructor\n {\n $seperateValues=explode(\" \",$value); //splitting the input using ' '\n\n $this->operator=array_shift($seperateValues); //using this method, I stored the operator in the operator property of \n //this class and removed it from the array\n \n \n for ($x = 0; $x < count($seperateValues); $x++) \n {\n try\n {\n if(is_numeric($seperateValues[$x])==1)\n {\n $this->operands[$x]=(int)$seperateValues[$x]; //retreivng the numbers from the existing array to the operands \n } //property I have created int this class\n else\n {\n $this->flag=1; //if the array has something else than a number, the flag becomes 1\n }\n }\n catch(Exception $e)\n {\n $this->flag=1; //also if there is any exception, the flag becomes 1\n }\n }\n }", "public function __construct($name = null, $operator = null, $value = null);", "public function __construct($valor){\n\t\tif(is_numeric($valor)){\n\t\t\t$this->arabigo = intval($valor);\n\t\t\t$this->romano = CRomano::arabigo2romano($this->arabigo);\n\t\t}\n\t\telse{\n\t\t\t$this->arabigo = CRomano::romano2arabigo($valor);\n\t\t\t$this->romano = CRomano::arabigo2romano($this->arabigo);\n\t\t}\n\t}", "public function __construct(\n //nbMessErr $nbMessErr,\n // Bar $bar,\n // Baz $baz,\n // Other $other\n )\n {\n //$this->nbMessErr = $nbMessErr;\n // $this->bar = $bar;\n // $this->baz = $baz;\n // $this->other = $other;\n }", "public function __construct($_oprL = null,$_oprType = null,$_label = null,$_name = null,$_oper = null,$_debit = null,$_credit = null)\n {\n parent::__construct(array('oprL'=>$_oprL,'oprType'=>$_oprType,'Label'=>$_label,'Name'=>$_name,'oper'=>$_oper,'Debit'=>$_debit,'Credit'=>$_credit), false);\n }", "public function __construct($title, $status = self::DID_PASS)\n {\n if (!is_int($status)) {\n throw new InvalidArgumentException(\n \"{$status} is not a valid result status\"\n );\n }\n\n $this->title = $title;\n $this->status = $status;\n }", "final private function __construct(string $enum)\n {\n $enum = strtoupper($enum);\n if (!array_key_exists($enum, static::$values)) {\n throw new UnexpectedValueException();\n }\n $this->value = static::$values[$enum];\n }", "function __construct(/*$value=NULL,$key=NULL,$settings=array()*/){\n $this->err = new opc_status($this->_init_msgs());\n $this->val = $this->s_get('val_init');\n $this->err->mode_success = 2;\n $this->err->lev_base = 2;\n $ar = func_get_args();\n call_user_func_array(array(&$this,'init'),$ar);\n }", "public function __construct($red, $green, $blue)\n {\n $this->toSelf = \"toRGB\";\n\n if ($red < 0 || $red > 255) {\n throw new InvalidArgumentException(sprintf('Parameter red out of range (%s)', $red));\n }\n if ($green < 0 || $green > 255) {\n throw new InvalidArgumentException(sprintf('Parameter green out of range (%s)', $green));\n }\n if ($blue < 0 || $blue > 255) {\n throw new InvalidArgumentException(sprintf('Parameter blue out of range (%s)', $blue));\n }\n\n $this->red = $red;\n $this->green = $green;\n $this->blue = $blue;\n }", "public function __construct($value = null, int $type = VT_EMPTY, $codepage = CP_ACP) {}", "public function __construct()\n {\n if (2 == func_num_args()) {\n $this->name = func_get_arg(0);\n $this->values = func_get_arg(1);\n }\n }", "public function testValueIsInvalid()\n {\n $init = 'foo';\n $set = array('test');\n $str = new \\Pv\\PEnum($init, null, $set);\n }", "function __construct() {\n # Initialize Attributes\n $this->cur_val = 0;\n $this->cur_type = \"Integer\";\n $this->length = 0;\n $this->result = 0;\n $this->error_message = \"\";\n $this->error_log = array();\n $this->error_count = 0;\n }", "function __construct($errorMsg, $comparisonField){\r\n\t\tparent::__construct($errorMsg);\r\n\t\t$this->comparisonField = $comparisonField;\r\n\t}", "public function __construct()\n {\n if (1 == func_num_args()) {\n $this->insuranceTypesCount = func_get_arg(0);\n }\n }", "public function __construct ($value) {}", "public function __construct ($value) {}", "public function __construct ($value) {}", "abstract public function __construct($value);", "function __construct(int $r, int $g, int $b) {\n\t\t$this->col = sprintf(\"#%02X%02X%02X\", $r, $g, $b);\n\t}", "public function __construct($value) {\n\t\t$this->_value = $value + 0;\n\t\t$this->_result = '';\n\t}", "function __construct($h = 0, $s = 0, $v = 0)\n {\n if(!is_numeric($h) || !is_numeric($s) || !is_numeric($v)){\n throw new \\Exception('Values must be numeric');\n }\n\n //Check if parameters are in the proper range 0->255\n if(!($h>=0 && $h <=360) || !($s>=0 && $s <=1) || !($v>=0 && $v <=1)){\n throw new \\Exception('Expected values from 0 to 360 in hue, and 0 to 1 in saturation and value');\n }\n $this->hue = $h;\n $this->saturation = $s;\n $this->value = $v;\n }", "function __construct(int $loanTerm, int $loanAmount, int $rpa, int $extraAmount = 0, int $downPayment = 0)\n {\n $this->loanAmount = $loanAmount - $downPayment;\n $this->loanTerm = $loanTerm;\n $this->rpa = $rpa;\n $this->extraAmount = $extraAmount;\n $this->rpm = $rpa / (100 * 12);\n $this->loanMonths = $loanTerm * 12;\n $this->downPayment = $downPayment;\n }", "public function __construct($r, $g, $b)\r\n {\r\n $this->red = $r;\r\n $this->green = $g;\r\n $this->blue = $b;\r\n }" ]
[ "0.6713969", "0.6340263", "0.60523725", "0.566583", "0.5644633", "0.5627109", "0.5532788", "0.552133", "0.55060625", "0.55014443", "0.5485953", "0.54538053", "0.544474", "0.5418187", "0.53756094", "0.5345832", "0.53069496", "0.52875847", "0.5282102", "0.52296215", "0.52060574", "0.51917225", "0.51917225", "0.51917225", "0.51824266", "0.51823944", "0.5162966", "0.51611114", "0.5157388", "0.5148072" ]
0.66733354
1
Get the nested causal exception (if any). Note, this replicates the final getPrevious() method that was added in PHP 5.3 (adding our own method enables exception nesting in PHP 5.0+).
public function getPriorException(){ // dont call this method getPrevious as in php5.3+ because this // method is final and we want this to run in 5 and 5.3+ return $this->priorException; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCause()\n {\n return $this->getPrevious();\n }", "public function get_previous() { return $this->getPrevious(); }", "public function getPrevious()\n {\n $prev = $this;\n $find = false;\n if (!is_null($this->parent)) {\n foreach ($this->parent->content as $c) {\n if ($c === $this) {\n $find=true;\n break;\n }\n if (!$find) {\n $prev = $c;\n }\n }\n }\n return $prev;\n }", "public function getException() {\n\t\treturn $this->lastException;\n\t}", "public function getParent() {\n if (NULL === $this->_parent) {\n throw new LogicException('No parent object was provided for this context.');\n }\n return $this->_parent;\n }", "public function getException()\r\n {\r\n return count($this->oException) == 0 ? null :\r\n (count($this->oException) == 1 ? $this->oException[0] :\r\n $this->oException);\r\n }", "function getException() {\n\t\treturn $this->Exception;\n\t}", "final public function getPrevious() {\n\t\treturn null;\n\t}", "public function getException()\n {\n return $this->exception;\n }", "public function getException()\n {\n return $this->exception;\n }", "public function getException()\n {\n return $this->exception;\n }", "public function getException()\n {\n return $this->exception;\n }", "public function getException()\n {\n return $this->exception;\n }", "public function getException()\n {\n return $this->exception;\n }", "public function getException() {\n return $this->exception;\n }", "public function getException()\n {\n return $this->_exceptions;\n }", "public function getException() {\n\t\treturn $this->_exception;\n\t}", "public function getLastException(): ?\\Exception\n {\n return $this->lastException;\n }", "public function getPrevious()\n {\n return $this->previous;\n }", "public function getPrevious()\n {\n return $this->previous;\n }", "public function getException()\r\n\t{\r\n\t\treturn $this->_exception;\r\n\t}", "public function getException(){\n return $this->_exception;\n }", "public function getException();", "final public static function getBaseException(\\Exception $exception)\n {\n while ($exception->getPrevious() !== null) {\n $exception = $exception->getPrevious();\n }\n\n return $exception;\n }", "public function getOuterMostParent() {}", "public function prevInvisible() {\n if(!$this->parent) {\n return null;\n } else {\n return $this->_prev($this->parent->children(), func_get_args(), 'invisible');\n }\n }", "public function back() {\n if ($this->parent === null) {\n throw new IllegalStateException(\"can't go back - no parent image\");\n }\n return $this->parent;\n }", "public function getPrevious() {}", "public function GetPrevLevel()\n {\n return $this->prevLevel;\n }", "public function getPreviousObject()\n {\n return $this->__object;\n }" ]
[ "0.6553154", "0.6120389", "0.5961391", "0.5914953", "0.582243", "0.57577556", "0.56650764", "0.55970615", "0.5523271", "0.5523271", "0.5523271", "0.5523271", "0.5523271", "0.5523271", "0.5518413", "0.54944897", "0.5494391", "0.5482709", "0.5470664", "0.5470664", "0.5429438", "0.5398771", "0.53092974", "0.5289634", "0.5260937", "0.5239657", "0.522053", "0.5201901", "0.519305", "0.51176375" ]
0.6861253
0
Display the trainingen page.
public function trainingen() { return view('pages.trainingen'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function training()\n {\n return view('training');\n }", "public function show(Training $training)\n {\n //\n }", "public function traininglist()\n {\n return view('training.opentraining.index');\n }", "public function index()\n {\n return view('training::index');\n }", "public function show(Train $train)\n {\n //\n }", "public function index()\n {\n $training_data = Training::all()->sortByDesc(\"id\");\n return view('admin.training.index', compact('training_data'));\n }", "function training_page_html() {\n return t('This is the landing page of the Training module');\n}", "public function index()\n {\n $trainers=Trainer::all();\n return view('backend.trainer.index',compact('trainers'));\n }", "public function displayPage()\n {\n\n // I check if there is a duplicate action\n $this->handleDuplicate();\n\n $formTable = new FormListTable();\n\n $formTable->prepare_items();\n require_once __DIR__ . '/templates/index.php';\n }", "public function index(){\n \n $this->display();\n }", "public function index()\n {\n $datas = $this->_model->getTakes();\n $this->render('Take/index', ['datas' => $datas, 'title' => 'Page d\\'emprunt']);\n }", "function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}", "public function list(TrainingRepository $repo) {\n\n $trainings = $repo->findAllInOrder();\n\n return $this->render('admin/training/index.html.twig', [\n 'trainings' => $trainings\n ]);\n }", "private function printLessonPage() {\n\t\t$correctVocabulary = mt_rand ( 0, 4 );\n\t\tinclude ('html/vocabularyTest.php');\n\t}", "public function show(TrainingInstitute $trainingInstitute)\n {\n //\n }", "function run() {\n\t\t$view = new View();\n\t\t\n\t\t$students = new Student();\n\t\tif ($view->students_tbl = $students->get_students_as_tbl_arr() ) {\n\t\t\t$view->error = $students->get_error();\n\t\t}\n\n\t\t$view->student_desc = $students->get_student_desc();\n\t\t$view->render('main_page.php');\n\t}", "public function show(UserTrainingAuth $userTrainingAuth)\n {\n //\n }", "public function index()\n {\n //\n $trainers = Trainer::all();//almacena coleccion(array) de entrenadores utiliza metodo all consulta todos los entradores \n return view(\"trainers.index\", compact(\"trainers\")); //la vista recibe parametro compact genera un array con la informacion asignada\n //return 'Hola controladortrainer';\n }", "public function show() {\n $this->buildPage();\n echo $this->_page;\n }", "public function index()\n {\n $trainers = Trainer::orderby('branch_id')->orderby('index')->paginate(6);\n\n return view('admin.Trainer.index', compact('trainers'));\n }", "public function index()\n {\n $exercises = Exercise::all();\n $trainings = Training::all();\n \n return view('exercises.index')->with('exercises', $exercises)->with('trainings', $trainings);\n \n }", "public function indexAction()\n {\n $this->page = Brightfame_Builder::loadPage(null, 'initialize.xml');\n \n // load the data\n Brightfame_Builder::loadPage(null, 'load_data.xml', $this->page);\n\n // load the view\n Brightfame_Builder::loadPage(null, 'load_view.xml', $this->page, $this->view);\n \n // render the page\n $this->view->page = $this->page;\n $this->view->layout()->page = $this->page->getParam('xhtml');\n }", "public function index(){\r\n $this->display(index);\r\n }", "public function index()\n {\n return Training::latest()->paginate();\n }", "public function index(){\r\n $this->display();\r\n }", "function index() {\n\t\t$faculties = $this->user->get_list_by_role(2); // all faculty list\n\t\t$logged_in = $this->session->userdata('logged_in');\n\n\t\t// Not student\n\t\tif ( $logged_in->role != '1' ) {\n\t\t\t$faculties = $this->evaluation->get_faculty_list($logged_in->id);\n\t\t}\n\n\t\t$this->data['title'] = 'Evaluate';\n\t\t$this->data['content'] = 'evaluate';\n\t\t$this->data['faculties'] = $faculties;\n\t\t$this->load->view('page-user', $this->data);\n\t}", "public function index()\n {\n $trainings = Training::all();\n if (Auth::user()->role == 'admin') {\n $trainings = Training::withCount('trainee')->orderBy('trainee_count', 'DESC')->take(4)->get();\n return view('admin.home')->with('trainings', $trainings);\n } elseif (Auth::user()->role == 'writer') {\n $posts = News::all();\n $comments = Comments::all();\n return view('admin.writer')->with([\n 'posts' => $posts,\n 'comments' => $comments,\n ]);\n } elseif (Auth::user()->role == 'pm') {\n return view('admin.pm');\n } else {\n return redirect()->route('index');\n };\n }", "public function listAction()\n {\n $this->_getSession()->setFormData([]);\n\n $this->_title($this->__('Training Cms'))\n ->_title($this->__('Pages'));\n\n $this->loadLayout();\n\n $this->_setActiveMenu('training_cms');\n $this->_addBreadcrumb($this->__('Training Cms'), $this->__('Training Cms'));\n $this->_addBreadcrumb($this->__('Pages'), $this->__('Pages'));\n\n $this->renderLayout();\n }", "public function index()\r\n\t{\r\n\t\t$data = array(\"title\" => \"Evaluacion\");\r\n\t\t$this->load->view('inicio', $data);\r\n \r\n\t\t\r\n\t}", "public function index()\n\t{\n\n\t\t$data['wi'] = $this->Backsep_model->get_wi_picking('');\n\t\t$this->Backsystem_model->checksession();\n\t\t$this->output('',$data);\n\t\t// $this->output('starter_view');\n\t}" ]
[ "0.7517378", "0.7281552", "0.7074264", "0.70442677", "0.6984545", "0.6908189", "0.67756504", "0.6657752", "0.6559157", "0.6516138", "0.65024227", "0.6494711", "0.6492683", "0.649082", "0.64902055", "0.6475568", "0.6429362", "0.6416625", "0.6393047", "0.6390218", "0.6385416", "0.6344242", "0.6322351", "0.6300494", "0.62949044", "0.62738717", "0.6273537", "0.6267255", "0.62566924", "0.62480026" ]
0.7941928
0
Display the biotim page.
public function biotim() { return view('pages.biotim'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show() {\n $this->buildPage();\n echo $this->_page;\n }", "public function biowim()\n\t{\n\t\treturn view('pages.biowim');\n\t}", "function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}", "public function show()\n {\n /** Configure generic views */\n $this->setupViews();\n /** Render views */\n ?>\n <html>\n <body>\n <?php\n /** Render views */\n $this->head_view->render();\n $this->secondary_nav_bar->render();\n $this->tree_view->render();\n $this->title_view->render();\n $this->primary_nav_bar->render();\n $this->render_page();\n ?>\n </body>\n </html>\n <?php\n }", "public function displayPage()\n\t{\n\t\t$this->assign('rightMenu', $this->rightMenu);\n\t\t$this->assign('content', $this->content);\n\t\t$this->display(\"main.tpl\");\n\t}", "public function display() {\n echo $this->render();\n }", "public function display() {\r\n\t\t$this->script();\r\n\t\t$this->html();\r\n\t\t\r\n\t}", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function Display()\n\t\t{\n\t\t\techo \"<html>\\n<head>\\n\";\n\t\t\t$this -> DisplayTitle();\n\t\t\t$this -> DisplayKeywords();\n\t\t\t$this -> DisplayStyles();\n\t\t\techo \"</head>\\n<body>\\n\";\n\t\t\t$this -> DisplayHeader();\n\t\t\t$this -> DisplayMenu($this->buttons);\n\t\t\techo $this->content;\n\t\t\t$this -> DisplayFooter();\n\t\t\techo \"</body>\\n</html>\\n\";\n\t\t}", "public function index(){\n \n $this->display();\n }", "public function display()\n {\n return $this->page->output();\n }", "public function displayPage()\n {\n\n $this->model->checkUserSession();\n $html = $this->displayHeader();\n $html .= $this->displayContent();\n $html .= $this->displayFooter();\n\n return $html;\n }", "function display() {\r\n \t$pageNo = null;\r\n\r\n \tif (isset($this->params['pass']['page'])) {\r\n \t\t$pageNo = $this->params['pass']['page'];\r\n \t}\r\n \t$pageCount = $this->params['paging']['Post']['pageCount'];\r\n\t\techo $this->getPaginationString($pageNo, $pageCount * 15, 15, 2, \"/messages/index/\", \"page:\");\r\n }", "public function displayPage()\n {\n\n // I check if there is a duplicate action\n $this->handleDuplicate();\n\n $formTable = new FormListTable();\n\n $formTable->prepare_items();\n require_once __DIR__ . '/templates/index.php';\n }", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function reqBiblePage() {\n $this->instance = new Bible();\n $this->view($this->instance->getBible(false, false), 'bible', 'Bíblia');\n }", "public function show();", "public function show();", "public function show();", "public function show();", "public function display()\n\t{\n\t\tparent::display();\n\t}", "public abstract function display();", "public function display(){}", "public function display() {\n\t}", "public function display() {}", "public function display() {}" ]
[ "0.70402324", "0.69638723", "0.69442993", "0.6780792", "0.67758614", "0.672785", "0.6688839", "0.66764104", "0.6649364", "0.6566488", "0.6566009", "0.65582913", "0.65241915", "0.65101755", "0.6497314", "0.6492671", "0.6492671", "0.6490646", "0.6490646", "0.648595", "0.64744717", "0.64744717", "0.64744717", "0.64744717", "0.6456679", "0.64538044", "0.64426965", "0.64362514", "0.6409727", "0.6409727" ]
0.75264925
0
Display the biowim page.
public function biowim() { return view('pages.biowim'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show() {\n $this->buildPage();\n echo $this->_page;\n }", "public function biotim()\n\t{\n\t\treturn view('pages.biotim');\n\t}", "function showPage() \n\t{\n\t\t$this->xt->display($this->templatefile);\n\t}", "public function show()\n {\n /** Configure generic views */\n $this->setupViews();\n /** Render views */\n ?>\n <html>\n <body>\n <?php\n /** Render views */\n $this->head_view->render();\n $this->secondary_nav_bar->render();\n $this->tree_view->render();\n $this->title_view->render();\n $this->primary_nav_bar->render();\n $this->render_page();\n ?>\n </body>\n </html>\n <?php\n }", "public function display() {\n echo $this->render();\n }", "public function displayPage()\n\t{\n\t\t$this->assign('rightMenu', $this->rightMenu);\n\t\t$this->assign('content', $this->content);\n\t\t$this->display(\"main.tpl\");\n\t}", "public function Display()\n\t\t{\n\t\t\techo \"<html>\\n<head>\\n\";\n\t\t\t$this -> DisplayTitle();\n\t\t\t$this -> DisplayKeywords();\n\t\t\t$this -> DisplayStyles();\n\t\t\techo \"</head>\\n<body>\\n\";\n\t\t\t$this -> DisplayHeader();\n\t\t\t$this -> DisplayMenu($this->buttons);\n\t\t\techo $this->content;\n\t\t\t$this -> DisplayFooter();\n\t\t\techo \"</body>\\n</html>\\n\";\n\t\t}", "public function display() {\r\n\t\t$this->script();\r\n\t\t$this->html();\r\n\t\t\r\n\t}", "public function displayPage()\n {\n\n // I check if there is a duplicate action\n $this->handleDuplicate();\n\n $formTable = new FormListTable();\n\n $formTable->prepare_items();\n require_once __DIR__ . '/templates/index.php';\n }", "public function display()\n {\n return $this->page->output();\n }", "public function displayPage()\n {\n\n $this->model->checkUserSession();\n $html = $this->displayHeader();\n $html .= $this->displayContent();\n $html .= $this->displayFooter();\n\n return $html;\n }", "public function index(){\n \n $this->display();\n }", "public function display()\n {\n echo $this->getDisplay();\n $this->isDisplayed(true);\n }", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n\t{\n\t\t//\n\t}", "public function show()\n {\n //the board string is used in the view\n $data = $this->getBoardAsString();\n require VIEW_PATH.'web.php';\n\n }", "function display() {\r\n \t$pageNo = null;\r\n\r\n \tif (isset($this->params['pass']['page'])) {\r\n \t\t$pageNo = $this->params['pass']['page'];\r\n \t}\r\n \t$pageCount = $this->params['paging']['Post']['pageCount'];\r\n\t\techo $this->getPaginationString($pageNo, $pageCount * 15, 15, 2, \"/messages/index/\", \"page:\");\r\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display()\n {\n }", "public function display() {\n\t}", "public function show();", "public function show();", "public function show();", "public function show();", "public function render() {\n echo \"<!DOCTYPE html>\\n\";\n echo \"<html>\\n\";\n $this->show_head();\n \n echo\"\\n<body>\\n\";\n echo $this->show_contents();\n\n echo \"\\n</body>\";\n echo \"\\n</html>\\n\\n\";\n }", "public function show()\n\t{\n\t\t\n\t}", "function display() {\n\t\t$view = &$this->getView();\n\t\t$view->display();\n\t}" ]
[ "0.74522656", "0.7130924", "0.71187615", "0.7036122", "0.6946333", "0.6922578", "0.68875295", "0.68491083", "0.6819816", "0.679951", "0.67669797", "0.6760535", "0.6694673", "0.6636045", "0.6636045", "0.6636045", "0.66299397", "0.6627444", "0.6623019", "0.6623019", "0.6621124", "0.6621124", "0.66184443", "0.66174376", "0.66174376", "0.66174376", "0.66174376", "0.6613192", "0.65930843", "0.658962" ]
0.7221221
1
Gets the metadataToAdd A collection of keyvalue pairs that should be added to the file.
public function getMetadataToAdd() { if (array_key_exists("metadataToAdd", $this->_propDict)) { if (is_a($this->_propDict["metadataToAdd"], "\Beta\Microsoft\Graph\SecurityNamespace\Model\KeyValuePair") || is_null($this->_propDict["metadataToAdd"])) { return $this->_propDict["metadataToAdd"]; } else { $this->_propDict["metadataToAdd"] = new KeyValuePair($this->_propDict["metadataToAdd"]); return $this->_propDict["metadataToAdd"]; } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAddMetadata()\n {\n return $this->readOneof(3);\n }", "public function setMetadataToAdd($val)\n {\n $this->_propDict[\"metadataToAdd\"] = $val;\n return $this;\n }", "public function addMetadata()\n {\n $metadata = new clozetext_metadata();\n $metadata->set_distractor_rationale('It is a general feedback');\n return $metadata;\n }", "public function get_metadata() {\n\t\t$metadata = [];\n\n\t\tforeach ( $this->get_mapping() as $attribute => $meta_key ) {\n\t\t\t$metadata[ $attribute ] = $this->get_meta( $meta_key );\n\t\t}\n\n\t\treturn $metadata;\n\t}", "public function get_metadata() {\n return $this->metadata;\n }", "public function getMetaData() {\n\t\treturn $this->arrMetadata;\n\t}", "public function getFileMetadata()\n {\n return $this->get('FileMetadata');\n }", "public function add()\n {\n $data = array(\n \n 'user_id' => '',\n \n 'perm_id' => '',\n \n 'isactive' => '',\n \n 'userid' => '',\n \n 'created' => '',\n \n 'modified' => '',\n \n );\n //'created' => NOW(),\n //'modified' => NOW(),\n //'userid' => userid(),\n return $data;\n }", "public function getAllMetadata(): Collection;", "protected function getMetadata()\n {\n // object not working must use array\n $metadata['platform'] = \"Magento 1\";\n $metadata['version'] = Mage::getVersion();\n return $metadata;\n }", "public function getMetaData()\n {\n return $this->metadata;\n }", "public function getMetadata();", "public function getMetadata();", "public function getMetadata();", "public static function get_metadata(collection $collection) : collection {\n $collection->add_database_table(\n 'tool_dataprivacy_request',\n [\n 'comments' => 'privacy:metadata:request:comments',\n 'userid' => 'privacy:metadata:request:userid',\n 'requestedby' => 'privacy:metadata:request:requestedby',\n 'dpocomment' => 'privacy:metadata:request:dpocomment',\n 'timecreated' => 'privacy:metadata:request:timecreated'\n ],\n 'privacy:metadata:request'\n );\n\n $collection->add_user_preference(tool_helper::PREF_REQUEST_FILTERS,\n 'privacy:metadata:preference:tool_dataprivacy_request-filters');\n $collection->add_user_preference(tool_helper::PREF_REQUEST_PERPAGE,\n 'privacy:metadata:preference:tool_dataprivacy_request-perpage');\n\n return $collection;\n }", "function getAdditionalMetadataFieldNames() {\n\t\treturn $this->getMetadataFieldNames(false);\n\t}", "protected function addCustomFieldset()\n {\n $this->meta = array_merge_recursive(\n $this->meta,\n [\n static::NOTE_FIELD_INDEX => $this->getFieldsetConfig(),\n ]\n );\n }", "public function getAdditionalAddAttributes(): ?array;", "public function getMetaData()\n {\n return [\n 'type' => $this->type,\n 'mimetype' => $this->mimetype,\n 'size' => $this->size,\n 'width' => $this->width,\n 'height' => $this->height\n ];\n }", "public function getMetadata() {}", "public function getMetadata() {}", "public function getAdd()\n {\n return array(\n 'Currency.name' => array('type' => 'text', 'label' => __(\"Name\")),\n 'Currency.code' => array('type' => 'text', 'label' => __(\"Code\")),\n 'Currency.rate' => array('type' => 'text', 'label' => __(\"Rate\"))\n );\n }", "public function getMetadata()\n {\n return $this->_metadata;\n }", "public function add_metadata($metadata)\n\t{\n\t\t$this->db->insert('metadata', $metadata);\n\t\treturn $this->db->insert_id();\n\t}", "public function getMetaData();", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }", "public function getMetadata()\n {\n return $this->metadata;\n }" ]
[ "0.65856576", "0.6050154", "0.5808412", "0.570184", "0.5596507", "0.5593734", "0.550526", "0.54395956", "0.5430593", "0.53976893", "0.53729856", "0.53718114", "0.53718114", "0.53718114", "0.5365972", "0.5363957", "0.5350035", "0.5349724", "0.53401923", "0.53392845", "0.53392845", "0.531599", "0.53030664", "0.529502", "0.52907765", "0.52857846", "0.52857846", "0.52857846", "0.52857846", "0.52857846" ]
0.70751345
0
Sets the metadataToAdd A collection of keyvalue pairs that should be added to the file.
public function setMetadataToAdd($val) { $this->_propDict["metadataToAdd"] = $val; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addMetadata(AbstractMetadata $metadata): void\n {\n $this->metadata[get_class($metadata)][] = $metadata;\n }", "protected function addCustomFieldset()\n {\n $this->meta = array_merge_recursive(\n $this->meta,\n [\n static::NOTE_FIELD_INDEX => $this->getFieldsetConfig(),\n ]\n );\n }", "public function setMetadata($metadata) {}", "public function setMetadata($metadata) {}", "public function setAddMetadata($var)\n {\n GPBUtil::checkMessage($var, \\Clarifai\\Api\\AddMetadata::class);\n $this->writeOneof(3, $var);\n\n return $this;\n }", "function set_metadata($name, $value) {\n if ($name && $value)\n $this->metadata[$name] = $value;\n }", "public function addMetadata($key, $value)\n {\n $this->_metadata[$key] = $value;\n }", "public function addMetadata($key, $value)\n {\n $this->metadata[$key] = $value;\n }", "public function setMetadata(?array $metadata): void\n {\n $this->metadata['value'] = $metadata;\n }", "function addUpdateMetadata(){\n\t \n\t\t $this->getMakeMetadata(); //get previously saved metadata\n\t\t \n\t\t $chValue = $this->checkParam(\"title\"); \n\t\t if($chValue != false ){\n\t\t\t\t$this->tableName = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"description\"); \n\t\t if($chValue != false ){\n\t\t\t\t$this->tableDesciption = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"doi\"); \n\t\t if($chValue != false ){\n\t\t\t\t$this->tableDOI = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"ark\"); \n\t\t if($chValue != false ){\n\t\t\t\t$this->tableARK = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"versionControl\");\n\t\t if($chValue != false){\n\t\t\t\t$this->versionControl = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"pubCreated\");\n\t\t if($chValue != false){\n\t\t\t\t$this->pubCreated = $chValue;\n\t\t }\n\t\t \n\t\t $chValue = $this->checkParam(\"tags\"); \n\t\t if($chValue != false ){\n\t\t\t\tif(stristr($chValue, self::tagDelim)){\n\t\t\t\t\t $rawTags = explode(self::tagDelim, $chValue);\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t $rawTags = array($chValue);\n\t\t\t\t}\n\t\t\t\t$tags = array();\n\t\t\t\tforeach($rawTags as $tag){\n\t\t\t\t\t $tags[] = trim($tag);\n\t\t\t\t}\n\t\t\t\t$this->tableTags = $tags;\n\t\t }\n\t\t \n\t\t $this->saveMetadata(); //save the upated metadata\n\t }", "public function setMetadata($metadata)\n\t{\n\t\t$this->vars['metadata'] = $metadata;\n\t}", "public function set_metadata ($metadata) {\n $this->metadata = $metadata;\n }", "public function setMetadata($metadata)\n {\n $this->metadata->set($metadata);\n }", "function add_metadata($meta_type, $object_id, $meta_key, $meta_value, $unique = \\false)\n {\n }", "public function setMetadata($metadata)\n {\n $this->metadata = $this->message['metadata'] = $metadata;\n }", "function setMetadata(array $inMetadata = array()) {\n\t\tif ( $inMetadata !== $this->_Metadata ) {\n\t\t\t$this->_Metadata = $inMetadata;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "public function setMetadata($metadata)\n {\n $this->metadata = $metadata;\n }", "public function setFileMetadata(array $fileMetadata)\n {\n $this->_fileMetadata = $fileMetadata;\n }", "function createMetaData()\n\t{\n\t\tparent::createMetaData();\n\t\t$this->saveAuthorToMetadata();\n\t}", "public function addMetaData(array $meta)\n {\n $this->meta = array_merge($this->meta, $meta);\n return $this;\n }", "public function setMetadata($name, $value)\n {\n $this->metadata[$name] = $value;\n }", "public function setMetadata(array $metadata)\n {\n $this->_metadata = $metadata;\n }", "public function setMetadata(array $metadata)\n {\n $this->_metadata = $metadata;\n }", "public function addMeta(array $metas, string $outputPath): void;", "private function set_metafile_fields(){\n\n\t\t\t// add more fields for your requierements\n $custom_fields = array( \n\t\t\t\t'field_name1'\t=> __( 'field name 1', self::$plugin_obj->class_name ),\n\t\t\t\t'field_name2'\t=> __( 'field name 2', self::$plugin_obj->class_name ),\n\t\t\t\t'field_name3'\t=> __( 'field name 3', self::$plugin_obj->class_name ),\n\t\t\t );\n\n\n foreach( $custom_fields as $custom_attrname => $custom_value){\n self::$metafile_fields->$custom_attrname = $custom_value;\n } \n\n }", "public function setMetaData($metaData);", "public function setMetadata(array $metadata)\n {\n $this->metadata = $metadata;\n }", "private function addPropertyMetadata(PropertyMetadataInterface $metadata)\n {\n $property = $metadata->getPropertyName();\n\n $this->members[$property][] = $metadata;\n }", "public function addMetadata($key, $value)\n {\n $this->metadata[$key] = $value;\n\n return $this;\n }", "public function add_metadata($metadata)\n\t{\n\t\t$this->db->insert('metadata', $metadata);\n\t\treturn $this->db->insert_id();\n\t}" ]
[ "0.61468655", "0.6092303", "0.599851", "0.5997684", "0.5920778", "0.58736515", "0.57742554", "0.57394105", "0.57075423", "0.5630088", "0.56269085", "0.5625178", "0.56005466", "0.5519524", "0.5495647", "0.54950476", "0.5457769", "0.5422183", "0.5393813", "0.53856033", "0.5384853", "0.53820294", "0.53820294", "0.53623736", "0.53497434", "0.53291225", "0.5305001", "0.5302711", "0.52968764", "0.52839965" ]
0.68084323
0
Gets the metadataToRemove A collection of strings that indicate which keys to remove from the file metadata.
public function getMetadataToRemove() { if (array_key_exists("metadataToRemove", $this->_propDict)) { return $this->_propDict["metadataToRemove"]; } else { return null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delMetadata() {}", "public function delMetadata() {}", "public function delMetadata() {}", "public function getDeleteMetadata()\n {\n return $this->readOneof(4);\n }", "public function getRemoveTags() {\n\t\treturn $this->removeTags;\n\t}", "protected function _remove()\n {\n $_tagsArray = array();\n foreach ($this->_tagsArray as $key => $value) {\n if (!in_array($value['tag'], $this->getRemoveTags())) {\n $_tagsArray[$value['tag']] = $value;\n }\n }\n $this->_tagsArray = array();\n $this->_tagsArray = $_tagsArray;\n return $this->_tagsArray;\n }", "public function get_metadata() {\n\t\t$metadata = [];\n\n\t\tforeach ( $this->get_mapping() as $attribute => $meta_key ) {\n\t\t\t$metadata[ $attribute ] = $this->get_meta( $meta_key );\n\t\t}\n\n\t\treturn $metadata;\n\t}", "public function getRemoveTags()\n {\n return $this->_removeTags;\n }", "function getAdditionalMetadataFieldNames() {\n\t\treturn $this->getMetadataFieldNames(false);\n\t}", "public function setMetadataToRemove($val)\n {\n $this->_propDict[\"metadataToRemove\"] = $val;\n return $this;\n }", "public function getRemovedTypes()\n {\n return $this->removedTypes;\n }", "public function getListRemove()\n {\n return $this->_listRemove;\n }", "public function removeAllMeta() {\n // Get the amount of meta tags that is going to be removed\n $removed = sizeof($this->meta);\n\n // Remove all the meta tags\n $this->meta = array();\n\n // Return the amount of removed tags\n return $removed;\n }", "public function getCleanKeys()\n {\n return $this->cleanKeys;\n }", "public function extractAllMeta(): array\n {\n $uploadMetaData = $this->request->headers->get('Upload-Metadata');\n\n if (empty($uploadMetaData)) {\n return [];\n }\n\n $uploadMetaDataChunks = explode(',', $uploadMetaData);\n\n $result = [];\n foreach ($uploadMetaDataChunks as $chunk) {\n $pieces = explode(' ', trim($chunk));\n\n $key = $pieces[0];\n $value = $pieces[1] ?? '';\n\n $result[$key] = base64_decode($value);\n }\n\n return $result;\n }", "public function getAllMetadata(): Collection;", "public function getFileMetadata()\n {\n return $this->get('FileMetadata');\n }", "public function getRemovedObjects() {\n\t\treturn $this->removedObjects;\n\t}", "private function getFieldsFromMetadata($metadata)\n {\n $fields = $metadata[0]->fieldNames;\n\n // Remove the primary key field if it's not managed manually\n /*if (!$metadata->isIdentifierNatural()) {\n $fields = array_diff($fields, $metadata->identifier);\n }\n\n foreach ($metadata->associationMappings as $fieldName => $relation) {\n if ($relation['type'] !== ClassMetadataInfo::ONE_TO_MANY) {\n $fields[] = $fieldName;\n }\n }*/\n\n return $fields;\n }", "function getSetMetadataFieldNames($translated = true) {\n\t\t// Retrieve a list of all possible meta-data field names\n\t\t$metadataFieldNameCandidates = $this->getMetadataFieldNames($translated);\n\n\t\t// Only retain those fields that have data\n\t\t$metadataFieldNames = array();\n\t\tforeach($metadataFieldNameCandidates as $metadataFieldNameCandidate) {\n\t\t\tif($this->hasData($metadataFieldNameCandidate)) {\n\t\t\t\t$metadataFieldNames[] = $metadataFieldNameCandidate;\n\t\t\t}\n\t\t}\n\t\treturn $metadataFieldNames;\n\t}", "protected function deleted()\n {\n $result = [];\n\n foreach ($before as $key => $value) {\n $result[] = [\n 'key' => $key,\n 'value' => $value,\n 'type' => empty($value) ? 'equal' : 'delete',\n ];\n }\n\n return $result;\n }", "public function getMetaData() {\n\t\treturn $this->arrMetadata;\n\t}", "public function get_removed_cart_contents() {\n\t\treturn (array) $this->removed_cart_contents;\n\t}", "protected function _getAllCustomMetadataKeys() {}", "public function getModifiedColumns()\n {\n return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];\n }", "public function getModifiedColumns()\n {\n return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];\n }", "public function getModifiedColumns()\n {\n return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];\n }", "public function getModifiedColumns()\n {\n return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];\n }", "public function getModifiedColumns()\n {\n return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];\n }", "public function getModifiedColumns()\n {\n return $this->modifiedColumns ? array_keys($this->modifiedColumns) : [];\n }" ]
[ "0.552871", "0.552871", "0.552871", "0.5365626", "0.53509885", "0.5302153", "0.52644527", "0.5199049", "0.51217324", "0.5118283", "0.51068085", "0.5094225", "0.5085879", "0.5039409", "0.4996771", "0.49885955", "0.49806613", "0.49720898", "0.49266577", "0.4891758", "0.48408672", "0.4835823", "0.4823749", "0.48070884", "0.4806787", "0.4806787", "0.4806787", "0.4806787", "0.4806787", "0.4806787" ]
0.72064364
0
Sets the metadataToRemove A collection of strings that indicate which keys to remove from the file metadata.
public function setMetadataToRemove($val) { $this->_propDict["metadataToRemove"] = $val; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delMetadata() {}", "public function delMetadata() {}", "public function delMetadata() {}", "public function unsetMetadata(): void\n {\n $this->metadata = [];\n }", "public function resetMetadata(array $metadata);", "public function setMetadata($metadata) {}", "public function setMetadata($metadata) {}", "public function getMetadataToRemove()\n {\n if (array_key_exists(\"metadataToRemove\", $this->_propDict)) {\n return $this->_propDict[\"metadataToRemove\"];\n } else {\n return null;\n }\n }", "public function setFileMetadata(array $fileMetadata)\n {\n $this->_fileMetadata = $fileMetadata;\n }", "public function setMetadata($metadata)\n {\n $this->metadata->set($metadata);\n }", "public function set_metadata ($metadata) {\n $this->metadata = $metadata;\n }", "public function setMetadata($metadata)\n {\n $this->metadata = $metadata;\n }", "public function setMetadata(array $metadata)\n {\n $this->_metadata = $metadata;\n }", "public function setMetadata(array $metadata)\n {\n $this->_metadata = $metadata;\n }", "public function setMetadata(array $metadata)\n {\n $this->metadata = $metadata;\n }", "public function setMetadata($metadata)\n\t{\n\t\t$this->vars['metadata'] = $metadata;\n\t}", "public function setRemoved($removed) {\n\t\t$this->removed = (boolean)$removed;\n\n\t\t$this->addOrUpdate();\n\t}", "public function setMetadata($metadata)\n {\n $this->metadata = $this->message['metadata'] = $metadata;\n }", "public function setMetaData($metaData);", "public function setMetadata(?array $metadata): void\n {\n $this->metadata['value'] = $metadata;\n }", "public function delMetadata() {\n throw new Exception('Not implemented yet');\n }", "function setMetadata(array $inMetadata = array()) {\n\t\tif ( $inMetadata !== $this->_Metadata ) {\n\t\t\t$this->_Metadata = $inMetadata;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "public function setMetaData(array $data): void\n {\n $data = array_change_key_case($data, CASE_LOWER);\n\n //@todo sanitize attributes\n\n $this->data = $data + $this->data;\n\n try {\n Application::getInstance()->getVxPDO()->updateRecord('folders', $this->id, $this->data);\n }\n catch (\\PDOException $e) {\n throw new MetaFolderException(sprintf(\"Data commit of folder '%s' failed. PDO reports %s\", $this->filesystemFolder->getPath(), $e->getMessage()));\n }\n }", "public function resetMetadata(): void\n {\n $this->_metadata = null;\n }", "public function setDeleteMetadata($var)\n {\n GPBUtil::checkMessage($var, \\Clarifai\\Api\\DeleteMetadata::class);\n $this->writeOneof(4, $var);\n\n return $this;\n }", "function delete_metadata($meta_type, $object_id, $meta_key, $meta_value = '', $delete_all = \\false)\n {\n }", "public function setMetadata($metadata)\n {\n return $this->set('metadata', $metadata);\n }", "public function setMetadataOptions($var)\n {\n GPBUtil::checkMessage($var, \\Google\\Cloud\\StorageTransfer\\V1\\MetadataOptions::class);\n $this->metadata_options = $var;\n\n return $this;\n }", "public function setRemoveTags($tags) {\n\t\tforeach ($tags as $tag) {\n\t\t\t$this->setRemoveTag($tag);\n\t\t}\n\t}", "public function setRemoveTag($tag) {\n\t\t$this->removeTags[] = $this->trimTags($tag);\n\t}" ]
[ "0.5994148", "0.5994148", "0.5994148", "0.59756386", "0.5717427", "0.5666408", "0.5666208", "0.5527541", "0.55252934", "0.54712313", "0.5413414", "0.53825814", "0.5363142", "0.5363142", "0.5272438", "0.52425", "0.518364", "0.5155652", "0.51165986", "0.50931853", "0.49874014", "0.4972734", "0.49500933", "0.49249387", "0.48584488", "0.48180088", "0.4814836", "0.4774326", "0.4740156", "0.47384608" ]
0.61728036
0
Converts the received value to the Euro format
public static function euro($value) { if (! is_numeric($value)) { throw new Exception('[fieldRendererHelper::euro] The inserted value is not numeric!'); } return '€ '.number_format($value, 2, ',', '.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function currency_format_en($value) {\n $value = number_format($value, 2, '.', ',');\n $value = str_replace('.00', '', $value);\n return $value;\n }", "function european_format($amount)\n {\n //return $fmt->formatCurrency($amount, \"EUR\");\n return $amount;\n }", "function convertMoneyToCents($value){\n $value = preg_replace(\"/\\,/i\",\"\",$value);\n\n //to remove anything that is not a number, a dot or dash and replace it with an empty string\n $value = preg_replace(\"/([^0-9\\.\\-])/i\", \"\", $value);\n\n if(!is_numeric($value)){\n return 0.00;\n }\n\n $value = (float) $value;\n return round($value, 2) * 100;\n}", "public function price_to_s(){\n return number_format($this->price, 2, '€', '');\n }", "static function currency_format($value) {\n $value = number_format($value, 2, ',', '.');\n $value = str_replace(',00', '', $value);\n return $value;\n }", "function __formatCurrency($value)\n {\n if ($this->__init['definitions']['currency_type'] === 'dolar') {\n if (preg_match('/(([0-9]+)\\.([0-9]{1,2}))/', $value)) {\n $value.= 00;\n list($val, $decimal) = explode('.', $value);\n $decimal = substr($decimal, 0, 2);\n return $val . $decimal;\n } else return $value . '00';\n } else if ($this->__init['definitions']['currency_type'] === 'real') {\n if (preg_match('/(([0-9]+)\\,([0-9]{1,2}))/', $value)) {\n $value.= 00;\n list($val, $decimal) = explode(',', $value);\n $decimal = substr($decimal, 0, 2);\n return $val . $decimal;\n } else return $value . '00';\n } else return $value;\n }", "public function getPaiementEnEuro() {\n return $this->paiementEnEuro;\n }", "function to_price($amount = 0.00, $symbol = \"$\", $currency_code = \"USD\"){\n $amount = floatval($amount);\n return sprintf(\"%s%.2f %s\", $symbol, $amount, $currency_code);\n}", "public static function convertFahrenheitToCelsius($value)\n {\n if (is_array($value)) {\n foreach ($value as $key=>$v) {\n $value[$key] = self::convertFahrenheitToCelsius($v);\n }\n } else {\n $value = ($value - 32) * 5 / 9;\n }\n\n return $value;\n }", "function getfaircoin_price($price){\r\n global $edd_options;\r\n\r\n if( $price == 0 ) { // <span style=\"font-family:arial\">ƒ</span>\r\n $price = '1 Fair = '.number_format($edd_options['faircoin_price'], 2, '.', ',').' EUR';\r\n }\r\n return $price;\r\n}", "public function priceToEur($price,$currency){\r\n \t\t$from = $currency;\r\n\t\t$to = Mage::app()->getStore()->getCurrentCurrencyCode();\r\n\t\t$allowedCurrencies = Mage::getModel('directory/currency')->getConfigAllowCurrencies(); \r\n\t\t$currencyRates = Mage::getModel('directory/currency')->getCurrencyRates('EUR', array_values($allowedCurrencies));\r\n\t\t$rate = 1/$currencyRates['USD'];\r\n\t\t$newPrice = $price*$rate;\r\n\t\treturn $newPrice;\r\n }", "function putEuroSymbolandSupTagDecimals($number) {\n\t$number = strval($number); // Convert to string.\n\n\tif (strpos($number,'.')) { // If the number is a float (i.e. contains a point).\n\t\t// Replace the point by an € and put the <sup> tags.\n\t\treturn str_replace(\".\", \"€<sup>\", $number).'</sup>';\n\t}\n\n\t// Return the number without any modification (except that we transformed it into a string).\n\treturn $number.'€';\n}", "function conv_money($uang){\n\t\t$uang_explode = explode('.',$uang);\n\t\tif($uang_explode[0] < '1,000'){\n\t\t\t$uang_res = $uang_explode[0];\n\t\t}else{\n\t\t\t$uang_res = str_replace(',','',$uang_explode[0]);\n\t\t}\n\t\treturn $uang_res;\n\t}", "function price () {\n global $value;\n $pricefloat = ceil($value['price']);\n\n if ($pricefloat <= 999) {\n echo $pricefloat;\n } elseif ($pricefloat >= 1000) {\n $num_format = number_format($pricefloat, 0, '.', ' ');\n echo $num_format . \" &#8381;\";\n }\n }", "public function formatPriceWithoutCurrency($value) {\n return Mage::getModel('directory/currency')->format($value, array('display' => Zend_Currency::NO_SYMBOL), false);\n }", "public function formatPriceWithoutCurrency($value) {\n return Mage::getModel('directory/currency')->format($value, array('display' => Zend_Currency::NO_SYMBOL), false);\n }", "static function toCurrency($amount)\r\n {\r\n return \"$\" . number_format((double) $amount, 2);\r\n }", "function format_currency($value, $symbol=true)\r\n{\r\n\r\n\tif(!is_numeric($value))\r\n\t{\r\n\t\treturn;\r\n\t}\r\n\t\r\n\t$CI = &get_instance();\r\n\t\r\n\tif($value < 0 )\r\n\t{\r\n\t\t$neg = '- ';\r\n\t} else {\r\n\t\t$neg = '';\r\n\t}\r\n\t\r\n\tif($symbol)\r\n\t{\r\n\t\t$formatted\t= number_format(abs($value), 2,'.', ',');\r\n\t\t\r\n\t\t\t$formatted\t= $neg.'$'.$formatted;\r\n\t}\r\n\telse\r\n\t{\r\n\t\r\n\t\t//traditional number formatting\r\n\t\t$formatted\t= number_format(abs($value), 2, '.', ',');\r\n\t}\r\n\t\r\n\treturn $formatted;\r\n}", "public function iva_articulos_formato(){\r\n\t\t\t$importe = $this->iva_articulos();\r\n\t\t\t$formatter = new NumberFormatter('de_DE', NumberFormatter::CURRENCY);\r\n\t\t\treturn $formatter->formatCurrency($importe, 'EUR');\r\n\t\t}", "public function setValue($value) {\n // this is an improvise\n // detect the currency by symbol,\n $currencySign = mb_substr($value, 0, 1, 'utf-8');\n // seperated out amount from currecy symbol, although this is not \n // correct but since data is missing from csv\n $this->value = (float) mb_substr($value, 1, mb_strlen($value) - 1, 'utf-8');\n $this->detectCurrencyBySign($currencySign);\n }", "function format($val) {\r\n //setlocale(LC_MONETARY, 'en_US');\r\n return number_format(money_format('%i', $val), 2);\r\n }", "function konv_to_money($money)\n\t{\n\t\t$money_r = number_format($money, 2, '.', ',');\n\t\treturn $money_r; // output : $5,000.00\n\t}", "public function currency($value): string\n {\n $class = '';\n if ($value instanceof Money) {\n $value = MoneyUtil::format($value);\n } else {\n $value = $this->Number->currency($value);\n }\n if ($value < 0) {\n $class = 'negative-balance';\n }\n\n return $this->Html->tag('span', $value, ['class' => $class]);\n }", "public function formatedPrice()\n {\n // if I format total amount of cart, use cart->total_price\n $amount = $this->price ? $this->price : $this->total_price;\n $fmt_price = new NumberFormatter('en', NumberFormatter::CURRENCY);\n \n return $fmt_price->formatCurrency($amount, \"EUR\");\n }", "public function formatPrice($value)\n\t{\n\t\treturn Mage::getSingleton('adminhtml/session_quote')->getStore()->formatPrice($value);\n\t}", "public function getValue(bool $inEuro = false);", "function Valores_sd($valor){\t\n\n return '$ '.number_format($valor,0,',','.');\n\n}", "function toMoney($val,$symbol='$',$r=2){\n\n\n $n = $val;\n $c = is_float($n) ? 1 : number_format($n,$r);\n $d = '.';\n $t = ',';\n $sign = ($n < 0) ? '-' : '';\n $i = $n=number_format(abs($n),$r);\n $j = (($j = strlen($i)) > 3) ? $j % 3 : 0;\n\n return $symbol.$sign .($j ? substr($i,0, $j) + $t : '').preg_replace('/(\\d{3})(?=\\d)/',\"$1\" + $t,substr($i,$j)) ;\n\n}", "public function getPrice()\n {\n return '£' . number_format($this->price, 2);\n }", "public function currency($value)\n {\n return config(\"customer_portal.currency_symbol\") . number_format($value, 2, config(\"customer_portal.decimal_separator\"), config(\"customer_portal.thousands_separator\"));\n }" ]
[ "0.6946296", "0.6927172", "0.64700776", "0.6387634", "0.6357601", "0.6298162", "0.6116194", "0.61106825", "0.61036587", "0.60473263", "0.5987716", "0.5959169", "0.5951928", "0.59432983", "0.5928837", "0.5928837", "0.5868156", "0.58627117", "0.5862655", "0.5859593", "0.58593094", "0.58535737", "0.5852552", "0.58451945", "0.5791396", "0.5782672", "0.5778165", "0.5764811", "0.5749793", "0.57399505" ]
0.7648277
0
Appends a text before or after(default) when rendering a given value
public static function append($value, $text, $pos = 'after') { if (! in_array($pos, array('after', 'before'))) { throw new Exception('[fieldRendererHelper::append] The value for arg $pos is not valid!'); } if ($pos == 'after') { return $value.' '.$text; } elseif ($pos == 'before') { return $text.' '.$value; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function textLine($value)\n {\n return $value . $this->LE;\n }", "public function TextLine($value) {\n\t return $value . $this->LE;\n\t}", "public function textLine($value)\n {\n }", "static function after(){\n\t\t$text = \"\n\t\t\";\n\treturn $text;\n\t}", "function makeBold($val){\n\t\treturn \"<b>$val</b>\";\n\t}", "public function render($value = null);", "function prepend($text1, $text2) {\n return $text2 . $text1;\n }", "public function setHtmlAfter($string);", "protected function output() {\n\t\treturn \"<hr class=\\\"hr-text\\\" data-content=\\\"{$this->option( 'text', '' )}\\\"/>\";\n\t}", "public function Render($value = '')\n {\n echo $value;\n }", "public static function renderText();", "public function __toString() {\n\t\treturn self::$before . $this->render() . self::$after;\n\t}", "public function appendValue($value) {\n $this->current->value($value);\n }", "function appendText ($text) {\r\n $this->content .= $text;\r\n }", "function addText($text);", "function dt_text($title,$value,$default = '',$comment='',$use_htmlspecialchars = 1,$class_col1='col-md-2',$class_col2='col-md-10'){\n\t\tif(!isset($value))\n\t\t\t$value = $default;\n\t\techo '<div class=\"form-group\">\n <label class=\"'.$class_col1.' col-xs-12 control-label\">'.$title.'</label>\n <div class=\"'.$class_col2.' col-xs-12\">';\n\t\tif($use_htmlspecialchars)\n\t\t\techo htmlspecialchars($value);\n\t\telse \n\t\t\techo $value;\n\t\t\t\n\t\tif($comment)\n\t\t\techo '<p class=\"help-block\">'.$comment.'</p>';\n\t\techo '</div></div>';\n\t}", "function MY_VERY_OWN_OM_Text($attr, $content = null) {\n\n\t$result = '<div style=\"display: flex; padding: 0px;\"><div class=\"oldEnglish\"><b><font color=\"gray\">ORIGINAL TEXT</font></b></div><div class=\"newEnglish\"><b><font color=\"gray\">MODERN TEXT</font></b></div></div>';\t\n\treturn $result;\n}", "function myText(){\n\t\n\n\techo '<h1>before subForums</h1>';\n\t\n\n}", "function negrita($text){\r\n return \"<strong>$text</strong>\";\r\n }", "public function output($content = '') {\n $toPlaceholder = $this->getProperty('toPlaceholder','');\n if (!empty($toPlaceholder)) {\n $this->modx->setPlaceholder($toPlaceholder,$content);\n return '';\n }\n return $content;\n }", "public function appendLine($value = \"\")\r\n {\r\n $this->addElement($value.PHP_EOL);\r\n }", "function izq($text){\r\n return \"<div align=\\\"left\\\">$text</div>\";\r\n }", "function der($text){\r\n return \"<div align=\\\"right\\\">$text</div>\";\r\n }", "function t($text)\n\t{\n\t\tPie::event('pie/text', array(), 'before', $text);\n\t\treturn $text;\n\t}", "public function getDynamicDisplayValue($value)\n {\n if (!empty($value)) {\n return t(\"%sTest value - your random number is: %s%s\", \"<p>\", $value, \"</p>\");\n }\n\n return t(\"%sNo test value, no random number. How odd!%s\", \"<p>\", \"</p>\");\n }", "public function setAfter(string $content): HtmlElementInterface;", "public function helperText()\n {\n return \"\";\n }", "function erp_print_key_value( $label, $value, $sep = ' : ', $type = 'text' ) {\n if ( empty( $value ) ) {\n $value = '&mdash;';\n\n } else {\n switch ( $type ) {\n case 'email':\n case 'url':\n case 'phone':\n $value = erp_get_clickable( $type, $value );\n break;\n }\n }\n\n printf(\n '<label>%s</label> <span class=\"sep\">%s</span> <span class=\"value\">%s</span>',\n wp_kses_post( $label ),\n esc_html( $sep ),\n wp_kses_post( $value )\n );\n}", "public function getDynamicPlainTextValue($value)\n {\n if (!empty($value)) {\n return t(\"Test value - your random number is: %s\", $value);\n }\n\n return t(\"No test value, no random number. How odd!\");\n }", "public function setText($value)\n\t{\n\t\t$this->setViewState('Text',$value,'');\n\t}" ]
[ "0.6160281", "0.6125725", "0.59087247", "0.5748544", "0.574418", "0.570059", "0.5636773", "0.5586149", "0.55660504", "0.55572474", "0.5483786", "0.5465556", "0.54250175", "0.5403216", "0.53918916", "0.5386625", "0.5382033", "0.5374111", "0.5372694", "0.5371033", "0.5345228", "0.53438514", "0.5341172", "0.53380054", "0.5335947", "0.5320997", "0.5320691", "0.5311329", "0.5309973", "0.5286728" ]
0.6245998
0
Create new daemon reference from dictionary.
public static function newFromDictionary(array $dict) { $ref = new DaemonReference; $ref->name = Arr::get($dict, 'name', 'Unknown'); $ref->pid = Arr::get($dict, 'pid'); $ref->start = Arr::get($dict, 'start'); return $ref; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct($dictionary = null) {}", "public static function createDictionary() {}", "public function create( &$object );", "function vdn_make($name,$umd=NULL){\n if(is_null($umd)) $umd = $this->ddef;\n if(is_object($umd)) return $umd->key . $this->svdn . $name;\n else return $umd . $this->svdn . $name;\n }", "function createDictionary($items = [])\n {\n return new \\Phanda\\Dictionary\\Dictionary($items);\n }", "public function testLibraryCreateBookInstanceFromIdAndConfig(): void\r\n {\r\n $configParser = new ArrayParser();\r\n $serviceLibrary = new ServiceLibrary($configParser);\r\n $this->assertFalse($serviceLibrary->has('AdditionalService'));\r\n $serviceLibrary->set(\r\n id: 'AdditionalService',\r\n class: '\\\\Namespace\\\\To\\\\Existing\\\\Class',\r\n arguments: $configParser->buildArgumentCollection(['name' => 'Joe', 'age' => 42, true]),\r\n calls: $configParser->buildCallCollection([\r\n ['setAddress', ['POBox' => 80809, 'City' => 'München']]\r\n ]),\r\n shared: false\r\n );\r\n $this->assertTrue($serviceLibrary->has('AdditionalService'));\r\n }", "public static function factory(\\SetaPDF_Core_Document $document, \\SetaPDF_Core_Type_Dictionary $encryptionDictionary) {}", "public function create($kv_pairs) {\r\n\r\n # Create Resource\r\n\r\n $params = array_merge(array('ws.op' => 'create'), $kv_pairs);\r\n\r\n $data = $this->adapter->request('POST', $this->url, $params, array('return' => 'headers'));\r\n\r\n $this->_entries = array();\r\n\r\n\r\n\r\n # Return new Resource\r\n\r\n @$url = $data['Location'];\r\n\r\n $resource_data = $this->adapter->request('GET', $url);\r\n\r\n return new AWeberEntry($resource_data, $url, $this->adapter);\r\n\r\n }", "protected function createObjectFromRequest($dh) {\n $attr = array();\n $attr[\"id\"] = $dh->getParameter(\"treeid\");\n $attr[\"taxon_id\"] = $dh->getParameter(\"taxonid\");\n $attr[\"dbh\"] = $dh->getParameter(\"dbh\");\n $attr[\"lat\"] = $dh->getParameter(\"lat\");\n $attr[\"lng\"] = $dh->getParameter(\"lng\");\n $attr[\"layers\"] = $dh->getParameter(\"layers\");\n \n return new Tree($attr);\n }", "private function instantiateService($id, Container\\Container $container)\n {\n /** @var object $_service_data */\n $_service_data = $this->_service_list[$id];\n /** @var \\ReflectionClass $_reflector */\n $_reflector = new \\ReflectionClass($_service_data->class);\n return $_reflector->newInstanceArgs($this->getArgs($_service_data, $container));\n }", "private function create()\n\t{\n\t\ttry\n\t\t{\n\t\t\t$q_string = \"insert into sandbox.dbo.daemon (object, dbtype) values (:object, :dbtype)\";\n\n\t\t\t$q = $this->_conn->prepare($q_string);\n\t\t\t$q->bindParam(':object', $this->_object);\n\t\t\t$q->bindParam(':dbtype', $this->_dbtype);\n\n\t\t\t$success = $q->execute();\n\t\t}\n\t\tcatch (PDOException $e)\n\t\t{\n\t\t\techo 'ERROR: ', $e->getMessage(), $this->_nl;\n\t\t\texit();\n\t\t}\n\n\t\t// unable to insert new entry\n\t\tif ($success !== true)\n\t\t{\n\t\t\techo \"ERROR: unable to create new lock entry for $this->_dbtype $this->_object.\", $this->_nl, $this->_nl;\n\t\t\texit();\n\t\t}\n\t}", "public function createFromSettings(array $settings);", "function create(DataHolder $holder);", "public function createServiceObjects() \n {\n var_dump('jj', Ini::$serviceConnections);\n //if (!empty(Ini::$serviceConnections)) \n //{\n foreach (Ini::$serviceConnections as $connectionName => $connectionDetail) \n {\n Ini::loadModule(Sysutils::Ucase($connectionDetail->type) . 'Service', 'Services', '\\Sys');\n $fqClassname = '\\\\Sys\\\\'. Sysutils::Ucase($connectionDetail->type) . 'Service';\n $this->autoLoadedServices[$connectionName] = array('url' => $connectionDetail->url, 'type' => $connectionDetail->type);\n $this->{$connectionName} = new $fqClassname($connectionDetail->url);\n }\n \n //}\n }", "public static function create(PdfDictionary $dictionary, $stream)\n {\n $v = new self();\n $v->value = $dictionary;\n $v->stream = (string) $stream;\n\n return $v;\n }", "private function createService(array $service)\n {\n if (isset($service['constructor'])) {\n $instance = $service['constructor']();\n return $instance;\n }\n\n if (!isset($service['class'])) {\n throw new ContainerException('Service hasn\\'t field class');\n }\n\n if (!class_exists($service['class'])) {\n throw new ContainerException(\"Class {$service['class']} doesn't exists\");\n }\n\n $class = $service['class'];\n if (isset($service['arguments'])) {\n $newService = new $class(...$service['arguments']);\n } else {\n $newService = new $class();\n }\n\n if (isset($service['calls'])) {\n foreach ($service['calls'] as $call) {\n if (!method_exists($newService, $call['method'])) {\n throw new ContainerException(\"Method {$call['method']} from {$service['class']} class not found\");\n }\n\n $arguments = $call['arguments'] ?? [];\n\n call_user_func_array([$newService, $call['method']], $arguments);\n }\n }\n\n return $newService;\n }", "public function create($entityDict)\r\n {\r\n return $this->conn->insert($this, __FUNCTION__, $entityDict);\r\n }", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public function getDictionary($create = false) {}", "public static function resolveDictionaryByAttribute(\\SetaPDF_Core_Type_Dictionary $dict, $name, $parentName = 'Parent') {}", "public function __construct(DIInterface $dic, string $class)\n {\n $this->dic = $dic;\n $this->instance = $this->dic->instance($class);\n }", "public function loadLinkedFromdnasequenceattachment() { \n // ForeignKey in: dnasequenceattachment\n $t = new dnasequenceattachment();\n }" ]
[ "0.51235944", "0.50945127", "0.47428128", "0.47115842", "0.461738", "0.44723433", "0.44106826", "0.4401278", "0.43539694", "0.43376103", "0.4328578", "0.432068", "0.43194214", "0.4310321", "0.43043825", "0.4302915", "0.4298945", "0.4286619", "0.4286619", "0.4286619", "0.4286619", "0.4286619", "0.4286619", "0.42846617", "0.42846617", "0.42846617", "0.42846617", "0.4257942", "0.42578676", "0.4251249" ]
0.784082
0
Evaluate a double quoted string literal We need to replace the double quoted string with a
public function StringLiteral_DoubleQuotedStringLiteral(&$result, $sub) { $result['code'] = '\'' . substr(str_replace(['\'', '\\"'], ['\\\'', '"'], $sub['text']), 1, -1) . '\''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function quote4Eval($in) {\n\t\tif (is_numeric($in)) {\n\t\t\treturn $in;\n\t\t} else {\n\t\t\treturn '\"' . str_replace(\"\\\\'\", \"'\", addslashes($in)) . '\"';\n\t\t}\n\t}", "public static function intoQuote($string){ return \"'\".$string.\"'\"; }", "function prepare_eval($phrase)\n{\n $retVal = \"\";\n $retVal = str_replace(\"!\", \"\\\"\",$phrase);\n $retVal = str_replace(\"#\", \"'\", $retVal);\n return str_replace(\"~\", \"#\", $retVal);\n}", "protected function quote($literal)\n {\n return \"'\" . addslashes($literal) . \"'\";\n }", "public function quote($stringValue);", "function trataApostrofe($str){\n\t\t$result_subst = str_replace(\"\\'\", \"'\", $str);\n\t\t$result_subst = str_replace(\"'\", \"\\'\", $result_subst);\n\t\treturn $result_subst;\n\t}", "abstract public function quoteString($value);", "public function quote_literal($value)\n\t{\n\t\tif (is_object($value) OR is_string($value))\n\t\t\treturn $this->escape($value);\n\n\t\treturn parent::quote_literal($value);\n\t}", "public function quoteAndEscape(string $str): string;", "public function quote_literal($value)\n\t{\n\t\tif (is_object($value) OR is_string($value))\n\t\t\treturn $this->escape_literal($value);\n\n\t\treturn parent::quote_literal($value);\n\t}", "public function addDoubleQuotes($str){\n\t\treturn '\"'.$str.'\"';\n\t}", "function changesqlquote($str,$rep=\"'\")\r\n{\r\n\treturn str_replace(\"`\", $rep, $str);\r\n}", "static function quote($s){\r\n return '\"' . str_replace('\"', '\\\"', $s) . '\"';\r\n }", "function escape_sq($str)\n{\n $esc_str = str_replace(\"'\", \"''\", $str);\n return $esc_str;\n}", "static function squote($s){\r\n return \"'\" . str_replace(\"'\", '\\'', $s) . \"'\";\r\n }", "function addSlhs($elm){return \"'\".$elm.\"'\";}", "private function newStringLiteralFromSemanticString($value) {\n // a character which needs to be escaped -- e.g., \"\\q\" and \"\\'\" are\n // literally \"\\q\" and \"\\'\". stripcslashes() is too aggressive, so find\n // all these under-escaped backslashes and escape them.\n\n $len = strlen($value);\n $esc = false;\n $out = '';\n\n for ($ii = 0; $ii < $len; $ii++) {\n $c = $value[$ii];\n if ($esc) {\n $esc = false;\n switch ($c) {\n case 'x':\n $u = isset($value[$ii + 1]) ? $value[$ii + 1] : '';\n if (!preg_match('/^[a-f0-9]/i', $u)) {\n // PHP treats \\x followed by anything which is not a hex digit\n // as a literal \\x.\n $out .= '\\\\\\\\'.$c;\n break;\n }\n /* fallthrough */\n case 'n':\n case 'r':\n case 'f':\n case 'v':\n case '\"':\n case '$':\n case 't':\n case '0':\n case '1':\n case '2':\n case '3':\n case '4':\n case '5':\n case '6':\n case '7':\n $out .= '\\\\'.$c;\n break;\n case 'e':\n // Since PHP 5.4.0, this means \"esc\". However, stripcslashes() does\n // not perform this conversion.\n $out .= chr(27);\n break;\n default:\n $out .= '\\\\\\\\'.$c;\n break;\n }\n } else if ($c == '\\\\') {\n $esc = true;\n } else {\n $out .= $c;\n }\n }\n\n return stripcslashes($out);\n }", "function quote($s) { \n return \"'\".str_replace('\\\\\"', '\"', addslashes($s)).\"'\"; \n }", "protected function _expressionString($ast, $class = null, $method = null) {\n $string = str_replace('\\\\\\\\', '\\\\', $ast['value']);\n // Make usre that string that include quotes and such, are properly escaped.\n $string = addslashes($string);\n $this->_emitter->emit(\"'{$string}'\");\n }", "function reholdQuotes($str){\n $str = str_replace(\"\\`\", \"`\", $str);\n $str = str_replace(\"\\\\\\\"\", \"\\\"\", $str);\n $str = str_replace(\"\\'\", \"'\", $str);\n $str = str_replace(\"\\\\\\\\\", \"\\\\\", $str);\n return $str;\n }", "function snmp_parser_unquote($str)\n{\n return str_replace(array('PLACEHOLDER-DOT', 'PLACEHOLDER-SPACE', 'PLACEHOLDER-ESCAPED-QUOTE'),\n array('.',' ','\"'), $str);\n}", "static public function addSingleQuotes($arg) \n { \n /* single quote and escape single quotes and backslashes */ \n return \"'\" . addcslashes($arg, \"'\\\\\") . \"'\"; \n }", "function testUrlEncodeQuotes3()\n\t{\n\t\t\t$input = 'This is a test with a \"double quote';\n\t\t\t$expectedOutput = \"This is a test with a &quot;double quote\";\n\t\t\t$this->assertEqual (\n\t\t\t\t\t$expectedOutput,\n\t\t\t\t\t$this->stringUtils->urlEncodeQuotes($input)\n\t\t\t);\n\t}", "function unquote($str)\n{\n $pos = strpos($str, \"\\\"\");\n if ($pos === 0) {\n $qstr = substr($str, 1, -1);\n return trim($qstr);\n } else {\n return trim($str);\n }\n}", "function escape_double_quotes_in_json_string(string $jsonString, string $replacement = \"''\"): string\n {\n return preg_replace_callback(\n '/(?<!\\\\\\\\)(?:\\\\\\\\{2})*\\\\\\\\(?!\\\\\\\\)\"/',\n static function (array $match) use ($replacement): string {\n return str_replace('\\\\\"', $replacement, $match[0]);\n },\n $jsonString\n );\n }", "function ps_escape_string($str, $as_token = false, $esc_quotes = false) {\n $s = '';\n foreach (str_split($str) as $c) {\n if (($i = strpos(\"\\n\\r\\t\\10\\f\\\\()\", $c)) !== false)\n $c = '\\\\' . 'nrtbf\\\\()'[$i]; // postscript escapes, see PLRM 3.2.2 Literals\n elseif (($o = ord($c)) < 0x20 || $o >= 0x7F)\n $c = sprintf('\\\\%03o', $o); // control & non-ASCII\n elseif ($esc_quotes && $c == '\"')\n $c = '\\\\042'; // octal escape \" (for gs v9 parameters)\n $s .= $c;\n }\n return $as_token ? \"($s)\" : $s;\n}", "public function testCanEscapeTextInLiteralValuesSoItCanBeUsedDirectlyInSqlQuery()\n\t {\n\t\t$this->assertEquals(\"'test'\", $this->object->sqlText(\"test\"));\n\t\t$this->assertEquals(\"'won\\'t'\", $this->object->sqlText(\"won't\"));\n\n\t\t$this->object = new MySQLdatabase($GLOBALS[\"DB_HOST\"], \"nonexistentdb\", $GLOBALS[\"DB_USER\"], $GLOBALS[\"DB_PASSWD\"]);\n\t\t$this->assertEquals(\"'test'\", $this->object->sqlText(\"test\"));\n\t\t$this->assertEquals(\"'won''t'\", $this->object->sqlText(\"won't\"));\n\t }", "function bab_pm_quote($str)\n{\n return '\"' . str_replace('\"', '\"\"', $str) . '\"';\n}", "private static function parseDoubleQuotedStringWithEmbeddedVars($globals)\n\t{\n\t\t$scanner = $globals->curr_pkg->scanner;\n\t\t$value = $scanner->s;\n\t\t$scanner->readSym();\n\t\twhile( $scanner->sym === Symbol::$sym_embedded_variable ){\n\t\t\t# Embedded vars found, cannot determine the resulting value:\n\t\t\t$value = NULL;\n\t\t\t$v = $globals->searchVar($scanner->s);\n\t\t\tif( $v === NULL ){\n\t\t\t\t$globals->logger->error($scanner->here(), \"undefined variable \\$\" . $scanner->s);\n\t\t\t} else {\n\t\t\t\t// Check implicit conversion of $v to string:\n\t\t\t\t$r = Result::factory($v->type);\n\t\t\t\t$r->convertToString($globals->logger, $scanner->here());\n\t\t\t\t$globals->accountVarRHS($v);\n\t\t\t}\n\t\t\t$scanner->readSym();\n\t\t\tif( $scanner->sym === Symbol::$sym_continuing_double_quoted_string ){\n\t\t\t\t$scanner->readSym();\n\t\t\t}\n\t\t}\n\t\treturn Result::factory(Globals::$string_type, $value);\n\t}", "function unescape_quotes($str\n{\n $esc_str = str_replace(\"''\", \"'\", $str);\n $esc2_str = str_replace(\"\\\"\\\"\", \"\\\"\", $esc_str);\n return $esc2_str;\n}" ]
[ "0.64030397", "0.6339041", "0.63248557", "0.6257721", "0.6214622", "0.62100613", "0.62001795", "0.61983013", "0.61735827", "0.61577743", "0.61317647", "0.6129143", "0.60889196", "0.6074564", "0.60499704", "0.6026522", "0.5969111", "0.59674126", "0.59493345", "0.5938987", "0.59042895", "0.5902477", "0.5896604", "0.5894231", "0.58786976", "0.5852648", "0.58315825", "0.58196", "0.58012354", "0.57762575" ]
0.70083034
0
Return an expression that unwraps the given expression if it is a Context object.
protected function unwrapExpression($expression) { $varName = '$_' . $this->tmpId++; return '((' . $varName . '=' . $expression . ') instanceof \Neos\Eel\Context?' . $varName . '->unwrap():' . $varName . ')'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getExpressionContext()\n {\n return $this->expressionContext;\n }", "public function normalize($value)\n {\n if ($value instanceof Expression ||\n $value instanceof Expressionable) {\n return $value;\n }\n\n return parent::normalize($value);\n }", "public static function expression($expression) {\n\t\treturn new \\db\\expression($expression);\n\t}", "public function raw($expression = null) {\n // Execute the closure on the mongodb collection\n if ($expression instanceof Closure) {\n return call_user_func($expression, $this->collection);\n }\n\n // Create an expression for the given value\n else if (!is_null($expression)) {\n return new Expression($expression);\n }\n\n // Quick access to the mongodb collection\n return $this->collection;\n }", "public function raw($expression)\n\t{\n\t\treturn $this->rawFactory->__invoke($expression);\n\t}", "public function raw($expression = null)\n {\n // Execute the closure on the mongodb collection\n if ($expression instanceof Closure) {\n return call_user_func($expression, $this->collection);\n }\n\n // Create an expression for the given value\n elseif (!is_null($expression)) {\n return new Expression($expression);\n }\n\n // Quick access to the mongodb collection\n return $this->collection;\n }", "public function raw($expression = null)\n {\n // Execute the closure on the mongodb collection\n if ($expression instanceof Closure)\n {\n return call_user_func($expression, $this->collection);\n }\n\n // Create an expression for the given value\n else if ( ! is_null($expression))\n {\n return new Expression($expression);\n }\n\n // Quick access to the mongodb collection\n return $this->collection;\n }", "public function evaluateExpression($expression)\n {\n if ($this->getTalesMode() === 'php') {\n return PHPTAL_Php_TalesInternal::php($expression);\n }\n return PHPTAL_Php_TalesInternal::compileToPHPExpressions($expression, false);\n }", "public function getExpression()\n {\n if (array_key_exists(\"expression\", $this->_propDict)) {\n return $this->_propDict[\"expression\"];\n } else {\n return null;\n }\n }", "public function raw($value)\n {\n return new Expression($value);\n }", "public function reverseTransform($expression)\n {\n if (!$expression) {\n return null;\n }\n\n $expression = $this->serializer->deserialize($expression);\n\n if (null === $expression) {\n throw new TransformationFailedException(sprintf(\n 'An issue with number \"%s\" does not exist!',\n $expression\n ));\n }\n\n return $expression;\n }", "public function CheckIsLiteral($expression)\n\t\t{\n\t\t\tif (!is_a($expression, SqlEntity)) \n\t\t\t{\n\t\t\t\treturn new SqlLiteral($expression);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn $expression;\n\t\t\t}\n\t\t}", "public function getExpression(): string\n {\n if ($this->wrapMode > 0) {\n return ($this->wrapMode === static::WRAP_IN_TAGS ? '<?php ' : '<?= ') . $this->expression . ' ?>';\n }\n\n return $this->expression;\n }", "public static function evalExpression($expression, Container $container) {\n if ($expression instanceof Statement) {\n $arguments = [];\n foreach ($expression->arguments as $attribute) {\n if ($attribute === '...') {\n continue;\n }\n $arguments[] = self::evalExpression($attribute, $container);\n }\n $entity = self::$semanticMap[$expression->entity] ?? $expression->entity;\n if (function_exists($entity)) {\n return $entity(...$arguments);\n } else {\n throw new NotImplementedException();\n /* $rc = ClassType::from($entity);\n return $rc->newInstanceArgs(Resolver::autowireArguments($rc->getConstructor(), $arguments, function (string $type, bool $single) use ($container) {\n return $this->getByType($type);\n }));*/\n // TODO!!!\n }\n } else {\n return $expression;\n }\n }", "public function expr()/*# : ExpressionInterface */;", "function evaluateExpression($expression)\n\t{\n\t\treturn eval('return '.$expression.';');\n\t}", "public function getExpression();", "protected function evalaluate($expression) {\n $evaluated = @eval('return (' . $expression . ');');\n \n return $evaluated !== false ? $evaluated : '';\n }", "public function getExpressionNode()\n {\n return $this->expressionNode;\n }", "final public static function unwrap(mixed $value): mixed\n {\n if ($value instanceof self) {\n $value = $value->value;\n }\n\n return $value;\n }", "public static function createExpression($sql_expression) {\r\n\t return new LazyDBExpressionType($sql_expression);\r\n\t}", "public function transform($expression)\n {\n if (null === $expression) {\n return '';\n }\n\n return $this->serializer->serialize($expression);\n }", "static function expr(string $expression) : string\n {\n '' !== $expression && '(' === $expression[0]\n && $expression = substr($expression, 1, -1);\n\n return trim($expression);\n }", "public static function expr($string = '')\n\t{\n\t\treturn new Expression($string);\n\t}", "public function expressionFunction();", "public function setExpressionContext(ExpressionContext $expressionContext)\n {\n $this->expressionContext = $expressionContext;\n\n return $this;\n }", "private function onWrapper()\n {\n return function ($parameter) {\n if ($parameter instanceof FragmentInterface) {\n return $parameter;\n }\n\n return new Expression($parameter);\n };\n }", "private function wrapExpression( $from, callable $expr, array $types ) {\n\t\tlist( $fn, $pos ) = explode( ':', $from );\n\t\t$from = \"The expression return value of argument {$pos} of {$fn}\";\n\n\t\treturn function ( $value ) use ( $from, $expr, $types ) {\n\t\t\t$value = $expr( $value );\n\t\t\t$this->validateType( $from, $value, $types );\n\n\t\t\treturn $value;\n\t\t};\n\t}", "public final static function unwrapThrowable(Throwable $x) {\n if ($x instanceof ThrowableException)\n return $x->unwrap();\n return $x;\n }", "private function parenthesizeIfLowerThanArrow(\n /*IExpression*/ $expression, /*string*/ $expr) /*: string*/ {\n if ($expression instanceof BinaryOpExpression ||\n $expression instanceof ClosureExpression ||\n $expression instanceof ConditionalExpression ||\n $expression instanceof ListAssignmentExpression ||\n $expression instanceof NewObjectExpression ||\n $expression instanceof UnaryOpExpression) {\n $expr = '('.$expr.')';\n }\n return $expr;\n }" ]
[ "0.53272545", "0.5058471", "0.48233417", "0.47118062", "0.46983784", "0.46795946", "0.46736154", "0.463953", "0.46379808", "0.46356824", "0.45975503", "0.45570228", "0.45417708", "0.45283318", "0.45200315", "0.4510017", "0.4508338", "0.43867028", "0.43540326", "0.43398088", "0.43187594", "0.43161866", "0.42687097", "0.4268108", "0.4264251", "0.42406633", "0.4240528", "0.4216311", "0.42072964", "0.42071506" ]
0.73917663
0
Returns currently handled field info
public function getFieldInfo() { return $this->fieldInfo; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getCompleteFieldInformation() {}", "public abstract function GetCurrentField();", "public function getIncomingFields() {}", "abstract protected function getFields();", "function fieldInfo( $table, $field );", "public function getField();", "public function getField();", "public function getField();", "public function get_field(/* .... */)\n {\n return $this->_field;\n }", "function getField(){\n\t\treturn $this->Field;\n\t}", "public function getFields() {}", "public function getFields() {}", "public function getFields() {}", "public static function getFields(){\n\t\treturn self::$fields;\n\t}", "function getFieldInfo($sql) {\n $record = $this->DEB->getRow($sql);\n return $this->DEB->fieldinfo;\n }", "abstract public function getFields();", "abstract public function getFields();", "public function getField(){\n return $this->field;\n }", "public static function get_fields()\n {\n }", "public function getField()\n {\n return $this->_field;\n }", "public function get_fields() {\r\n\t\treturn $this->fields;\r\n\t}", "public function get_fields() {\n\t\treturn $this->fields;\n\t}", "protected function getFields()\n {\n return $this->fields;\n }", "protected function getFields()\n {\n return $this->fields;\n }", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();", "public function getFields();" ]
[ "0.8046285", "0.7346443", "0.70788896", "0.6952199", "0.68741375", "0.68539214", "0.68539214", "0.68539214", "0.68151975", "0.6754026", "0.6753113", "0.6753113", "0.6753113", "0.67487186", "0.6742767", "0.6731911", "0.6731911", "0.6713632", "0.67040193", "0.67024946", "0.66996026", "0.6659928", "0.6642046", "0.6642046", "0.6630371", "0.6630371", "0.6630371", "0.6630371", "0.6630371", "0.6630371" ]
0.8102869
0
Creates a html warning template. Can be implemented flexibly.
function createWarningHTML($paraTitle, $paraMessage) { $html = " <div class='alert alert-danger alert-dismissible fade show' role='alert'> <h4>$paraTitle</h4> $paraMessage </div> "; return $html; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function template_ecl_warning_above ()\n{\n\tglobal $context;\n\n\techo '\n\t<div id=\"ecl_notification\">\n\t\t', $context['ecl_main_notice'], '\n\t</div>';\n}", "public function get_warnings() {\n\n\t\t$output = '';\n\t\t\n\t\t$warnings = $this->warnings;\n\t\t\n\t\tif ($warnings) {\n\t\t\t$items = '';\n\t\t\tforeach ($warnings as $w) {\n\t\t\t\t$items .= '<li>'.$w.'</li>' .\"\\n\";\n\t\t\t}\n\t\t\t$output = '<ul>'.\"\\n\".$items.'</ul>'.\"\\n\";\n\t\t}\n\t\telse {\n\t\t\t$output = __('There were no warnings.', CCTM_TXTDOMAIN);\n\t\t}\n\t\treturn sprintf('<h2>%s</h2><div class=\"summarize-posts-warnings\">%s</div>'\n\t\t\t, __('Warnings', CCTM_TXTDOMAIN)\n\t\t\t, $output);\n\t}", "public function generateWarning($message) {\n\t\t\techo \"\n\t\t\t\t<div class='alert alert-warning' role='alert'>\n\t\t\t\t\t{$message}\n\t\t\t\t</div>\n\t\t\t\";\n\t\t}", "public function warning($message)\n {\n return $this->render($message, 'warning');\n }", "public function displayWarning($message)\n {\n $this->initializeTemplateMessages();\n $this->templateWarnings[] = $message;\n\n return ' ';\n }", "public static function warning($message)\n {\n return '<div class=\"alert alert-warning\">' . $message . '</div>';\n }", "function wmf_redirect_template_warning_notice() {\n\t$screen = get_current_screen();\n\tif ( ! isset( $screen ) ) {\n\t\treturn;\n\t}\n\n\tif ( 'edit' !== $screen->parent_base || 'page' !== $screen->post_type ) {\n\t\treturn;\n\t}\n\n\tif ( ! wmf_is_redirect_template_page( get_the_ID() ) ) {\n\t\treturn;\n\t}\n\n\t?>\n\t<div class=\"notice notice-warning\">\n\t\t<p>\n\t\t\t<?php esc_html_e( 'This page is using the \"Redirect Page\" page template.', 'shiro-admin' ); ?>\n\t\t\t<?php esc_html_e( 'It will redirect to the newest child page which declares this page as its parent.', 'shiro-admin' ); ?>\n\t\t\t<?php esc_html_e( 'Change the template if you wish to edit this page directly.', 'shiro-admin' ); ?>\n\t\t</p>\n\t</div>\n\t<?php\n}", "protected function template() {\n\t\treturn '';\n\t}", "public function getInvalidTpl(){\n return $this->templates['invalid'];\n }", "protected function getErrorMsgTemplate()\n {\n return 'The %s cast is ';\n }", "public function notice_error() {\n\t\t$class = 'notice notice-error';\n\t\t$message = __( 'An error occurred during synchronization.', 'elemarjr' );\n\t\treturn sprintf( '<div class=\"%1$s\"><p>%2$s</p></div>', esc_attr( $class ), esc_html( $message ) );\n\t}", "function warning($message, array $context = array());", "protected function renderWarnings() {\n\t\trequire_once(SLS_DIR.\"lib/data/warning/WarningList.class.php\");\n\t\t$objWarningList = new WarningList();\n\t\t$objWarningList->readWarnings();\n\t\t$this->warnings = $objWarningList->warning;\n\t\t\n\t}", "function get_warning_error_p($msg_arg,$warning_me=false) {\n\n // <p class=\"help-block col-sm-offset-3\" style=\"font-size:0.9em;color:#ff0000\" id=\"errorMessagePseudo\"></p>\n\n $msg=\"\";\n\n if($warning_me){$alert=\"warning\"; $gliphicon=\"warning-sign\";$txt=\"Warning\"; }else { $alert=\"danger\"; $gliphicon=\"exclamation-sign\";$txt=\"Error\"; }\n\n // {$alert} {$gliphicon} {$txt}\n if($msg_arg){\n $msg.= \"<p class=\\\"alert alert-{$alert} help-block col-sm-offset-3\\\" role='alert'>\";\n $msg.=\"<a href='#' class='close' data-dismiss='alert'>&times;</a>\";\n $msg.=\"<span class=\\\"glyphicon glyphicon-{$gliphicon}\\\" aria-hidden='true'></span>\";\n $msg.=\"<span class=\\\"sr-only\\\"><strong>{$txt}:</strong></span>\";\n $msg.=\" \". $msg_arg;\n $msg .= \"</p>\";\n } else {\n $msg=\"\";\n }\n\n return $msg;\n\n\n}", "function get_warning_error_div($msg_arg,$warning_me=false) {\n $msg=\"\";\n\n if($warning_me){$alert=\"warning\"; $gliphicon=\"warning-sign\";$txt=\"Warning\"; }else { $alert=\"danger\"; $gliphicon=\"exclamation-sign\";$txt=\"Error\"; }\n\n // {$alert} {$gliphicon} {$txt}\n if($msg_arg){\n $msg.= \"<div class=\\\"alert alert-{$alert}\\\" role='alert'>\";\n $msg.=\"<a href='#' class='close' data-dismiss='alert'>&times;</a>\";\n $msg.=\"<span class=\\\"glyphicon glyphicon-{$gliphicon}\\\" aria-hidden='true'></span>\";\n $msg.=\"<span class=\\\"sr-only\\\"><strong>{$txt}:</strong></span>\";\n $msg.=\" \". $msg_arg;\n $msg .= \"</div>\";\n } else {\n $msg=\"\";\n }\n\n return $msg;\n\n\n}", "protected function generateHtmlMessage($module_errors)\n {\n }", "public function license_invalid_message() {\n\t\t$message = __( 'There was a problem activating your Block Lab license.', 'block-lab' );\n\t\treturn sprintf( '<div class=\"notice notice-error\"><p>%s</p></div>', esc_html( $message ) );\n\t}", "public static function output_markup_warning() {\n\t\tprintf('<p class=\"description\">%s</p>', __('Use \"Insert Markup\" if you don\\'t want to use shortcodes for your EasyAzon links. Any global changes to your link settings will not affect your non shortcode links.'));\n\t}", "public static function GenericWarning() :self{\n\t\treturn new Response('Generic Warning', -1, true);\n\t}", "function PhpdocHTMLWarningRenderer($path, $templateRoot, $application, $extension = \".html\") {\n\n $this->setPath($path);\n $this->setTemplateRoot($templateRoot);\n $this->application = $application;\n $this->file_extension = $extension;\n\n $this->accessor = new PhpdocWarningAccessor;\n $this->fileHandler = new PhpdocFileHandler;\n\n }", "function finishWarnings() {\n\n if (!is_object($this->tpl)) \n return;\n\n // 3/11/2002 - Tim Gallagher added the next two lines\n // so the version and link could be put in and easily\n // changed as versions, and urls change.\n $this->tpl->setVariable(\"PHPDOCVERSION\", PHPDOC_VERSION);\n $this->tpl->setVariable(\"PHPDOC_LINK\", PHPDOC_LINK);\n $this->tpl->setVariable(\"PHPDOC_GENERATED_DATE\", PHPDOC_GENERATED_DATE);\n\t\t\n $this->tpl->setVariable(\"APPNAME\", $this->application);\n\n $this->fileHandler->createFile($this->path.\"phpdoc_warnings\" . $this->file_extension, $this->tpl->get() );\n\n\t\t$this->tpl->free();\n \n }", "public function getText()\n {\n return __($this->configuration->getWarningMessage());\n }", "protected static function renderUserNotPermittedAlert() {\n\t\tif (static::validateUserPermission()) {\n\t\t\treturn '';\n\t\t}\n\t\t$perm = static::DPLUSPERMISSION;\n\t\treturn self::pw('config')->twig->render('util/alert.twig', ['type' => 'danger', 'title' => \"You don't have access to this function\", 'iconclass' => 'fa fa-warning fa-2x', 'message' => \"Permission: $perm\"]);\n\t}", "public static function warning($message, $context);", "function tep_output_warning($warning) {\n return (tep_image(DIR_WS_ICONS . 'warning.gif', ICON_WARNING) . ' ' . $warning);\n }", "public static function formWarningMessage($name, $message){\r\n $mainframe = JFactory::getApplication();\t\t\r\n $base = JURI::root();\r\n $image = $base.'administrator/components/com_jresearch/assets/messagebox_warning.png';\r\n\r\n return '<label for=\"'.$name.'\" class=\"labelform\">\r\n <img alt=\"!!!\" src=\"'.$image.'\" width=\"20\" height=\"20\" style=\"vertical-align: middle;\"\r\n title=\"'.$message.'\" /></label>';\r\n\r\n }", "public function warning()\n {\n return $this->type('warning');\n }", "public function message() {\n return ':attribute ' . __('lang.must_not_contain_any_html');\n }", "public static function warning() {\n\t\t# Get arguments to this function:\n\t\t$args = func_get_args();\n\n\t\t# Add message to log:\n\t\treturn self::add(LOG_WARNING, $args);\n\t}", "public function action_issuewarning()\n\t{\n\t\tglobal $txt, $scripturl, $modSettings, $mbname, $context, $cur_profile;\n\n\t\t// Make sure the sub-template is set...\n\t\ttheme()->getTemplates()->load('ProfileAccount');\n\t\t$context['sub_template'] = 'issueWarning';\n\n\t\t// We need this because of template_load_warning_variables\n\t\ttheme()->getTemplates()->load('Profile');\n\t\tloadJavascriptFile('profile.js');\n\n\t\t// jQuery-UI FTW!\n\t\t$modSettings['jquery_include_ui'] = true;\n\t\tloadCSSFile('jquery.ui.slider.css');\n\t\tloadCSSFile('jquery.ui.theme.min.css');\n\n\t\t// Get all the actual settings.\n\t\tlist ($modSettings['warning_enable'], $modSettings['user_limit']) = explode(',', $modSettings['warning_settings']);\n\n\t\t// Doesn't hurt to be overly cautious.\n\t\tif (empty($modSettings['warning_enable'])\n\t\t\t|| ($context['user']['is_owner'] && !$cur_profile['warning'])\n\t\t\t|| !allowedTo('issue_warning'))\n\t\t{\n\t\t\tthrow new Exception('no_access', false);\n\t\t}\n\n\t\t// Get the base (errors related) stuff done.\n\t\tTxt::load('Errors');\n\t\t$context['custom_error_title'] = $txt['profile_warning_errors_occurred'];\n\n\t\t// Make sure things which are disabled stay disabled.\n\t\t$modSettings['warning_watch'] = !empty($modSettings['warning_watch']) ? $modSettings['warning_watch'] : 110;\n\t\t$modSettings['warning_moderate'] = !empty($modSettings['warning_moderate']) && !empty($modSettings['postmod_active']) ? $modSettings['warning_moderate'] : 110;\n\t\t$modSettings['warning_mute'] = !empty($modSettings['warning_mute']) ? $modSettings['warning_mute'] : 110;\n\n\t\t$context['warning_limit'] = allowedTo('admin_forum') ? 0 : $modSettings['user_limit'];\n\t\t$context['member']['warning'] = $cur_profile['warning'];\n\t\t$context['member']['name'] = $cur_profile['real_name'];\n\n\t\t// What are the limits we can apply?\n\t\t$context['min_allowed'] = 0;\n\t\t$context['max_allowed'] = 100;\n\t\tif ($context['warning_limit'] > 0)\n\t\t{\n\t\t\trequire_once(SUBSDIR . '/Moderation.subs.php');\n\t\t\t$current_applied = warningDailyLimit($this->_memID);\n\n\t\t\t$context['min_allowed'] = max(0, $cur_profile['warning'] - $current_applied - $context['warning_limit']);\n\t\t\t$context['max_allowed'] = min(100, $cur_profile['warning'] - $current_applied + $context['warning_limit']);\n\t\t}\n\n\t\t// Defaults.\n\t\t$context['warning_data'] = array(\n\t\t\t'reason' => '',\n\t\t\t'notify' => '',\n\t\t\t'notify_subject' => '',\n\t\t\t'notify_body' => '',\n\t\t);\n\n\t\t// Are we saving?\n\t\t$this->_save_warning();\n\n\t\t// Perhaps taking a look first? Good idea that one.\n\t\t$this->_preview_warning();\n\n\t\t// If we have errors, lets set them for the template\n\t\tif (!empty($this->_issueErrors))\n\t\t{\n\t\t\t// Fill in the suite of errors.\n\t\t\t$context['post_errors'] = array();\n\t\t\tforeach ($this->_issueErrors as $error)\n\t\t\t{\n\t\t\t\t$context['post_errors'][] = $txt[$error];\n\t\t\t}\n\t\t}\n\n\t\t$context['page_title'] = $txt['profile_issue_warning'];\n\n\t\t// Let's use a generic list to get all the current warnings\n\t\trequire_once(SUBSDIR . '/Profile.subs.php');\n\n\t\t// Work our the various levels.\n\t\t$context['level_effects'] = array(\n\t\t\t0 => $txt['profile_warning_effect_none'],\n\t\t);\n\n\t\tforeach (array('watch', 'moderate', 'mute') as $status)\n\t\t{\n\t\t\tif ($modSettings['warning_' . $status] != 110)\n\t\t\t{\n\t\t\t\t$context['level_effects'][$modSettings['warning_' . $status]] = $txt['profile_warning_effect_' . $status];\n\t\t\t}\n\t\t}\n\t\t$context['current_level'] = 0;\n\n\t\tforeach ($context['level_effects'] as $limit => $dummy)\n\t\t{\n\t\t\tif ($context['member']['warning'] >= $limit)\n\t\t\t{\n\t\t\t\t$context['current_level'] = $limit;\n\t\t\t}\n\t\t}\n\n\t\t// Build a listing to view the previous warnings for this user\n\t\t$this->_create_issued_warnings_list();\n\n\t\t$warning_for_message = $this->_req->getQuery('msg', 'intval', false);\n\t\t$warned_message_subject = '';\n\n\t\t// Are they warning because of a message?\n\t\tif (!empty($warning_for_message) && $warning_for_message > 0)\n\t\t{\n\t\t\trequire_once(SUBSDIR . '/Messages.subs.php');\n\t\t\t$message = basicMessageInfo($warning_for_message);\n\n\t\t\tif (!empty($message))\n\t\t\t{\n\t\t\t\t$warned_message_subject = $message['subject'];\n\t\t\t}\n\t\t}\n\n\t\trequire_once(SUBSDIR . '/Maillist.subs.php');\n\n\t\t// Any custom templates?\n\t\t$context['notification_templates'] = array();\n\t\t$notification_templates = maillist_templates('warntpl');\n\n\t\tforeach ($notification_templates as $row)\n\t\t{\n\t\t\t// If we're not warning for a message skip any that are.\n\t\t\tif ($warning_for_message === false && strpos($row['body'], '{MESSAGE}') !== false)\n\t\t\t{\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$context['notification_templates'][] = array(\n\t\t\t\t'title' => $row['title'],\n\t\t\t\t'body' => $row['body'],\n\t\t\t);\n\t\t}\n\n\t\t// Setup the \"default\" templates.\n\t\tforeach (array('spamming', 'offence', 'insulting') as $type)\n\t\t{\n\t\t\t$context['notification_templates'][] = array(\n\t\t\t\t'title' => $txt['profile_warning_notify_title_' . $type],\n\t\t\t\t'body' => sprintf($txt['profile_warning_notify_template_outline' . (!empty($warning_for_message) ? '_post' : '')], $txt['profile_warning_notify_for_' . $type]),\n\t\t\t);\n\t\t}\n\n\t\t// Replace all the common variables in the templates.\n\t\tforeach ($context['notification_templates'] as $k => $name)\n\t\t{\n\t\t\t$context['notification_templates'][$k]['body'] = strtr($name['body'],\n\t\t\t\tarray(\n\t\t\t\t\t'{MEMBER}' => un_htmlspecialchars($context['member']['name']),\n\t\t\t\t\t'{MESSAGE}' => '[url=' . getUrl('action', ['msg' => $warning_for_message]) . ']' . un_htmlspecialchars($warned_message_subject) . '[/url]',\n\t\t\t\t\t'{SCRIPTURL}' => $scripturl,\n\t\t\t\t\t'{FORUMNAME}' => $mbname,\n\t\t\t\t\t'{REGARDS}' => replaceBasicActionUrl($txt['regards_team'])\n\t\t\t\t)\n\t\t\t);\n\t\t}\n\t}" ]
[ "0.6392513", "0.6326557", "0.6285918", "0.62715286", "0.6266103", "0.6253169", "0.62057537", "0.6057342", "0.5972067", "0.5954006", "0.5950921", "0.59411216", "0.59314454", "0.59283787", "0.5919225", "0.59060425", "0.5898825", "0.5882457", "0.5816333", "0.5814268", "0.57788056", "0.5752067", "0.57507086", "0.5747895", "0.57357585", "0.56907564", "0.5688327", "0.5667108", "0.56385773", "0.56289303" ]
0.71026874
0
Gets SELECT sentence to load a single register from the storage.
public function getSelectRegister() { return ($this->isValueNumeric('nb_icontact_prospect_id')) ? $this->buildSentence( 'select * ' . 'from nb_icontact_prospect ' . "where nb_icontact_prospect_id=%nb_icontact_prospect_id\$d " ) : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSelectRegister()\n {\n return ($this->isValueNumeric('nb_catalog_item_id') && $this->isValueNumeric('nb_language_id'))\n ? $this->buildSentence(\n 'select * '\n . 'from nb_catalog_item_lang '\n . \"where nb_catalog_item_id=%nb_catalog_item_id\\$d \"\n . \"and nb_language_id=%nb_language_id\\$d \"\n )\n : null;\n }", "public function getSelectRegister()\n {\n return ($this->isValueNumeric('nb_domain_zone_id'))\n ? $this->buildSentence(\n 'select * '\n . 'from nb_domain_zone '\n . \"where nb_domain_zone_id=%nb_domain_zone_id\\$d \"\n )\n : null;\n }", "public function getSelectRegister()\n {\n return ($this->isValueNumeric('nb_commerce_product_category_id'))\n ? $this->buildSentence(\n 'select * '\n . 'from nb_commerce_product_category '\n . \"where nb_commerce_product_category_id=%nb_commerce_product_category_id\\$d \"\n )\n : null;\n }", "function mSELECT(){\n try {\n $_type = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$SELECT;\n $_channel = Erfurt_Sparql_Parser_Sparql11_Update_Tokenizer11::$DEFAULT_TOKEN_CHANNEL;\n // Tokenizer11.g:116:3: ( 'select' ) \n // Tokenizer11.g:117:3: 'select' \n {\n $this->matchString(\"select\"); \n\n\n }\n\n $this->state->type = $_type;\n $this->state->channel = $_channel;\n }\n catch(Exception $e){\n throw $e;\n }\n }", "protected function getSelect() {\n $oSql = new SqlSelect();\n $oSql->setEntity($this->Persistence->getTableName());\n $oSql->addColumn(implode(',', $this->getColumns()));\n $oSql->setCriteria($this->Criteria); \n return $oSql->getInstruction();\n }", "public function getSelect();", "public function getSelect();", "public function select();", "public function select();", "public function select();", "public function loadTrainerName(){\r\n\t\t\t$objDBConn = DBManager::getInstance();\r\n\t\t\tif($objDBConn->dbConnect()){\r\n\t\t\t\t$query = \"select trainerid, firstname, lastname from trainer\";\r\n\t\t\t\t$result = mysql_query($query); \r\n\t\t\t}\r\n\t\t\t$objDBConn->dbClose();\r\n\t\t\treturn $result;\r\n\t\t\t\r\n\t\t}", "protected function getSelection() : string {\n\n\t\t\t$selection = [];\n\n\t\t\tforeach ($this->definition->getParamsSecure() as $field) $selection[] = ('ent.' . $field);\n\n\t\t\t# ------------------------\n\n\t\t\treturn implode(', ', $selection);\n\t\t}", "private function selectUserToken()\n {\n return $this->selectParsedData( ['id_komisu'] );\n }", "public function select()\n {\n return $this->_getReadAdapter()->select();\n }", "public function getSelect()\n {\n throw new \\Exception('SELECT not ready');\n }", "function select() {\n\t\t$raw = shmop_read($this -> id, 0, $this -> size);\n\t\tif ($this -> raw === false) {\n\t\t\t$this -> val = unserialize($raw);\n\n\t\t} else {\n\t\t\t$i = strpos($raw, \"\\0\");\n\t\t\tif ($i === false) {\n\t\t\t\t$this -> val = $raw;\n\t\t\t}\n\t\t\t$this -> val = substr($raw, 0, $i);\n\n\t\t}\n\n\t\treturn $this -> val;\n\n\t}", "public function select() {\n return $this->getActionByName('Select');\n }", "public function getSelect()\n {\n return $this->select;\n }", "public function getSelect()\n {\n return $this->select;\n }", "public function readName ()\n {\n\n $query = \"SELECT type FROM \" . $this->table_namee . \" WHERE type_id = ? limit 0,1\";\n\n $stmt = $this->conn->prepare( $query );\n $stmt->bindParam(1, $this->type_id);\n $stmt->execute();\n\n $row = $stmt->fetch(PDO::FETCH_ASSOC);\n\n $this->type = $row['type'];\n\n }", "function select() {\r\n\t\t$query = 'SELECT * FROM `subscribers`';\r\n\t\t\r\n\t\t$this->query = $query;\r\n\t}", "static function getRegistrationKey(){\n return DB::select('SELECT value FROM admin_data WHERE name = \"registration-key\";')[0]->value;\n }", "public function actionSelect(){\n $select = $this->select('Pilih donk akhh..', ['kopi'=>'kopi', 'susu'=>'susu']);\n echo \"Pilihan nya adalah : $select\";\n }", "function getResourceTypeName($id){\n return sqlSelectOne(\"SELECT * FROM types WHERE type_id='$id'\", 'type_name');\n}", "public function getSelect() {\n return $this->select;\n }", "public static function getSelect()\n {\n return Hash::combine(self::getConstants(), '{s}.value', '{s}.name');\n }", "public function getOneSyl() {\n $table = \"eng-1-syl\";\n $sql = \"SELECT * FROM `$table`\";\n $stmt = $this->pdo->prepare($sql);\n $stmt->execute();\n $response = $stmt->fetchAll(PDO::FETCH_ASSOC);\n if ($response) {\n $numberRows = count($response);\n $random = $this->random($numberRows);\n $word = $response[$random][\"word\"];\n return $word;\n }\n else {\n echo \"something is broken\";\n }\n\n // select a random number from 0 to the highest numbered row\n // take that word and return it\n }", "static public function singleSelect($sql){\n\t\t$db = DbBase::rawConnect();\n\t\tif(substr(ltrim($sql), 0, 7)!='SELECT') {\n\t\t\t$sql = 'SELECT '.$sql;\n\t\t}\n\t\t$db->setFetchMode(DbBase::DB_NUM);\n\t\t$num = $db->fetchOne($sql);\n\t\t$db->setFetchMode(DbBase::DB_ASSOC);\n\t\treturn $num[0];\n\t}", "static function loadUser() : string\n {\n return \"SELECT *\n FROM users\n WHERE id = :id;\";\n }", "public function select() {\n\t\t// PHP doesn't allow direct use as function argument\n\t\t$_args=func_get_args();\n\t\treturn call_user_func_array(array($this,'lookup'),$_args);\n\t}" ]
[ "0.6641933", "0.6083972", "0.5826066", "0.5785692", "0.55953115", "0.5493979", "0.5493979", "0.53172874", "0.53172874", "0.53172874", "0.52288806", "0.5153606", "0.51333666", "0.5127988", "0.5109189", "0.5103348", "0.5093415", "0.50858283", "0.50858283", "0.5075214", "0.50686073", "0.50661045", "0.5062928", "0.5058081", "0.5045511", "0.5037132", "0.49822307", "0.49795482", "0.49781772", "0.49718806" ]
0.6461894
1
Get all items in the storage as an associative array where the field 'nb_icontact_prospect_id' is the index, and each value is an instance of class CNabuIContactProspectBase.
public static function getAlliContactProspects() { return forward_static_call( array(get_called_class(), 'buildObjectListFromSQL'), 'nb_icontact_prospect_id', 'select * from nb_icontact_prospect' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function getAllProduit() {\n $rep = Model::$pdo->query('SELECT *\n\t\t\t\t\t\t\t\tFROM PRODUIT');\n $rep->setFetchMode(PDO::FETCH_CLASS, 'ModelProduit');\n $ans = $rep->fetchAll();\n return $ans;\n }", "public function toArray()\n {\n $itemArray = [];\n foreach ($this->storage as $item) {\n $itemArray[] = $item;\n }\n return [\n 'uid' => $this->getIdentifier(),\n 'title' => $this->getTitle(),\n 'description' => $this->getDescription(),\n 'table_name' => $this->getItemTableName(),\n 'items' => $itemArray\n ];\n }", "public function getProduits() {\n $produit = Produit::get();\n\n return json_encode($produit);\n }", "public function getItemsArray() {\r\n $stmt = $this->DB->prepare ( \"SELECT * FROM products\");\r\n $stmt->execute ();\r\n return $stmt->fetchAll (PDO::FETCH_ASSOC);\r\n }", "public function toArray()\n {\n return [\n 'id' => $this->items->first()->getKey(), //eventually change ow this works\n 'ids' => $this->items->pluck('id'),\n 'grocery_list_id' => $this->items->first()->grocery_list_id,\n 'department' => $this->department(),\n 'department_id' => $this->departmentId(),\n 'quantity' => $this->quantity(),\n 'description' => $this->description(),\n 'implicitQty' => $this->hasImplicitQuantity(),\n ];\n }", "public function toArray() {\n\t\t\t$result = array();\n\t\t\tforeach (array_keys(static::$_fields) as $key) {\n\t\t\t\t$result[$key] = $this->getData($key);\n\t\t\t}\n\t\t\treturn $result;\n\t\t}", "public function getItems(): array\n\t{\n\t\treturn $this->storage->all();\n\t}", "public function toArray() {\n return $this->_items;\n }", "private function getItensInformation()\n {\n $Itens = $this->order->getAllVisibleItems();\n $PagSeguroItens = array();\n\n //CarShop Items\n foreach ($Itens as $item) {\n $PagSeguroItem = new PagSeguroItem();\n $PagSeguroItem->setId($item->getId());\n $PagSeguroItem->setDescription(self::fixStringLength($item->getName(), 255));\n $PagSeguroItem->setQuantity(self::toFloat($item->getQtyOrdered()));\n $PagSeguroItem->setWeight(round($item->getWeight()));\n $PagSeguroItem->setAmount(self::toFloat($item->getPrice()));\n\n array_push($PagSeguroItens, $PagSeguroItem);\n }\n\n return $PagSeguroItens;\n }", "public function toArray() {\r\n return $this->associativeArray();\r\n }", "public function toArray(): array\n {\n $receipt_items = [];\n foreach ($this->items as $receipt_item) {\n if ($receipt_item instanceof Item) {\n $receipt_items[] = $receipt_item->toArray();\n }\n }\n\n return \\array_filter([\n 'Items' => $receipt_items,\n 'calculationPlace' => $this->calculation_place,\n 'taxationSystem' => $this->taxation_system,\n 'email' => $this->email,\n 'phone' => $this->phone,\n 'isBso' => $this->is_bso,\n 'amounts' => [\n 'electronic' => \\number_format((float) $this->electronic_amount, 2, '.', ''),\n 'advancePayment' => \\number_format((float) $this->advance_payment_amount, 2, '.', ''),\n 'credit' => \\number_format((float) $this->credit_amount, 2, '.', ''),\n 'provision' => \\number_format((float) $this->provision_amount, 2, '.', ''),\n ],\n ]);\n }", "public function toArray()\n {\n return array_filter(array(\n 'VPSProtocol' => $this->vpsProtocol,\n 'TxType' => $this->txType,\n 'Vendor' => $this->vendor,\n 'VendorTxCode' => $this->vendorTxCode,\n 'Currency' => $this->currency,\n 'NotificationURL' => $this->notificationUrl,\n 'Profile' => $this->profile\n ));\n }", "public function toArray(){\n return $this->items;\n }", "public function toArray(): array\n {\n return $this->getAllItems();\n }", "public function getItems()\n {\n $cartItems = [];\n\n foreach ($_SESSION['cart'] as $id => $data) {\n $cartItem = $this->productList->getProduct($id);\n $cartItem->count = $data['count'];\n\n $cartItems[$id] = $cartItem;\n }\n\n return $cartItems;\n }", "public function toArray()\n {\n return array_filter([\n 'product' => $this->product,\n 'price' => $this->getPriceInteger(),\n 'quantity' => $this->quantity,\n 'taxMode' => $this->getTaxMode(),\n ]);\n }", "public function toArray(): array {\n return $this->items;\n }", "public function toArray(): array\n {\n return array(\n 'id' => $this->ID,\n 'public_id' => $this->PublicID,\n 'request_time' => $this->RequestTime\n );\n }", "function toArray() {\n\t\treturn array(\n\t\t\t'uid' => $this->getUID(),\n\t\t\t'pid' => $this->getPID(),\n\t\t\t'type' => $this->getType(),\n\t\t\t'feuser_id' => $this->getFEUserUID());\n\t}", "public function toArray()\r\n\t{\r\n\t\treturn $this->m_data;\r\n\t}", "public function recupererToutesLesCompetitions()\n {\n return $this->getAll('competition','Competition');\n }", "public function toArray()\n\t{\n\t\treturn $this->items;\n\t}", "public function toArray()\n\t{\n\t\treturn $this->items;\n\t}", "public function toArray()\n {\n return $this->items;\n }", "public function toArray()\n {\n return $this->items;\n }", "public function toArray()\n {\n return $this->items;\n }", "public function toArray() : array{\n return get_object_vars( $this );\n }", "public function toArray()\n {\n return $this->fetchData;\n }", "public function getAllProtypes(){\r\n\t\t//viet cau sql\r\n\t\t$sql =\"SELECT * FROM protypes\";\r\n\t\t//thuc thi cau truy van\r\n\t\t$obj = self::$conn->query($sql);\r\n\t\treturn $this->getData($obj);\r\n\t}", "public function getItems(): array\n {\n return $this->getData();\n }" ]
[ "0.57289755", "0.5567055", "0.55608827", "0.554019", "0.5456522", "0.54491276", "0.5444158", "0.5400886", "0.5392007", "0.53907245", "0.53729206", "0.53725743", "0.5362772", "0.5354171", "0.5345363", "0.5334532", "0.5323782", "0.5323492", "0.5320009", "0.5316349", "0.5312814", "0.5310981", "0.5310981", "0.53039247", "0.53039247", "0.53039247", "0.5300316", "0.52878225", "0.52825946", "0.5274863" ]
0.6905446
0
Gets a filtered list of iContact Prospect instances represented as an array. Params allows the capability of select a subset of fields, order by concrete fields, or truncate the list by a number of rows starting in an offset.
public static function getFilterediContactProspectList($q = null, $fields = null, $order = null, $offset = 0, $num_items = 0) { $fields_part = nb_prefixFieldList(CNabuIContactProspectBase::getStorageName(), $fields, false, true, '`'); $order_part = nb_prefixFieldList(CNabuIContactProspectBase::getStorageName(), $fields, false, false, '`'); if ($num_items !== 0) { $limit_part = ($offset > 0 ? $offset . ', ' : '') . $num_items; } else { $limit_part = false; } $nb_item_list = CNabuEngine::getEngine()->getMainDB()->getQueryAsArray( "select " . ($fields_part ? $fields_part . ' ' : '* ') . 'from nb_icontact_prospect ' . ($order_part ? "order by $order_part " : '') . ($limit_part ? "limit $limit_part" : ''), array( ) ); return $nb_item_list; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getAlliContactProspects()\n {\n return forward_static_call(\n array(get_called_class(), 'buildObjectListFromSQL'),\n 'nb_icontact_prospect_id',\n 'select * from nb_icontact_prospect'\n );\n }", "public function getByCriteria() {\n $ret = array();\n $sql = \"SELECT DISTINCT C.courseID FROM Course C INNER JOIN Section S ON C.courseID=S.courseID WHERE S.sessionYear = :sessionYear AND S.sessionCode = :sessionCode AND S.term = :term\";\n $params = array(':sessionCode' => $this->code, ':sessionYear' => $this->year, ':term' => $this->term);\n foreach($this->filters as $name => $val) {\n $sql .= ' AND '.$name.'=:'.$name;\n $params[':'.$name] = $val;\n }\n $stmt = $this->conn->prepare($sql);\n $stmt->execute($params);\n while ($row = $stmt->fetch(PDO::FETCH_ASSOC)) {\n $ret[] = new Course($row['courseID'], $this->head);\n echo $row['courseID'];\n }\n return $ret;\n return (!empty($ret)) ? $ret : false;\n }", "public function getContacts(){\n $contacts = [];\n if ($this->data instanceof IPPCustomer){\n $newContact = $this->parseData($this->data);\n $contacts[] = $newContact;\n }\n else {\n foreach ($this->data as $contact) {\n $newContact = $this->parseData($contact);\n $contacts[] = $newContact;\n }\n }\n\n return $contacts;\n }", "public function select(?int $limit = null, ?int $offset = null): array\n {\n $copy = $this->array;\n if ($limit !== null && $offset !== null) {\n return array_splice($copy, $offset, $limit);\n } elseif ($offset !== null) {\n return array_splice($copy, $offset);\n } elseif ($limit !== null) {\n return array_splice($copy, 0, $limit);\n }\n return $copy;\n\n }", "public function filterList($perPage = null);", "function contacts_getList ($per_page = 25, $page = 1, $filter = NULL) {\n $response = $this->execute(array('method' => 'flickr.contacts.getList', 'per_page' => $per_page, 'page' => $page, 'filter' => $filter));\n\t\t$object = unserialize($response);\n\t\tif ($object['stat'] == 'ok') {\n\t\t\treturn $object['contacts'];\n\t\t} else {\n\t\t\t$this->setError($object['message'], $object['code']);\n\t\t\treturn NULL;\n\t\t}\n\t}", "public function findContactsBy(array $criteria);", "function getLimitOffsetData($fields, $table, $condition = null, $params = array(), $limit = 500, $offset = 0){\n\t\t$list = array();\n\t\ttry {\n\t\t\t$sql = \"SELECT * FROM $table\";\n\t\t\tif($fields && !empty($fields)) {\n\t\t\t\t$sql = \"SELECT $fields FROM $from\";\n\t\t\t}\n\t\t\tif($condition && !empty($condition)) {\n\t\t\t\t$sql .=\" WHERE $condition\";\n\t\t\t}\n\t\t\t$sql .=\" limit $limit\";\n\t\t\t$sql .=\" offset $offset\";\n\t\t\t$query = $this->executeQuery($sql, $params);\n\t\t\tif ($query){\n\t\t\t\t$list = $query->fetchAll(PDO::FETCH_ASSOC);\n\t\t\t\tunset($query);\n\t\t\t}\n\t\t}catch(Exception $e){\n\t\t\t$this->logger->error($sql, $e->getMessage());\n\t\t\tthrow $e;\n\t\t}\n\t\treturn $list;\n\t}", "public function findBy(array $criteria, ?array $orderBy = null, $limit = null, $offset = null) : array;", "public function fetchCampaigns(): ?array\n {\n return $this->readImproved([\n 'what' => [$this->table . '.*'],\n 'where' => [\n $this->table . '.vendorId' => $this->vendorId\n ]\n ]);\n }", "public function getFilteredDetails();", "function &GetArray($nRows = -1)\n\t{\n\t\t$results = array();\n\t\t$cnt = 0;\n\t\twhile (!$this->EOF && $nRows != $cnt) {\n\t\t\t$results[] = $this->fields;\n\t\t\t$this->MoveNext();\n\t\t\t$cnt++;\n\t\t}\n\t\treturn $results;\n\t}", "public function getRecords(){\n // Get the sql statement\n $sql = $this->getSql($this->filters);\n // Prepare the query\n $stmt = $this->db->query($sql);\n // Fetch values from PDO array\n return $stmt->fetchAll(\\PDO::FETCH_ASSOC);\n }", "public function listByCriteria(array $search, $offset = null)\n {\n foreach ($search as $key => $value)\n {\n $pieces[] = \"criteria[$key]=$value\";\n }\n if ($offset) $pieces[] = 'n=' . $offset;\n $request = new Highrise_Api_Request();\n $request->endpoint = '/people/search.xml?' . implode('&', $pieces);\n $request->method = Highrise_Api_Client::METHOD_GET;\n $request->expected=200;\n \n $response = $this->_client->request($request);\n \n $xml = simplexml_load_string($response->getData());\n $result = $xml->xpath('/people/person');\n $collection = array();\n if (!$result) return $collection;\n foreach ($result as $xmlEntry)\n {\n $person = new Highrise_Entity_Person();\n $person->fromXml($xmlEntry->saveXml());\n $collection[] = $person;\n }\n return $collection;\n }", "public function queryAll(array $criteria = array(), array $fields = array(), $hydrate = true, $timeout = 30000) {\n\t\t// Find our records\n\t\t$records = $this->getCollection()->find($criteria, $fields);\n\t\t$records->timeout($timeout);\n\t\t$records->maxTimeMS($timeout);\n\t\t\n\t\t// Handle sorting\n\t\tif ($this->getSort() != '-1') {\n\t\t\t$records = $records->sort(array($this->getSort() => (strtoupper($this->getSord()) == 'ASC' ? \\MongoCollection::ASCENDING : \\MongoCollection::DESCENDING)));\n\t\t}\n\n\t\t// Handle pagination\n\t\tif (!$this->getIgnorePagination()) {\n\t\t\tif ($this->getStart() !== false) {\n\t\t\t\t$records = $records->limit($this->getItemsPerPage())->skip($this->getStart());\n\t\t\t} else {\n\t\t\t\t$records = $records->limit($this->getItemsPerPage())->skip($this->getStartIndex());\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check if we need to hydrate before we return\n\t\tif ($hydrate === true) {\n\t\t\t// Figure out how many records we found\n\t\t\t$count = $this->getCollection()->count($criteria);\n\t\t\t$this->setTotal($count);\n\t\t\t\n\t\t\t$ret_val = array();\n\t\t\tif ($records->count() > 0) {\n\t\t\t\t$record_array = iterator_to_array($records);\n\t\t\t\tforeach ($record_array as $record_item) {\n\t\t\t\t\t$hydrate_class_name = get_class($this);\n\t\t\t\t\t$hydrate_class = new $hydrate_class_name();\n\t\t\t\t\t$hydrate_class->populate($record_item);\n\t\t\t\t\t$ret_val[] = $hydrate_class;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// Return the array\n\t\t\treturn $ret_val;\n\t\t} else {\n\t\t\t// Return the cursor\n\t\t\treturn $records;\n\t\t}\n\t}", "private function get_recs() {\n\tglobal $_DB;\n\n\t$sql = \"SELECT e00.name, e00.property_id AS name_id,\n\t\t\t\te02.name AS value, e02.prop_value_id AS value_id\n\t\t\tFROM (\n\t\t\t\tSELECT property_id, name FROM \".$_DB->prefix.\"e00_property\n\t\t\t\tWHERE organization_idref = \".$_SESSION[\"organization_id\"].\"\n\t\t\t) AS e00\n\t\t\tJOIN \".$_DB->prefix.\"e02_prop_value AS e02 ON e02.property_idref = e00.property_id\n\t\t\tORDER BY name, value;\";\n\t$stmt = $_DB->query($sql);\n\t$this->records = array();\n\twhile ($row = $stmt->fetchObject()) {\n\t\t$record = array(\n\t\t\t\t\"name\" =>\t\t$row->name,\n\t\t\t\t\"name_id\" =>\t$row->name_id,\n\t\t\t\t\"value\" =>\t\t$row->value,\n\t\t\t\t\"value_id\" =>\t$row->value_id,\n\t\t);\n\t\t$this->records[] = $record;\n\t}\n\t$stmt->closeCursor();\n}", "public function list(int $offset = 0, int $limit = self::MAX_ITEMS_PER_REQUEST, array $fields = []): array\n {\n /** @var Contact[] $contacts */\n $contacts = [];\n $response = $this->client->get($this->prepareUrlForKey('get-contacts'), [\n '_skip' => $offset,\n '_limit' => $limit,\n '_fields' => $fields,\n ]);\n\n $responseData = $response->getDecodedBody();\n\n foreach ($responseData['data'] as $contact) {\n $contacts[] = new Contact($contact);\n }\n\n return $contacts;\n }", "function get ()\n\t{\n\t\t$ ret = array ();\n\t\t\n\t\t// Loop por todos os registros no banco de dados\n\t\tfor ( $ x = 0 ; ( $ x < $ this -> num_records () && count ( $ ret ) < $ this -> _limit ); $ x ++)\n\t\t{\t\t\t\n\t\t\t$ row = $ this -> _px -> retrieve_record ( $ x );\n\t\t\t\n\t\t\tif ( $ this -> _test ( $ row ))\n\t\t\t{\n\t\t\t\tforeach ( $ row as $ key => $ val )\n\t\t\t\t{\n\t\t\t\t\t// Encontre todos os campos que não estão na matriz selecionada\n\t\t\t\t\tif (! in_array ( $ key , $ this -> _select ) &&! empty ( $ this -> _select )) unset ( $ row [ $ key ]);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$ ret [] = $ linha ;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $ ret ;\n\t}", "protected function &getItemsAsArray() {\n\n if ($this->_itemArray !== null) {\n return $this->_itemArray;\n }\n\n $this->_itemArray = array();\n $q = $this->query();\n\n while($row = $q->fetchRow()) {\n\n $item = $this->createModelInstance($row);\n $this->_itemArray[] = $item;\n\n }\n\n if ($this->_comparatorFunction) {\n\n // Error suppression is because of\n // https://bugs.php.net/bug.php?id=50688\n @usort($this->_itemArray, $this->_comparatorFunction);\n\n }\n\n if ($this->_offset && $this->_maxRecords) {\n\n $this->_itemArray = array_slice($this->_itemArray, $this->_offset, $this->_maxRecords);\n\n } else if ($this->_maxRecords) {\n\n $this->_itemArray = array_slice($this->_itemArray, 0, $this->_maxRecords);\n\n } else if ($this->_offset) {\n\n $this->_itemArray = array_slice($this->_itemArray, $this->_offset);\n\n }\n\n return $this->_itemArray;\n\n }", "public function getByFilter(object $params): array\n\t{\n\t\t$sql = \"SELECT\n\t\t\t\t\te.id,\n\t\t\t\t\te.event_name,\n\t\t\t\t\te.frequency,\n\t\t\t\t\te.start_date,\n\t\t\t\t\te.end_date,\n\t\t\t\t\te.duration\n\t\t\t\tFROM events e\n\t\t\t\tLEFT JOIN event_invitees ei\n\t\t\t\t\tON e.id = ei.event_id\n\t\t\t\tWHERE 1 = 1\n\t\t\t\tAND e.duration is not null\n\t\t\t\tAND (\n\t\t\t\t\t\t(\n\t\t\t\t\t\tfrequency != 'Once-Off' \n\t\t\t\t\t\tAND (\n\t\t\t\t\t\t\t\t(e.start_date BETWEEN :startDateTime AND :endDateTime) \n\t\t\t\t\t\t\t\tOR (e.end_date BETWEEN :startDateTime2 AND :endDateTime2) \n\t\t\t\t\t\t\t\tOR (e.start_date <= :startDateTime3 AND (e.end_date >= :endDateTime3 OR end_date IS NULL))\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\tOR (\n\t\t\t\t\t\tfrequency = 'Once-Off' \n\t\t\t\t\t\tAND e.start_date BETWEEN :startDateTime4 AND :endDateTime4\n\t\t\t\t\t)\n\t\t\t\t)\";\n\t\t\n\t\tif ($params->invitees) {\n\t\t\t$sql .= \" AND ei.user_id in (\". $params->invitees .\") GROUP BY e.id\";\n\t\t} else {\n\t\t\t$sql .= \" GROUP BY e.id\";\n\t\t}\n\t\t\t\t\n\t\t$params = [\n 'startDateTime' => $params->from,\n 'endDateTime' => $params->to,\n 'startDateTime2' => $params->from,\n 'endDateTime2' => $params->to,\n 'startDateTime3' => $params->from,\n 'endDateTime3' => $params->to,\n 'startDateTime4' => $params->from,\n 'endDateTime4' => $params->to,\n ];\n\n return DB::select($sql, $params);\n\t}", "function getPartners($limit, $offset=0) {\n $this->db->select(\"*\");\n $this->db->order_by(\"partnerName\", \"asc\");\n\t\t$this->db->limit($limit, $offset);\n $query = $this->db->get('partner');\n if ($query->num_rows() > 0) {\n return $query->result_array();\n }\n return array();\n }", "public function getPaginatedList($offset, $limit, $criteria = array());", "public function getUser(array $params, ?int $limit, ?int $offset): array\n {\n //Define output\n $outputs = [\n 'success' => true,\n 'message' => '',\n ];\n\n try {\n //create filter\n $users = $this->getDataByParams($params);\n\n if (!empty($limit)) {\n //get total record\n $outputs['total'] = $users[1];\n }\n\n $outputs['data'] = $users[0];\n\n } catch (\\Exception $e) {\n $outputs['success'] = false;\n $outputs['message'] = 'missionFail';\n }\n \n\n return $outputs;\n }", "public function getCriteriaList() {\n return $this->_get(6);\n }", "public function getFilter() {\n\n // check if there is at least one match\n if (\n ($fromFields = $this->getConfiguration('searchFields'))\n && ($timestamp = $this->getDataPrepared())\n && (is_numeric($timestamp))\n && (is_array($fromFields))\n ) {\n\n // build where condition\n $whereClause = array ();\n foreach ($fromFields as $field) {\n $whereClause[] = '(' . $field . ' >= ' . intval($timestamp) . ')';\n }\n\n return array (\n 'selectFields' => (($this->getConfiguration('selectFieldsAddition')) ? explode(',', $this->getConfiguration('selectFieldsAddition')) : array ()),\n 'searchClass' => (($this->getConfiguration('searchClass')) ? $this->getConfiguration('searchClass') : NULL),\n 'orderBy' => ( ($this->getConfiguration('orderBy') && is_array($this->getConfiguration('orderBy'))) ? $this->getConfiguration('orderBy') : array()),\n 'where' => '(' . implode(' AND ', $whereClause) . ')'\n );\n //===\n }\n\n return array();\n //===\n }", "public function searchProfessionals($pCriteria){\n\t\t// \t-> get();\n\n\t// \t return $this -> professional -> join('pros_specs', 'professionals.ID', '=', 'pros_specs.professionalID')\n\t// \t\t -> join('specializations', 'specializations.ID', '=', 'pros_specs.specializationID')\n\t// \t\t-> join('pros_creativefields', 'professionals.ID', '=', 'pros_creativefields.ProfessionalID')\n\t// \t\t-> join('creativefields', 'pros_creativefields.CreativeFieldID', '=', 'creativefields.ID')\n\t// \t\t-> join('pros_platforms', 'professionals.ID', '=', 'pros_platforms.ProfessionalID')\n\t// \t\t-> join('platforms', 'platforms.ID', '=', 'pros_platforms.PlatformID')\n\t// \t\t-> join('cities', 'professionals.CityID', '=', 'Cities.ID')\n\t// \t\t-> where('CompanyName', 'LIKE', '%' . $pCriteria['pCompanyName'] . '%')\n\t// \t\t-> whereIn('specializations.ID', $pCriteria['pSpecializations'])\n\t// \t\t-> whereIn('creativefields.ID', $pCriteria['pCreativeFields'])\n\t// \t\t-> whereIn('platforms.ID', $pCriteria['pPlatforms'])\n\t// \t\t-> whereIn('cities.ID', $pCriteria['pCities']) \n\t// \t\t-> groupBy('professionals.ID')\n\t// \t\t-> distinct() -> get();\n\t// }\n\n\t\t$searchQuery = $this -> professional -> queryJoiningTables();\n\n\t\tif(!is_null($pCriteria['pCompanyName'])){\n\t\t\t$searchQuery = $searchQuery -> queryCompanyName($pCriteria['pCompanyName']);\n\t\t}\n\n\t\tif(!is_null($pCriteria['pSpecializations'])){\n\t\t\t$searchQuery = $searchQuery -> querySpecializations($pCriteria['pSpecializations']);\n\t\t}\n\n\t\tif(!is_null($pCriteria['pCreativeFields'])){\n\t\t\t$searchQuery = $searchQuery -> queryCreativeFields($pCriteria['pCreativeFields']);\n\t\t}\n\n\t\tif(!is_null($pCriteria['pPlatforms'])){\n\t\t\t$searchQuery = $searchQuery -> queryPlatforms($pCriteria['pPlatforms']);\n\t\t}\n\n\t\tif(!is_null($pCriteria['pCities'])){\n\t\t\t$searchQuery = $searchQuery -> queryCities($pCriteria['pCities']);\n\t\t}\n\n\n\n\t\treturn $searchQuery -> groupBy('professionals.ID') \n\t\t\t-> distinct() -> get(array('Professionals.*'));\n\t}", "public function getContacts() {\n $sforce = $this->getDataSource();\n $SOQL = $sforce->getConfigSOQL();\n $resultSet = $this->queryBatch($SOQL);\n \n return $resultSet;\n }", "public function getListaPessoas($filtros = array()){\r\n\r\n $filtrostring = array('1=1');\r\n if(!empty($filtros['pesqNome'])){\r\n $filtrostring[] = 'p.nome like :nome';\r\n }\r\n if(!empty($filtros['pesqCPF'])){\r\n $filtrostring[] = 'p.cpf = :cpf';\r\n }\r\n $sql = $this->db->prepare(\"SELECT\r\n p.id,\r\n p.nome,\r\n p.email,\r\n p.cpf,\r\n p.dtnasc,\r\n COUNT(t.id) as QtdFones\r\n FROM\r\n pessoa p\r\n LEFT OUTER JOIN \r\n telefone t\r\n ON t.id_pessoa = p.id\r\n WHERE \".implode(' AND ', $filtrostring).\"\r\n GROUP BY\r\n p.id,p.nome,p.email,p.cpf,p.dtnasc\");\r\n if(!empty($filtros['pesqNome'])){\r\n $sql->bindValue(\":nome\", \"%\".$filtros['pesqNome'].\"%\");\r\n }\r\n if(!empty($filtros['pesqCPF'])){\r\n $sql->bindValue(\":cpf\", $filtros['pesqCPF']);\r\n }\r\n $sql->execute();\r\n\r\n $dados = array();\r\n if($sql->rowCount() > 0){\r\n $dados = $sql->fetchAll();\r\n }\r\n return $dados;\r\n }", "public function getContacts(){\n\t\t$db = Dbconn::getDB();\n\t\t$sql = \"SELECT * FROM contacts\";\n\t\t$result = $db->query($sql);\n\n\t\t$contacts = array();\n\n\t\tforeach ($result as $row){\n\t\t\t$contact = new Contact(\n\t\t\t\t$row['contact_fname'],\n\t\t\t\t$row['contact_lname'],\n\t\t\t\t$row['contact_email'],\n\t\t\t\t$row['contact_phone'],\n\t\t\t\t$row['contact_msg']\n\t\t\t\t);\n\t\t\t$contacts[] = $contact;\n\t\t}\n\n\t\treturn $contacts;\n\t}", "function getDataListWhere($table,$fields = null,$where = null,$order = null,$limit_start,$limit_limit) {\r\n\t\t\r\n\t\t$db = self::getDatabaseDataWhere($table,$fields,$where,$order,$limit_start,$limit_limit);\r\n\t\t\r\n\t\t//echo $db->getQuery();\r\n\t\treturn $db->loadAssocList();\r\n\t}" ]
[ "0.6249827", "0.5301811", "0.5274262", "0.52478707", "0.52412444", "0.51928794", "0.51886785", "0.518818", "0.5184411", "0.51803696", "0.51769125", "0.51664776", "0.5139945", "0.51377296", "0.5072435", "0.505985", "0.50510234", "0.5047611", "0.5044364", "0.5021724", "0.501416", "0.49937803", "0.49836773", "0.4983421", "0.49703914", "0.4946504", "0.49380296", "0.4925702", "0.4924584", "0.49061817" ]
0.64116406
0
Get Icontact Prospect Id attribute value
public function getId() : int { return $this->getValue('nb_icontact_prospect_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getContactID()\n {\n return $this->get('ContactID');\n }", "public function getContactID()\n {\n return $this->get('ContactID');\n }", "public function getContactID()\n {\n return $this->get('ContactID');\n }", "public function getIcontactId() : int\n {\n return $this->getValue('nb_icontact_id');\n }", "public function getPersonID() {\n\t\t$session_id = $this->getCurrentID();\n\t\t$this->load($session_id);\n\t\treturn $this->contactid;\n }", "public function getAttributeId();", "public function getIdContact()\n {\n return $this->id_contact;\n }", "public function getId()\n { return $this->getAttribute('id'); }", "public function getId() {\n return $this->datosprop->getId_prop_carac();\n }", "public function getContactID()\n {\n return $this->ContactID;\n }", "public function getId() {\n return @$this->attributes['id'];\n }", "public function getId() {\n return @$this->attributes['id'];\n }", "public function npCommunicationId(): string\n {\n return $this->pluck('npCommunicationId');\n }", "function getPersonID()\n {\n return $this->getValueByFieldName('person_id');\n }", "public function getIdentifyingAttribute();", "public function GetId()\n {\n return $this->GetAttribute(self::ATTR_ID);\n }", "public function getId() {\n return $this->attributes['id'];\n }", "public function getPhone()\n {\n return $this->getValue('nb_icontact_prospect_phone');\n }", "public function getContactId()\n\t{\n\t\treturn $this->_contactId;\n\t}", "public function getIdentification()\n {\n return $this->identification;\n }", "public function getId()\n {\n return $this->getAttribute('id');\n }", "public function uniqueId()\n {\n return $this->contact->id;\n }", "public function getFieldContactID()\n\t{\n\t\treturn $this->GetDAL()->GetField(DotCoreContactMemberDAL::CONTACT_MEMBER_ID);\n\t}", "public function getId()\n {\n return $this->attributes['id'];\n }", "public function getIdentityAttribute(): string;", "public function getId()\n {\n return $this->product->{$this->params['productFieldId']};\n }", "public function getIdentification(): string\n {\n return $this->identification;\n }", "function get_id() {\n return $this->get_mapped_property('id');\n }", "function getAssocId() {\n\t\treturn $this->getData('assocId');\n\t}", "function getAssocId() {\n\t\treturn $this->getData('assocId');\n\t}" ]
[ "0.6667847", "0.6667847", "0.6666448", "0.6632674", "0.6533523", "0.6515566", "0.64441454", "0.6346272", "0.6339089", "0.63353395", "0.62844706", "0.62844706", "0.6278635", "0.62675464", "0.62584364", "0.62548506", "0.6254567", "0.62313926", "0.62116784", "0.619901", "0.6162214", "0.61527324", "0.614683", "0.61242944", "0.61044097", "0.6095697", "0.6076984", "0.60741514", "0.6069194", "0.6069194" ]
0.7076327
0
Sets the Icontact Prospect Id attribute value.
public function setId(int $id) : CNabuDataObject { if ($id === null) { throw new ENabuCoreException( ENabuCoreException::ERROR_NULL_VALUE_NOT_ALLOWED_IN, array("\$id") ); } $this->setValue('nb_icontact_prospect_id', $id); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getId() : int\n {\n return $this->getValue('nb_icontact_prospect_id');\n }", "function setCertId($value)\n {\n $this->_props['CertId'] = $value;\n }", "function SetId($value) { $this->id=$value; }", "public function setId($id) {\n $this->datosprop->setId_prop_carac($id);\n }", "function setId($value) {\n $this->_id = intval($value);\n }", "function setDevId($value)\n {\n $this->_props['DevId'] = $value;\n }", "public function setIdAttribute($value)\n {\n $this->attributes['id'] = $value;\n }", "public function setContactId($value)\n {\n return $this->set('ContactId', $value);\n }", "public function setId($id)\n {\n $this->setIdExpert($id);\n }", "public function setID($value) {\r\n //if (!is_numeric($value)) die(\"setID() only accepts a numerical ID value\");\r\n $this->id = $value;\r\n }", "public function setContactID($value)\n {\n return $this->set('ContactID', $value);\n }", "function set_id($id)\r\n {\r\n $this->set_default_property(self :: PROPERTY_ID, $id);\r\n }", "public function setId($id) {\n $this->vendorData[\"ID_VENDOR\"] = (int)$id;\n }", "public function setId($pId) {\n\t\t$this->Id = $pId;\n\t}", "function set_id($id)\n {\n $this->set_default_property(self :: PROPERTY_ID, $id);\n }", "public function setId($id)\n {\n $this->_id = (int) $id;\n }", "public function setId($id) {\r\n $this->_id = $id;\r\n }", "function setId($id) {\n\t\t$this->_id = $id;\n\t}", "public function setId($id)\n {\n $this->_id = (int) $id;\n }", "function setId($id) {\r\n $this->_id = $id;\r\n }", "public function setId($id){\n $this->_id = $id;\n }", "function setId($id) {\n $this->id = $id;\n }", "function setId($id) {\n $this->id = $id;\n }", "public function setId($var){\n\t\t$this->id=$var;\n\t}", "private function SetID($value)\n\t\t{\n\t\t\t$this->id = $value;\n\t\t}", "public function setId($id) {\n $this->id = $id;\n }", "public function setId($id) {\r\n $this->id = $id;\r\n }", "public function setId($id) {\r\n $this->id = $id;\r\n }", "public function setIdVit($id){\n\t\t$this->id = $id;\n\t}", "public function setId($id)\n {\n $this->_id = $id;\n }" ]
[ "0.62196887", "0.61816156", "0.6165866", "0.5995591", "0.58890015", "0.585228", "0.584415", "0.57962215", "0.5792642", "0.571326", "0.57030725", "0.56521004", "0.56317824", "0.5596284", "0.5593554", "0.55855364", "0.55755085", "0.5567525", "0.55623436", "0.5562107", "0.55608386", "0.556", "0.556", "0.554956", "0.55466515", "0.55384594", "0.5535462", "0.5535462", "0.5524732", "0.55229366" ]
0.6272112
0
Get Icontact Prospect Email Hash attribute value
public function getEmailHash() { return $this->getValue('nb_icontact_prospect_email_hash'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmail()\n {\n return $this->getValue('nb_icontact_prospect_email');\n }", "function getEmailKey() {\n\t\treturn $this->getData('emailKey');\n\t}", "protected function _getEmailHash()\n {\n if (isset($this->_properties['email_hash'])) {\n return md5($this->_properties['email_hash']);\n }\n\n throw new \\Cake\\Error\\FatalErrorException(__d('elabs', 'You should have selected the email_hash field as email alias.'));\n }", "function getEmail() {\n\t\treturn $this->getData('email');\n\t}", "public function getEmail()\n {\n if (array_key_exists(\"email\", $this->_propDict)) {\n return $this->_propDict[\"email\"];\n } else {\n return null;\n }\n }", "public function getEmail()\n {\n return $this->attributes['email'] ?? null;\n }", "function getEmailId() {\n\t\treturn $this->getData('emailId');\n\t}", "public static function getEmail(){\n if(Cache::isStored('website_email')) return Cache::get('website_email'); \n $row = getDatabase()->queryFirstRow(\"SELECT `value` FROM `settings` WHERE `setting` = 'website_email'\");\n $address = $row['value'];\n Cache::store('website_email', $address);\n return $address;\n }", "public function getEmail()\n {\n return $this->getAttribute('email');\n }", "function getRHUL_Email() {\n\treturn getRHUL_LDAP_FieldValue(\"adi_mail\");\n}", "public function getEmail()\r\n\t{\r\n\t\treturn $this['email'];\r\n\t}", "public function getGiftcardRecipientEmail();", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function get_email() {\r\n return $this->email;\r\n }", "public function getEmail() {\n return $this->getValue('email');\n }", "public function getEmail()\n {\n return $this->__get(\"email\");\n }", "public function get_email() \n {\n return $this->email;\n }", "function getStudentEmail() {\n\t\treturn $this->getData('studentEmail');\n\t}", "public function get_email()\n {\n return $this->_email;\n }", "public function get_email()\n {\n return $this->_email;\n }", "public function get_email()\n {\n return $this->_email;\n }", "public function getEmailHashColumn()\n {\n\n return $this->getProfileColumnName('email_hash');\n }", "private function _extract_email()\r\n\t{\r\n\t\tif (! isset( $_SESSION['blesta_client_id'] ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tLoader :: loadModels( $this, array( 'clients' ) );\r\n\t\t$client_id\t=\t$_SESSION['blesta_client_id'];\r\n\t\t\r\n\t\t$client\t=\t$this->Clients->get( $_SESSION['blesta_client_id'] );\r\n\t\t\r\n\t\tif (! isset( $client->email ) ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn $client->email;\r\n\t}", "private function _hashEmail($email)\n\t{\n\t\treturn Security::hash(strtolower($email), $this->_hashType);\n\t}", "public function getFieldEmail()\n\t{\n\t\treturn $this->GetDAL()->GetField(DotCoreContactMemberDAL::CONTACT_MEMBER_EMAIL);\n\t}", "public function getEmail()\n {\n \treturn $this->email;\n }" ]
[ "0.65616786", "0.64263403", "0.6304265", "0.62540346", "0.6251856", "0.61685336", "0.6134398", "0.61256427", "0.6123265", "0.6056756", "0.60498565", "0.60454875", "0.60368925", "0.60368925", "0.60368925", "0.60350764", "0.60350764", "0.60286504", "0.60153484", "0.6003907", "0.59955245", "0.59914386", "0.597631", "0.597631", "0.597631", "0.59714705", "0.59506536", "0.59288377", "0.59264344", "0.5924114" ]
0.7844742
0
Sets the Icontact Prospect Email Hash attribute value.
public function setEmailHash(string $email_hash = null) : CNabuDataObject { $this->setValue('nb_icontact_prospect_email_hash', $email_hash); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmailHash()\n {\n return $this->getValue('nb_icontact_prospect_email_hash');\n }", "function setEmail($newEmail){\n $this->email = $newEmail;\n }", "public function setUserEmailHash($user, $email_hash)\n {\n $this->setUserProfileProperty($user, 'email_hash', $email_hash);\n }", "public function setEmail(string $email = null) : CNabuDataObject\n {\n $this->setValue('nb_icontact_prospect_email', $email);\n \n return $this;\n }", "public function setEmailAttribute($value)\n {\n if (!empty($value)) {\n $this->attributes['email'] = $this->mayaEncrypt($value);\n }\n }", "public function setEmail(?string $value): void {\n $this->getBackingStore()->set('email', $value);\n }", "public function setEmail($value)\n {\n $this->_email = $value;\n }", "protected function _getEmailHash()\n {\n if (isset($this->_properties['email_hash'])) {\n return md5($this->_properties['email_hash']);\n }\n\n throw new \\Cake\\Error\\FatalErrorException(__d('elabs', 'You should have selected the email_hash field as email alias.'));\n }", "public function setEmail($newEmail){\n\t}", "private function _setEmail($input) {\n\t\tif(!Validator::Email($input)) throw new Exception(lang('error_9'));\n\t\t$this->_identifier = $input;\n\t}", "public function setEmail($value) {\r\n $this->email = $value;\r\n }", "public function setGiftcardRecipientEmail($value);", "function setEmail($email) {\n\t\treturn $this->setData('email', $email);\n\t}", "public function setEmail($value) {\n if(!strstr($value, \"@\")){\n throw new Exception(\"Errore in setEmail\");\n }\n // se esiste\n\n $this->email = $value;\n\n //$this->generateUserId();\n }", "function setEmail( $email )\n {\n $this->setValueByFieldName( 'person_email', $email );\n return;\n }", "public function setEmail($val)\n {\n $this->_propDict[\"email\"] = $val;\n return $this;\n }", "public function setHash($pHash) {\n\t\t$this->Hash = $pHash;\n\t}", "public function setEmail($email) {\n\t\t$this->_email = $email;\n\t}", "public function setGiftcardSenderEmail($value);", "public function setEmailAttribute($value) {\n \t$this->attributes['email'] = strtolower($value);\n\t}", "public function setEmail($email){\n\t\t$this->email = $email;\n\t}", "public function setEmailAttribute($email)\n {\n $this->attributes['email'] = strtolower($email);\n }", "public function setEmail($strEmail) {\n\t\t$this->email = $strEmail;\n\t}", "public function setEmail($email){\n\t\t\t$this->email = $email;\n\t\t}", "public static function setEmail($email)\n {\n self::$email = $email;\n }", "public function setEmail($newEmail) {\n //first, trim the input of excess whitespace\n $newEmail = trim($newEmail);\n \n //second, sanitize the email of all invalid email characters\n $newEmail = filter_var($newEmail, FILTER_SANITIZE_EMAIL);\n \n //finally, bring the email out of quarantine\n $this->email = $newEmail;\n }", "public function set_email( $email ) {\n\t\treturn $this->set_field( 'EMAIL', $email );\n\t}", "public function _setEmail($Email)\n {\n $this->Email = $Email;\n\n }", "public function setEmail($value) {\n\t\tif(!check($value)) throw new Exception(lang('error_9'));\n\t\tif(!Validator::AccountEmail($value)) throw new Exception(lang('error_9'));\n\t\t\n\t\t$this->_email = $value;\n\t}", "function setEmailKey($emailKey) {\n\t\treturn $this->setData('emailKey', $emailKey);\n\t}" ]
[ "0.66702294", "0.5820604", "0.57151973", "0.5664816", "0.5657283", "0.5618985", "0.561031", "0.557492", "0.5551225", "0.548401", "0.54804677", "0.5451854", "0.54444504", "0.5435141", "0.54308367", "0.54140794", "0.5407314", "0.5398089", "0.53835684", "0.5373934", "0.53671885", "0.53459275", "0.5318277", "0.5288749", "0.52880585", "0.52619636", "0.52497953", "0.5248616", "0.5247827", "0.52388066" ]
0.69197357
0
Get Icontact Prospect Status Id attribute value
public function getStatusId() { return $this->getValue('nb_icontact_prospect_status_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getStatusID() {\n\t\treturn $this->data_array['status_id'];\n\t}", "public function getIdStatus()\n {\n return $this->id_status;\n }", "public function getStatusId()\n\t{\n\n\t\treturn $this->status_id;\n\t}", "public function getStatusId()\n\t\t{\n\t\t\t\treturn $this->getModel()->application_status_id;\n\t\t}", "public function getStatus() {\n\t\t\t$sql = \"SELECT status FROM persons WHERE idPerson = $this->idPerson\";\n\t\t\treturn ($data = $this->getArray($sql)) ? $data['status'] : '';\n\t\t}", "public function getId() : int\n {\n return $this->getValue('nb_icontact_prospect_id');\n }", "public function getStatus()\n\t\t{\n\t\t\t$status_id = $this->getStatusId();\n\t\t\t$asf = ECash::getFactory()->getReferenceList('ApplicationStatusFlat');\n\t\t\treturn $asf[$status_id];\n\t\t}", "function getStatus() {\n\t\treturn $this->getData('status');\n\t}", "public static function getAssignStudentStatus($acm_id)\n {\n $datas = AcmAcademicAssignStudent::where('acm_academic_id', '=', $acm_id)->first();\n// if ($datas->status == 'A') {\n// return 'A';\n// } else {\n// return 'N/A';\n// }\n\n}", "public function getUser_status_id()\n {\n return $this->user_status_id;\n }", "public function getStatus()\n {\n return $this->data['status'];\n }", "public function status()\n {\n $query = \"\n call sp_campanha_status(\n ? # campanha\n ,@1\n ,@2\n );\";\n $params = array(\n $this->id_campanha\n );\n $retorno = $this->getAdapter()\n ->query($query, $params)\n ->fetch();\n\n return $retorno['status'];\n }", "public function getStatus()\n {\n return $this->getData('status');\n }", "public function getStatus()\n {\n return $this->getProperty(self::STATUS);\n }", "public function getStatus()\n {\n $rtn = $this->data['status'];\n\n return $rtn;\n }", "function getDetailedStatus() ;", "public function getStatusAttribute()\n {\n return data_get($this, 'trackingNumber.last_status');\n }", "public function getStatus() : int\n {\n $rtn = $this->data['status'];\n\n return $rtn;\n }", "public function getStatusAto()\n {\n return $this->status_ato;\n }", "public function getStatusPureAttribute() {\n if(isset($this->attributes['status']))\n return $this->attributes['status'];\n return null;\n }", "function getContactStatus($idPatient, $idMotif) {\n \n \t$idPatient = (int) $idPatient;\n \t$idMotif = (int) $idMotif;\n \t\n\t\t$sql = \"SELECT `statut` FROM `mp_pile` WHERE `id_motif` = '$idMotif' AND `id_patient` = '$idPatient'\";\n\t\t\t\t \n $sel = mysql_query($sql);\n \n $status = mysql_fetch_array($sel);\n\n if ($sel) {\n return $status[\"statut\"] ;\n } else {\n return false;\n }\n \n }", "protected function getStatusDetail()\n {\n $proc_return_code = $this->getProcReturnCode();\n\n return $proc_return_code ? (isset($this->codes[$proc_return_code]) ? (string) $this->codes[$proc_return_code] : null) : null;\n }", "function get_status()\r\n {\r\n return $this->get_default_property(self :: PROPERTY_STATUS);\r\n }", "function getStatus() {\n return $this->getAdditionalProperty('payment_status_selected');\n }", "public function getStatus(){\n\t\treturn $this->status;\n\t}", "public function getStatus()\n {\n if (array_key_exists(\"status\", $this->_propDict)) {\n return $this->_propDict[\"status\"];\n } else {\n return null;\n }\n }", "public function getStatus()\n {\n if (array_key_exists(\"status\", $this->_propDict)) {\n return $this->_propDict[\"status\"];\n } else {\n return null;\n }\n }", "public function getIcontactId() : int\n {\n return $this->getValue('nb_icontact_id');\n }", "public function getIdentifyingAttribute();", "function get_status() {\n return $this->status;\n }" ]
[ "0.6922434", "0.6495864", "0.6312298", "0.6108296", "0.60967606", "0.6055607", "0.5868648", "0.58063763", "0.57909673", "0.5767292", "0.5764183", "0.5736758", "0.5704611", "0.57028884", "0.5688073", "0.56863844", "0.5686016", "0.5674778", "0.5672597", "0.56641704", "0.56494915", "0.5645293", "0.5640303", "0.5636618", "0.56352854", "0.5634368", "0.5634368", "0.563425", "0.5631897", "0.56318146" ]
0.76976633
0
Sets the Icontact Prospect Status Id attribute value.
public function setStatusId(int $status_id = null) : CNabuDataObject { $this->setValue('nb_icontact_prospect_status_id', $status_id); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStatusId()\n {\n return $this->getValue('nb_icontact_prospect_status_id');\n }", "public function setStatusIdAttribute($input)\n {\n $this->attributes['status_id'] = $input ? $input : null;\n }", "public function setStatusId($v)\n\t{\n\r\n\t\t// Since the native PHP type for this column is integer,\r\n\t\t// we will cast the input value to an int (if it is not).\r\n\t\tif ($v !== null && !is_int($v) && is_numeric($v)) {\r\n\t\t\t$v = (int) $v;\r\n\t\t}\r\n\n\t\tif ($this->status_id !== $v || $v === 0) {\n\t\t\t$this->status_id = $v;\n\t\t\t$this->modifiedColumns[] = MmPeer::STATUS_ID;\n\t\t}\n\n\t}", "public function setStatusId($statusId);", "public function set_contract_status_updates_contract_status_with_passed_status_id()\n {\n $this->assertEquals(\n self::$contract->set_contract_status(self::$contract, $status_id = 2),\n self::$contract->update(['contract_status_id' => $status_id])\n );\n }", "public function getIdStatus()\n {\n return $this->id_status;\n }", "public function setStatus($value)\n {\n $this->setItemValue('status', ['id' => (int)$value]);\n }", "public function setstatus()\n {\n $this->checkAjaxToken();\n $this->throwForbiddenUnless(SecurityUtil::checkPermission('AddressBook::', '::', ACCESS_ADMIN));\n\n $id = $this->request->request->get('id', 0);\n $status = $this->request->request->get('status', 0);\n $alert = '';\n \n if ($id == 0) {\n $alert .= $this->__('No ID passed.');\n } else {\n $item = array('id' => $id, 'status' => $status);\n $res = DBUtil::updateObject($item, 'addressbook_address', '', 'id');\n if (!$res) {\n $alert .= $item['id'].', '. $this->__f('Could not change item, ID %s.', DataUtil::formatForDisplay($id));\n if ($item['status']) {\n $item['status'] = 0;\n } else {\n $item['status'] = 1;\n }\n }\n }\n // get current status to return\n $item = DBUtil::selectObjectByID('addressbook_address', $id, 'id');\n if (!$item) {\n $alert .= $this->__f('Could not get data, ID %s.', DataUtil::formatForDisplay($id));\n }\n\n return new Zikula_Response_Ajax(array('id' => $id, 'status' => $item['status'], 'alert' => $alert));\n }", "public function setInvoiceStatus($val)\n {\n $this->_propDict[\"invoiceStatus\"] = $val;\n return $this;\n }", "public function setStatus($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->status !== $v) {\n\t\t\t$this->status = $v;\n\t\t\t$this->modifiedColumns[] = CampaignPeer::STATUS;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setStatus_IdStatus($status_idstatus){\n\t\t$status_idstatus = (int) $status_idstatus;\n\t\t// On vérifie ensuite si ce nombre est bien strictement positif.\n\t\tif ($status_idstatus > 0){\n\t\t // Si c'est le cas, c'est tout bon, on assigne la valeur à l'attribut correspondant.\n\t\t\t$this->_status_idstatus = $status_idstatus;\n\t\t}\n }", "function setId_activ($iid_activ)\n {\n $this->iid_activ = $iid_activ;\n }", "public function setIdStatus($id_status)\n {\n $this->id_status = $id_status;\n\n return $this;\n }", "public function setStatusProspect()\n {\n $this->profile->setStatusProspect();\n\n return $this;\n }", "public function updateStatus()\n {\n $this->Invoice->updateInvoiceStatus($this->input->post('id'));\n }", "public function updateStatusPs($id)\n {\n $this->loadModel('PurchaseRequests');\n $purchaseRequest = $this->PurchaseRequests->get($id);\n $info = '';\n if ($this->request->data('info')) {\n $info = $this->request->data('info');\n }\n\n if ($this->request->is(['patch', 'post', 'put', 'ajax'])) {\n $data = $this->request->getData();\n $data['status'] = 2;\n $data['info'] = $info;\n\n $purchaseRequest = $this->PurchaseRequests->patchEntity($purchaseRequest, $data);\n\n if ($this->PurchaseRequests->save($purchaseRequest)) {\n $code = 200;\n $message = __('Permintaan pembelian berhasil diselesaikan.');\n } else {\n $code = 50;\n $message = __('Permintaan pembelian gagal diselesaikan. Silahkan ulangi kembali.');\n }\n\n $this->set(compact('code', 'message', 'receive', 'data'));\n $this->set('_serialize', ['code', 'message', 'purchaseRequest', 'data']);\n }\n }", "public function set_status_of_ist($id){\n $update_status = $this->login_model->set_status($id);\n return $update_status;\n }", "public static function setDispatchStatus($id)\n {\n $statusArray1 = [];\n $leadDetails = LeadDetails::find($id);\n if ($leadDetails->dispatchType['dispatchType'] == 'Direct Collections') {\n $statusName = 'Collected';\n } elseif ($leadDetails->dispatchType['dispatchType'] == 'Delivery') {\n $statusName = 'Delivered';\n } elseif ($leadDetails->dispatchType['dispatchType'] == 'Collections') {\n $statusName = 'Collected';\n } elseif ($leadDetails->dispatchType['dispatchType'] == 'Delivery & Collections') {\n $statusName = 'Delivery and collection';\n }\n\n $lead = $leadDetails['dispatchDetails']['documentDetails'];\n if ($lead) {\n foreach ($lead as $key => $value) {\n $statusArray1[] = $value['DocumentCurrentStatus'];\n }\n $statusArray = array_unique($statusArray1);\n if (count(array_unique($statusArray)) === 1 && end($statusArray) === '1') {\n $dispatchStatus = 'Lead';\n } elseif (count(array_unique($statusArray)) === 1 && end($statusArray) === '10') {\n $dispatchStatus = 'Rejected From reception';\n } elseif (count(array_unique($statusArray)) === 1 && end($statusArray) === '2') {\n $dispatchStatus = $statusName;\n } elseif (count(array_unique($statusArray)) === 1 && end($statusArray) === '3') {\n $dispatchStatus = 'Reschedule for same day';\n } elseif (count(array_unique($statusArray)) === 1 && end($statusArray) === '4') {\n $dispatchStatus = 'Reschedule for another day';\n } elseif (count(array_unique($statusArray)) === 1 && end($statusArray) === '5') {\n $dispatchStatus = 'Could not contact';\n } elseif ((count(array_unique($statusArray)) === 1 && end($statusArray) === '6' || count(array_unique($statusArray)) === 1 && end($statusArray) === '15') || ((in_array('6', $statusArray) && in_array('15', $statusArray)) && (count(array_unique($statusArray))) <= 2)\n ) {\n $dispatchStatus = 'Transfer Accepted';\n } elseif (count(array_unique($statusArray)) === 1 && end($statusArray) === '8') {\n $dispatchStatus = 'Canceled';\n } elseif (count(array_unique($statusArray)) === 1 && end($statusArray) === '11') {\n $dispatchStatus = 'Delivery';\n } elseif (count(array_unique($statusArray)) === 1 && end($statusArray) === '17') {\n $dispatchStatus = 'Transfer Rejected';\n } elseif (count(array_unique($statusArray)) === 1 && end($statusArray) === '12') {\n $dispatchStatus = 'Reception(Rejected from schedule for delivery )';\n } elseif (count(array_unique($statusArray)) === 1 && end($statusArray) === '13') {\n $dispatchStatus = 'Schedule for delivery';\n } elseif ((count(array_unique($statusArray)) === 1 && end($statusArray) === '9' || count(array_unique($statusArray)) === 1 && end($statusArray) === '14') || ((in_array('9', $statusArray) && in_array('14', $statusArray)) && (count(array_unique($statusArray))) <= 2)\n ) {\n $dispatchStatus = 'Transferred';\n } elseif ((count(array_unique($statusArray)) === 1 && end($statusArray) === '7' || count(array_unique($statusArray)) === 1 && end($statusArray) === '16') || ((in_array('7', $statusArray) && in_array('16', $statusArray)) && (count(array_unique($statusArray))) <= 2)\n ) {\n $dispatchStatus = 'Completed';\n } else {\n $dispatchStatus = 'Partial';\n }\n $data = array(\n 'dispatchStatus' => $dispatchStatus\n );\n LeadDetails::where('_id', new ObjectID($id))->update($data, ['upsert' => true]);\n }\n }", "public function changeStatus(int $id);", "public function setProcessing($id){\n \t\t$model = Mage::getModel(\"mprmasystem/rmarequest\")->load($id);\n \t\t$model->setStatus(\"Processing\")->save();\n \t}", "public function getStatusId()\n\t{\n\n\t\treturn $this->status_id;\n\t}", "public function status($id)\n {\n return appointment::where('id',$id)->update(['verified'=>1]);\n }", "public function testSetSolidStatusIncorrectID()\r\n {\r\n $solidId = 0;\r\n $pct = 1;\r\n $status = $this->Solids::READY;\r\n $result = $this->Solids->setSolidStatus($solidId, $pct, $status);\r\n $this->assertFalse($result);\r\n }", "public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }", "public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }", "public function setStatus($val)\n {\n $this->_propDict[\"status\"] = $val;\n return $this;\n }", "function setId_activ($iid_activ = '')\n {\n $this->iid_activ = $iid_activ;\n }", "function setstatus($pr_id, $cloud_status) {\n\t\tswitch ($cloud_status) {\n\t\t\tcase 'new':\n\t\t\t\t$cr_status=1;\n\t\t\t\tbreak;\n\t\t\tcase 'approve':\n\t\t\t\t$cr_status=2;\n\t\t\t\tbreak;\n\t\t\tcase 'active':\n\t\t\t\t$cr_status=3;\n\t\t\t\tbreak;\n\t\t\tcase 'deny':\n\t\t\t\t$cr_status=4;\n\t\t\t\tbreak;\n\t\t\tcase 'deprovision':\n\t\t\t\t$cr_status=5;\n\t\t\t\tbreak;\n\t\t\tcase 'done':\n\t\t\t\t$cr_status=6;\n\t\t\t\tbreak;\n\t\t\tcase 'no-res':\n\t\t\t\t$cr_status=7;\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\texit(1);\n\t\t\t\tbreak;\n\t\t}\n\t\t$db=htvcenter_get_db_connection();\n\t\t$rs = $db->Execute(\"update \".$this->_db_table.\" set pr_status=$cr_status where pr_id=$pr_id\");\n\n\t}", "protected static function set_status()\n {\n }", "function setActivityStatus($activityId,$status) \n {\n return $this->instance->setActivityStatus($activityId,$status);\n }" ]
[ "0.68280447", "0.62564075", "0.597325", "0.58936495", "0.56966764", "0.56314254", "0.5616738", "0.5607769", "0.56018686", "0.542414", "0.53707844", "0.53683686", "0.5333322", "0.53261876", "0.53115124", "0.5308517", "0.5304587", "0.528939", "0.52892834", "0.5274101", "0.52526313", "0.5248885", "0.5248287", "0.5235862", "0.5235862", "0.5235862", "0.52285016", "0.5217654", "0.5205621", "0.5204372" ]
0.6673516
1
Get Icontact Prospect Creation Datetime attribute value
public function getCreationDatetime() { return $this->getValue('nb_icontact_prospect_creation_datetime'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCreatetime()\n {\n return $this->createtime;\n }", "public function getCreate_time()\r\n {\r\n return $this->create_time;\r\n }", "public function getDatetime( Inx_Api_Recipient_Attribute $oAttribute );", "public function getCreatetime()\n {\n return $this->createTime;\n }", "public function getCreate_at()\n {\n return $this->create_at;\n }", "public function getCreate_at()\n {\n return $this->create_at;\n }", "public function getCreateAt()\n {\n return $this->create_at;\n }", "public function getCreationTime(){\n\t\treturn $this->creationTime;\n\t}", "public function getCreatedAt()\n {\n return $this->data['fields']['created_at'];\n }", "public function getDateCreation()\n {\n return $this->date_creation;\n }", "public function getCreationTime(){\r\n\t\treturn $this->creationTime;\r\n\t}", "public function getDateCreation()\n {\n return $this->dateCreation;\n }", "public function getDateCreation()\n {\n return $this->dateCreation;\n }", "public function getDateCreation()\n {\n return $this->dateCreation;\n }", "public function get_creation_date()\n {\n return $this->get_default_property(self::PROPERTY_CREATION_DATE);\n }", "public function getCreatedAt() {\n return $this->attributes['created_at'];\n }", "public function getDate_creation()\n {\n return $this->date_creation;\n }", "public function getCreationTime()\n {\n return $this->creation_time;\n }", "function get_timecreated() {\n return $this->timecreated;\n }", "public function getCreatedAt(){\n return $this->_getData(self::CREATED_AT);\n }", "function get_creation_date()\n\t{\n\t\treturn $this->creation_date;\n\t}", "public function getCreatedAt()\n {\n return $this->getProperty(self::CREATED_AT);\n }", "function getCreateDate() {\n\t\treturn $this->_CreateDate;\n\t}", "function getCreateDate() {\n\t\treturn $this->_CreateDate;\n\t}", "public function getCreated()\n {\n if (! isset($this->created)) {\n $this->created = new DateTime($this->getXPath($this->getDom())->query($this->getCreatedQuery())->item(0)->value);\n }\n return $this->created;\n }", "public function getPickupDateTimeAttribute()\n {\n return date('l, F d, Y h:i A',strtotime($this->attributes['created_at']));\n }", "public function getCreateDate(): string\n {\n return $this->create_date;\n }", "public function created_at()\n {\n return $this->object->created_at;\n }", "public function getCreationDate()\n {\n return $this->creation_date;\n }", "public function getCreationDate()\n {\n return $this->creation_date;\n }" ]
[ "0.68930227", "0.68647385", "0.68608874", "0.6818008", "0.6762321", "0.6762321", "0.66817456", "0.6657511", "0.6624833", "0.6620258", "0.66199034", "0.66054446", "0.66054446", "0.66054446", "0.6590746", "0.6577612", "0.65630805", "0.655986", "0.65510017", "0.65224147", "0.65084875", "0.6480235", "0.6475938", "0.6475938", "0.64671814", "0.64660263", "0.6453784", "0.6451671", "0.64478", "0.64478" ]
0.77571744
0
Get Icontact Prospect Last Update Datetime attribute value
public function getLastUpdateDatetime() { return $this->getValue('nb_icontact_prospect_last_update_datetime'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUpdatedTime()\n {\n return $this->getAttribute('updatedTime');\n }", "public function getUpdatedAt()\n {\n return $this->data['fields']['updated_at'];\n }", "public function getLastUpdateTime()\n {\n return $this->last_update_time;\n }", "public function lastUpdated()\n {\n // TODO: Implement lastUpdated() method.\n return self::$user['updated_at'];\n\n }", "public function getUpdatedAt(){\n return $this->_getData(self::UPDATED_AT);\n }", "function getLastModifiedDate() {\n\t\treturn $this->data_array['last_modified_date'];\n\t}", "public function LastUpdated()\n\t{\n\t\treturn $this->LastUpdated;\n\t}", "public function getUpdatedTimeAttribute() {\n\n\t\tif (request()->segment(1) == 'api') {\n\n\t\t\t$date = change_date_format($this->attributes['updated_at']);\n\t\t\t$datemonth = date($date, strtotime($this->attributes['updated_at']));\n\t\t\treturn $datemonth . ' at ' . date('H:i', strtotime($date));\n\n\t\t} else {\n\n\t\t\t$new_str = new DateTime($this->attributes['updated_at'], new DateTimeZone(Config::get('app.timezone')));\n\n\t\t\t$user = auth()->guard('store')->user();\n\t\t\t$new_str->setTimeZone(new DateTimeZone($user->user_address->default_timezone));\n\t\t\t$date = change_date_format($this->attributes['updated_at']);\n\t\t\t$datemonth = date($date, strtotime($this->attributes['updated_at']));\n\t\t\treturn $datemonth . ' at ' . $new_str->format('H:i');\n\n\t\t}\n\n\t}", "public function getLastUpdatedOn()\n {\n return $this->_fields['LastUpdatedOn']['FieldValue'];\n }", "public function getLastUpdate() {\n\t\treturn $this->lastUpdate;\n\t}", "public function getLastUpdate(): \\DateTime\n {\n return $this->lastUpdate;\n }", "public function getDateUpdate()\n {\n return $this->date_update;\n }", "public function getDateUpdate()\n {\n return $this->date_update;\n }", "public function getUpdatedAt() {\n return $this->attributes['updated_at'];\n }", "public function lastUpdatedDateTime(): string\n {\n return $this->pluck('lastUpdatedDateTime');\n }", "function getLastModified() {\n\t\treturn $this->getData('lastModified');\n\t}", "public function getDateUpdate()\n {\n return $this->dateUpdate;\n }", "public function getUpdate_time()\r\n {\r\n return $this->update_time;\r\n }", "public function getLastUpdatedAt()\n {\n return $this->last_updated_at;\n }", "public function getLastModified()\n {\n return ($this->item['mtime'] ? $this->item['mtime'] : ($this->item['ctime'] ? $this->item['ctime'] : time()));\n }", "public function getLastUpdate()\n {\n return $this->lastUpdate;\n }", "public function getLastUpdate()\n {\n return $this->lastUpdate;\n }", "public function getUpdateTime()\n {\n return isset($this->update_time) ? $this->update_time : null;\n }", "public static function last_update()\n {\n $gallery_date = Gallery::orderBy('updated_at', 'desc')->value('updated_at');\n $gallery_last_date = (!empty($gallery_date)) ? date(strtotime($gallery_date . '+1 hours')) : '';\n $posts_date = Posts::orderBy('updated_at', 'desc')->value('updated_at');\n $posts_last_date = (!empty($posts_date)) ? date(strtotime($posts_date . '+1 hours')) : '';\n $newsletter_date = Newsletter::orderBy('updated_at', 'desc')->value('updated_at');\n $newsletter_last_date = (!empty($newsletter_date)) ? date(strtotime($newsletter_date . '+1 hours')) : '';\n $properties_date =\n DB::table('apimo_properties')\n ->select('updated_at')\n ->where(function($query) {\n $query->orWhere('reference', 'like', 'HSTP%')\n ->orWhere('reference', 'like', 'HD%');\n })\n ->orderBy('updated_at', 'desc')\n ->value('updated_at');\n $properties_last_date = (!empty($properties_date)) ? date(strtotime($properties_date . '+1 hours')) : '';\n\n $dates = [$posts_last_date, $gallery_last_date, $properties_last_date, $newsletter_last_date];\n\n $last_update = max($dates);\n\n return date('d.m.Y - H:i', (!empty($last_update)) ? $last_update : 0);\n }", "function getUpdateDate() {\n\t\treturn $this->_UpdateDate;\n\t}", "public function getLatestUpdateDate()\n {\n return $this->channel->getLatestUpdateDate();\n }", "public function getUpdate_date(){\n return $this->update_date;\n }", "public function getLastSyncTime() {\n $rec = $this->allEmail->select('date_time')->orderBy('date_time', 'desc')->first();\n if (!empty($rec)) {\n return $rec->date_time;\n } else {\n return false;\n }\n }", "public function getDateLastUpdated()\n {\n if (isset($this->data['LastUpdatedDate'])) {\n return $this->data['LastUpdatedDate'];\n } else {\n return false;\n }\n }", "public function getLastUpdated()\n {\n $packages = Package::get()->limit(1);\n if (!$packages->count()) {\n return '';\n }\n /** @var DBDatetime $datetime */\n $datetime = $packages->first()->dbObject('LastEdited');\n return $datetime->Date() . ' ' . $datetime->Time12();\n }" ]
[ "0.6918732", "0.6904482", "0.68619764", "0.6822401", "0.676653", "0.67520016", "0.67510533", "0.6739569", "0.6738892", "0.6729149", "0.67261076", "0.6724969", "0.6724969", "0.67002934", "0.66934633", "0.6690013", "0.66846645", "0.6670758", "0.6665346", "0.66569936", "0.66569644", "0.66569644", "0.6627289", "0.65912277", "0.6590984", "0.6581668", "0.65720695", "0.6565855", "0.6556986", "0.65564597" ]
0.78069997
0
Get Icontact Prospect First Name attribute value
public function getFirstName() { return $this->getValue('nb_icontact_prospect_first_name'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFirstname() {\n return $this->getValue('firstname');\n }", "function getFirstName() {\n\t\treturn $this->getInfo('FirstName');\n\t}", "function getPersonFirstName()\n {\n return $this->getValueByFieldName('person_fname');\n }", "public function getFirstname() {\n\t\treturn $this->firstname;\n\t}", "public function getFirstname() {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n\t{\n\t\treturn $this->firstname;\n\t}", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n\t\t{\n\t\t\treturn $this->firstname;\n\t\t}", "public function getFirstName(){\n\t\t\treturn $this->firstname;\n\t\t}", "public function getFirstName()\n {\n return $this->get('FirstName');\n }", "public function getFirstName()\n {\n $name = $this->getAttribute('name');\n if (isset($name)) {\n return $name['firstName'];\n }\n return null;\n }", "public function getFirstName() {\n\t\treturn $this->first_name;\n\t}", "public function getFirstname(): string\n {\n return $this->_firstname;\n }", "public function getFirstName() {\n\t\treturn $this->getCustomField( 'first_name' );\n\t}", "public function getFirstName()\n\t{\n\t\treturn $this->first_name;\n\t}", "public function getFirstName() {\n return $this->firstname;\n }", "public function getApplicantFirstName()\n {\n return $this->getProperty('applicant_first_name');\n }", "public function getFirstName()\n {\n return $this->firstname;\n }", "public function getFirst_name()\r\n {\r\n return $this->first_name;\r\n }", "public function GetFirstName()\n {\n return $this->firstname;\n }" ]
[ "0.78520685", "0.78091806", "0.76961976", "0.75938106", "0.7569131", "0.7544091", "0.7544091", "0.7544091", "0.7544091", "0.7544091", "0.7544091", "0.7544091", "0.7544091", "0.7544091", "0.7541573", "0.7510952", "0.7500696", "0.74995106", "0.7499032", "0.7473027", "0.74693525", "0.7462202", "0.74526143", "0.7406235", "0.7398009", "0.7395626", "0.73911047", "0.7385204", "0.7381398", "0.73807836" ]
0.8299667
0
Sets the Icontact Prospect First Name attribute value.
public function setFirstName(string $first_name = null) : CNabuDataObject { $this->setValue('nb_icontact_prospect_first_name', $first_name); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFirstName()\n {\n return $this->getValue('nb_icontact_prospect_first_name');\n }", "public function setFirstName($value){\n $this->first_name = $value;\n }", "public function setFirstname($value)\n {\n $this->_firstname = $value;\n }", "public function setFirstNameAttribute($value)\n\t{\n\t\t$this->attributes['name'] = $value;\n\t}", "function setFirstName( $fname )\n {\n $this->setValueByFieldName( 'person_fname', $fname );\n }", "function setFirstName($name)\n {\n $this->addParam('first_name', (string)$name);\n }", "public function setFirstNameAttribute($value)\n {\n $this->attributes['first_name'] = ucfirst($value);\n }", "public function setFirstName($firstname){\n\t\t\t$this->firstname = $firstname;\n\t\t}", "public function setFirstName($first_name)\n\t{\n\t\t$this->first_name = $first_name;\n\t}", "public function setFirstnameAttribute($value)\n {\n $this->attributes['firstname'] = title_case(trim($value));\n }", "public function setFirstname($firstname) {\n\t\t$this->firstname = $firstname;\n\t}", "public function setFirstname($firstname) {\n $this->firstname = $firstname;\n }", "public function set_firstname($firstname) {\n $this->firstname = $firstname;\n }", "function setFirstName($newVal)\r\n\t{\r\n\t\t$this->FirstName = $newVal;\r\n\t}", "public function setFirstname(string $firstname): void\n {\n $this->_firstname = $firstname;\n }", "public function setFirstName($first_name) {\n $this->user_first_name = $first_name;\n }", "public function setFirstName(string $first_name): void\n {\n $this->_first_name = $first_name;\n }", "function set_first_name($first_name='*')\r\n{\r\n\t$this->first_name = '';\t\t// return\r\n\t\r\n\t// Get Random Name\r\n\tif ( $first_name == '*' )\r\n\t{\r\n\t\tif ( !isset($this->gender) ) $this->set_gender();\r\n\t\t$this->first_name = $this->_get_random_first_name($this->gender);\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$this->first_name = $first_name;\r\n\t}\r\n\t\r\n\t// capitalize\r\n\t$this->first_name = ucwords($this->first_name);\r\n\t\r\n\t// adjust hyphenates\r\n\tif ( $_pos = strpos($this->first_name, '-') )\r\n\t{\r\n\t\t$this->first_name = substr($this->first_name, 0, $_pos+1) . '-' . ucwords( substr($this->first_name, $_pos+1) );\r\n\t}\r\n\t\r\n\treturn $this->first_name;\r\n}", "public function setFirstName($value)\n {\n return $this->set('FirstName', $value);\n }", "private function setFirstName()\n {\n \tif ( empty($_POST['first_name'] ) ) {\n \t\t$this->data['error']['first_name'] = \"Please provide your first name.\";\n $this->error = true;\n return;\n }\n \n $fn = trim( $_POST['first_name'] );\n \n\t\tif ( preg_match('/^[A-Z \\'.-]{1,40}$/i', $fn ) ) {\n\t\t\t$this->data['first_name'] = $fn;\n\t\t} else {\n\t\t\t$this->data['error']['first_name'] = \"Your first name can include letters, apostrophes, periods and hyphens.\";\n $this->error = true;\n\t\t}\n }", "public function getFirstname() {\n return $this->getValue('firstname');\n }", "public function setFirstName($newFirstName) {\n //sanitize the string\n $newFirstName = filter_var($newFirstName, FILTER_SANITIZE_STRING);\n \n //if the string got here, it's passed all our tests - assign it!\n $this->firstName = $newFirstName;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function GetFirstName()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function setFirstNameAttribute(string $value): void\n {\n $this->attributes[self::FIRST_NAME] = \\trim($value);\n }", "public function getFirst_name()\r\n {\r\n return $this->first_name;\r\n }", "public function getFirstname()\n\t\t{\n\t\t\treturn $this->firstname;\n\t\t}", "public function getFirstname()\n {\n return $this->firstname;\n }", "public function getFirstname()\n {\n return $this->firstname;\n }" ]
[ "0.75533235", "0.7496562", "0.7409756", "0.7285167", "0.72364753", "0.72247463", "0.72082514", "0.703136", "0.6976977", "0.69647205", "0.69319534", "0.69314635", "0.6921811", "0.6914211", "0.68791145", "0.6876629", "0.6865524", "0.6852605", "0.68176746", "0.68117917", "0.6791962", "0.676645", "0.67528886", "0.67510563", "0.67494684", "0.67484736", "0.67465764", "0.6707872", "0.6694153", "0.6694153" ]
0.7553843
0
Get Icontact Prospect Last Name attribute value
public function getLastName() { return $this->getValue('nb_icontact_prospect_last_name'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getPersonLastName()\n {\n return $this->getValueByFieldName('person_lname');\n }", "public function getApplicantLastName()\n {\n return $this->getProperty('applicant_last_name');\n }", "public function getLastname() {\n return $this->getValue('lastname');\n }", "public function getCustomerLastname();", "public function getLastName()\n {\n $name = $this->getAttribute('name');\n if (isset($name)) {\n return $name['lastName'];\n }\n return null;\n }", "public function getDisplayName() {\r\n $displayName = $this->fname.' '.$this->lname;\r\n if(strlen($displayName) <= 1) {\r\n $displayName = explode('@',$this->email);\r\n return($displayName[0]);\r\n }\r\n return($displayName);\r\n }", "public function getSurname(){\n return $this->_getModelProperty('surname');\n }", "public function getFirstName()\n {\n return $this->getValue('nb_icontact_prospect_first_name');\n }", "public function getShipToLastName();", "public function getLastName() {\n\t\treturn $this->getCustomField( 'last_name' );\n\t}", "public function getName()\n {\n $result = null;\n if (isset($this->userInfo['first_name']) && isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['first_name'] . ' ' . $this->userInfo['last_name'];\n } elseif (isset($this->userInfo['first_name']) && !isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['first_name'];\n } elseif (!isset($this->userInfo['first_name']) && isset($this->userInfo['last_name'])) {\n $result = $this->userInfo['last_name'];\n }\n return $result;\n }", "public function getLastName()\n {\n return $this->get('LastName');\n }", "function getStudentLastName() {\n\t\treturn $this->getData('studentLastName');\n\t}", "public function feide_name() {\n\t\t\tif(isset($this->attributes['displayName'][0])) {\n\t\t\t\t$this->feide_name = $this->attributes['displayName'][0];\n\t\t\t\t// echo \"displayName set!!!\";\n\t\t\t} else if(isset($this->attributes['givenName'][0]) && isset($this->attributes['sn'][0])) {\n\t\t\t\t$this->feide_name = $this->attributes['givenName'][0] . ' ' . $this->attributes['sn'][0];\n\t\t\t\t// echo \"givenName/sn set!!!\";\n\t\t\t} else if(isset($this->attributes['cn'][0])) {\n\t\t\t\t$this->feide_name = $this->attributes['cn'][0];\n\t\t\t\t// echo \"cn set!!!\";\n\t\t\t} // FALLBACK IF NO NAME IS ACCESSIBLE FROM ANY OF THE ABOVE ATTRIBS...\n\t\t\telse {\n\t\t\t\t$this->feide_name = $this->attributes['eduPersonPrincipalName'][0];\n\t\t\t}\n\n\t\t\treturn $this->feide_name;\n\t\t}", "function getRHUL_LastName() {\n return getRHUL_LDAP_FieldValue(\"last_name\");\n}", "public function getSecondName()\n {\n if (isset($this->response['name']) && isset($this->response['name']['familyName']))\n {\n return $this->response['name']['familyName'];\n }\n\n return null;\n }", "public function getLastName(){\n \n return $this->last_name;\n \n }", "public function getBillingLastName();", "public function getDisplayNameAttribute()\n {\n $display_name = $this->profile->display_name;\n \n if (! $display_name) {\n $display_name = explode('@', $this->email)[0];\n }\n\n return $display_name;\n }", "public function getLastName(){\n\t\t\treturn $this->lastname;\n\t\t}", "public function getLastname(): string\n {\n return $this->_lastname;\n }", "public function getLastname() {\n return $this->lastname;\n }", "public function getLastname()\r\n {\r\n return $this->lastname;\r\n }", "public function getLastname() {\n\t\treturn $this->lastname;\n\t}", "public function fullName()\n {\n return $this->getAttribute('first_name').' '.$this->getAttribute('last_name');\n }", "public function getHonoreeLastName();", "public function getLastName() { return $this->lastName; }", "public function getLastname()\n {\n return $this->lastname;\n\n }", "public function getLastName()\n {\n return $this->getBillingLastName();\n }", "function getLastname()\n {\n return $this->lastname;\n }" ]
[ "0.7290021", "0.7077379", "0.70624375", "0.7061306", "0.69539094", "0.6923824", "0.6858533", "0.6838845", "0.68001443", "0.6799698", "0.67709833", "0.6770981", "0.6752695", "0.6748945", "0.6742421", "0.6730935", "0.6712139", "0.6703611", "0.6697088", "0.6690182", "0.66814184", "0.66813886", "0.66781044", "0.66762483", "0.66651833", "0.66634303", "0.66589856", "0.66551983", "0.66479653", "0.6637419" ]
0.76327616
0
Sets the Icontact Prospect Last Name attribute value.
public function setLastName(string $last_name = null) : CNabuDataObject { $this->setValue('nb_icontact_prospect_last_name', $last_name); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setLastname($value)\n {\n $this->_lastname = $value;\n }", "public function getLastName()\n {\n return $this->getValue('nb_icontact_prospect_last_name');\n }", "public function setLastName(string $last_name);", "function setLastName( $lname )\n {\n $this->setValueByFieldName( 'person_lname', $lname );\n }", "function setLastName($name)\n {\n if( !isset($name) || $name == '' )\n $name = 'Not Available';\n $this->addParam('last_name', (string)$name);\n }", "function set_last_name($last_name='*')\r\n{\r\n\t$this->last_name = '';\t\t// return\r\n\t\r\n\t// get random name\r\n\tif ( $last_name == '*' )\r\n\t{\r\n\t\t$this->last_name = $this->_get_random_last_name();\r\n\t}\r\n\telse\r\n\t{\r\n\t\t$this->last_name = $last_name;\r\n\t}\r\n\t\r\n\t// capitalize\r\n\t$this->last_name = ucwords($this->last_name);\r\n\t\r\n\t// tweaks\r\n\tif ( substr($this->last_name, 0, 2) == 'Mc' ) $this->last_name = 'Mc' . ucwords( substr($this->last_name, 2) );\r\n\t\r\n\treturn $this->last_name;\r\n}", "public function setLastname($lastname) {\n\t\t$this->lastname = $lastname;\n\t}", "private function setLastName()\n {\n \tif ( empty($_POST['last_name'] ) ) {\n \t\t$this->data['error']['last_name'] = \"Please provide your last name.\";\n $this->error = true;\n return;\n }\n \n $ln = trim( $_POST['last_name'] );\n \n \tif (preg_match('/^[A-Z \\'.-]{1,40}$/i', $ln)) {\n\t\t\t$this->data['last_name'] = $ln;\n\t\t} else {\n\t\t\t$this->data['error']['last_name'] = \"Your last name can include letters, apostrophes, periods and hyphens.\";\n $this->error = true;\n\t\t}\n }", "public function setLastname($lastname) {\n $this->lastname = $lastname;\n }", "public function setLastname(string $lastname): void\n {\n $this->_lastname = $lastname;\n }", "public function setLastName($last_name)\n\t{\n\t\t$this->last_name = $last_name;\n\t}", "public function setLastName(string $last_name): void\n {\n $this->_last_name = $last_name;\n }", "public function setLastName($lastname){\n\t\t\t$this->lastname = $lastname;\n\t\t}", "function setLastName($newVal)\r\n\t{\r\n\t\t$this->LastName = $newVal;\r\n\t}", "public function setLastnameAttribute($value)\n {\n $this->attributes['lastname'] = title_case(trim($value));\n }", "function setLastName($lastName);", "protected function setLastname(string $lastname)\r\n\t{\r\n\t\t$this->lastname = $lastname;\r\n\t}", "public function setLastName(string $last_name) {\n\n $this->last_name = $last_name;\n\n }", "public function saveLastName()\n {\n $this->validate(['lastName' => 'sometimes|required']);\n\n $this->updateValue(\n 'last_name',\n $this->lastName,\n 'Customer Last name updated successfully.'\n );\n\n $this->lastNameUpdate = false;\n $this->emit('profileUpdate');\n }", "public function setLastName($newLastName) {\n //sanitize the string\n $newLastName = filter_var($newLastName, FILTER_SANITIZE_STRING);\n \n //if the string got here, it's passed all our tests - assign it!\n $this->lastName = $newLastName;\n }", "public function setCustomerLastname($customerLastname);", "public function setLastNameAttribute(string $value): void\n {\n $this->attributes[self::LAST_NAME] = \\trim($value);\n }", "public function setLastName($last_name) {\n $this->user_last_name = $last_name;\n }", "public function getLastname() {\n return $this->getValue('lastname');\n }", "public function setCustomerLastName($lastName = '') {\n $last = array(\n 'x_last_name'=>$this->truncateChars($lastName, 50),\n );\n $this->NVP = array_merge($this->NVP, $last); \n }", "public function setLastName($u_lname) {\n\n $this->u_lname = $u_lname;\n\n }", "protected function last_name() {\n $element = new Text('last_name');\n $element->setLabel('Last Name');\n $element->setAttribute('class', 'form-control');\n $element->setUserOption('lblRequired', true);\n $element->addValidators(array(\n new PresenceOf(array('message' => 'Last Name is required'))\n ));\n $this->add($element);\n }", "public function getLastName(){\n \n return $this->last_name;\n \n }", "public function setShippingLastName($lastName = '') {\n $last = array(\n 'x_ship_to_last_name'=>$this->truncateChars($lastName, 50),\n );\n $this->NVP = array_merge($this->NVP, $last); \n }", "public function getLastName() { return $this->lastName; }" ]
[ "0.7153936", "0.7138143", "0.7007816", "0.6891748", "0.6869068", "0.68166506", "0.6800841", "0.678225", "0.6769184", "0.6766341", "0.6756794", "0.67203003", "0.67047024", "0.6702612", "0.6688154", "0.66678965", "0.66633976", "0.6661129", "0.65952784", "0.65909594", "0.6580778", "0.6541595", "0.645397", "0.64311355", "0.63819015", "0.6363874", "0.63638395", "0.63488895", "0.6331495", "0.63058645" ]
0.73769593
0
Get Icontact Prospect Fiscal Number attribute value
public function getFiscalNumber() { return $this->getValue('nb_icontact_prospect_fiscal_number'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFax()\n {\n return $this->getValue('nb_icontact_prospect_fax');\n }", "public function getFiscalCode()\n {\n return $this->fiscalCode;\n }", "public function getFaxnbr()\n {\n return $this->faxnbr;\n }", "public function getCfax()\n {\n return $this->cfax;\n }", "public function getPhone()\n {\n return $this->getValue('nb_icontact_prospect_phone');\n }", "public function getFax() {\n return $this->sFax;\n }", "function getFax() {\n\t\treturn $this->getData('fax');\n\t}", "public function getFax() {}", "public function getFax()\n {\n return $this->getParameter('billingFax');\n }", "public function getReqFaxPhone()\n\t{\n\t\treturn $this->req_fax_phone;\n\t}", "public function getFax();", "public function getFaxNumber() :string\n {\n return $this->faxNumber;\n }", "public function getFax()\n {\n return $this->fax;\n }", "public function getFax()\n {\n return $this->fax;\n }", "public function getFax()\n {\n return $this->fax;\n }", "public function getfilingfee()\n\t{\n\t\t$filingId = $_SESSION['filingId'];\n\t\t$form_type = $_SESSION['formtype'];\n\t\t$result = $this->productpaymentDAO->getfilingfee($filingId, $form_type);\n\t\treturn $result;\n\t}", "public function getBillingFax()\n {\n return $this->getParameter('billingFax');\n }", "public function getIdFiscalEntity()\n {\n return $this->idFiscalEntity;\n }", "public function setFiscalNumber(string $fiscal_number = null) : CNabuDataObject\n {\n $this->setValue('nb_icontact_prospect_fiscal_number', $fiscal_number);\n \n return $this;\n }", "public function getFsFiscal(): ?string {\n return $this->fsFiscal;\n }", "public function getPhadifaxnbr()\n {\n return $this->phadifaxnbr;\n }", "public function getPhoneNumberAttribute()\n {\n return $this->attributes[ 'country_code' ].$this->attributes[ 'phone' ];\n }", "public function getOfficialCode ()\n {\n return ltrim ( (string) $this->xmlRecord->matriculeFgs, '0' );\n }", "public function getApplicantTelephoneNumber()\n {\n return $this->getProperty('applicant_telephone_number');\n }", "public function getCpf() {\n return $this->oCgm->getCpf();\n }", "public function fiscales(){\n return $this->hasOne(Fiscal::class);\n }", "public function getNprciAccion()\n {\n return $this->nprciAccion;\n }", "public function getShippingFaxNo()\r\n {\r\n return $this->_shippingFaxNo;\r\n }", "public function getInvoiceNumber();", "public function getPrciAccion()\n {\n return $this->prciAccion;\n }" ]
[ "0.71612895", "0.6866872", "0.6392374", "0.6368531", "0.6213074", "0.6199703", "0.61532944", "0.61456543", "0.6117025", "0.6070633", "0.6061479", "0.601108", "0.58977515", "0.58977515", "0.58977515", "0.5828467", "0.58057487", "0.58052", "0.57456124", "0.56048954", "0.5585215", "0.55634916", "0.5545755", "0.55407786", "0.5540475", "0.5532976", "0.54971576", "0.5481835", "0.548106", "0.5480468" ]
0.79332566
0
Sets the Icontact Prospect Fiscal Number attribute value.
public function setFiscalNumber(string $fiscal_number = null) : CNabuDataObject { $this->setValue('nb_icontact_prospect_fiscal_number', $fiscal_number); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFiscalNumber()\n {\n return $this->getValue('nb_icontact_prospect_fiscal_number');\n }", "public function setFax(string $fax = null) : CNabuDataObject\n {\n $this->setValue('nb_icontact_prospect_fax', $fax);\n \n return $this;\n }", "public function setFax($fax = \"\");", "public function setFiscalYear($value)\n {\n return $this->set('FiscalYear', $value);\n }", "public function setFiscalYear($value)\n {\n return $this->set('FiscalYear', $value);\n }", "public function setFiscalYear($value)\n {\n return $this->set('FiscalYear', $value);\n }", "public function getFax()\n {\n return $this->getValue('nb_icontact_prospect_fax');\n }", "public function setCpfAttribute($value) {\n $this->attributes['cpf'] = str_replace('.', '', $value);\n }", "public function setFax($fax)\n {\n $this->fax = $fax;\n }", "public function getFiscalCode()\n {\n return $this->fiscalCode;\n }", "public function getFaxnbr()\n {\n return $this->faxnbr;\n }", "public function setPfAttribute($value)\n {\n $this->attributes['pf'] = str_replace('CSTD/PF/', '', $value);\n }", "public function setRegnoAttribute($value)\n\t{\n\t\t$this->attributes['regno'] = strtoupper($value);\n\t}", "public function setDayNumberAttribute($value) {\n $this->attributes['day_number'] = ($value === null ? null : (int)$value);\n }", "public function setInvoiceNumberAttribute($input)\n {\n $this->attributes['invoice_number'] = $input ? $input : null;\n }", "public function setFederalID($value)\n {\n return $this->set('FederalID', $value);\n }", "public function setFNumber(?float $value): void {\n $this->getBackingStore()->set('fNumber', $value);\n }", "public function setInvoiceNumber()\n { \n // get next number according to invoicetype\n return $this->bean->name = $this->bean->invoicetype()->nextSerial();\n }", "function\tsetCustomerRFQNo( $_myCustomerRFQNo) {\n\t\tFDbg::begin( 1, basename( __FILE__), __CLASS__, __METHOD__.\"( '$_myCustomerRFQNo')\") ;\n\t\t$this->CustomerRFQNo\t=\t$_myCustomerRFQNo ;\n\t\tif ( strlen( $_myCustomerRFQNo) > 0) {\n\t\t\t$this->reload() ;\n\t\t}\n\t\tFDbg::end() ;\n\t}", "function setFax($fax) {\n\t\treturn $this->setData('fax', $fax);\n\t}", "public function set_idnumber($value) {\r\n $this->idnumber = $value;\r\n data::add(\"idnumber\", $this->idnumber == \"\" ? NODATA : input::santize($this->idnumber), $this->table_fields);\r\n }", "public function setFaxnbr($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->faxnbr !== $v) {\n $this->faxnbr = $v;\n $this->modifiedColumns[OrdrhedTableMap::COL_FAXNBR] = true;\n }\n\n return $this;\n }", "public function setFilingDate($value) {\n\t\t$value = date('d-M-Y', strtotime($value));\n\t\tself::$_filingDate = $value;\n\t}", "public function setNumber_process($fv_number_process)\n {\n\n \tif(!empty($fv_number_process))\n \t{\n\n\t\t\t$fv_number_process = trim($fv_number_process);\n\t\t\t\n\t\t\tif(!is_numeric($fv_number_process))\n\t\t\t{\n\n\t\t\t\t$this->fv_error_message = $this->fv_error_message . '<br>- Numero de Proceso '.$fv_number_process.ERROR_DATO_NUMERICO;\n\t\t\t\treturn $this->fv_number_process =null;\n\t\t\t}\n\t\t\tif($fv_number_process<0)\n\t\t\t{\n\t\t\t\t$this->fv_error_message = $this->fv_error_message . '<br>- Numero de Proceso '.$fv_number_process.ERROR_NUMERICO_POSITIVO;\n\t\t\t\treturn $this->fv_number_process =null;\t\t\n\t\t\t}\n\t\t\treturn $this->fv_number_process = $fv_number_process;\n\t\t}\n\t\t$this->fv_error_message = $this->fv_error_message .'<br>- Numero de Proceso '.ERROR_NULL;\n\t\treturn $this->fv_number_process=null;\n\n \n }", "public function setCustomerFax($customerFax = '000-000-0000') {\n $fax = array(\n 'x_fax'=>$this->truncateChars($this->cleanPhoneNumber($customerFax), 25),\n );\n $this->NVP = array_merge($this->NVP, $fax); \n }", "public function setCPF($cpf) {\n\t\t//CNPJ passado ao invés de CPF\n\t\tif (strlen($cpf) == 14) return $this->setCNPJ($cpf);\n\t\t\n\t\t$this->checkoutTransparente['cliente']['senderCPF'] = $cpf;\n\t\t$this->checkoutTransparente['cartao']['creditCardHolderCPF'] = $cpf;\n\t\treturn $this;\n\t}", "public function testSetNumeroFiche() {\n\n $obj = new FichesControlesEntetes();\n\n $obj->setNumeroFiche(10);\n $this->assertEquals(10, $obj->getNumeroFiche());\n }", "function setPhone($newPhone){\n //check if the phone number is numeric\n if(is_numeric($newPhone)) {\n $this->phone = $newPhone;\n }\n //if not set to default, 0000000000\n $this->phone = \"0000000000\";\n }", "function modificarNumFilhos($numFilhos) {\r\n $this->numFilhos = $numFilhos;\r\n }", "public function setTelefono($_telefono)\n {\n $this->telefono = $_telefono;\n }" ]
[ "0.70131123", "0.6025333", "0.5560974", "0.55483866", "0.55483866", "0.55483866", "0.554826", "0.5530393", "0.5514525", "0.5512564", "0.53465337", "0.52981055", "0.5218184", "0.5203194", "0.52008367", "0.51841116", "0.5180091", "0.5138367", "0.5136954", "0.5119778", "0.50670046", "0.5063471", "0.5043605", "0.50089747", "0.49841848", "0.49673247", "0.49439836", "0.4938023", "0.49335915", "0.49232823" ]
0.6961816
1
Get Icontact Prospect Address 1 attribute value
public function getAddress1() { return $this->getValue('nb_icontact_prospect_address_1'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAddress1()\n {\n return parent::getValue('address1');\n }", "public function getImAddress()\n {\n return $this->getProperty(\"ImAddress\");\n }", "public function getAddress2()\n {\n return $this->getValue('nb_icontact_prospect_address_2');\n }", "public function getAddress1()\n {\n return $this->fv_address1;\n }", "public function getApplicantAddressOne()\n {\n return $this->getProperty('applicant_address_one');\n }", "public function getAddress1()\r\n {\r\n return $this->_address1;\r\n }", "public function getAddress1()\n {\n return $this->address1;\n }", "public function getAddress1()\n {\n return $this->address1;\n }", "public function getAddress()\n {\n return $this->get('address')->value;\n }", "function address() { return ($this->address); }", "public function getAddress()\n {\n if (array_key_exists(\"address\", $this->_propDict)) {\n return $this->_propDict[\"address\"];\n } else {\n return null;\n }\n }", "public function getAddress2()\n {\n return parent::getValue('address2');\n }", "public function getAddress()\n\t{\n\t\treturn $this->data['address'];\n\t}", "function getContact()\n\t{\n\t\treturn $this->Info['Contact'];\n\t}", "private function get_address()\n\t{\n\t\treturn $this->m_address;\n\t}", "public function getContactDetailAttribute()\n {\n return $this->contact()->first();\n }", "public function getCorrespondentAddress() {\n\t\treturn self::$_correspondentAddress;\n\t}", "public function getAddress(){\r\n\t\treturn $this->address;\r\n\t}", "public function get_address_1( $context = 'view' ) {\n\t\treturn $this->get_prop( 'address_1', $context );\n\t}", "public function getStreetAddress1()\n {\n return $this->street_address_1;\n }", "public function getAddress()\n {\n \treturn $this->address;\n }", "public function getAddressLine3(): ?string;", "public function getReqAddress1()\n\t{\n\t\treturn $this->req_address1;\n\t}", "public function getAddressAttribute()\n {\n return $this->addresses()->where('type', 'permanent')->first();\n }", "public function getApplicantAddressTwo()\n {\n return $this->getProperty('applicant_address_two');\n }", "public function getAddress() {\n\t\t$address = current($this->getAddresses()->toArray());\n\t\treturn $address;\n\t}", "public function getAddress() {\n //return the value address\n return $this->Address;\n }", "public function getAddressLine1(): ?string;", "public function getAttribute($oi, $attribute) {\n\n // we support attribute:type configurations to allow for testing a specific email address \n $values = explode(':',$attribute);\n $type=null;\n if(sizeof($values) > 1) {\n $attribute=$values[0];\n $type=$values[1];\n }\n\n $valuefound=null;\n // if the attribute is a model name, check for the related fields\n if(isset($oi[$attribute])) {\n\n // To distinguish between a non-existing attribute and a supported attribute\n // for which we do not have a value, we set $valuefound to the empty array at this point.\n $valuefound=array();\n\n // loop over all recovered models of this attribute (ie: all email addresses)\n $models = $oi[$attribute];\n if($attribute == \"PrimaryName\") {\n // PrimaryName is a hasOne association\n $models = array($models);\n }\n foreach($models as $model) {\n switch($attribute) {\n case 'TelephoneNumber':\n if($type === null || $type == $model['type']) {\n $valuefound[] = formatTelephone($model);\n }\n break;\n case 'Address':\n if(in_array($type, array('street','state','postal_code','room','locality','country'))) {\n if($model[$type] !== null) {\n $valuefound[] = $model[$type];\n }\n }\n break;\n case 'PrimaryName':\n $valuefound[] = generateCn($model);\n break;\n case 'Name':\n if( ($type !== null && $type == $model['type']) \n || ($type === null)) {\n $valuefound[] = generateCn($model);\n }\n break;\n case 'Identifier':\n if($type === null || $type == $model['type']) {\n $valuefound[] = $model['identifier'];\n }\n break;\n case 'EmailAddress':\n if($type === null || $type == $model['type']) {\n $valuefound[] = $model['mail'];\n }\n break;\n case 'Url':\n if($type === null || $type == $model['type']) {\n $valuefound[] = $model['url'];\n }\n break;\n }\n }\n }\n return $valuefound;\n }", "public function getAddress()\r\n {\r\n return $this->address;\r\n }" ]
[ "0.6951034", "0.6687104", "0.66132176", "0.6541282", "0.65254337", "0.6496288", "0.64840126", "0.64840126", "0.6473111", "0.6389668", "0.63713235", "0.63578224", "0.6342028", "0.6309464", "0.62809706", "0.62609136", "0.6212956", "0.62000227", "0.6188262", "0.618671", "0.6170024", "0.61601853", "0.61600214", "0.61594975", "0.61428356", "0.61246544", "0.607389", "0.60693604", "0.6062925", "0.60600775" ]
0.74590474
0
Sets the Icontact Prospect Address 1 attribute value.
public function setAddress1(string $address_1 = null) : CNabuDataObject { $this->setValue('nb_icontact_prospect_address_1', $address_1); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_address_1( $address ) {\n\t\t$this->set_prop( 'address_1', $address );\n\t}", "public function getAddress1()\n {\n return $this->getValue('nb_icontact_prospect_address_1');\n }", "function setStreet1( &$value )\n {\n $this->Street1 = $value;\n }", "public function setAddress1($value)\n {\n parent::setValue('address1', $value);\n\n return $this;\n }", "public function setAddress1($address1)\r\n {\r\n $this->_address1 = $address1;\r\n }", "public function setAddress1($address1)\n {\n $this->address1 = $address1;\n }", "public function setCorrespondentAddress($value) {\n\t\tself::$_correspondentAddress = $value;\n\t}", "public function setImAddress($value)\n {\n $this->setProperty(\"ImAddress\", $value, true);\n }", "public function street1($street1) {\n $this->data['attachment']['payload']['address']['street_1'] = $street1;\n\n return $this;\n }", "public function getAddress1()\n {\n return parent::getValue('address1');\n }", "public function getAddress1()\r\n {\r\n return $this->_address1;\r\n }", "public function setAddress1($fv_address1)\n {\n \tif(!empty($fv_address1))\n \t{\n \t\treturn $this->fv_address1 = $fv_address1;\n \t}\n $this->fv_error_message = $this->fv_error_message .'<br> - Direccion 1 '.ERROR_NULL;\n\n return $this->fv_address1 = null;\n }", "public function setAddress($value)\n {\n $this->_address = $value;\n }", "public function getAddress1()\n {\n return $this->fv_address1;\n }", "public function setAddress1($value)\n {\n $this->setParameter('billingAddress1', $value);\n $this->setParameter('shippingAddress1', $value);\n\n return $this;\n }", "public function getAddress1()\n {\n return $this->address1;\n }", "public function getAddress1()\n {\n return $this->address1;\n }", "public function getStreetAddress1()\n {\n return $this->street_address_1;\n }", "public function getApplicantAddressOne()\n {\n return $this->getProperty('applicant_address_one');\n }", "public function setStreetAddress($value) {\n\t\tself::$_streetAddress = $value;\n\t}", "public function setStreet1(string $street1): void\n {\n $this->_street1 = $street1;\n }", "public function setAutoResponderToAddressField($value) { $this->_autoResponderToAddressField = $value; }", "function setStreet2( &$value )\n {\n $this->Street2 = $value;\n }", "public function getPayerAddressStreet1() {\n\t\treturn $this->_getField(self::$PAYER_ADDRESS_STREET_1);\n\t}", "function &street1( )\n {\n return $this->Street1;\n }", "public function setEmail1($value)\n {\n return $this->set('Email1', $value);\n }", "public function setAddress($value)\n {\n \t$this->address = $value;\n \treturn $this;\n }", "public function setAddress($value)\n {\n return $this->set('Address', $value);\n }", "public function setAddress($value)\n {\n return $this->set('Address', $value);\n }", "public function setAddress($value)\n {\n return $this->set('Address', $value);\n }" ]
[ "0.7157522", "0.7043722", "0.6863888", "0.6578857", "0.65760064", "0.64264125", "0.63914526", "0.6310634", "0.6178894", "0.613267", "0.60659075", "0.6034228", "0.6011086", "0.6010339", "0.60074383", "0.6005202", "0.6005202", "0.6003974", "0.5952486", "0.5819499", "0.57920736", "0.57879704", "0.56632733", "0.56550884", "0.5634595", "0.5619929", "0.5617803", "0.56028235", "0.56028235", "0.56028235" ]
0.73605347
0
Get Icontact Prospect Address 2 attribute value
public function getAddress2() { return $this->getValue('nb_icontact_prospect_address_2'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAddress2()\n {\n return parent::getValue('address2');\n }", "public function getAddress1()\n {\n return $this->getValue('nb_icontact_prospect_address_1');\n }", "public function getAddress2()\r\n {\r\n return $this->_address2;\r\n }", "public function getAddress2()\n {\n return $this->address2;\n }", "public function getAddress2()\n {\n return $this->address2;\n }", "public function getAddress2()\n {\n return $this->address2;\n }", "public function getAddress2()\n\t{\n\t\treturn $this->address2;\n\t}", "public function getAddress2()\n {\n\n return $this->fv_address2;\n }", "public function getApplicantAddressTwo()\n {\n return $this->getProperty('applicant_address_two');\n }", "public function getAddress1()\n {\n return parent::getValue('address1');\n }", "public function getStreetAddress2()\n {\n return $this->street_address_2;\n }", "public function getReqAddress2()\n\t{\n\t\treturn $this->req_address2;\n\t}", "public function getAddress2()\n {\n return $this->getParameter('billingAddress2');\n }", "public function get_address_2( $context = 'view' ) {\n\t\treturn $this->get_prop( 'address_2', $context );\n\t}", "public function getShipaddress2()\n {\n return $this->shipaddress2;\n }", "public function getImAddress()\n {\n return $this->getProperty(\"ImAddress\");\n }", "public function getAddressLine2(): ?string;", "public function getAddress1()\r\n {\r\n return $this->_address1;\r\n }", "public function getPayerAddressStreet2() {\n\t\treturn $this->_getField(self::$PAYER_ADDRESS_STREET_2);\n\t}", "public function getAddressLine3(): ?string;", "public function getAddress1()\n {\n return $this->address1;\n }", "public function getAddress1()\n {\n return $this->address1;\n }", "public function getAddress1()\n {\n return $this->fv_address1;\n }", "public function getAddress()\n {\n return $this->get('address')->value;\n }", "public function getBillingAddress2()\n {\n return $this->getParameter('billingAddress2');\n }", "public function getOrganizationAddress2() :?string {\n\t\treturn($this->organizationAddress2);\n\t}", "function address() { return ($this->address); }", "function &street2( )\n {\n return $this->Street2;\n }", "public function getApplicantAddressOne()\n {\n return $this->getProperty('applicant_address_one');\n }", "public function getShippingAddress2()\n {\n return $this->getParameter('shippingAddress2');\n }" ]
[ "0.73814696", "0.7124303", "0.69664526", "0.69215953", "0.69215953", "0.69215953", "0.69122523", "0.68785554", "0.6869134", "0.6758549", "0.665951", "0.6600631", "0.6562246", "0.6519088", "0.6405389", "0.6400906", "0.639235", "0.6328764", "0.63270503", "0.62981254", "0.62790686", "0.62790686", "0.6228753", "0.6222227", "0.62179554", "0.6174998", "0.6137789", "0.61337954", "0.6080469", "0.6075858" ]
0.77225566
0
Sets the Icontact Prospect Address 2 attribute value.
public function setAddress2(string $address_2 = null) : CNabuDataObject { $this->setValue('nb_icontact_prospect_address_2', $address_2); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_address_2( $address ) {\n\t\t$this->set_prop( 'address_2', $address );\n\t}", "function setStreet2( &$value )\n {\n $this->Street2 = $value;\n }", "public function setAddress2($address2)\r\n {\r\n $this->_address2 = $address2;\r\n }", "public function getAddress2()\n {\n return $this->getValue('nb_icontact_prospect_address_2');\n }", "public function setAddress2($value)\n {\n parent::setValue('address2', $value);\n\n return $this;\n }", "public function setAddress2($address2)\n {\n $this->address2 = $address2;\n }", "public function setAddress2($fv_address2)\n {\n \tif(!empty($fv_address2))\n \t{\n \treturn $this->fv_address2 = $fv_address2;\n \t}\n \t$this->fv_error_message = $this->fv_error_message .'<br> - Direccion 2 '.ERROR_NULL;\n return $this->fv_address2=null;\n }", "public function street2($street2) {\n $this->data['attachment']['payload']['address']['street_2'] = $street2;\n\n return $this;\n }", "public function setAddress2($value)\n {\n $this->setParameter('billingAddress2', $value);\n $this->setParameter('shippingAddress2', $value);\n\n return $this;\n }", "public function setStreet2(string $street2): void\n {\n $this->_street2 = $street2;\n }", "public function getAddress2()\n {\n return parent::getValue('address2');\n }", "public function setAddress2($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->address2 !== $v) {\n $this->address2 = $v;\n $this->modifiedColumns[] = EventPeer::ADDRESS2;\n }\n\n\n return $this;\n }", "public function getAddress2()\r\n {\r\n return $this->_address2;\r\n }", "public function setEmail2($value)\n {\n return $this->set('Email2', $value);\n }", "public function getAddress2()\n {\n return $this->address2;\n }", "public function getAddress2()\n {\n return $this->address2;\n }", "public function getAddress2()\n {\n return $this->address2;\n }", "public function setShippingAddress2($value)\n {\n return $this->setParameter('shippingAddress2', $value);\n }", "public function setAddress2($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->address2 !== $v) {\n\t\t\t$this->address2 = $v;\n\t\t\t$this->modifiedColumns[] = VenuePeer::ADDRESS2;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function getAddress2()\n\t{\n\t\treturn $this->address2;\n\t}", "public function setImAddress($value)\n {\n $this->setProperty(\"ImAddress\", $value, true);\n }", "public function getAddress2()\n {\n\n return $this->fv_address2;\n }", "public function getApplicantAddressTwo()\n {\n return $this->getProperty('applicant_address_two');\n }", "public function getStreetAddress2()\n {\n return $this->street_address_2;\n }", "public function set_address_1( $address ) {\n\t\t$this->set_prop( 'address_1', $address );\n\t}", "public function setValue2($value){\n $this->_value2 = $value;\n }", "public function setBillingAddress2($value)\n {\n return $this->setParameter('billingAddress2', $value);\n }", "function setStreet1( &$value )\n {\n $this->Street1 = $value;\n }", "public function setAddress2($address2)\n {\n $this->address2 = $address2;\n\n return $this;\n }", "function &street2( )\n {\n return $this->Street2;\n }" ]
[ "0.71717554", "0.69730026", "0.69138604", "0.68633384", "0.67814755", "0.67112565", "0.6508256", "0.63634497", "0.6258579", "0.623101", "0.6143252", "0.6112973", "0.61034834", "0.60550404", "0.59999377", "0.59999377", "0.59999377", "0.59991044", "0.5958885", "0.59454876", "0.589638", "0.5885824", "0.58848614", "0.58375764", "0.57946837", "0.5775666", "0.57526606", "0.5677901", "0.56438917", "0.56150544" ]
0.73222035
0
Get Icontact Prospect ZIP Code attribute value
public function getZIPCode() { return $this->getValue('nb_icontact_prospect_zip_code'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getZipCode()\n {\n return parent::getValue('zip_code');\n }", "public function getApplicantZipPostalCode()\n {\n return $this->getProperty('applicant_zip_postal_code');\n }", "public function getFactZipCode() {\n return $this->fact_zip_code;\n }", "public function getZipCode(){\r\n\t\treturn $this->zipCode;\r\n\t}", "public function getZipcode()\n {\n return $this->zipcode;\n }", "public function getZipcode()\n {\n return $this->zipcode;\n }", "public function getZipcode()\n {\n return $this->zipcode;\n }", "public function getZipCode(): string\n {\n return $this->_zipCode;\n }", "public function getZipCode()\n {\n return $this->zipCode;\n }", "public function getZipCode()\n {\n return $this->zipCode;\n }", "public function getPostalcode();", "public function zipCode(): string\n {\n return $this->getData('ZipCode');\n }", "public function getPostalCode();", "public function getPostalCode();", "public function getReqZipcode()\n\t{\n\t\treturn $this->req_zipcode;\n\t}", "public function getPostalCode()\n {\n $node = $this->response->getFirst('contact:addr/contact:pc', $this->node);\n if ($node === null) {\n return null;\n }\n\n return $node->nodeValue;\n }", "public function getRegZipCode() {\n return $this->reg_zip_code;\n }", "public function getCodePostal()\n {\n return $this->codepostal;\n }", "public function getcodePostal() \n {\n return $this->codePostal;\n }", "public function getPostalCode()\n {\n return $this->postal_code;\n }", "public function getZipCode()\n {\n return $this->getParameter('zip');\n }", "public function getPostalCode()\n\t{\n\t\treturn $this->postal_code;\n\t}", "public function getPostalCode()\n {\n return $this->postalCode;\n }", "public function getPostalCode()\n {\n return $this->postalCode;\n }", "public function getPostalCode()\n {\n return $this->postalCode;\n }", "public function getPostalCode()\n {\n return $this->postalCode;\n }", "public function getCodpostal()\r\n {\r\n return $this->codpostal;\r\n }", "public function getPostalCode()\n {\n return (string) $this->json()->postal_code;\n }", "public function getOrganizationZip(): string {\n\t\treturn ($this->organizationZip);\n\t}", "public function getZipcode(): ?string\n {\n return $this->Zipcode ?? null;\n }" ]
[ "0.75991505", "0.7373561", "0.7340149", "0.72860765", "0.7261774", "0.7261774", "0.7261774", "0.7157591", "0.7121993", "0.7121993", "0.71026826", "0.70861274", "0.70839906", "0.70839906", "0.70219505", "0.7016189", "0.70092803", "0.6944991", "0.6905464", "0.6894662", "0.68536925", "0.6840631", "0.6813274", "0.6813274", "0.6813274", "0.6813274", "0.6714986", "0.6696258", "0.6670672", "0.6666603" ]
0.7560102
1
Sets the Icontact Prospect ZIP Code attribute value.
public function setZIPCode(string $zip_code = null) : CNabuDataObject { $this->setValue('nb_icontact_prospect_zip_code', $zip_code); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setZipCode($value)\n {\n return $this->set('ZipCode', $value);\n }", "function setZip( $value )\n {\n $this->Zip = $value;\n }", "public function setZipCode($value)\n {\n parent::setValue('zip_code', $value);\n\n return $this;\n }", "public function getZIPCode()\n {\n return $this->getValue('nb_icontact_prospect_zip_code');\n }", "public function getZipCode()\n {\n return parent::getValue('zip_code');\n }", "public function getZipCode(){\r\n\t\treturn $this->zipCode;\r\n\t}", "public function setZipCode($zip_code): void\n {\n $trimmedZip = preg_replace('/\\s/', '', $zip_code);\n if( strlen($trimmedZip) > 6 )\n {\n throw new InvalidArgumentException(\"Attempted to set zip code to a string longer than the limit of 6 characters [$trimmedZip]\");\n }\n $this->_zipCode = $trimmedZip;\n }", "public function setZipcode(string $zipcode)\n {\n $this->Zipcode = str_replace(\" \", \"\", $zipcode);\n return $this;\n }", "private function setPostalCode()\n {\n \tif ( ! isset( $_POST['postal_code'] ) ) {\n \t\t$this->data['error']['postal_code'] = 'Please provide your postal or zip code.';\n $this->error = true;\n return;\n }\n \n $pc = trim( $_POST['postal_code'] );\n\t\n \n // Make sure the country is set\n if ( ! isset( $this->data['country'] ) ) {\n $pc_obj = new PostalCode( $pc );\n if ( $pc_obj->isValid() ) {\n $this->data['postal_code'] = $pc_obj->get();\n return;\n }\n \n $zip_obj = new ZipCode( $pc );\n if ( $zip_obj->isValid() ) {\n $this->data['postal_code'] = $zip_obj->get();\n return;\n }\n }\n \n if ( $this->data['country'] == 'CA' ) {\n $pc_obj = new PostalCode( $pc );\n if ( ! $pc_obj->isValid() ) {\n\t\t\t\t$this->data['error']['postal_code'] = 'Please provide a valid postal code.';\n $this->error = true;\n return;\n }\n $this->data['postal_code'] = $pc_obj->get();\n }\n elseif ( $this->data['country'] == 'US' ) {\n $zip_obj = new ZipCode( $pc );\n if ( ! $zip_obj->isValid() ) {\n\t\t\t\t$this->data['error']['postal_code'] = 'Please provide a valid zip code.';\n $this->error = true;\n return;\n }\n $this->data['postal_code'] = $zip_obj->get();\n }\n }", "public function getZipCode()\n {\n return $this->zipCode;\n }", "public function getZipCode()\n {\n return $this->zipCode;\n }", "public function getZipcode()\n {\n return $this->zipcode;\n }", "public function getZipcode()\n {\n return $this->zipcode;\n }", "public function getZipcode()\n {\n return $this->zipcode;\n }", "public function setPopZipCode($value)\n {\n return $this->set('PopZipCode', $value);\n }", "public function setPostcode($value) {\n\t\tself::$_postCode = $value;\n\t}", "function setZip($zip) {\r\r\n\t\t$this->zip = $zip;\r\r\n\t}", "public function setZipcode($zipcode)\n {\n $this->zipcode = $zipcode;\n }", "public function postalCode($value)\n {\n $this->setProperty('postalCode', $value);\n return $this;\n }", "public function getApplicantZipPostalCode()\n {\n return $this->getProperty('applicant_zip_postal_code');\n }", "public function setRecipientZip($value)\n {\n return $this->set('RecipientZip', $value);\n }", "public function setRecipientZip($value)\n {\n return $this->set('RecipientZip', $value);\n }", "public function setZipCode( $zip_code ) {\n\t\t$this->container['zip_codes'] = isset( $zip_code ) ? array( $zip_code ) : null;\n\n\t\treturn $this;\n\t}", "public function setZipcode($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->zipcode !== $v) {\n $this->zipcode = $v;\n $this->modifiedColumns[] = EventPeer::ZIPCODE;\n }\n\n\n return $this;\n }", "public function getFactZipCode() {\n return $this->fact_zip_code;\n }", "public function setZip($zip) {\n\t\t$this->zip = $zip;\n\t}", "public function setZip($zip)\r\n {\r\n $this->_zip = $zip;\r\n }", "public function setCustomerZip($customerZip = '') {\n $zip = array(\n 'x_zip'=>$this->truncateChars($customerZip, 20),\n );\n $this->NVP = array_merge($this->NVP, $zip); \n }", "public function setZip($zip)\n {\n $this->zip = $zip;\n }", "public function set_zip( $zip ) {\n\t\treturn $this->set_field( 'OWNERZIP', $zip );\n\t}" ]
[ "0.7018697", "0.6976705", "0.6829347", "0.67199343", "0.6654344", "0.6447099", "0.64125586", "0.63726294", "0.636952", "0.6361281", "0.6361281", "0.6304973", "0.6304973", "0.6304973", "0.6278713", "0.6252481", "0.6245441", "0.6230323", "0.62095743", "0.6194295", "0.61567026", "0.61567026", "0.6128856", "0.61267686", "0.61121583", "0.608343", "0.60829586", "0.6068189", "0.6058127", "0.59896195" ]
0.7186257
0
Get Icontact Prospect City Name attribute value
public function getCityName() { return $this->getValue('nb_icontact_prospect_city_name'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCity(): string\n {\n return $this->result->city_name;\n }", "public function city(): string\n {\n return $this->getData('CityName');\n }", "public function getCityNameAttribute()\n {\n return $this->city->getCityName();\n }", "public function getCity()\n {\n return parent::getValue('city');\n }", "public function getCityNameAttribute()\n {\n return $this->city->city;\n }", "public function getCityNameAttribute()\n {\n return $this->city->name;\n }", "public function getCity()\n {\n return $this->getNodeValue('./vcard:locality', $this->data);\n }", "public function getCity() {\n \tif($this->city == null)\n\t\t\treturn \"\";\n\t\telse\n \treturn $this->city;\n }", "public function getCity() :string\n {\n return $this->city;\n }", "public function getCityName(): string\n {\n return $this->make_firebase_connection()\n ->firstWhere('city_id', Auth::user()->city_id)['city_name'];\n }", "public function getCity() {}", "function getCity() {\r\r\n\t\treturn $this->city;\r\r\n\t}", "public function showCity(){\n\n return $this->getPostData()['novaposhta_city_custom_field'];\n\n }", "public function getCity();", "public function getCountryNameAttribute()\n {\n return $this->city->country->country;\n }", "public function getCity() \n {\n return $this->city;\n }", "protected function getCity()\n {\n $formatter = new \\Dotpay\\Tool\\StringFormatter\\Name();\n return $formatter->format($this->checkoutSession->getLastRealOrder()->getBillingAddress()->getCity());\n }", "public function getCity()\r\n {\r\n return $this->city;\r\n }", "public function getCity()\r\n {\r\n return $this->city;\r\n }", "public function getCity()\r\n {\r\n return $this->city;\r\n }", "public function getCity(){\r\n\t\treturn $this->city;\r\n\t}", "public function getCity()\n {\n\n return $this->fv_city;\n }", "public function getCity()\n {\n return $this->getParameter('city');\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\r\n {\r\n return $this->_city;\r\n }", "protected function giveCity()\n\t{\n\t\treturn \"Orland\";\n\t}", "public function getCity()\n {\n return (string) $this->json()->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }", "public function getCity()\n {\n return $this->city;\n }" ]
[ "0.7442881", "0.7403294", "0.71636546", "0.71518356", "0.71074027", "0.7032033", "0.6997171", "0.6956183", "0.6933689", "0.6816", "0.6814979", "0.6805225", "0.67403734", "0.6738139", "0.67165923", "0.67016083", "0.6695937", "0.66677505", "0.66677505", "0.66677505", "0.6650491", "0.66356397", "0.66347194", "0.6606108", "0.65910995", "0.65910316", "0.6590196", "0.65829337", "0.65829337", "0.65829337" ]
0.7881228
0
Sets the Icontact Prospect City Name attribute value.
public function setCityName(string $city_name = null) : CNabuDataObject { $this->setValue('nb_icontact_prospect_city_name', $city_name); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCityName()\n {\n return $this->getValue('nb_icontact_prospect_city_name');\n }", "public function setRecipientCityName($value)\n {\n return $this->set('RecipientCityName', $value);\n }", "public function setCity(string $city): void\n {\n $this->_city = $city;\n }", "function setCity($city) {\r\r\n\t\t$this->city = $city;\r\r\n\t}", "public function setCity($city = \"\");", "public function getCityNameAttribute()\n {\n return $this->city->getCityName();\n }", "public function getCityNameAttribute()\n {\n return $this->city->name;\n }", "public function setCity($newCity){\n\t}", "public function setCity($value) {\n\t\tself::$_city = $value;\n\t}", "public function getCityNameAttribute()\n {\n return $this->city->city;\n }", "public function setCity($city)\r\n {\r\n $this->_city = $city;\r\n }", "protected function giveCity()\n {\n return \"Luanda minha CIDADE\";\n }", "public function setCompanyNameAttribute($value) {\n\t\t$this->company_name = $value;\n\t}", "public function setCity($city) {\n\t\t$this->city = $city;\n\t}", "public function setCity($city)\n {\n $this->city = $city;\n }", "public function setCity($city)\n {\n $this->city = $city;\n }", "public function testSetGetCityName()\n {\n $cityName = 'Cologne';\n\n $location = new Location();\n\n $this->assertSame($location, $location->setCityName($cityName));\n $this->assertEquals($cityName, $location->getCityName());\n }", "protected function giveCity()\n\t{\n\t\treturn \"Orland\";\n\t}", "public function setCity($city)\n {\n $this->json()->city = $city;\n }", "public function setCustomerCity($customerCity = '') {\n $city = array(\n 'x_city'=>$this->truncateChars($customerCity, 40),\n );\n $this->NVP = array_merge($this->NVP, $city); \n }", "public function city(): string\n {\n return $this->getData('CityName');\n }", "function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }", "function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }", "function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }", "function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }", "function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }", "private function setName()\n {\n $countries = array('Croatia', 'Serbia', 'Slovenia', 'Italia', 'England', 'Scotland', 'Spain', 'Portugal', 'Mexico', 'Brazil', 'Chile', 'Argentina', 'China');\n $this->_name = $countries[rand(0, count($countries) - 1)];\n }", "function setName( $value )\n {\n $this->Name = $value;\n }", "public static function cityName() {\n\t\treturn static::randomElement(static::$cityNames);\n\t}", "public function setContactName(?string $contactName): void\n {\n $this->contactName = $contactName;\n }" ]
[ "0.6966634", "0.64368236", "0.6363458", "0.6324979", "0.6284081", "0.62723285", "0.6265368", "0.6232986", "0.61891663", "0.61780214", "0.61639744", "0.6110094", "0.610928", "0.60705596", "0.6038098", "0.6038098", "0.5997112", "0.5923528", "0.5848786", "0.58238345", "0.572693", "0.5689234", "0.5689234", "0.5689234", "0.5689234", "0.5689234", "0.567899", "0.566198", "0.5637427", "0.5609485" ]
0.71691847
0
Get Icontact Prospect Province Name attribute value
public function getProvinceName() { return $this->getValue('nb_icontact_prospect_province_name'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCityName()\n {\n return $this->getValue('nb_icontact_prospect_city_name');\n }", "public function getCountryNameAttribute()\n {\n return $this->city->country->country;\n }", "public function getProvinceName()\n {\n return $this->province_name;\n }", "public function getNombreProvincia() {\n return $this->provincia->nombre_provincia;\n }", "public function getCountryName()\n {\n return $this->getValue('nb_icontact_prospect_country_name');\n }", "public function getStreetName();", "public function getCountryName();", "public function getProvinceNameEn()\n {\n return $this->province_name_en;\n }", "public function getProvinciaNombre()\n {\n return $this->provincia->getNombre();\n }", "public function streetName(): string\n {\n return $this->getData('Streetname');\n }", "public function getStreetName() : string\n {\n return collect($this->make_firebase_connection()\n ->firstWhere('city_id', Auth::user()->city_id)['containers'])\n ->firstWhere('street_id', Auth::user()->street_id)['street_name'];\n }", "public function getCountry(): string\n {\n return $this->result->country_name;\n }", "public function getLocationNameAttribute()\n {\n return $this->hasGeoip() ? $this->geoip->country.' '.$this->geoip->city : 'undefined';\n }", "public function getCity(): string\n {\n return $this->result->city_name;\n }", "public function getProvincia()\n {\n return $this->provincia;\n }", "public function getProvincia()\n {\n return $this->provincia;\n }", "public function feide_name() {\n\t\t\tif(isset($this->attributes['displayName'][0])) {\n\t\t\t\t$this->feide_name = $this->attributes['displayName'][0];\n\t\t\t\t// echo \"displayName set!!!\";\n\t\t\t} else if(isset($this->attributes['givenName'][0]) && isset($this->attributes['sn'][0])) {\n\t\t\t\t$this->feide_name = $this->attributes['givenName'][0] . ' ' . $this->attributes['sn'][0];\n\t\t\t\t// echo \"givenName/sn set!!!\";\n\t\t\t} else if(isset($this->attributes['cn'][0])) {\n\t\t\t\t$this->feide_name = $this->attributes['cn'][0];\n\t\t\t\t// echo \"cn set!!!\";\n\t\t\t} // FALLBACK IF NO NAME IS ACCESSIBLE FROM ANY OF THE ABOVE ATTRIBS...\n\t\t\telse {\n\t\t\t\t$this->feide_name = $this->attributes['eduPersonPrincipalName'][0];\n\t\t\t}\n\n\t\t\treturn $this->feide_name;\n\t\t}", "public function getCityNameAttribute()\n {\n return $this->city->getCityName();\n }", "public function city(): string\n {\n return $this->getData('CityName');\n }", "public function getCityNameAttribute()\n {\n return $this->city->name;\n }", "public function ResidenceString()\n\t{\n\t\t$res = $this->Residence();\n\t\tif (!$res)\n\t\t\treturn \"\";\n\t\telseif ($res->Custom())\n\t\t\treturn $res->Address.\" \".$res->City.\" \".$res->State;\n\t\telse\n\t\t\treturn $res->Name.\" \".$this->Apartment;\n\t}", "function get_name() {\n\t\treturn $this->get_name_from_vtec();\t\n\t}", "public function getProvincia() {\n return $this->provincia;\n }", "public function getProvincia() {\n\t\treturn $this -> provincia;\n\t}", "function tep_get_country_name($country_id) {\n\t$country_array = tep_get_countries($country_id);\n\treturn $country_array['countries_name'];\n}", "public function getJkw_hospitalAddressStr () {\n return $this->xprovince->name . $this->xcity->name . $this->xcounty->name . $this->content;\n }", "public function getProvince()\r\n {\r\n return $this->province;\r\n }", "public function getCity()\n {\n return $this->getNodeValue('./vcard:locality', $this->data);\n }", "public function getCountryCode(): string;", "public function getStreetName() {\n\t\treturn $this->streetName;\n\t}" ]
[ "0.66666305", "0.66075957", "0.6567292", "0.65218705", "0.6513628", "0.63782656", "0.6289603", "0.627011", "0.62007356", "0.61561596", "0.6138012", "0.6122851", "0.6027206", "0.60016245", "0.5939655", "0.5939655", "0.5909215", "0.5907759", "0.5906895", "0.5895163", "0.5894819", "0.5872541", "0.5859484", "0.5852461", "0.58335227", "0.582354", "0.5801255", "0.5799827", "0.5787009", "0.5780253" ]
0.71772265
0
Sets the Icontact Prospect Province Name attribute value.
public function setProvinceName(string $province_name = null) : CNabuDataObject { $this->setValue('nb_icontact_prospect_province_name', $province_name); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getProvinceName()\n {\n return $this->getValue('nb_icontact_prospect_province_name');\n }", "public function getProvinceName()\n {\n return $this->province_name;\n }", "public function SetName ($name = \\MvcCore\\IEnvironment::PRODUCTION) {\n\t\t$this->name = $name;\n\t\tforeach (static::GetAllNames() as $envName)\n\t\t\t$this->values[$envName] = FALSE;\n\t\t$this->values[$this->name] = TRUE;\n\t\treturn $name;\n\t}", "public function getProvinceNameEn()\n {\n return $this->province_name_en;\n }", "public function setName($Name)\n {\n $this->__set(\"name\", $Name);\n }", "public function setName($Name)\n {\n $this->__set(\"name\", $Name);\n }", "public function getCityName()\n {\n return $this->getValue('nb_icontact_prospect_city_name');\n }", "public function setProvinceName($province_name)\n {\n $this->province_name = $province_name;\n\n return $this;\n }", "public function setName($Name) \n {\n $this->Name = $Name;\n }", "public function setNameAttribute($name)\n {\n $this->attributes['name'] = strtolower($name);\n }", "function setName($Name){\n\t\t$this->Name = $Name;\n\t}", "public function setName($Name)\r\n {\r\n $this->Name = $Name;\r\n }", "private function setName()\n {\n $countries = array('Croatia', 'Serbia', 'Slovenia', 'Italia', 'England', 'Scotland', 'Spain', 'Portugal', 'Mexico', 'Brazil', 'Chile', 'Argentina', 'China');\n $this->_name = $countries[rand(0, count($countries) - 1)];\n }", "function setName( $value )\n {\n $this->Name = $value;\n }", "public function getCountryName()\n {\n return $this->getValue('nb_icontact_prospect_country_name');\n }", "function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }", "function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }", "function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }", "function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }", "function setName( $value )\r\n {\r\n $this->Name = $value;\r\n }", "public function setStreetName($streetName) {\n\t\t$this->streetName = $streetName;\n\t}", "public function set_name($new_name) {\r\n\t\t$this->name = strtoupper($new_name);\r\n\t}", "public function SetName($pName)\n {\n return $this->AddAttribute(self::ATTR_NAME, $pName);\n }", "public function set_name( $name ) {\n\t\t$this->set_prop( 'name', $name );\n\t}", "public function setRegionName($val)\n {\n $this->_propDict[\"regionName\"] = $val;\n return $this;\n }", "function setName($value) {\n $this->name = $value;\n }", "public function setName($name){\n $this->__set('name',$name);\n }", "public function setItemName()\n {\n if ($product = $this->product) {\n $name = $product->productPrint->name;\n $name = $product->mailingOption->name . ' ' . $name;\n $name = $name . ' ' . $product->stockOption->name;\n $this->name = $name;\n $this->save();\n }\n }", "function set_name($name) {\n $this->name = $name;\n }", "public function setCityName(string $city_name = null) : CNabuDataObject\n {\n $this->setValue('nb_icontact_prospect_city_name', $city_name);\n \n return $this;\n }" ]
[ "0.64072174", "0.5926251", "0.56171566", "0.5558705", "0.54277235", "0.54277235", "0.5426466", "0.5426122", "0.53864884", "0.53766406", "0.53663415", "0.5352063", "0.53509915", "0.5343799", "0.5341213", "0.5335968", "0.5335968", "0.5335968", "0.5335968", "0.5335968", "0.5328828", "0.5282776", "0.5272989", "0.5271449", "0.52495635", "0.5235105", "0.5233727", "0.5211535", "0.5201773", "0.5198966" ]
0.6402313
1
Get Icontact Prospect Country Name attribute value
public function getCountryName() { return $this->getValue('nb_icontact_prospect_country_name'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCountryName();", "public function getCountry(): string\n {\n return $this->result->country_name;\n }", "public function getCountryNameAttribute()\n {\n return $this->city->country->country;\n }", "public function getCountry()\n {\n return parent::getValue('country');\n }", "public function getCountry()\n {\n return $this->getValueObject('country');\n }", "public function country(): string\n {\n return $this->country;\n }", "public function getCountry() : string\n {\n return $this->country;\n }", "function tep_get_country_name($country_id) {\n\t$country_array = tep_get_countries($country_id);\n\treturn $country_array['countries_name'];\n}", "public function getCountry() :string\n {\n return $this->country;\n }", "public function getCountry() {}", "public function getCountry() {}", "public function getCountryName()\n {\n return $this->getCountry()->getName();\n }", "public function getCountry()\n {\n return $this->getParameter('country');\n }", "public function getCountry() : string {\n\t\t\treturn substr($this->value, 4, 2);\n\t\t}", "public function getCountryNameDirectly()\r\n {\r\n\r\n $url_to_exch_code = \"https://freegeoip.net/json/\";\r\n\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, $url_to_exch_code);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n $json = curl_exec($ch);\r\n curl_close($ch);\r\n\r\n $details = json_decode($json, true);\r\n\r\n if(!empty($details['country_name'])) {\r\n\r\n return $details['country_name'];\r\n\r\n } else {\r\n\r\n $url_to_exch_code = \"https://geoip.nekudo.com/api/json\";\r\n\r\n $ch = curl_init();\r\n curl_setopt($ch, CURLOPT_URL, $url_to_exch_code);\r\n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\r\n $json = curl_exec($ch);\r\n curl_close($ch);\r\n\r\n $details = json_decode($json, true);\r\n\r\n if(!empty($details['country']['name'])) {\r\n\r\n return $details['country']['name'];\r\n\r\n } else {\r\n\r\n return false;\r\n\r\n }\r\n }\r\n\r\n }", "public function getCountryCode(): string;", "public function getCountry();", "public function getCountry();", "function getCountry() {\r\r\n\t\treturn $this->country;\r\r\n\t}", "public function getCountry() \n {\n return $this->country;\n }", "public function getCountry()\n {\n return isset($this->address_data['country']) ? $this->address_data['country'] : null;\n }", "public function getReqCountry()\n\t{\n\t\treturn $this->req_country;\n\t}", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }", "public function getCountry()\n {\n return $this->country;\n }" ]
[ "0.7642912", "0.75186384", "0.73346174", "0.7262316", "0.71506697", "0.70680207", "0.7062143", "0.7022066", "0.70164263", "0.69419897", "0.69419897", "0.69156235", "0.6915369", "0.6895673", "0.68402356", "0.68251634", "0.6803539", "0.6803539", "0.67989534", "0.67625964", "0.6757576", "0.6750428", "0.67116976", "0.67116976", "0.67116976", "0.67116976", "0.67116976", "0.67116976", "0.67116976", "0.67116976" ]
0.7863113
0
Sets the Icontact Prospect Country Name attribute value.
public function setCountryName(string $country_name = null) : CNabuDataObject { $this->setValue('nb_icontact_prospect_country_name', $country_name); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCountryName()\n {\n return $this->getValue('nb_icontact_prospect_country_name');\n }", "private function setName()\n {\n $countries = array('Croatia', 'Serbia', 'Slovenia', 'Italia', 'England', 'Scotland', 'Spain', 'Portugal', 'Mexico', 'Brazil', 'Chile', 'Argentina', 'China');\n $this->_name = $countries[rand(0, count($countries) - 1)];\n }", "public function getCountryName();", "public function getCountryNameAttribute()\n {\n return $this->city->country->country;\n }", "public function getCountryName()\n {\n return $this->getCountry()->getName();\n }", "function setCountry($country) {\r\r\n\t\t$this->country = $country;\r\r\n\t}", "public function setCountry($value) {\n\t\tself::$_country = $value;\n\t}", "public function setCountry($newCountry){\n\t}", "public static function addressCountryName()\n {\n return new TextNode('address_country_name');\n }", "public function setCountry($country)\r\n {\r\n $this->country = $country;\r\n }", "public function setCountry($country = \"\");", "public function getCountryName() {\n if ($this->getFormData() && $this->getFormData()->getCountryId()) {\n $country = Mage::getModel('directory/country')->load($this->getFormData()->getCountryId());\n if ($country->getData() != array())\n return $country->getName();\n }\n return null;\n }", "public function country_name($country)\n {\n $result = common_select_values('name', 'ad_countries', ' id = \"'.$country.'\"', 'row');\n return $result; \n }", "public function setcountryAttribute($country)\n {\n $this->attributes['country']= BasicSiteRepository::getListOfCountries()[$country];\n }", "public function setCountry(string $country): void\n {\n $this->_country = $country;\n }", "public function getCountryName() {\n //check if we have a country code\n if ($this->country) {\n //return the country name\n return Locale::getDisplayRegion('en_' . $this->country);\n }\n return NULL;\n }", "public function setCustomerCountry($customerCountry = '') {\n $country = array(\n 'x_country'=>$this->truncateChars($customerCountry, 60),\n );\n $this->NVP = array_merge($this->NVP, $country); \n }", "public function getCountry(): string\n {\n return $this->result->country_name;\n }", "function setCountryId( $value )\n {\n $this->CountryID = $value;\n }", "public function getCountry()\n {\n return parent::getValue('country');\n }", "public function getName()\n {\n return 'country_form_frontend';\n }", "public function getCountryName()\n {\n return $this->getShippingAddress()->getCountryModel()->getName($this->localeResolver->getLocale());\n }", "public function setCountry($country)\n {\n $this->country = $country;\n }", "function setCountry( &$country )\n {\n if ( get_class( $country ) == \"ezcountry\" )\n {\n $this->CountryID = $country->id();\n }\n else if ( is_numeric( $country ) )\n {\n $this->CountryID = $country;\n }\n }", "function SetCountry(&$country)\n\t{\n\t\t$this->countryId = $country->countryId;\n\t}", "public function getCountry() :string\n {\n return $this->country;\n }", "public function getCountry() : string\n {\n return $this->country;\n }", "public function country(): string\n {\n return $this->country;\n }", "function setDisplayName($name){\n\t\t$this->display_name =$name;\n\t}", "public function setShippingCountry($shippingCountry = '') {\n $country = array(\n 'x_ship_to_country'=>$this->truncateChars($shippingCountry, 60),\n );\n $this->NVP = array_merge($this->NVP, $country); \n }" ]
[ "0.7088833", "0.6397987", "0.626309", "0.61965805", "0.6168364", "0.60860294", "0.6080244", "0.60768086", "0.6075073", "0.6014523", "0.60074204", "0.59814996", "0.597793", "0.59390444", "0.5924774", "0.5913121", "0.59076893", "0.5821144", "0.58095396", "0.5759298", "0.5754275", "0.57509977", "0.5742917", "0.57072043", "0.56376284", "0.5625092", "0.5599147", "0.5597898", "0.5592993", "0.55130816" ]
0.7025881
1
Get Icontact Prospect Enterprise attribute value
public function getEnterprise() { return $this->getValue('nb_icontact_prospect_enterprise'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPropertyDetails(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get ( 'Apptha\\Airhotels\\Model\\Attributes' );\n }", "public function getEmail()\n {\n return $this->getValue('nb_icontact_prospect_email');\n }", "public function getAttribute($oi, $attribute) {\n\n // we support attribute:type configurations to allow for testing a specific email address \n $values = explode(':',$attribute);\n $type=null;\n if(sizeof($values) > 1) {\n $attribute=$values[0];\n $type=$values[1];\n }\n\n $valuefound=null;\n // if the attribute is a model name, check for the related fields\n if(isset($oi[$attribute])) {\n\n // To distinguish between a non-existing attribute and a supported attribute\n // for which we do not have a value, we set $valuefound to the empty array at this point.\n $valuefound=array();\n\n // loop over all recovered models of this attribute (ie: all email addresses)\n $models = $oi[$attribute];\n if($attribute == \"PrimaryName\") {\n // PrimaryName is a hasOne association\n $models = array($models);\n }\n foreach($models as $model) {\n switch($attribute) {\n case 'TelephoneNumber':\n if($type === null || $type == $model['type']) {\n $valuefound[] = formatTelephone($model);\n }\n break;\n case 'Address':\n if(in_array($type, array('street','state','postal_code','room','locality','country'))) {\n if($model[$type] !== null) {\n $valuefound[] = $model[$type];\n }\n }\n break;\n case 'PrimaryName':\n $valuefound[] = generateCn($model);\n break;\n case 'Name':\n if( ($type !== null && $type == $model['type']) \n || ($type === null)) {\n $valuefound[] = generateCn($model);\n }\n break;\n case 'Identifier':\n if($type === null || $type == $model['type']) {\n $valuefound[] = $model['identifier'];\n }\n break;\n case 'EmailAddress':\n if($type === null || $type == $model['type']) {\n $valuefound[] = $model['mail'];\n }\n break;\n case 'Url':\n if($type === null || $type == $model['type']) {\n $valuefound[] = $model['url'];\n }\n break;\n }\n }\n }\n return $valuefound;\n }", "public function getAttributes()\n {\n return $this->getValueJSONDecoded('nb_icontact_prospect_attributes');\n }", "public function getProfessionalInfo(){\r\n\t return $this->_professionalInfo;\r\n\t}", "public function getAttributeDetails(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get('Magento\\Eav\\Model\\Config' );\n }", "public function getPhone()\n {\n return $this->getValue('nb_icontact_prospect_phone');\n }", "public function getIdentifyingAttribute();", "public function getContactDetailAttribute()\n {\n return $this->contact()->first();\n }", "public function getString( Inx_Api_Recipient_Attribute $oAttribute );", "function getContact()\n\t{\n\t\treturn $this->Info['Contact'];\n\t}", "public function getAccident()\n {\n return $this->accident;\n }", "public function getAudiencePegi() {\n $result = TingOpenformatMethods::parseFields($this->_getDetails(), array('audiencePegi' => array('audiencePegiElement')));\n return (is_array($result)) ? reset($result) : $result;\n }", "public function evaluate(ECash_CFE_IContext $c)\n\t\t{\n\t\t\treturn $c->getAttribute($this->attr);\n\t\t}", "function getCostPersonalTagIndividual(){\n\treturn campo('config_system','id','1','cost_individual_personal_tag');\n}", "function getCostPersonalTagIndividual(){\n\treturn campo('config_system','id','1','cost_individual_personal_tag');\n}", "public static function getAlliContactProspects()\n {\n return forward_static_call(\n array(get_called_class(), 'buildObjectListFromSQL'),\n 'nb_icontact_prospect_id',\n 'select * from nb_icontact_prospect'\n );\n }", "public function getContact(): string\n {\n return $this->_contact;\n }", "public function getIdentityAttribute(): string;", "public static function get_attribute_returns() {\n return new external_value(PARAM_RAW, 'The course element attribute value');\n }", "public function getProductAttributeInt($productId, $attributeCode){\r\n\t$resource = Mage::getSingleton('core/resource');\r\n\t$readConnection = $resource->getConnection('core_read');\r\n\treturn\t\r\n\t $readConnection->fetchOne(\r\n\t 'select value from catalog_product_entity_int where entity_id=' . $productId . '\r\n\t\t and attribute_id = (select attribute_id from eav_attribute where attribute_code = \\'' . $attributeCode . '\\')'\r\n );\r\n}", "public function attribute_info($attribute_code){\n\n $result = $this->curlRequest(\"/rest/V1/products/attributes/\".$attribute_code,0);\n $attribute_id = $result['attribute_id'];\n return $attribute_id;\n }", "public function lookForIAttribute(){\r\n $len = mb_strlen($this -> mangoTalker, \"utf-8\");\r\n if ($len == 7 ) {\r\n $this -> mangoTalker = '7812'.$this -> mangoTalker;\r\n } elseif ($len == 10) {\r\n $this -> mangoTalker = '7'.$this -> mangoTalker;\r\n }\r\n $mCall = mCall::model() -> findByAttributes(array('fromPhone' => $this -> mangoTalker));\r\n if (is_a($mCall, 'mCall')) {\r\n $this -> i = $mCall -> i;\r\n } else {\r\n unset($this -> i);\r\n }\r\n }", "public function getAttributeCode()\r\n {\r\n return $this->getAttribute()->getAttributeCode();\r\n }", "public function getImAddress()\n {\n return $this->getProperty(\"ImAddress\");\n }", "public function getAno() {\n return $this->iAno;\n }", "public function getAno() {\n return $this->iAno;\n }", "public function getInteger( Inx_Api_Recipient_Attribute $oAttribute );", "function get_eco_attributes($product_id)\n\t{\n\t\t\t$product = $this->product_model->reset()->load($product_id);\n\t\t\t$attribute_name = 'ecoattribute';\n\t\n\t\t\t$eco_attributes = $product->getAttributeText($attribute_name);\n\t\t\tif(count($eco_attributes) == 1) $eco_attributes = array($eco_attributes); //put in array if there's ONE eco attribute filled\n\t\t\treturn $eco_attributes;\n\t}", "public function getViaTableAttributesValue();" ]
[ "0.63659704", "0.6285842", "0.62758905", "0.6041538", "0.6041297", "0.60204464", "0.5984404", "0.58012915", "0.56841826", "0.5627888", "0.56094897", "0.5576095", "0.55608994", "0.5540518", "0.5524591", "0.5524591", "0.54674137", "0.5454357", "0.54538214", "0.5443118", "0.5441954", "0.54336977", "0.5427342", "0.5419796", "0.5415577", "0.54071194", "0.54071194", "0.53729296", "0.5362156", "0.53578895" ]
0.66536343
0
Sets the Icontact Prospect Enterprise attribute value.
public function setEnterprise(string $enterprise = null) : CNabuDataObject { $this->setValue('nb_icontact_prospect_enterprise', $enterprise); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEnterprise()\n {\n return $this->getValue('nb_icontact_prospect_enterprise');\n }", "public function setEmail(string $email = null) : CNabuDataObject\n {\n $this->setValue('nb_icontact_prospect_email', $email);\n \n return $this;\n }", "public function testSetCommuneNaissance() {\n\n $obj = new Employes();\n\n $obj->setCommuneNaissance(\"communeNaissance\");\n $this->assertEquals(\"communeNaissance\", $obj->getCommuneNaissance());\n }", "public function testSetCodeOfficielCommune() {\n\n $obj = new Employes();\n\n $obj->setCodeOfficielCommune(\"codeOfficielCommune\");\n $this->assertEquals(\"codeOfficielCommune\", $obj->getCodeOfficielCommune());\n }", "public function setAttendee($value)\n {\n $this->attendee = $value;\n }", "public function setEmail($value)\n {\n $this->_email = $value;\n }", "function setEmail($newEmail){\n $this->email = $newEmail;\n }", "function setEpoca($iepoca = '')\n {\n $this->iepoca = $iepoca;\n }", "public function setGiftcardRecipientEmail($value);", "public function setEmail($email) {\n $this->getlead()->setEmail($email);\n }", "public function setEmail($value) {\r\n $this->email = $value;\r\n }", "public function testSetCodeOfficielCommune() {\n\n $obj = new Collaborateurs();\n\n $obj->setCodeOfficielCommune(\"codeOfficielCommune\");\n $this->assertEquals(\"codeOfficielCommune\", $obj->getCodeOfficielCommune());\n }", "public function setEmailAttribute($value)\n {\n if (!empty($value)) {\n $this->attributes['email'] = $this->mayaEncrypt($value);\n }\n }", "public function setEmail($newEmail){\n\t}", "public function setSalePriceAttribute($value)\n {\n $this->attributes['sale_price'] = Utils::numbersOnly($value);\n }", "public function setGiftcardSenderEmail($value);", "public function enviteAttendee (Attendee $attendee) {\n\t\t\tif($this->isStillValid() == false) { return \"VipCode '{$this->vipCode}' já não é válido\"; }\n\t\t\t$attendee->setVipCode($this);\n\t\t\ttry {\n\t\t\t\t$attendee->saveEnvite();\n\t\t\t}\n\t\t\tcatch(Exception $error) {\n\t\t\t\t//write the logs in the application logs\n\t\t\t\t$error->getTrace();\n\t\t\t}\n\t\t}", "public function setExperience($experience) {\n $this->experience = $experience;\n }", "function setEstanteria($_codigoEstanteria){\r\n $this->estanteria=$_codigoEstanteria;\r\n }", "public function setYomiCompany($value)\n {\n $this->setProperty(\"YomiCompany\", $value, true);\n }", "public function setAno($iAno) {\n $this->iAno = $iAno;\n }", "public function setAno($iAno) {\n $this->iAno = $iAno;\n }", "protected function setOfferValue ()\n {\n $this->request->coupon_benefits[ $this->offerNature ] = $this->offer->rate;\n }", "function setEmail( $email )\n {\n $this->setValueByFieldName( 'person_email', $email );\n return;\n }", "public function setEmailAttribute($value) {\n \t$this->attributes['email'] = strtolower($value);\n\t}", "public function updateObject( Inx_Api_Recipient_Attribute $attr, $oValue );", "public function __set($prop, $value)\n {\n $this->assignee[$prop] = $value;\n }", "function setExperience($experience) { $experience = (int) $experience;\r\n if ($experience >= 1 && $experience <= 100) {\r\n $this->_experience = $experience;\r\n }\r\n }", "public function setEmail($email){\n\t\t$this->email = $email;\n\t}", "public function setEmailAttribute($value)\n {\n $this->attributes['email'] = mb_strtolower($value);\n }" ]
[ "0.56973225", "0.53698695", "0.5341013", "0.51508725", "0.51044714", "0.49738923", "0.49430752", "0.49160308", "0.49103138", "0.4881057", "0.4878018", "0.48751006", "0.48374414", "0.48345423", "0.4800514", "0.47942063", "0.4755115", "0.47402185", "0.47238776", "0.47143155", "0.47056058", "0.47056058", "0.46912134", "0.46880737", "0.46871173", "0.46485788", "0.46375084", "0.4625236", "0.46103773", "0.46030855" ]
0.6568217
0
Get Icontact Prospect Phone attribute value
public function getPhone() { return $this->getValue('nb_icontact_prospect_phone'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPhone()\n {\n return $this->get(self::PHONE);\n }", "public function getPhone(){\r\n\t\t\treturn $this->phone;\r\n\t\t}", "public function get_phone() {\r\n return $this->phone;\r\n }", "public function getPhone()\n {\n return $this->get('Phone');\n }", "public function getPhone()\n\t{\n\t\treturn $this->phone;\n\t}", "public function getPhone() {\n\t\treturn $this->phone;\n\t}", "public function getPhone()\r\n {\r\n return $this->phone;\r\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhone()\n {\n return $this->phone;\n }", "public function getPhoneNumberAttribute()\n {\n return $this->attributes[ 'country_code' ].$this->attributes[ 'phone' ];\n }", "public function getPhone()\r\n {\r\n return $this->_phone;\r\n }", "function getPhone() {\n return $this->phone;\n }", "public function getPhone() {\n return $this->phone;\n }", "public function getPhone() {\n return $this->phone;\n }", "public function getPhone()\n {\n $value = $this->get(self::PHONE);\n return $value === null ? (string)$value : $value;\n }", "public function getPhone();" ]
[ "0.74794763", "0.74523205", "0.7448596", "0.74416625", "0.7441019", "0.7414851", "0.7397117", "0.7373307", "0.7373307", "0.7373307", "0.7373307", "0.7373307", "0.7373307", "0.7373307", "0.7373307", "0.7373307", "0.7373307", "0.7373307", "0.7373307", "0.7373307", "0.7373307", "0.7373307", "0.73537254", "0.7340513", "0.73391104", "0.732944", "0.731646", "0.731646", "0.73111916", "0.73073137" ]
0.8067093
0
Sets the Icontact Prospect Phone attribute value.
public function setPhone(string $phone = null) : CNabuDataObject { $this->setValue('nb_icontact_prospect_phone', $phone); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setPhone($phone)\r\n {\r\n $this->_phone = $phone;\r\n }", "public function setPhone($phone)\r\n {\r\n $this->_phone = $phone;\r\n }", "public function setPhone($phone = \"\");", "public function setPhone($phone) {\n\t\t$this->phone = $phone;\n\t}", "public function setPhoneAttribute($value)\n {\n if (!empty($value)) {\n $this->attributes['phone'] = $this->mayaEncrypt($value);\n }\n }", "public function setPhone($phone) {\n $this->phone = $phone;\n }", "public function setPhone($var)\n {\n GPBUtil::checkString($var, True);\n $this->phone = $var;\n }", "public function setPhone($value)\n {\n return $this->set('Phone', $value);\n }", "public function setPhone($phone)\n {\n $this->phone = $phone;\n }", "public function setPhone($phone)\n {\n $this->phone = $phone;\n }", "public function setPhone(string $phone):void\n {\n $this->phone = $phone;\n }", "function setPhone($newPhone){\n //check if the phone number is numeric\n if(is_numeric($newPhone)) {\n $this->phone = $newPhone;\n }\n //if not set to default, 0000000000\n $this->phone = \"0000000000\";\n }", "public function setPhone(string $phone): void\n {\n $this->_phone = $phone;\n }", "public function setPhone($value)\n {\n $this->phone = $value;\n return $this;\n }", "public function setPhone($value)\n {\n return $this->set(self::PHONE, $value);\n }", "public function setPhone($value)\n {\n return $this->set(self::PHONE, $value);\n }", "public function getPhone()\n {\n return $this->getValue('nb_icontact_prospect_phone');\n }", "public function setProfilePhone($profilePhone) {\n\t\t$this->profilePhone = $profilePhone;\n\t}", "public function setPhone( $phone ) {\n\t\t$this->container['phones'] = isset( $phone ) ? array( $phone ) : null;\n\n\t\treturn $this;\n\t}", "public function setCustomerPhone($val)\n {\n $this->_propDict[\"customerPhone\"] = $val;\n return $this;\n }", "public function setPhone($phone)\n {\n $this->phone = $phone;\n\n return $this;\n }", "public function setPhone($phone)\r\n {\r\n $this->phone = $phone;\r\n return $this;\r\n }", "public function getPhone(){\r\n\t\t\treturn $this->phone;\r\n\t\t}", "public function setPhone($value)\n {\n $this->setParameter('billingPhone', $value);\n $this->setParameter('shippingPhone', $value);\n\n return $this;\n }", "public function setPhone($phone)\n {\n $this->phone = $phone;\n return $this;\n }", "public function setPhone($phone)\n {\n $this->phone = $phone;\n return $this;\n }", "public function getPhone()\r\n {\r\n return $this->phone;\r\n }", "private function setTelephone()\n {\n \tif ( empty($_POST['telephone'] ) ) {\n $this->data['error']['telephone'] = 'Please provide a valid phone number.';\n $this->error = true;\n return;\n }\n\t\n $t = trim( $_POST['telephone'] );\n \n\t\t// Remove non-digits.\n\t\t$t = preg_replace('/[^0-9]/', '', $t);\n\t\n\t\t// Make sure it's 10 digits.\n\t\tif ( strlen($t) != 10 ) {\n\t\t\t$this->data['error']['telephone'] = 'Please provide a valid phone number.';\n $this->error = true;\n return;\n\t\t}\n\t\n $this->data['telephone'] = $t;\n }", "public function setPhone($phone) {\n $this->phone = $phone;\n\n return $this;\n }", "public function get_phone() {\r\n return $this->phone;\r\n }" ]
[ "0.7184623", "0.7184623", "0.7166065", "0.7151197", "0.71160126", "0.7113196", "0.7103345", "0.7065265", "0.70635754", "0.70635754", "0.69708186", "0.6969315", "0.6951838", "0.69409716", "0.6831488", "0.6831488", "0.68165576", "0.678704", "0.65486825", "0.6541347", "0.6532783", "0.6482471", "0.6391077", "0.6382686", "0.63327056", "0.63327056", "0.63175863", "0.6310492", "0.6298259", "0.62971604" ]
0.7311176
0
Get Icontact Prospect Telephone Prefix attribute value
public function getTelephonePrefix() { return $this->getValue('nb_icontact_prospect_telephone_prefix'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPhone()\n {\n return $this->getValue('nb_icontact_prospect_phone');\n }", "public function get_telephone();", "public function getTelephone() {}", "public function getPhoneNumberAttribute()\n {\n return $this->attributes[ 'country_code' ].$this->attributes[ 'phone' ];\n }", "public function getTelephone() : string {\n return $this->telephone;\n }", "public function getCellularPrefix()\n {\n return $this->getValue('nb_icontact_prospect_cellular_prefix');\n }", "public function getTelephone()\n {\n return $this->telephone;\n }", "public function getProfilePhone() : string {\n\t\treturn $this->profilePhone;\n\t}", "public function getTelephone()\n {\n return $this->telephone;\n }", "public function getTelephone()\n {\n return $this->telephone;\n }", "public function getTelephone()\n {\n return $this->telephone;\n }", "public function getTelephone()\n {\n return $this->telephone;\n }", "public function getTelephone()\n {\n return $this->telephone;\n }", "public function getTelephone()\n {\n return $this->telephone;\n }", "public function getTelephone() {\n\t\treturn $this->telephone;\n\t}", "public function getPhoneNo() : string\n {\n return $this->phoneNo;\n }", "function getPrimaryPhone() {\n\t\treturn $this->getData('primaryPhone');\n\t}", "public function getCustomerPrefix();", "public function getPhone(): string\n {\n return $this->phone;\n }", "public function getShipToPhone();", "public function get_phone() {\r\n return $this->phone;\r\n }", "public function getTelephoneNumber() :string\n {\n return $this->telephoneNumber;\n }", "public function getPhoneNumber()\n {\n return $this->country_code.$this->phone;\n }", "public function getPhone():string\n {\n return $this->phone;\n }", "public function getPhone();", "public function getBillingPhone();", "public function getPhone()\n {\n return $this->get(self::PHONE);\n }", "public function getPhone(){\r\n\t\t\treturn $this->phone;\r\n\t\t}", "protected function getPhone()\n {\n return $this->checkoutSession->getLastRealOrder()->getBillingAddress()->getTelephone();\n }", "public function getPhone()\n {\n $value = $this->get(self::PHONE);\n return $value === null ? (string)$value : $value;\n }" ]
[ "0.7258447", "0.7072343", "0.6947862", "0.68408537", "0.6718261", "0.66378766", "0.6555763", "0.65397406", "0.6521537", "0.6521537", "0.6521537", "0.6521537", "0.6521537", "0.6521537", "0.64769113", "0.64141405", "0.6401089", "0.63741726", "0.6371285", "0.6352999", "0.63516116", "0.6330353", "0.6322989", "0.6299001", "0.62922996", "0.62803423", "0.6239047", "0.6235115", "0.62333715", "0.6223337" ]
0.8042052
0
Sets the Icontact Prospect Telephone Prefix attribute value.
public function setTelephonePrefix(string $telephone_prefix = null) : CNabuDataObject { $this->setValue('nb_icontact_prospect_telephone_prefix', $telephone_prefix); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTelephonePrefix()\n {\n return $this->getValue('nb_icontact_prospect_telephone_prefix');\n }", "public function setPrefix($p)\t{\n\t\t$this->prefix = $p;\n\t}", "public function setPrefix($address_prefix)\n\t{\n\t\t$this->address_prefix = trim($address_prefix);\n\t}", "public function setPrefix($value)\n {\n $this->prefix = $value;\n }", "private function setTelephone()\n {\n \tif ( empty($_POST['telephone'] ) ) {\n $this->data['error']['telephone'] = 'Please provide a valid phone number.';\n $this->error = true;\n return;\n }\n\t\n $t = trim( $_POST['telephone'] );\n \n\t\t// Remove non-digits.\n\t\t$t = preg_replace('/[^0-9]/', '', $t);\n\t\n\t\t// Make sure it's 10 digits.\n\t\tif ( strlen($t) != 10 ) {\n\t\t\t$this->data['error']['telephone'] = 'Please provide a valid phone number.';\n $this->error = true;\n return;\n\t\t}\n\t\n $this->data['telephone'] = $t;\n }", "public function setPrefix() {\n\t}", "public function setPhoneAttribute($value)\n {\n if (!empty($value)) {\n $this->attributes['phone'] = $this->mayaEncrypt($value);\n }\n }", "public function setCustomerPrefix($customerPrefix);", "public function setPrefix( $prefix );", "function setPhone($newPhone){\n //check if the phone number is numeric\n if(is_numeric($newPhone)) {\n $this->phone = $newPhone;\n }\n //if not set to default, 0000000000\n $this->phone = \"0000000000\";\n }", "public function setCustomerPhone($val)\n {\n $this->_propDict[\"customerPhone\"] = $val;\n return $this;\n }", "public function setTelephone($telephone) {\n\t\t$this->telephone = $telephone;\n\t}", "public function setPrefix($prefix)\n {\n $this->prefix = !empty($prefix) ? $prefix . ':' : '';\n }", "public function getPhone()\n {\n return $this->getValue('nb_icontact_prospect_phone');\n }", "public static function setProcessPrefix($prefix)\n\t{\n\t\tself::$processPrefix = $prefix;\n\t}", "public function setPhone(string $phone = null) : CNabuDataObject\n {\n $this->setValue('nb_icontact_prospect_phone', $phone);\n \n return $this;\n }", "public function setTelephone($telephone)\n {\n $this->telephone = $telephone;\n }", "public function setPrefix($prefix){\n\t\t$this->prefix = $prefix;\n\t}", "protected function setPrefix()\n {\n if (array_key_exists('prefix', $this->config)) {\n $this->prefix = $this->config['prefix'];\n }\n }", "public function setPrefix($prefix = \"\") {\n $this->_prefix = !empty($prefix) ? $prefix : '';\n }", "public function setPrice_prefix( $price_prefix ) {\n\t\t$this->price_prefix = $price_prefix;\n\t}", "public function setPrefix($prefix);", "public function setPrefix(string $prefix): void\n {\n $this->prefix = $prefix;\n }", "public function setPrefix(string $prefix): void\n {\n $this->prefix = $prefix;\n }", "public function setPhone($phone = \"\");", "public function setPrefix($prefix) {\n $this->prefix = $prefix;\n }", "public function setPrefix($prefix) {\n $this->prefix = $prefix;\n }", "public function setPhone($value)\n {\n return $this->set('Phone', $value);\n }", "public function setPhone(string $phone): void\n {\n $this->_phone = $phone;\n }", "public function setPrefix($prefix)\n {\n $this->prefix = $prefix;\n }" ]
[ "0.7400231", "0.6230868", "0.61902803", "0.6127611", "0.60433185", "0.60107344", "0.60027736", "0.59897107", "0.595665", "0.59286803", "0.59239316", "0.58605105", "0.5842605", "0.58404404", "0.58389467", "0.5805153", "0.5770917", "0.5767915", "0.57641554", "0.5729678", "0.57198507", "0.5713365", "0.5706987", "0.5706987", "0.570418", "0.5687692", "0.5687692", "0.56742245", "0.5669303", "0.56579095" ]
0.72613573
1
Get Icontact Prospect Cellular attribute value
public function getCellular() { return $this->getValue('nb_icontact_prospect_cellular'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPhone()\n {\n return $this->getValue('nb_icontact_prospect_phone');\n }", "public function getAttributes()\n {\n return $this->getValueJSONDecoded('nb_icontact_prospect_attributes');\n }", "public function getEmail()\n {\n return $this->getValue('nb_icontact_prospect_email');\n }", "public function getCellphone7Attribute()\n {\n return substr($this->cellphone, -7);\n }", "public function getAttribute($oi, $attribute) {\n\n // we support attribute:type configurations to allow for testing a specific email address \n $values = explode(':',$attribute);\n $type=null;\n if(sizeof($values) > 1) {\n $attribute=$values[0];\n $type=$values[1];\n }\n\n $valuefound=null;\n // if the attribute is a model name, check for the related fields\n if(isset($oi[$attribute])) {\n\n // To distinguish between a non-existing attribute and a supported attribute\n // for which we do not have a value, we set $valuefound to the empty array at this point.\n $valuefound=array();\n\n // loop over all recovered models of this attribute (ie: all email addresses)\n $models = $oi[$attribute];\n if($attribute == \"PrimaryName\") {\n // PrimaryName is a hasOne association\n $models = array($models);\n }\n foreach($models as $model) {\n switch($attribute) {\n case 'TelephoneNumber':\n if($type === null || $type == $model['type']) {\n $valuefound[] = formatTelephone($model);\n }\n break;\n case 'Address':\n if(in_array($type, array('street','state','postal_code','room','locality','country'))) {\n if($model[$type] !== null) {\n $valuefound[] = $model[$type];\n }\n }\n break;\n case 'PrimaryName':\n $valuefound[] = generateCn($model);\n break;\n case 'Name':\n if( ($type !== null && $type == $model['type']) \n || ($type === null)) {\n $valuefound[] = generateCn($model);\n }\n break;\n case 'Identifier':\n if($type === null || $type == $model['type']) {\n $valuefound[] = $model['identifier'];\n }\n break;\n case 'EmailAddress':\n if($type === null || $type == $model['type']) {\n $valuefound[] = $model['mail'];\n }\n break;\n case 'Url':\n if($type === null || $type == $model['type']) {\n $valuefound[] = $model['url'];\n }\n break;\n }\n }\n }\n return $valuefound;\n }", "public function getPropertyDetails(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get ( 'Apptha\\Airhotels\\Model\\Attributes' );\n }", "public function getImAddress()\n {\n return $this->getProperty(\"ImAddress\");\n }", "public function getAddress1()\n {\n return $this->getValue('nb_icontact_prospect_address_1');\n }", "public function getCellularPrefix()\n {\n return $this->getValue('nb_icontact_prospect_cellular_prefix');\n }", "public function lookForIAttribute(){\r\n $len = mb_strlen($this -> mangoTalker, \"utf-8\");\r\n if ($len == 7 ) {\r\n $this -> mangoTalker = '7812'.$this -> mangoTalker;\r\n } elseif ($len == 10) {\r\n $this -> mangoTalker = '7'.$this -> mangoTalker;\r\n }\r\n $mCall = mCall::model() -> findByAttributes(array('fromPhone' => $this -> mangoTalker));\r\n if (is_a($mCall, 'mCall')) {\r\n $this -> i = $mCall -> i;\r\n } else {\r\n unset($this -> i);\r\n }\r\n }", "public function getContactDetailAttribute()\n {\n return $this->contact()->first();\n }", "public static function get_attribute_returns() {\n return new external_value(PARAM_RAW, 'The course element attribute value');\n }", "public function getProfessionalInfo(){\r\n\t return $this->_professionalInfo;\r\n\t}", "function getCostPersonalTagIndividual(){\n\treturn campo('config_system','id','1','cost_individual_personal_tag');\n}", "function getCostPersonalTagIndividual(){\n\treturn campo('config_system','id','1','cost_individual_personal_tag');\n}", "public function getDeviceIMEI()\n {\n if (array_key_exists(\"deviceIMEI\", $this->_propDict)) {\n return $this->_propDict[\"deviceIMEI\"];\n } else {\n return null;\n }\n }", "public function getEnterprise()\n {\n return $this->getValue('nb_icontact_prospect_enterprise');\n }", "public function getAddress2()\n {\n return $this->getValue('nb_icontact_prospect_address_2');\n }", "function getContact()\n\t{\n\t\treturn $this->Info['Contact'];\n\t}", "public function getFax()\n {\n return $this->getValue('nb_icontact_prospect_fax');\n }", "public function getIdentifyingAttribute();", "public function getPhoneNumberAttribute()\n {\n return $this->attributes[ 'country_code' ].$this->attributes[ 'phone' ];\n }", "public static function getAlliContactProspects()\n {\n return forward_static_call(\n array(get_called_class(), 'buildObjectListFromSQL'),\n 'nb_icontact_prospect_id',\n 'select * from nb_icontact_prospect'\n );\n }", "public function getMatricule(){\n return $this->$Matricule;\n }", "public function getViaTableAttributesValue();", "public function getAttorney()\n {\n return $this->get(self::ATTORNEY);\n }", "public function getElectronicMail()\n {\n return $this->electronicMail;\n }", "public function getContactInfo() {\n return $this->contactInfo;\n }", "public function getContact(): string\n {\n return $this->_contact;\n }", "public function getCorrespondentAddress() {\n\t\treturn self::$_correspondentAddress;\n\t}" ]
[ "0.6361543", "0.61550057", "0.58876616", "0.5840882", "0.5829249", "0.5828084", "0.5740345", "0.56717235", "0.5544847", "0.5507087", "0.545105", "0.544845", "0.5444071", "0.5437662", "0.5437662", "0.5437462", "0.5432303", "0.54284745", "0.5424835", "0.54186845", "0.5416004", "0.53978044", "0.53574526", "0.5328435", "0.5311665", "0.5303037", "0.52939034", "0.5281405", "0.5269036", "0.526586" ]
0.72665113
0
Sets the Icontact Prospect Cellular attribute value.
public function setCellular(string $cellular = null) : CNabuDataObject { $this->setValue('nb_icontact_prospect_cellular', $cellular); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCellular()\n {\n return $this->getValue('nb_icontact_prospect_cellular');\n }", "public function setCellularPrefix(string $cellular_prefix = null) : CNabuDataObject\n {\n $this->setValue('nb_icontact_prospect_cellular_prefix', $cellular_prefix);\n \n return $this;\n }", "public function setEnterprise(string $enterprise = null) : CNabuDataObject\n {\n $this->setValue('nb_icontact_prospect_enterprise', $enterprise);\n \n return $this;\n }", "public function getPhone()\n {\n return $this->getValue('nb_icontact_prospect_phone');\n }", "public function setPhone(string $phone = null) : CNabuDataObject\n {\n $this->setValue('nb_icontact_prospect_phone', $phone);\n \n return $this;\n }", "public function setToCell(Cell &$Cell);", "public function setEmail(string $email = null) : CNabuDataObject\n {\n $this->setValue('nb_icontact_prospect_email', $email);\n \n return $this;\n }", "public function setFacsimile($facsimile) {\n\t\t$this->facsimile = $facsimile;\n\t}", "public function testSetNet()\n\t{\n\t\t$net = new PNPetrinet('test');\n\t\t$this->object->setNet($net);\n\t\t$this->assertEquals($net, TestReflection::getValue($this->object, 'net'));\n\t}", "public function setImAddress($value)\n {\n $this->setProperty(\"ImAddress\", $value, true);\n }", "public function setDeviceIMEI($val)\n {\n $this->_propDict[\"deviceIMEI\"] = $val;\n return $this;\n }", "public function setCorrespondentAddress($value) {\n\t\tself::$_correspondentAddress = $value;\n\t}", "public function setRegnoAttribute($value)\n\t{\n\t\t$this->attributes['regno'] = strtoupper($value);\n\t}", "public function setAttributes($attributes = null) : CNabuDataObject\n {\n $this->setValueJSONEncoded('nb_icontact_prospect_attributes', $attributes);\n \n return $this;\n }", "public function setMobile($mobile);", "public function __construct($nb_icontact_prospect = false)\n {\n if ($nb_icontact_prospect) {\n $this->transferMixedValue($nb_icontact_prospect, 'nb_icontact_prospect_id');\n }\n \n parent::__construct();\n }", "public function setReceiverMobile($phone): JawaliAttributes\n {\n $this->attributes['body']['receiverMobile'] = $phone;\n return $this;\n }", "public function setPriceNettoAttribute($value)\n\t{\n\t\t$this->attributes['price_netto'] = str_replace(',', '.', $value);\n\t}", "public function setTelefono($_telefono)\n {\n $this->telefono = $_telefono;\n }", "public function testSetAnnulationChantier() {\n\n $obj = new Collaborateurs();\n\n $obj->setAnnulationChantier(true);\n $this->assertEquals(true, $obj->getAnnulationChantier());\n }", "public function testSetInterim() {\n\n $obj = new Collaborateurs();\n\n $obj->setInterim(true);\n $this->assertEquals(true, $obj->getInterim());\n }", "function setPhone($newPhone){\n //check if the phone number is numeric\n if(is_numeric($newPhone)) {\n $this->phone = $newPhone;\n }\n //if not set to default, 0000000000\n $this->phone = \"0000000000\";\n }", "public function setMeetingCapability($val)\n {\n $this->_propDict[\"meetingCapability\"] = $val;\n return $this;\n }", "public function setNonPartneredSmallParcelData($value)\n {\n $this->_fields['NonPartneredSmallParcelData']['FieldValue'] = $value;\n return $this;\n }", "public function getCellularPrefix()\n {\n return $this->getValue('nb_icontact_prospect_cellular_prefix');\n }", "protected function initParticipant()\n {\n $default = ['maximum' => 1, 'minimum' => 0];\n $this->setProperty(ParticipantInterface::BPMN_PROPERTY_PARTICIPANT_MULTIPICITY, $default);\n }", "public function setBuslineAttribute($value)\n {\n $this->attributes['busline'] = $value;\n }", "public function setMobile($mobile)\n {\n $this->mobile = $mobile;\n }", "public function setPhoneAttribute($value)\n {\n if (!empty($value)) {\n $this->attributes['phone'] = $this->mayaEncrypt($value);\n }\n }", "public function setMinistryAttribute($value)\n {\n $this->attributes['ministry'] = $value ? $value : null;\n }" ]
[ "0.6281944", "0.5023208", "0.49155802", "0.49010855", "0.48583752", "0.4833886", "0.47730917", "0.46978527", "0.4564927", "0.45531216", "0.4540843", "0.4537776", "0.4484646", "0.44172734", "0.43358076", "0.43210438", "0.4306351", "0.42869446", "0.4263539", "0.4259936", "0.42435476", "0.42356187", "0.42169794", "0.41999638", "0.41952887", "0.4194147", "0.41623592", "0.41585493", "0.4151898", "0.4138253" ]
0.69910294
0
Get Icontact Prospect Cellular Prefix attribute value
public function getCellularPrefix() { return $this->getValue('nb_icontact_prospect_cellular_prefix'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTelephonePrefix()\n {\n return $this->getValue('nb_icontact_prospect_telephone_prefix');\n }", "public function getCustomerPrefix();", "public function getPrefix()\n {\n return $this->__get(self::FIELD_PREFIX);\n }", "public function getPhone()\n {\n return $this->getValue('nb_icontact_prospect_phone');\n }", "public function getPrefix()\n\t{\n\t\t\n\t\t$parsed = $this->getAsArray();\n\t\t\n\t\tif( ! empty($parsed) )\n\t\t{\n\t\t\tif( in_array($parsed[0], (array)$this->prefixes) )\n\t\t\t{\n\t\t\t\treturn $parsed[0];\n\t\t\t}\n\t\t}\n\t\t\n\t}", "Public Function getPrefix() { Return $this->prefix; }", "public function getAddress1()\n {\n return $this->getValue('nb_icontact_prospect_address_1');\n }", "public function getPrefix()\n {\n $connector_parameters = $this->getConnectorParameters();\n \n foreach( $connector_parameters as $param )\n {\n if( $param->getName() == self::PREFIX )\n {\n return $param->getValue();\n }\n }\n }", "public function getPrefix() {}", "public static function getPrefix()\n\t\t{\n\t\t\treturn substr(self::get(), 0, 2);\n\t\t}", "public function getPrefix(): string\n {\n return (string) $this->prefix;\n }", "public function getPrefix()\n {\n return $this->prefix ?? '';\n }", "public function getPrefix()\n\t{\n\t\treturn $this->prefix;\n\t}", "public function getPrefix()\n\t{\n\t\treturn $this->prefix;\n\t}", "public function getPrefix()\n\t{\n\t\treturn $this->prefix;\n\t}", "public function getPrefix()\n\t{\n\t\treturn $this->prefix;\n\t}", "public function getCellular()\n {\n return $this->getValue('nb_icontact_prospect_cellular');\n }", "public function getPhoneNumberAttribute()\n {\n return $this->attributes[ 'country_code' ].$this->attributes[ 'phone' ];\n }", "public function getElementPrefix();", "public function getPrefix();", "public function getPrefix();", "public function getPrefix() {\n return $this->sPrefix;\n }", "public function getPrefix()\n {\n return $this->prefix;\n }", "public function getPrefix()\n {\n return $this->prefix;\n }", "public function getPrefix()\n {\n return $this->prefix;\n }", "public function getPrefix()\n {\n return $this->prefix;\n }", "public function getPrefix()\n {\n return $this->prefix;\n }", "public function getPrefix()\n {\n return $this->prefix;\n }", "public function getPrefix()\n {\n return $this->prefix;\n }", "public function getPrefix()\n {\n return $this->prefix;\n }" ]
[ "0.74920523", "0.64361894", "0.62481457", "0.6201967", "0.6149073", "0.60551846", "0.6029763", "0.5980653", "0.5917929", "0.59040064", "0.5898023", "0.5886976", "0.58713084", "0.58713084", "0.58713084", "0.58713084", "0.58635867", "0.58526796", "0.5852027", "0.5831769", "0.5831769", "0.582694", "0.58043945", "0.58043945", "0.58043945", "0.58043945", "0.58043945", "0.58043945", "0.58043945", "0.58043945" ]
0.7844519
0
Sets the Icontact Prospect Cellular Prefix attribute value.
public function setCellularPrefix(string $cellular_prefix = null) : CNabuDataObject { $this->setValue('nb_icontact_prospect_cellular_prefix', $cellular_prefix); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCellularPrefix()\n {\n return $this->getValue('nb_icontact_prospect_cellular_prefix');\n }", "public function getTelephonePrefix()\n {\n return $this->getValue('nb_icontact_prospect_telephone_prefix');\n }", "public function setTelephonePrefix(string $telephone_prefix = null) : CNabuDataObject\n {\n $this->setValue('nb_icontact_prospect_telephone_prefix', $telephone_prefix);\n \n return $this;\n }", "protected function setPrefix()\n {\n if (array_key_exists('prefix', $this->config)) {\n $this->prefix = $this->config['prefix'];\n }\n }", "public function setPrefix($address_prefix)\n\t{\n\t\t$this->address_prefix = trim($address_prefix);\n\t}", "public function setPrefix() {\n\t}", "public function setPrefix( $prefix );", "public function setPrefix($value)\n {\n $this->prefix = $value;\n }", "public function setPrefix($p)\t{\n\t\t$this->prefix = $p;\n\t}", "public function setCustomerPrefix($customerPrefix);", "public function setPrefix($prefix)\n {\n $this->prefix = !empty($prefix) ? $prefix . ':' : '';\n }", "public function setPrefix($prefix){\n\t\t$this->prefix = $prefix;\n\t}", "public static function setProcessPrefix($prefix)\n\t{\n\t\tself::$processPrefix = $prefix;\n\t}", "public function setPrefix($prefix);", "public function setPrefix($prefix = \"\") {\n $this->_prefix = !empty($prefix) ? $prefix : '';\n }", "public function setPrefix($prefix) {\n $this->prefix = $prefix;\n }", "public function setPrefix($prefix) {\n $this->prefix = $prefix;\n }", "public function setPrefix($prefix)\n\t{\n\t\t$this->prefix = $prefix;\n\t}", "public function setPrefix($prefix)\n {\n $this->prefix = $prefix;\n }", "public function setPrefix($prefix)\n {\n $this->prefix = $prefix;\n }", "public function setPrefix(string $prefix): void\n {\n $this->prefix = $prefix;\n }", "public function setPrefix(string $prefix): void\n {\n $this->prefix = $prefix;\n }", "public function setPrefix($prefix)\n {\n $this->__set(self::FIELD_PREFIX,$prefix);\n return $this;\n }", "public function setPrice_prefix( $price_prefix ) {\n\t\t$this->price_prefix = $price_prefix;\n\t}", "function setPrefixSymbol( $value )\r\n {\r\n if ( $value == true )\r\n {\r\n $this->PositivePrefixCurrencySymbol = \"yes\";\r\n $this->NegativePrefixCurrencySymbol = \"yes\";\r\n }\r\n else\r\n {\r\n $this->PositivePrefixCurrencySymbol = \"no\";\r\n $this->NegativePrefixCurrencySymbol = \"no\";\r\n }\r\n }", "public function setPrefix($value = NULL)\n\t{\n\t\tif (NULL !== $value) {\n\t\t $this->prefix = $value;\n\t\t}\n\t\treturn $this;\n\t}", "public function setPrefix($prefix)\n {\n $this->idPrefix = $prefix;\n }", "public function setPrefix( $prefix ) {\n $this->_prefix = $prefix;\n return $this;\n }", "public function setPrefix( string $value ) : Asset\n {\n $connector_parameters = $this->getConnectorParameters();\n \n foreach( $connector_parameters as $param )\n {\n if( $param->getName() == self::PREFIX )\n {\n $param->setValue( $value );\n }\n }\n return $this;\n }", "public function setNamespacePrefix($prefix) {\n $this->nsprefix= $prefix;\n }" ]
[ "0.6830794", "0.66592485", "0.66356164", "0.613191", "0.61220455", "0.6113672", "0.59454507", "0.5915182", "0.5857354", "0.58413875", "0.57441354", "0.5689228", "0.5685557", "0.5669344", "0.56053895", "0.55869913", "0.55869913", "0.5577606", "0.5566824", "0.5566824", "0.5561119", "0.5561119", "0.5500776", "0.54771924", "0.54418045", "0.5437328", "0.5390083", "0.53748333", "0.5359515", "0.5345052" ]
0.6830179
1
Get Icontact Prospect Fax attribute value
public function getFax() { return $this->getValue('nb_icontact_prospect_fax'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getFax() {\n\t\treturn $this->getData('fax');\n\t}", "public function getFax() {}", "public function getFax() {\n return $this->sFax;\n }", "public function getFax();", "public function getCfax()\n {\n return $this->cfax;\n }", "public function getReqFaxPhone()\n\t{\n\t\treturn $this->req_fax_phone;\n\t}", "public function getFax()\n {\n return $this->fax;\n }", "public function getFax()\n {\n return $this->fax;\n }", "public function getFax()\n {\n return $this->fax;\n }", "public function getPhone()\n {\n return $this->getValue('nb_icontact_prospect_phone');\n }", "public function getFax()\n {\n return $this->getParameter('billingFax');\n }", "public function getFaxnbr()\n {\n return $this->faxnbr;\n }", "public function getBillingFax()\n {\n return $this->getParameter('billingFax');\n }", "public function getFaxNumber() :string\n {\n return $this->faxNumber;\n }", "public static function fax()\n {\n return new TextNode('fax');\n }", "public function getShippingFax()\n {\n return $this->getParameter('shippingFax');\n }", "function getPhone($xmlObj) {\n return $xmlObj->xpath('//*[@id=\"main_container\"]/div[4]/div/div[5]/form/input[4]/@value');\n}", "public function getFiscalNumber()\n {\n return $this->getValue('nb_icontact_prospect_fiscal_number');\n }", "public function getAddress1()\n {\n return $this->getValue('nb_icontact_prospect_address_1');\n }", "public function get_telephone();", "public function getEtblFax() {\n return $this->etblFax;\n }", "public function getPhadfaxnbr()\n {\n return $this->phadfaxnbr;\n }", "public function getPhoneNumberAttribute()\n {\n return $this->attributes[ 'country_code' ].$this->attributes[ 'phone' ];\n }", "function getContact()\n\t{\n\t\treturn $this->Info['Contact'];\n\t}", "public function getTelephone() {}", "public function getEmail()\n {\n return $this->getValue('nb_icontact_prospect_email');\n }", "public function getReqOfficePhone()\n\t{\n\t\treturn $this->req_office_phone;\n\t}", "public function getShippingFaxNo()\r\n {\r\n return $this->_shippingFaxNo;\r\n }", "public function getShipToPhone();", "public function getReqFaxComment()\n\t{\n\t\treturn $this->req_fax_comment;\n\t}" ]
[ "0.7024501", "0.6834503", "0.6796533", "0.67732906", "0.67185074", "0.66596854", "0.66295993", "0.66295993", "0.66295993", "0.6593816", "0.650105", "0.60577875", "0.6057679", "0.59984994", "0.59484065", "0.5867257", "0.5821076", "0.581206", "0.5778073", "0.5734748", "0.5729964", "0.57160187", "0.5711492", "0.57098895", "0.56765115", "0.56728274", "0.5640235", "0.5624367", "0.5616383", "0.5596175" ]
0.7748036
0
Sets the Icontact Prospect Fax attribute value.
public function setFax(string $fax = null) : CNabuDataObject { $this->setValue('nb_icontact_prospect_fax', $fax); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setFax($fax = \"\");", "public function setFax($fax)\n {\n $this->fax = $fax;\n }", "public function getFax()\n {\n return $this->getValue('nb_icontact_prospect_fax');\n }", "function setFax($fax) {\n\t\treturn $this->setData('fax', $fax);\n\t}", "public function getFax() {\n return $this->sFax;\n }", "public function getFax()\n {\n return $this->fax;\n }", "public function getFax()\n {\n return $this->fax;\n }", "public function getFax()\n {\n return $this->fax;\n }", "public function setPfAttribute($value)\n {\n $this->attributes['pf'] = str_replace('CSTD/PF/', '', $value);\n }", "public function setCpfAttribute($value) {\n $this->attributes['cpf'] = str_replace('.', '', $value);\n }", "public function setFax($fax)\n {\n $this->fax = $fax;\n return $this;\n }", "public function setCustomerFax($customerFax = '000-000-0000') {\n $fax = array(\n 'x_fax'=>$this->truncateChars($this->cleanPhoneNumber($customerFax), 25),\n );\n $this->NVP = array_merge($this->NVP, $fax); \n }", "public function getCfax()\n {\n return $this->cfax;\n }", "public function setFax(array $fax)\n {\n $this->fax = $fax;\n return $this;\n }", "public function setFax($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->fax !== $v) {\n $this->fax = $v;\n $this->modifiedColumns[] = EventPeer::FAX;\n }\n\n\n return $this;\n }", "public function getReqFaxPhone()\n\t{\n\t\treturn $this->req_fax_phone;\n\t}", "public function getFax() {}", "function getFax() {\n\t\treturn $this->getData('fax');\n\t}", "public static function fax()\n {\n return new TextNode('fax');\n }", "public function setFax($value)\n {\n $this->setParameter('billingFax', $value);\n $this->setParameter('shippingFax', $value);\n\n return $this;\n }", "public function getFax();", "public function setFacsimile($facsimile) {\n\t\t$this->facsimile = $facsimile;\n\t}", "function setFareCalcLine($fareCalcLine) {\n $this->fareCalcLine = $fareCalcLine;\n }", "public function setReqFaxPhone($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->req_fax_phone !== $v) {\n\t\t\t$this->req_fax_phone = $v;\n\t\t\t$this->modifiedColumns[] = VpoRequestPeer::REQ_FAX_PHONE;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function getFax()\n {\n return $this->getParameter('billingFax');\n }", "public function setShippingFax($value)\n {\n return $this->setParameter('shippingFax', $value);\n }", "public function setForcedFaxNegotiator( Streamwide_Engine_Call_Leg_Connector_ForcedFaxNegotiator $forcedFaxNegotiator )\n {\n $this->_forcedFaxNegotiator = $forcedFaxNegotiator;\n }", "public function setFIp($f_ip)\n {\n $this->f_ip = $f_ip;\n\n return $this;\n }", "public function setPhone(string $phone = null) : CNabuDataObject\n {\n $this->setValue('nb_icontact_prospect_phone', $phone);\n \n return $this;\n }", "public function setCfax($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->cfax !== $v) {\n $this->cfax = $v;\n $this->modifiedColumns[AliMemberTableMap::COL_CFAX] = true;\n }\n\n return $this;\n }" ]
[ "0.6753463", "0.65708953", "0.6539211", "0.6243767", "0.5862337", "0.5672176", "0.5672176", "0.5672176", "0.5669236", "0.55859166", "0.5580051", "0.5576736", "0.55284476", "0.552762", "0.5526315", "0.54411286", "0.54024136", "0.5287668", "0.52626324", "0.52552444", "0.5199427", "0.5164639", "0.50952196", "0.5081881", "0.5079509", "0.5066331", "0.5019961", "0.5018365", "0.50153685", "0.49584824" ]
0.6690314
1
Get Icontact Prospect Email attribute value
public function getEmail() { return $this->getValue('nb_icontact_prospect_email'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmail()\n {\n return $this->getAttribute('email');\n }", "public function getEmail()\n {\n return $this->attributes['email'] ?? null;\n }", "function getEmail() {\n\t\treturn $this->getData('email');\n\t}", "public function getEmail() {\n return $this->getValue('email');\n }", "public function getEmail()\n {\n return $this->__get(\"email\");\n }", "public function getContactEmail()\n {\n return $this->contactEmail;\n }", "public function getEmail()\n {\n if (array_key_exists(\"email\", $this->_propDict)) {\n return $this->_propDict[\"email\"];\n } else {\n return null;\n }\n }", "public function getFieldEmail()\n\t{\n\t\treturn $this->GetDAL()->GetField(DotCoreContactMemberDAL::CONTACT_MEMBER_EMAIL);\n\t}", "public function getEmail()\r\n\t{\r\n\t\treturn $this['email'];\r\n\t}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail()\n {\n return $this->get('Email');\n }", "public function get_email() {\r\n return $this->email;\r\n }", "public function getEmail()\n {\n return $this->get(self::EMAIL);\n }", "public function get_email() \n {\n return $this->email;\n }", "public function getEmail()\n {\n \treturn $this->email;\n }", "public function getEmail(){\n\t\treturn $this->email;\n\t}", "public function getEmail(): string\n\t{\n\t\treturn $this->email->getEmail();\n\t}", "public function getEmail()\n {\n return $this->getParam(self::EMAIL);\n }", "public function getEmail(){\r\n\t\t\treturn $this->email;\r\n\t\t}", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();", "public function getEmail();" ]
[ "0.74349594", "0.73478544", "0.73189616", "0.7251899", "0.72168046", "0.7180222", "0.7149981", "0.71309507", "0.7100589", "0.7077302", "0.7077302", "0.7077302", "0.70761496", "0.70761496", "0.7074995", "0.7072077", "0.70658445", "0.7053101", "0.70490134", "0.7019294", "0.6997992", "0.69753397", "0.6967536", "0.6963951", "0.6963951", "0.6963951", "0.6963951", "0.6963951", "0.6963951", "0.6963951" ]
0.7875489
0
Get Icontact Prospect Subject attribute value
public function getSubject() { return $this->getValue('nb_icontact_prospect_subject'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSubject() {\n\t\treturn $this->getData('subject');\n\t}", "function getSubject() {\n\t\treturn $this->getData('subject');\n\t}", "public function getSubject()\n {\n if (array_key_exists(\"subject\", $this->_propDict)) {\n return $this->_propDict[\"subject\"];\n } else {\n return null;\n }\n }", "public function getSubject(): string;", "public function getSubject(): string\n {\n return $this->subject;\n }", "public function getSubjectAttribute()\n {\n if (isset($this->_subject)) {\n return $this->_subject;\n }\n\n return null;\n }", "function getSubject(){\n\t\t\treturn $this->subject;\n\t\t}", "public function getSubject() {\n\t\treturn $this->subject;\n\t}", "public function getSubject() \n\t{\n\t\treturn $this->subject;\n\t}", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n {\n return $this->subject;\n }", "public function getSubject()\n\t{\n\t\treturn $this->subject;\n\t}", "public function getSubject(): mixed\n {\n return $this->subject;\n }", "public function getSubject() : string {\n return $this->_subject;\n }", "protected function getSubject()\n {\n // NOTE: Subject header is always present,\n // so it's safe to call this without checking for header presence\n return $this->getHeader('Subject');\n }", "public function getSubject()\n {\n }" ]
[ "0.7275887", "0.7275887", "0.7008586", "0.69473565", "0.6858447", "0.68528813", "0.6816529", "0.6752531", "0.6748382", "0.6741369", "0.6741369", "0.6741369", "0.6741369", "0.6741369", "0.6741369", "0.6741369", "0.6741369", "0.6741369", "0.6741369", "0.6741369", "0.6741369", "0.6741369", "0.6741369", "0.6741369", "0.6741369", "0.67331564", "0.6732569", "0.66947323", "0.66690755", "0.6651672" ]
0.7727936
0
Sets the Icontact Prospect Subject attribute value.
public function setSubject(string $subject = null) : CNabuDataObject { $this->setValue('nb_icontact_prospect_subject', $subject); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setEmailSubject($value) { $this->_emailSubject = $value; }", "function setSubject($subject_toset,$default=\"No Subject\"){\n\t\t\tif(strlen($subject_toset)>0)\n\t\t\t{\n\t\t\t\t$this->subject=$subject_toset;\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->subject=$default;\t\n\t\t\t}\n\t\t}", "public function setSubject($subject)\r\n {\r\n $this->data['subject'] = $subject;\r\n }", "public function setSubject($subject);", "public function setSubject($subject);", "public function setSubject($subject);", "public function setSubject($subject) {\r\n\t\t$this->subject = $subject;\r\n\t}", "public function setSubject($subject) {\r\n $this->subject = $subject;\r\n }", "function setSubject( $email_subject ) {\n $this->email_subject = $email_subject;\t\n\t}", "public function setSubject($subject) {\n\t\t$this->subject = $subject;\n\t}", "function setSubject($subject) {\n\t\t$this->setData('subject', $subject);\n\t}", "function setSubject($subject)\n {\n $this->_subject = $subject;\n }", "public function setSubject($val)\n {\n $this->_propDict[\"subject\"] = $val;\n return $this;\n }", "public function setSubject($subject)\n {\n $this->_subject = $subject;\n }", "public function set_subject($subject) {\n\t\t\t$this->subject = $subject;\n\t\t}", "protected function setSubject() {}", "public function set_subject($subject);", "function setSubject($subject) {\n\t\t$this->Subject = JMailHelper::cleanLine( $subject );\n\t}", "public function setSubject($subject)\n {\n $this->mail->Subject = Helper::sanitizeInput($subject);\n }", "public function set_subject($subject) {\n $this->subject = '(no subject)';\n if (is_string($subject)) {\n $subject = trim(preg_replace('/\\R/', '', $subject)); // aims to prevent an Email Header Injection attacks\n if (!empty($subject)) {\n $this->subject = $subject;\n }\n }\n }", "public function setSubject($subject) {\n\t\t$this->mail['Subject'] = $subject;\n\t}", "public function setSubject($value)\n {\n return $this->set('Subject', $value);\n }", "public function setSubject($value)\n {\n return $this->set('Subject', $value);\n }", "public function setSubject($var)\n {\n GPBUtil::checkString($var, True);\n $this->subject = $var;\n\n return $this;\n }", "public function setSubject($var)\n {\n GPBUtil::checkString($var, True);\n $this->subject = $var;\n\n return $this;\n }", "public function set_subject($subject)\n\t{\n\t\tif (!$subject)\n\t\t{\n\t\t\t$subject = Fsb::$session->lang('no_subject');\n\t\t}\n\t\t$this->subject = $subject;\n\t}", "public function setSubject(string $subject): CuxMailer{\n $this->_subject = $subject;\n $this->_mail->Subject = $subject;\n return $this;\n }", "public function set_subject($subject = NULL)\n\t{\n\t\t$this->_subject = $subject;\n\t}", "public function setSubject($subject) {\n\t\tif(!empty($subject)){\n\t\t\t$this->subject = trim($subject);\n\t\t} elseif(!empty($_POST['subject'])) {\n\t\t\t$this->subject = trim($_POST['subject']);\n\t\t} else {\n\t\t\t$this->subject = $this->name . ': ' . $this->subject; //Use the default subject\n\t\t}\n\t}", "public function setSubject(?SslCertificateEntity $value): void {\n $this->getBackingStore()->set('subject', $value);\n }" ]
[ "0.74960524", "0.70334715", "0.6971012", "0.69651246", "0.69651246", "0.69651246", "0.68983966", "0.6864501", "0.6851617", "0.6851533", "0.68352854", "0.6830577", "0.68145144", "0.67941093", "0.6788644", "0.6759673", "0.67594266", "0.6698717", "0.66918606", "0.66844046", "0.6677565", "0.66136014", "0.66126144", "0.6592756", "0.6592756", "0.65846163", "0.6565554", "0.6539043", "0.6535404", "0.6477126" ]
0.7336246
1
Get Icontact Prospect Notes attribute value
public function getNotes() { return $this->getValue('nb_icontact_prospect_notes'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPersonNotes()\n {\n return $this->getProperty(\"PersonNotes\");\n }", "public function getContactNotes()\n\t{\n\t\treturn $this->contact_notes;\n\t}", "public function getCustomerNotes()\n {\n if (array_key_exists(\"customerNotes\", $this->_propDict)) {\n return $this->_propDict[\"customerNotes\"];\n } else {\n return null;\n }\n }", "public function getNotes()\n {\n if (array_key_exists(\"notes\", $this->_propDict)) {\n return $this->_propDict[\"notes\"];\n } else {\n return null;\n }\n }", "public function getNotes()\n {\n if (array_key_exists(\"notes\", $this->_propDict)) {\n return $this->_propDict[\"notes\"];\n } else {\n return null;\n }\n }", "public function note() { return $this->_m_note; }", "public function getCustomerNote();", "public function getPhone()\n {\n return $this->getValue('nb_icontact_prospect_phone');\n }", "public function getActorNote() {\n $result = TingOpenformatMethods::parseFields($this->_getDetails(), array('actorNote' => array('actorElement')));\n return (is_array($result)) ? reset($result) : $result;\n }", "public function getNote()\r\n {\r\n return $this->note;\r\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return $this->note;\n }", "public function getNote();", "public function getRelationshipNotes()\n {\n return $this->getFieldArray('580');\n }", "function getNote()\n {\n return $this->note;\n }", "public function getServiceNotes()\n {\n if (array_key_exists(\"serviceNotes\", $this->_propDict)) {\n return $this->_propDict[\"serviceNotes\"];\n } else {\n return null;\n }\n }", "function getNote() {\n return $this->note;\n }", "public function getContactDetailAttribute()\n {\n return $this->contact()->first();\n }", "public function getNote() {\n if (isset($_REQUEST['note'])) {\n return $_REQUEST['note'];\n } else\n return 0;\n }", "function getContact()\n\t{\n\t\treturn $this->Info['Contact'];\n\t}", "public function getCustomerNoteNotify();" ]
[ "0.65978837", "0.6453841", "0.6306151", "0.6276683", "0.6276683", "0.6203189", "0.6192879", "0.6143138", "0.60616505", "0.60538244", "0.59894454", "0.59894454", "0.59894454", "0.59894454", "0.59894454", "0.59894454", "0.59894454", "0.59894454", "0.59894454", "0.59894454", "0.59894454", "0.59683543", "0.59646386", "0.59645927", "0.59559065", "0.5941251", "0.5905158", "0.58790356", "0.58648646", "0.5860149" ]
0.7089385
0
Sets the Icontact Prospect Notes attribute value.
public function setNotes(string $notes = null) : CNabuDataObject { $this->setValue('nb_icontact_prospect_notes', $notes); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setNotes($value) {\n\t\tif ($value == NULL) {\n\t\t\t$this->_notes = \"\";\n\t\t} else {\n\t\t\t$this->_notes = $value;\n\t\t}\n\t}", "public function setPersonNotes($value)\n {\n $this->setProperty(\"PersonNotes\", $value, true);\n }", "public function setNotes($value)\n {\n $this->setItemValue('notes', (string)$value);\n }", "public function setNotes($val)\n {\n $this->_propDict[\"notes\"] = $val;\n return $this;\n }", "public function setNotes($val)\n {\n $this->_propDict[\"notes\"] = $val;\n return $this;\n }", "public function setCustomerNotes($val)\n {\n $this->_propDict[\"customerNotes\"] = $val;\n return $this;\n }", "public function setServiceNotes($val)\n {\n $this->_propDict[\"serviceNotes\"] = $val;\n return $this;\n }", "public function notes($value) {\n return $this->setProperty('notes', $value);\n }", "public function notes($value) {\n return $this->setProperty('notes', $value);\n }", "public function setContactNotes($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (string) $v;\n\t\t}\n\n\t\tif ($this->contact_notes !== $v) {\n\t\t\t$this->contact_notes = $v;\n\t\t\t$this->modifiedColumns[] = VpoRequestPeer::CONTACT_NOTES;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setNotes(?string $notes): self\n {\n $this->initialized['notes'] = true;\n $this->notes = $notes;\n\n return $this;\n }", "public function setNotes(): Documents\r\n {\r\n $notes = $this->order->get_customer_order_notes();\r\n\r\n if (!empty($notes)) {\r\n foreach ($notes as $index => $note) {\r\n $this->notes .= $note->comment_content;\r\n if ($index !== count($notes) - 1) {\r\n $this->notes .= '<br>';\r\n }\r\n }\r\n }\r\n\r\n return $this;\r\n }", "public function getNotes()\n {\n return $this->getValue('nb_icontact_prospect_notes');\n }", "public function setNote($text){\r\n $this->note = $text;\r\n }", "public function setNotes(array $notes)\n {\n $this->notes = $notes;\n return $this;\n }", "function setNotes($inNotes) {\n\t\tif ( $inNotes !== $this->_Notes ) {\n\t\t\t$this->_Notes = $inNotes;\n\t\t\t$this->setModified();\n\t\t}\n\t\treturn $this;\n\t}", "function setNoteText(){\n $html = \"\";\n \n $this->aFields[\"note\"]->editable = true;\n $this->aFields[\"note\"]->value = $html;\n }", "public function setNote($note);", "public function setCustomerNote($customerNote);", "public function setNotes($notes)\n {\n $this->notes = $notes;\n\n return $this;\n }", "public function getContactNotes()\n\t{\n\t\treturn $this->contact_notes;\n\t}", "public function setNote(?string $note): void\n {\n $this->note['value'] = $note;\n }", "public function set(Note $note, $input, $data = []);", "public function setNotes($notes = null)\n {\n $this->notes = $notes;\n\n return $this;\n }", "public function setNotes($v)\n {\n if ($v !== null) {\n $v = (string) $v;\n }\n\n if ($this->notes !== $v) {\n $this->notes = $v;\n $this->modifiedColumns[BiblioTableMap::COL_NOTES] = true;\n }\n\n return $this;\n }", "public function setCustomerNoteNotify($customerNoteNotify);", "private function setPurchaseNote() {\n $this->product->set_purchase_note($this->wcData->getPurchaseNote());\n }", "function __editNotes()\n {\n\n //profiling\n $this->data['controller_profiling'][] = __function__;\n\n //get the note\n $this->__viewNotes();\n\n //visibility\n $this->data['visible']['wi_my_note_edit'] = 1;\n $this->data['visible']['wi_my_note_view'] = 0;\n\n }", "public function setNote($note) {\n\n $this->note = $note;\n }", "public function getNotes()\n {\n if (array_key_exists(\"notes\", $this->_propDict)) {\n return $this->_propDict[\"notes\"];\n } else {\n return null;\n }\n }" ]
[ "0.7006579", "0.69422764", "0.65613234", "0.65101725", "0.65101725", "0.63634473", "0.62329876", "0.6163479", "0.6163479", "0.60237384", "0.59367025", "0.58737856", "0.57899743", "0.5754715", "0.5746256", "0.5698264", "0.5648049", "0.5626791", "0.5576725", "0.5532158", "0.5513003", "0.5504532", "0.54913217", "0.5486902", "0.5475215", "0.54369575", "0.5435893", "0.5347532", "0.53132844", "0.52269745" ]
0.7150892
0
Get Icontact Prospect Attributes attribute value
public function getAttributes() { return $this->getValueJSONDecoded('nb_icontact_prospect_attributes'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPropertyDetails(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get ( 'Apptha\\Airhotels\\Model\\Attributes' );\n }", "public function getCustomAttributesAttribute()\n {\n return $this->custom_attributes()->get();\n }", "public function getAttribute($oi, $attribute) {\n\n // we support attribute:type configurations to allow for testing a specific email address \n $values = explode(':',$attribute);\n $type=null;\n if(sizeof($values) > 1) {\n $attribute=$values[0];\n $type=$values[1];\n }\n\n $valuefound=null;\n // if the attribute is a model name, check for the related fields\n if(isset($oi[$attribute])) {\n\n // To distinguish between a non-existing attribute and a supported attribute\n // for which we do not have a value, we set $valuefound to the empty array at this point.\n $valuefound=array();\n\n // loop over all recovered models of this attribute (ie: all email addresses)\n $models = $oi[$attribute];\n if($attribute == \"PrimaryName\") {\n // PrimaryName is a hasOne association\n $models = array($models);\n }\n foreach($models as $model) {\n switch($attribute) {\n case 'TelephoneNumber':\n if($type === null || $type == $model['type']) {\n $valuefound[] = formatTelephone($model);\n }\n break;\n case 'Address':\n if(in_array($type, array('street','state','postal_code','room','locality','country'))) {\n if($model[$type] !== null) {\n $valuefound[] = $model[$type];\n }\n }\n break;\n case 'PrimaryName':\n $valuefound[] = generateCn($model);\n break;\n case 'Name':\n if( ($type !== null && $type == $model['type']) \n || ($type === null)) {\n $valuefound[] = generateCn($model);\n }\n break;\n case 'Identifier':\n if($type === null || $type == $model['type']) {\n $valuefound[] = $model['identifier'];\n }\n break;\n case 'EmailAddress':\n if($type === null || $type == $model['type']) {\n $valuefound[] = $model['mail'];\n }\n break;\n case 'Url':\n if($type === null || $type == $model['type']) {\n $valuefound[] = $model['url'];\n }\n break;\n }\n }\n }\n return $valuefound;\n }", "public function getIdentifyingAttribute();", "public static function getAttributes() \n\t{\n\t\tacPhpCas::setReporting();\n\t\treturn phpCAS::getAttributes();\t\t\n\t}", "public function getContactDetailAttribute()\n {\n return $this->contact()->first();\n }", "public function getAttributeDetails(){\n $objectManager = \\Magento\\Framework\\App\\ObjectManager::getInstance ();\n return $objectManager->get('Magento\\Eav\\Model\\Config' );\n }", "private function getConfiguredAttributes()\n {\n return $this->scopeConfig->getValue(Config::XML_PATH_FACETED_SEARCH_ATTRIBUTES, ScopeInterface::SCOPE_STORE);\n }", "public function getAttributesProperty()\n {\n return Attribute::whereAttributeType(Customer::class)->get();\n }", "public function getAttribute()\n {\n return $this->attribute;\n }", "public function getAttribute()\n {\n return $this->attribute;\n }", "public function getAttributes() {}", "public function getAttributes() {}", "public function getCustomAttributes() {}", "public function attr($attribute) {\n if (array_key_exists($attribute, $this->attributes)) {\n return $this->attributes[$attribute];\n } else {\n return 'PopShops API Error: Invalid attribute passed to ' . get_class($this) . '->attr: ' . $attribute;\n }\n }", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function getAttributes();", "public function lookForIAttribute(){\r\n $len = mb_strlen($this -> mangoTalker, \"utf-8\");\r\n if ($len == 7 ) {\r\n $this -> mangoTalker = '7812'.$this -> mangoTalker;\r\n } elseif ($len == 10) {\r\n $this -> mangoTalker = '7'.$this -> mangoTalker;\r\n }\r\n $mCall = mCall::model() -> findByAttributes(array('fromPhone' => $this -> mangoTalker));\r\n if (is_a($mCall, 'mCall')) {\r\n $this -> i = $mCall -> i;\r\n } else {\r\n unset($this -> i);\r\n }\r\n }", "function GetAttributes();", "function getAdditionalAttributes() ;", "public function getAttrib() {\n return $this->attrib;\n }", "public function getAttributes(){ }", "public function getDeviceAttributes() {}" ]
[ "0.675605", "0.6437375", "0.6309005", "0.6210956", "0.61287147", "0.6098419", "0.60817784", "0.59823847", "0.59698355", "0.5960815", "0.5960815", "0.5950652", "0.59497315", "0.59352124", "0.5906992", "0.5901893", "0.5901893", "0.5901893", "0.5901893", "0.5901893", "0.5901893", "0.5901893", "0.5901893", "0.5901893", "0.5883627", "0.58753663", "0.58433443", "0.58344054", "0.58315825", "0.579562" ]
0.7319879
0
Sets the Icontact Prospect Attributes attribute value.
public function setAttributes($attributes = null) : CNabuDataObject { $this->setValueJSONEncoded('nb_icontact_prospect_attributes', $attributes); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAttributes();", "private function setAttributeFieldValue()\n {\n // Get all our attribute objects\n $proxiedAttrs = $this->getAttributes();\n \n $data = [];\n foreach ($proxiedAttrs as $attrObjArr) {\n foreach ($attrObjArr as $attrObj) {\n $dataKey = $attrObj->getFieldName();\n $dataVal = $this->getRequest()->postVar($dataKey);\n $data[$dataKey] = $dataVal;\n }\n }\n \n $json = $this->dbObject('AttributeData')->toJson($data);\n $this->setField('AttributeData', $json);\n }", "public function __set($attri, $value) {\n if (in_array($attri, self::DYN_ATTRIBUTES)) {\n $this->{$attri} = $value;\n }\n }", "protected function initializeAttributes() {\n\t\tparent::initializeAttributes();\n\n\t\t$this->attributes['subtype'] = 'procuralog';\n\t}", "public function setAttributes($attributes);", "public function setAttributes($attributes){ }", "public function set_attributes()\n {\n $this->id = 0;\n $this->set_process();\n $this->set_decomposition();\n $this->set_technique();\n $this->set_applicability();\n $this->set_input();\n $this->set_output();\n $this->set_validation();\n $this->set_quality();\n $this->score = 0;\n $this->matchScore = 0;\n $this->misMatch = \"\";\n }", "public function setAttributes ($attributes)\n {\n\n $this->attributes = array_merge($this->attributes, $attributes);\n\n }", "public function setAttributes($item,$attributes) {\n\t\t$this->_properties[$item]['Attributes'] = ' '.$attributes;\n\t}", "public function set_attributes( $attributes = array(), $override = true ) {\n\t\n\t\tif ( true == $override ) {\n\t\t\t$this->attributes = array_merge( $this->attributes, $attributes );\n\t\t}\n\t\telse {\n\t\t\t$this->attributes = array_merge( $attributes, $this->attributes );\n\t\t}\n\t\n\t}", "public function setAttributes(array $attributes);", "public function setAttributes(array $attributes);", "public function setAttributes(array $attributes);", "public function set_attributes($attributes)\n {\n }", "public function getAttributes()\n {\n return $this->getValueJSONDecoded('nb_icontact_prospect_attributes');\n }", "protected function setAttributes($attributes) {\n $this->_formAttributes = $attributes;\n }", "public function setAttributes($attributes)\n {\n foreach($attributes as $key => $value) {\n $this->$key = $value;\n }\n }", "public function __set($atrib, $value){\n\t\t$this->$atrib = $value;\n\t}", "public function setAttributes_price_factor( $attributes_price_factor ) {\n\t\t$this->attributes_price_factor = $attributes_price_factor;\n\t}", "public function setAttributes(array $attributes)\n\t{\n\t\t$allowedAttributes = array('usuario','correo','cedula');\n\t\tforeach($attributes as $name=>$value) {\n\t\t\tif (in_array($name, $allowedAttributes))\n\t\t\t\t\t$this->$name = $value;\n\t\t}\n\t\treturn true;\n\t}", "public function __set($attribute, $value){\n\t\t$this->$attribute = $value;\n\t}", "public function __set($attribute, $value)\n {\n array_set($this->attributes, $attribute, $value);\n }", "public function setAttr($attribute, $value) {\n $this->attributes[$attribute] = $value;\n }", "public function setAttributes(array $attributes)\n {\n $this->audience_member = $attributes;\n return $this;\n }", "public function __SET($attr, $value){ //Establece valor y atributo\n\n\t\t\t$this->$attr=$value;\n\t\t}", "public function setAttribute($attribute, $value)\n {\n }", "function set_attr($attr=array()) {\n $this->other_attr = $attr;\n }", "public function setAttribute($attribute, $value)\r\n\t{\r\n\t\t\r\n\t}", "public function setAttribs($attribs) {\n\t\t$this->_attribs = $attribs;\n\t}", "protected function setAttribute($dataArray, $attribute)\n {\n if (isset($dataArray[$attribute])) {\n if (in_array($attribute, self::$validAttributes)) {\n $this->$attribute = $dataArray[$attribute];\n }\n }\n }" ]
[ "0.57392776", "0.5548167", "0.5500254", "0.54842925", "0.54174256", "0.53989697", "0.5392475", "0.535131", "0.5322989", "0.53110874", "0.53042144", "0.53042144", "0.53042144", "0.5293232", "0.52549535", "0.52476805", "0.5185937", "0.50797415", "0.50628513", "0.50402796", "0.50276774", "0.5003301", "0.49762946", "0.49497917", "0.49365988", "0.4927278", "0.49146584", "0.49002492", "0.48997438", "0.48800516" ]
0.6414142
0
Takes a collection of colleges and creates a CSV file
public static function generateCsv($colleges) { // Create CSV file $filePath = '/storage/'; $fileName = 'college_export_' . date('dmyhms') . '.csv'; $fp = fopen("./" . $filePath . $fileName, 'wb'); // Generate the CSV headers based on the colleges table $headerColumn = \Schema::getColumnListing($colleges[0]->getTable()); fputcsv($fp, $headerColumn); // Save each college's data on a new csv row foreach ($colleges as $key => $college) { fputcsv($fp, array_values($college->toArray())); } fclose($fp); // Not sure what format the response should be in. // Returning the link to the CSV file instead of the actual CSV text. return asset('storage/' . $fileName); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toCSV();", "public function createCouponsCSV1()\n {\n $mysqli = new mysqli(\"127.0.0.1\",\"coupon\",\"coupon\",\"coupon\");\n if ($mysqli->connect_errno)\n {\n echo \"Failed to connect to MySQL: (\" . $mysqli->connect_errno . \") \" . $mysqli->connect_error;\n }\n \n $query = \"SELECT 'coupon_id','coupon_name', 'coupon_description' FROM dual union all SELECT coupon_id,coupon_name, coupon_description FROM coupons\";\n $result = $mysqli->query($query);\n \n $i=$result->num_rows;\n //print_r ($result);\n for ($j=0; $j<$i; $j++)\n {\n $vec[$j]= $result->fetch_row();\n }\n \n $file_handle = fopen('coupons_data.csv','w+');\n \n foreach($vec as $row)\n {\n fputcsv($file_handle,$row);\n }\n \n fclose($file_handle);\n \n echo('The data.csv file was created');\n \n $mysqli->close();\n }", "public function generateCsv()\n\t{\n\t\t$doc = new CsvDocument(array(\"Member Name\",\"Email Address\",\"Alternate Email\"));\n\t\tforeach($this->emailList as $record)\n\t\t{\n\t\t\t$doc->addRow(array(\n\t\t\t\t$record->name,\n\t\t\t\t$record->emailAddress, \n\t\t\t\t$record->alternateEmail\n\t\t\t));\n\t\t}\n\n\t\t$filename = \"svenskaklubben_maillist_\" . date(\"d-m-Y_G-i\");\n\t\theader(\"Content-type: application/csv\");\n\t\theader(\"Content-Disposition: attachment; filename={$filename}.csv\");\n\t\theader(\"Pragma: no-cache\");\n\t\theader(\"Expires: 0\");\n\n\t\techo $doc->getDocument();\n\t\texit; //premature exit so the templates aren't appended to the document\n\t}", "function create_csv($info, $headers, $filename) {\n $new_file = fopen($_SERVER['DOCUMENT_ROOT'] . \"/php-tutors/csvs_for_download/\" . $filename, \"w\");\n\n foreach ($headers as $column) {\n fwrite($new_file, $column);\n fwrite($new_file, \",\");\n }\n fwrite($new_file, \"\\n\");\n\n foreach ($info as $one_row) {\n foreach ($one_row as $one_cell) {\n fwrite($new_file, $one_cell);\n fwrite($new_file, \",\");\n }\n fwrite($new_file, \"\\n\");\n }\n fclose($new_file);\n }", "function write_csv($arrays)\n {\n $handle = fopen($this->filename, \"w\");\n foreach ($arrays as $array) {\n fputcsv($handle, $array);\n }\n fclose($handle);\n }", "function writeToCsv($friends) {\n\t\t$csv = array();\n\t\tforeach ($friends as $friend) {\n\t\t\t$csv[] = implode(',', array_values($friend));\n\t\t}\n\t\tfile_put_contents(CSV, implode(PHP_EOL, $csv));\n\t}", "public function writeCsvMarcas(){\n $output = fopen('manufacturers_import.csv', 'w');\n $contadorMarca = 1;\n $vectorMarcas = array();\n $vectorMarcasLabel = $this->getVectorLabelMarcas();\n array_push($vectorMarcas,$vectorMarcasLabel);\n foreach ($this->vectorImagenesPrincipalesMarcas as $key => $value){\n $vector = $this->writeCsvFieldsMarcas($contadorMarca,$key,$value);\n array_push($vectorMarcas,$vector);\n $contadorMarca++;\n }\n foreach ($vectorMarcas as $campo) {\n fputcsv($output, $campo,';');\n }\n fclose($output);\n }", "function csv() {\n header('Content-Type: text/csv; charset=utf-8');\n header('Content-Disposition: attachment; filename=fflives.csv');\n\n // create a file pointer connected to the output stream\n $output = fopen('php://output', 'w');\n\n // output the column headings\n fputcsv($output, array('im_name', 'im_url'));\n\n // fetch the data\n foreach ($this->data as $id) {\n $im_name = \"$id.png\";\n $im_url = SITE_ROOT . \"themes/fflives/images/data/$id.png\";\n fputcsv($output, array($im_name, $im_url));\n }\n }", "public function exportToCSVContacts() {\n\t\t$contactDB = new contactDB();\n\t\t$emailsArray = $contactDB->getEmails($this->request->getVariable('id'),0,100000,1,0,$contactDB->contactColumns,PDO::FETCH_ASSOC);\n\t\t$contactGroupsDB = new contactgroupsDB();\n\t\t$contactGroup = $contactGroupsDB->fetchRow(\"id={$this->request->getVariable('id')}\");\n\t\t\n\t\tarray_unshift($emailsArray, $contactDB->contactColumns);\n\n\t\tcsv::getCsvFile(generate::cleanFileName($contactGroup->name.'_'.generate::sqlDatetime()), $emailsArray);\n\t}", "private function write_csv($array) //public function write_address_book($addresses_array) //code to write $addresses_array to file $this->filenam\n {\n if(is_writeable($this->filename)){\n $handle = fopen($this->filename, 'w');\n foreach($addresses_array as $subArray){\n fputcsv($handle, $subArray); \n }\n }\n fclose($handle);\n }", "function write_csv($array)\n {\n $handle = fopen($this->filename, \"w\");\n foreach ($address_array as $fields) \n {\n if ($fields != \"\") \n {\n fputcsv($handle, $fields);\n }\n }\n fclose($handle);\n }", "function getCSV($rows){\n\tif(empty($rows)){\n\t return \"No records for this category\";\n\t}\n\t//if records returned from DB\n\t$uniqueIds = array_keys($rows[0]);\n\t$header=implode(\",\", $uniqueIds); \t\n\t$fileContent = $header. \"\\r\\n\";\n\tforeach($rows as $row){\n\t\t$fileContent .= implode(\",\", $row) . \"\\r\\n\";\n\t}\n\treturn $fileContent;\n}", "function ExportCSVFile($records) {\n $fh = fopen( 'php://output', 'w' );\n $heading = false;\n if(!empty($records))\n\t\t\tob_end_clean();\n foreach($records as $row) {\n if(!$heading) {\n // output the column headings\n fputcsv($fh, array_keys($row));\n $heading = true;\n }\n // loop over the rows, outputting them\n fputcsv($fh, array_values($row));\n \n }\n fclose($fh);\n}", "private function prepareCSVFile(EloquentCollection $simulations): string\n {\n $outputFile = $this->directory . self::CSV_DATA_FILE;\n $data = $simulations->keyBy('id')\n ->map(fn($s) => $this->prepareSimulationData($s))\n ->prepend($this->prepareSimulationData($this->simulation), $this->simulation->id);\n $commonKeys = $this->getCommonKeys($data);\n $data = $data->map(fn($d) => $d->filter(fn($v, $k) => isset($commonKeys[$k])));\n $keys = $data->first()->keys()->toArray();\n $data = $data->map(fn($d, $k) => $d->values()->prepend($k)->toArray());\n $csv = Writer::createFromPath($outputFile, 'w+')\n ->setDelimiter(\"\\t\");\n $csv->insertOne($keys);\n $csv->insertAll($data);\n return $outputFile;\n }", "function CSVExport ($sql_csv)\n {\n header(\"Content-type:text/octect-stream\");\n header(\"Content-Disposition:attachment;filename=data.csv\");\n while ($row = mysql_fetch_row($sql_csv))\n {\n print '\"' . stripslashes(implode('\",\"', $row)) . \"\\\"\\n\";\n }\n exit();\n }", "private function write_csv($array)\n {\n $handle = fopen($this->filename, 'w');\n foreach ($array as $fields){\n fputcsv($handle,$fields);\n }\n fclose($handle);\n }", "function places_email_listing_csv() {\n\n $query = db_select('meeting_places_emails', 'm');\n $query->fields('m', array('name', 'date'));\n\n $results = $query->execute()->fetchAll();\n\n $rows = array();\n $rows[] = array(\n 'name' => 'name',\n 'date' => 'date'\n );\n\n foreach ($results as $row) {\n $rows[] = array(\n 'name' => $row->name,\n 'date' => format_date($row->date, 'custom', 'Y-m-d'),\n );\n }\n\n array_to_CSV($rows);\n\n header(\"Content-type: application/octet-stream\");\n header(\"Content-Disposition: attachment; filename=meeting_place_email.xls\");\n header(\"Pragma: no-cache\");\n header(\"Expires: 0\");\n return;\n}", "public function createCsv($csv,$round)\n {\n try {\n $today = date(\"d-m-Y\");\n\n $writer = Writer::createFromFileObject(new SplTempFileObject());\n $writer->setDelimiter(\";\");\n $writer->insertOne(['',\"Participation updated on :$today\",\n ]);\n $writer->insertOne([\n 'ICAR Code', 'Laboratorio', 'Delivery Address',\n 'City', 'Country', 'Contact person','Email',\n 'Fat_ref','Protein_ref','Lactose_ref', 'Urea_ref', 'Scc_ref',\n 'Fat_rout','Protein_rout', 'Lactose_rout', 'Urea_rout',\n 'BHB','PAG', 'DNA'\n ]);\n\n\n foreach ($csv as $e) {\n $records = [\n [\n \"*\".$e->icar_code,\n $e->lab_name,\n $e->invoice_address,\n $e->invoice_city,\n $e->invoice_country,\n $e->contatto_amministrativo,\n $e->email,\n (isset($e->fat_ref))?1:0 ,\n (isset($e->protein_ref))?1:0 ,\n (isset($e->lactose_ref))?1:0 ,\n (isset($e->urea_ref))?1:0 ,\n (isset($e->scc_ref))?1:0 ,\n (isset($e->fat_rout))?1:0 ,\n (isset($e->protein_rout))?1:0 ,\n (isset($e->lactose_rout))?1:0 ,\n (isset($e->urea_rout))?1:0 ,\n (isset($e->bhb))?1:0 ,\n (isset($e->pag))?1:0 ,\n (isset($e->dna))?1:0 ,\n ],\n ];\n $writer->insertAll($records);\n }\n\n header('Content-Description: File Transfer');\n header('Content-Type: application/octet-stream');\n header('Content-Disposition: attachment; filename=file.csv');\n header('Content-Transfer-Encoding: binary');\n header('Expires: 0');\n header('Cache-Control: must-revalidate, post-check=0, pre-check=0');\n header('Pragma: public');\n echo \"\\xEF\\xBB\\xBF\"; // UTF-8 BOM\n\n $writer->output('round-'.$round.'.csv');exit;\n // Storage::disk('csv')->put('round0917.csv', $writer);\n\n } catch (Exception $e) {\n $message = [\n 'flashType' => 'danger',\n 'flashMessage' => 'Errore! CSV'\n ];\n }\n }", "public function export(iterable $collection)\n {\n $resources = $this->normalizeData($collection);\n $flatted_resources = $this->flattenData($resources);\n $columns = $this->getColumnsName($flatted_resources);\n\n $fh = fopen('php://output', 'w');\n\n ob_start();\n\n /**\n * CSV columns name.\n */\n if (is_array($columns)) {\n fputcsv($fh, $columns);\n }\n\n /**\n * CSV values.\n */\n foreach ($flatted_resources as $row) {\n fputcsv($fh, (array) $this->getColumnsValue($row));\n }\n\n return ob_get_clean();\n }", "function erp_make_csv_file( $items, $file_name, $field_data = true ) {\n $file_name = ( ! empty( $file_name ) ) ? $file_name : 'csv_' . date( 'd_m_Y' ) . '.csv';\n\n if ( empty( $items ) ) {\n return;\n }\n\n $columns = array_keys( $items[0] );\n\n header( 'Content-Type: text/csv; charset=utf-8' );\n header( 'Content-Disposition: attachment; filename=' . $file_name );\n\n $output = fopen( 'php://output', 'w' );\n\n $columns = array_map( function ( $column ) {\n $column = ucwords( str_replace( '_', ' ', $column ) );\n\n return $column;\n }, $columns );\n\n fputcsv( $output, $columns );\n\n if ( $field_data ) {\n foreach ( $items as $item ) {\n $csv_row = array_map( function ( $item_val ) {\n\n if ( is_array( $item_val ) ) {\n return implode( ', ', $item_val );\n }\n\n return $item_val;\n\n }, $item );\n\n fputcsv( $output, $csv_row );\n }\n }\n\n exit();\n}", "abstract public function convert_to_csv();", "private function write_csv($array)\n {\n if (is_writable($this->filename)) \n {\n $handle = fopen($this->filename, \"w\");\n foreach($array as $entries) \n {\n fputcsv($handle, $entries);\n }\n fclose($handle);\n }\n }", "private static function downloadCsv() {\r\n header('Content-Type: text/csv; charset=utf-8');\r\n header('Content-Disposition: attachment; filename=data.csv');\r\n\r\n // create a file pointer connected to the output stream\r\n $output = fopen('php://output', 'w');\r\n\r\n // output the column headings\r\n fputcsv($output, array('Column 1', 'Column 2', 'Column 3'));\r\n\r\n // fetch the data\r\n $rows = self::getSignatures();\r\n // loop over the rows, outputting them\r\n while ($row = mysqli_fetch_assoc($rows)) fputcsv($output, $row);\r\n }", "public function csv_export() {\n\t$export = \"\";\n\t$order_id = null;\n\t$order_ids = array();\n\t$headers = array();\n\t$products = array();\n\t$summaries = array();\n\tforeach ($this->records as $record) {\n\t $order_id = $record[\"order_id\"];\n\t $order_ids[] = $order_id;\n\t if(!isset($headers[$order_id])) {\n\t\t$headers[$order_id] = $this->build_order_header($record);\n\t }\n\t $products[$order_id] = (isset($products[$order_id]) ? $products[$order_id] : '').$this->build_order_product_line($record);\n\t if(!isset($summaries[$order_id])) {\n\t\t$summaries[$order_id] = $this->build_order_summary($record);\n\t }\n\t}\n\t$order_ids = array_unique($order_ids);\n\tforeach($order_ids as $oid) {\n\t $export .= $headers[$oid].$products[$oid].$summaries[$oid];\n\t}\n\n\treturn $export;\n }", "public function generate_csv() {\n $csv_output = '';\n $table = 'wp_dux_car_data';\n\n $result = mysql_query(\"SHOW COLUMNS FROM \" . $table . \"\");\n\n $i = 0;\n if (mysql_num_rows($result) > 0) {\n while ($row = mysql_fetch_assoc($result)) {\n $csv_output = $csv_output . $row['products'] . \",\";\n $i++;\n }\n }\n $csv_output .= \"\\n\";\n\n $values = mysql_query(\"SELECT * FROM \" . $table . \"\");\n while ($rowr = mysql_fetch_row($values)) {\n for ($j = 0; $j < $i; $j++) {\n $csv_output .= $rowr[$j] . \",\";\n }\n $csv_output .= \"\\n\";\n }\n\n return $csv_output;\n }", "public function exportToCSV($items, $column_names, $file_subname, $from, $to) {\n\n\n $items = $items->toArray();\n\n //ob_start();\n\n $output = fopen('php://output', 'w');\n fputcsv($output, $column_names);\n \n foreach($items['data'] as $item) {\n \n $order = Order::where('invoice_number', $item['invoice_number'])->first();\n $item['store_id'] = sizeof($order->OrderItems);\n fputcsv($output, $item);\n\n }\n \n\n if(!$from) {\n $from = 'no-from-date';\n }\n if(!$to) {\n $to = 'no-to-date';\n }\n\n $filename = $from . '_' . $to . $file_subname;\n\n header('Content-Type: application/csv');\n header('Content-Disposition: attachment; filename=\"' . $filename . '.csv\"');\n\n fclose($output);\n\n //ob_end_clean();\n\n // don't print html\n exit();\n \n }", "public function createCSV()\n {\n $fh = fopen($this->csvFile, 'w');\n if ($fh === false) {\n throw new RuntimeException(\"Failed to create CSV file [$this->csvFile]\");\n }\n\n self::writeCSV($fh, self::CSV_HEADERS);\n foreach ($this->bmids as $bmid) {\n self::writeCSV($fh, self::buildExportRow($bmid));\n }\n\n fclose($fh);\n }", "public function exportCsv(){\n $user = $this->_ap_right_check();\n if(!$user){\n return;\n }\n $query = $this->{$this->main_model}->find(); \n $this->CommonQuery->build_common_query($query,$user,['Users','RealmNotes' => ['Notes']]);\n \n $q_r = $query->all();\n\n //Headings\n $heading_line = array();\n if(isset($this->request->query['columns'])){\n $columns = json_decode($this->request->query['columns']);\n foreach($columns as $c){\n array_push($heading_line,$c->name);\n }\n }\n $data = [\n $heading_line\n ];\n foreach($q_r as $i){\n\n $columns = array();\n $csv_line = array();\n if(isset($this->request->query['columns'])){\n $columns = json_decode($this->request->query['columns']);\n foreach($columns as $c){\n $column_name = $c->name;\n if($column_name == 'notes'){\n $notes = '';\n foreach($i->realm_notes as $un){\n if(!$this->Aa->test_for_private_parent($un->note,$user)){\n $notes = $notes.'['.$un->note->note.']'; \n }\n }\n array_push($csv_line,$notes);\n }elseif($column_name =='owner'){\n $owner_id = $i->user_id;\n $owner_tree = $this->Users->find_parents($owner_id);\n array_push($csv_line,$owner_tree); \n }else{\n array_push($csv_line,$i->{$column_name}); \n }\n }\n array_push($data,$csv_line);\n }\n }\n \n $_serialize = 'data';\n $this->setResponse($this->getResponse()->withDownload('export.csv'));\n $this->viewBuilder()->setClassName('CsvView.Csv');\n $this->set(compact('data', '_serialize')); \n \n }", "public function generateCsvForMemberProfiles($memberProfiles) {\n\t\t// get max number of databseRows per table (e.g. max number of mails, a member has)\n\t\t$this->getMaxNumberOfDatabaseRowsForMemberProfiles($memberProfiles);\n\t\t// generate header of csv file\n\t\t$this->generateCsvHeader(array('contact', 'phone', 'mail', 'address', 'study', 'member'));\n\t\t// generate body of csv file\n\t\tforeach($memberProfiles as $memberProfile) {\n\t\t\t$this->generateCsvForMemberProfile($memberProfile);\n\t\t}\n\t\t// return array with the data for a csv file, sperated in header and body\n\t\treturn $this->csv;\n\t}", "public function exportContents(array $logsCollection){\n $tempFile = tempnam(sys_get_temp_dir(), \"temp\");\n $fileRes = fopen($tempFile, \"w+\");\n fputcsv($fileRes, array(\"Mobile Number\"));\n foreach ($logsCollection as $currentBarryObj) {\n /* @var $currentBarryObj BarryOptLog*/\n fputcsv($fileRes, array($currentBarryObj->getMobileNumber()));\n }\n fclose($fileRes);\n return $tempFile;\n }" ]
[ "0.68323886", "0.6764953", "0.67043644", "0.6694519", "0.6534532", "0.64921993", "0.6475396", "0.6422142", "0.63558185", "0.6289904", "0.6223798", "0.62097156", "0.6178343", "0.6164352", "0.6145699", "0.6141522", "0.6141127", "0.61394805", "0.6126043", "0.61220694", "0.61199194", "0.61150336", "0.6064809", "0.6045182", "0.6030828", "0.6015391", "0.59913325", "0.5987584", "0.59852546", "0.59831536" ]
0.74103165
0
Challenge 8 Have the function CheckNums(num1,num2) take both parameters being passed and return the string true if num2 is greater than num1, otherwise return the string false. If the parameter values are equal to each other then return the string 1.
function CheckNums($num1,$num2) { if($num2 > $num1) { return 'true'; } elseif($num2 < $num1) { return 'false'; } else { return -1; } // code goes here return $num1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function TestNumber($firstNumber, $secondNumber)\n {\n //Déclaration des messages\n $Number1Win = \"Le premier nombre est plus grand\";\n $Number1Lose = \"Le premier nombre est plus petit\";\n $Number1Equal = \"Les deux nombres sont identiques\";\n\n //Test\n if($firstNumber > $secondNumber){\n return $Number1Win;\n }\n elseif($firstNumber < $secondNumber){\n return $Number1Lose;\n }\n else{\n return $Number1Equal;\n }\n\n }", "function comparison($x, $y)\n{\n\tif ($x > $y) {\n\t\techo 'The first number is larger';\n\t} elseif ($x < $y) {\n\t\techo 'Second number is larger';\n\t} elseif ($x = $y) {\n\t\techo 'The two numbers are identical';\n\t}\n}", "function numbers($x , $y ){\n \n if($x > $y){\n echo 'X is larger than Y';\n }\n else if($x < $y){\n echo 'X is smaller than Y';\n }\n else {\n echo 'X is equal than Y';\n }\n}", "function checkNumber($guess, $mysteryNumber)\n{\n if ($guess == $mysteryNumber) {\n return 'correct';\n } elseif ($guess > $mysteryNumber) {\n return 'high';\n } else {\n return 'low';\n }\n}", "function test_if($a,$b){\n\t//code in the dark \n\tif($a>=$b){\n\t\t//echo $a.\" a is bigger than b \".$b;\n\t\techo \"$a a is bigger than b $b\";\n\t}else{\n\t\techo \"b=$b is bigger than a=$a\"; \n\t}\n}", "function compare_scores($score1, $score2){\r\n return bccomp($score1['finger_counter_count'], $score2['finger_counter_count']);\r\n return ($score1 > $score2) ? -1 : 1;\r\n }", "function compareTimes($t1, $t2) {\n\t\t$h1 = (int) substr($t1, 0, 2);\n\t\t$m1 = (int) substr($t1, 3, 2);\n\t\t$h2 = (int) substr($t2, 0, 2);\n\t\t$m2 = (int) substr($t2, 3, 2);\n\n\t\t//echo \"h:\" . $h1 . \" m - \" . $m1 . \"\\n\" ;\n\t\t//echo \"h:\" . $h2 . \" m - \" . $m2 . \"\\n\" ;\n\n\t\t$res;\n\n\t\tif( $h1 > $h2 )\n\t\t\t$res = 1;\n\t\telse if( $h1 == $h2 && $m1 > $m2 )\n\t\t\t$res = 1;\n\t\telse\n\t\t\t$res = 0;\n\n\t\treturn $res;\n\n\t}", "function test($num,$num2){\n\t\n\t\techo $num.\"<br/>\";\n\t\techo $num2;\n\t}", "function version_comparison($check_ver, $base_ver)\n{\n $ret = 0;\n\n // determine the parts of the version to compare to\n $base_tmp = split('\\.', $base_ver);\n $base = array();\n $base['major'] = $base_tmp[0] != '' ? $base_tmp[0]:0;\n $base['minor'] = $base_tmp[1] != '' ? $base_tmp[1]:0;\n $base['patch'] = $base_tmp[2] != '' ? $base_tmp[2]:0;\n $base['build'] = $base_tmp[3] != '' ? $base_tmp[3]:0;\n\n // determine the parts of the version to check\n $check_tmp = split('\\.', $check_ver);\n $check = array();\n $check['major'] = $check_tmp[0] != '' ? $check_tmp[0]:0;\n $check['minor'] = $check_tmp[1] != '' ? $check_tmp[1]:0;\n $check['patch'] = $check_tmp[2] != '' ? $check_tmp[2]:0;\n $check['build'] = $check_tmp[3] != '' ? $check_tmp[3]:0;\n\n // loop through each part of the version number\n foreach ($base as $key => $val)\n {\n if ($check[$key] != $val)\n {\n // determine higher or lower and set return var\n if ($check[$key] > $val)\n {\n\n $ret = 1;\n }\n else\n {\n $ret = -1;\n }\n\n // and break out of loop\n break;\n }\n }\n\n // return the verdict\n return $ret;\n}", "function calculate_sameness($val1, $val2) {\n if ($val1 == 0 || $val2 == 0) return 0; //if either are unsure this is not a match\n else if ($val1 == $val2) return 1; //if both are sure and the same it is a match\n else return -10; //if both are sure and different it is not a match\n}", "function trouverPetit ($nombre1, $nombre2)\r\n{\r\n if ($nombre1 < $nombre2) {\r\n return $nombre1;\r\n }\r\n else {\r\n return $nombre2;\r\n }\r\n}", "function statuscomp($s1,$s2){\n $arr1 = explode(\" \",$s1);\n $arr2 = explode(\" \",$s2);\n $ret = 0;\n $ind = 0;\n while ($ind<22){\n if(is_null($arr1[$ind])){\n $arr1[$ind] = -1;\n }\n $ind++;\n }\n $ind = 0;\n while ($ind<22){\n if(is_null($arr2[$ind])){\n $arr2[$ind] = -1;\n }\n $ind++;\n }\n $ind = 0;\n while ($ind<22){\n if($arr1[$ind]<$arr2[$ind]){\n $ret--;\n }else if($arr1[$ind]>$arr2[$ind]){\n $ret++;\n }\n $ind++;\n }\n return $ret;\n}", "private function compareTeams($t1, $t2)\n {\n // Zwangsabstieg prüfen\n if ($t1['last_place']) {\n return 1;\n }\n if ($t2['last_place']) {\n return -1;\n }\n\n if ($t1['points'] == $t2['points']) {\n // Im 2-Punkte-Modus sind die Minuspunkte ausschlaggebend\n // da sie im 3-PM immer identisch sein sollten, können wir immer testen\n if ($t1['points2'] == $t2['points2']) {\n // Jetzt die Tordifferenz prüfen\n $t1diff = $t1['goals1'] - $t1['goals2'];\n $t2diff = $t2['goals1'] - $t2['goals2'];\n if ($t1diff == $t2diff) {\n // Jetzt zählen die mehr geschossenen Tore\n if ($t1['goals1'] == $t2['goals1']) {\n // #49: Und jetzt noch die Anzahl Spiele werten\n if ($t1['matchCount'] == $t2['matchCount']) {\n return 0; // Punkt und Torgleich\n }\n\n return $t1['matchCount'] > $t2['matchCount'];\n }\n\n return $t1['goals1'] > $t2['goals1'] ? -1 : 1;\n }\n\n return $t1diff > $t2diff ? -1 : 1;\n }\n // Bei den Minuspunkten ist weniger mehr\n return $t1['points2'] < $t2['points2'] ? -1 : 1;\n }\n\n return $t1['points'] > $t2['points'] ? -1 : 1;\n }", "function cmpTwoBits($aHigh, $aLow, $bHigh, $bLow) {\n if($aHigh < $bHigh) {\n return 1;\n } else if($aHigh > $bHigh) {\n return -1;\n } else {\n return (($aLow < $bLow)? 1: (($aLow > $bLow)? -1: 0));\n }\n}", "public static function buildsMaturityCmp($maturity1, $maturity2) {\r\n if($maturity1 == $maturity2) {\r\n return 0;\r\n }\r\n if($maturity1 == self::PA) return -1;\r\n if($maturity2 == self::B) return 1;\r\n if($maturity1 == self::B && $maturity2 == self::A) return 1;\r\n if($maturity1 == self::A && $maturity2 == self::PA) return 1;\r\n }", "function GetScore ($score1 = 0,$score2 = 0){\n\tif ($score1 < 10){$team1_score = \"0\".$score1;} else {$team1_score = $score1;}\n\tif ($score2 < 10){$team2_score = \"0\".$score2;} else {$team2_score = $score2;}\n\tif ($score1 > $score2){\n\t\t$team1_score = \"<span class=\\\"green\\\">\".$team1_score.\"</span>\";\n\t\t$team2_score = \"<span class=\\\"green\\\">\".$team2_score.\"</span>\";\n\t} elseif ($score1 < $score2){\n\t\t$team1_score = \"<span class=\\\"red\\\">\".$team1_score.\"</span>\";\n\t\t$team2_score = \"<span class=\\\"red\\\">\".$team2_score.\"</span>\";\n\t} else {\n\t\t$team1_score = \"<span class=\\\"dblue\\\">\".$team1_score.\"</span>\";\n\t\t$team2_score = \"<span class=\\\"dblue\\\">\".$team2_score.\"</span>\";\n\t}\n\treturn $team1_score.\":\".$team2_score;\n}", "function cmp($a, $b) {\n $cmp_pattern = \"/_nr_([0-9]*)_([0-9]{4})/\";\n if ((preg_match($cmp_pattern, $a[1], $a_) == 0) || (preg_match($cmp_pattern, $b[1], $b_) == 0)) {\n strcmp($a[1],$b[1]);\n }\n $a = $a_[2].$a_[1];\n $b = $b_[2].$b_[1];\n\n return intval($a) > intval($b);\n}", "function findVal($num, $multiple1, $multiple2, $valTrue) {\n\tif ( ((int)$num % $multiple1 == 0) && ((int)$num % $multiple2 == 0) && is_numeric($num) )\n\t{\n\t\treturn $valTrue;\n\t} \n\treturn $num;\n}", "public function compareVersionNumbers($ver1, $ver2) {\n\t\t$ver1Array = explode('.', $ver1);\n\t\t$ver2Array = explode('.', $ver2);\n\n\t\tfor ($i = 0; $i < count($ver1Array) && $i < count($ver2Array); $i++) {\n\t\t\tif ($ver1Array[$i] > $ver2Array[$i]) {\n\t\t\t\treturn 1;\n\t\t\t} else if ($ver1Array[$i] < $ver2Array[$i]) {\n\t\t\t\treturn -1;\n\t\t\t}\n\t\t}\n\n\t\tif (count($ver1Array) > count($ver2Array)) {\n\t\t\treturn 1;\n\t\t} else if (count($ver1Array) < count($ver2Array)) {\n\t\t\treturn -1;\n\t\t} else {\n\t\t\treturn 0;\n\t\t}\n\t}", "public function winner($resultOne, $resultTwo){\n if($resultOne > $resultTwo){\n echo 'You are Winner';\n }else{\n echo 'You are Loser';\n }\n }", "public function comparerReponses($rep1, $rep2) {\r\n $somme = 0;\r\n for($i = 1; $i <= 5; $i++) {\r\n if(getBit($rep1, $i) == getBit($rep2, $i)) {\r\n $somme++;\r\n }\r\n }\r\n return $somme;\r\n }", "function check($a, $b) {\n if (is_numeric($a) && is_numeric($b)) {\n return true;\n } else {\n return \"please enter numbers only.\";\n }\n}", "public function checkForWinner($playerOne, $playerTwo){\n if(($playerOne == 1 && $playerTwo == 2) || ($playerOne == 2 && $playerTwo == 3 || ($playerOne == 3 && $playerTwo == 1))){\n $this->printResult($playerOne, $playerTwo, 1);\n return 1;\n }elseif(($playerOne == 1 && $playerTwo == 1) || ($playerOne == 2 && $playerTwo == 2) || ($playerOne == 3 && $playerTwo == 3)){\n $this->printResult($playerOne, $playerTwo, 2);\n return 2;\n }else{\n $this->printResult($playerOne, $playerTwo, 3);\n return 3;\n }\n}", "function getresult($number1, $number2, $operator)\r\n {\r\n $this->number1 = $number1;\r\n $this->number2 = $number2;\r\n return $this->checkopration($operator);\r\n }", "private function _isBelow($numLow, $numHigh){\n\t\tif($numLow > $numHigh){\n\t\t\t//throws error\n\t\t\treturn 0;\n\t\t}\n\n\t\treturn 1;\n\t}", "function is_lucky($ticket) {\n $t = add_zeroes($ticket);\n $first = (int)$t[0] + (int)$t[1] + (int)$t[2]; //first and...\n $second = (int)$t[3] + (int)$t[4] + (int)$t[5]; //last three digits..\n return $first == $second; //compared\n}", "public function ifNum($num);", "function isPowerOfTwo($num2)\n {\n if ($num2 === 0) {\n $return = 0;\n }\n while ($num2 != 1) {\n if ($num2 % 2 != 0)\n $return = 0;\n $num2 = $num2 / 2;\n }\n $return = 1;\n }", "function compare_coal_power($coal1,$coal2){\n\t// must return an integer\n\t$val = $coal1['power']-$coal2['power'];\n\n\tif($val>0){\n\t\treturn -1;\n\t} elseif ($val<0) {\n\t\treturn 1;\n\t} else {\n\t\treturn 0;\n\t}\n}", "public function compare_passwords($pass1, $pass2)\r\n\t{\r\n\t\t//We use 3 equal signs, which means that both the value but also the \r\n\t\t//type is identical\r\n\t\tif ($pass1 === $pass2)\r\n\t\t{\r\n\t\t\treturn TRUE;\r\n\t\t}\r\n\t\treturn \"Passwords does not match\";\r\n\t}" ]
[ "0.6908326", "0.6549269", "0.65107787", "0.6441534", "0.59615386", "0.5959791", "0.5829316", "0.57443213", "0.5659106", "0.56190425", "0.5612067", "0.5599079", "0.55457765", "0.54828465", "0.54691887", "0.54436946", "0.54396963", "0.5437774", "0.54057", "0.5393613", "0.53901684", "0.537822", "0.537603", "0.5366189", "0.5359202", "0.5319633", "0.5309508", "0.5308191", "0.5301547", "0.52405155" ]
0.82784486
0
Get Codec instance or NULL.
public function getCodec();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getVideoCodec()\n {\n if (array_key_exists(\"videoCodec\", $this->_propDict)) {\n if (is_a($this->_propDict[\"videoCodec\"], \"\\Microsoft\\Graph\\CallRecords\\Model\\VideoCodec\") || is_null($this->_propDict[\"videoCodec\"])) {\n return $this->_propDict[\"videoCodec\"];\n } else {\n $this->_propDict[\"videoCodec\"] = new VideoCodec($this->_propDict[\"videoCodec\"]);\n return $this->_propDict[\"videoCodec\"];\n }\n }\n return null;\n }", "public function getVideoCodec() {}", "public function getAudioCodec()\n {\n if (array_key_exists(\"audioCodec\", $this->_propDict)) {\n if (is_a($this->_propDict[\"audioCodec\"], \"\\Microsoft\\Graph\\CallRecords\\Model\\AudioCodec\") || is_null($this->_propDict[\"audioCodec\"])) {\n return $this->_propDict[\"audioCodec\"];\n } else {\n $this->_propDict[\"audioCodec\"] = new AudioCodec($this->_propDict[\"audioCodec\"]);\n return $this->_propDict[\"audioCodec\"];\n }\n }\n return null;\n }", "public static function get ($instance=false) {\n\t\t$cname = self::_resolve_class_name($instance);\n\t\tif (!empty(self::$_codecs[$cname])) return self::$_codecs[$cname];\n\t\t\n\t\t$obj = new $cname;\n\t\tself::$_codecs[$cname] = $obj;\n\t\treturn $obj;\n\t}", "public function getEncoder()\n {\n if ($encoder = $this->getCodecMatcher()->getEncoder()) {\n return $encoder;\n }\n\n $this->getCodecMatcher()->setEncoder($encoder = $this->encoder());\n\n return $encoder;\n }", "public function getAudioCodec() {}", "public function getVideoCodec()\n\t{\n\t\treturn $this->videoCodec;\n\t}", "public function uniDecoder()\n {\n if ($this->uniDecoder === null) {\n if (self::$defaultUniDecoder === null) {\n self::$defaultUniDecoder = new UniDecoder();\n }\n\n $this->uniDecoder = self::$defaultUniDecoder;\n }\n\n return $this->uniDecoder;\n }", "public function getVideoCodecType()\n {\n return $this->videoCodecType;\n }", "public function get_codec($id = null)\n {\n try {\n $codec = Codecs::findOrFail($id);\n $title = 'Change Codec';\n $new = false;\n } catch (ModelNotFoundException $e) {\n $codec = new Codecs();\n $title = 'New Codec';\n $new = true;\n }\n\n return View::make('backend.codecs.codec', ['url' => $this->url, 'codec' => $codec, 'title' => $title, 'new' => $new]);\n }", "public static function static_getDecoder($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function getCharset(): ?TagInterface;", "public static function init() {\n static $instance = false;\n\n if ( ! $instance ) {\n $instance = new WPUF_QR_Code();\n }\n\n return $instance;\n }", "public function copy(): static\n {\n $this->isCustomCodec = false;\n\n return $this;\n }", "public function setCodec(Codec $codec);", "public function getEncoder();", "public function getEncoder();", "protected function getEncoder()\n\t{\n\t\treturn $this->encoder;\n\t}", "public static function getInstance(): CharacterEncodingInterface;", "public function getTranscoder()\n {\n return $this->transcoder;\n }", "public function getEncoder()\n {\n return $this->encoder;\n }", "public static function static_getEncoder($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function getEncoder()\n {\n return $this;\n }", "public function getEncoding()\n {\n $content = $this->getHeaderLine('content-type');\n if (!$content) {\n return null;\n }\n preg_match('/charset\\s?=\\s?[\\'\"]?([a-z0-9-_]+)[\\'\"]?/i', $content, $matches);\n if (empty($matches[1])) {\n return null;\n }\n\n return $matches[1];\n }", "public function getDecoder($format);", "public function getAudioCodecType()\n {\n return $this->audioCodecType;\n }", "public function getInstance(): ?object\n {\n return $this->instance;\n }", "function getCharset(): ?string;", "public static function getInstance(): ?self\n {\n static $instance = null;\n if ($instance == null) {\n Tools::atkdebug('Creating UI color states');\n $instance = new static();\n $instance->initColorPalette();\n }\n\n return $instance;\n }", "public function getCharset(): ?string;" ]
[ "0.6792413", "0.63471115", "0.6214836", "0.6111885", "0.6068491", "0.5783533", "0.57605416", "0.5751641", "0.547314", "0.53918964", "0.5339931", "0.5297244", "0.52340627", "0.5165036", "0.515167", "0.508529", "0.508529", "0.5052967", "0.5052542", "0.50293267", "0.5026986", "0.5015486", "0.50013334", "0.49977562", "0.4965562", "0.49640173", "0.49612132", "0.49356714", "0.4929363", "0.49163222" ]
0.70024264
1