query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
If template symlinks are disabled and this module is installed but not enabled then add session notification in addition to template notification, as template notification may not be seen if module installed via modman. Observes: core_block_abstract_to_html_after
public function addNotEnabledWarning(Varien_Event_Observer $observer) { /* @var $block Mage_Core_Block_Abstract */ $block = $observer->getBlock(); /* @var $helper EW_NativePasswords_Helper_Data */ $helper = Mage::helper('ew_nativepasswords'); if($block->getNameInLayout() != self...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function register_block_core_comment_template()\n {\n }", "public function atmf_html_backend(){\n\n $template_loader = new Uou_Atmf_Load_Template();\n ob_start();\n $template = $template_loader->locate_template( 'popup.php' );\n\n if(is_user_logged_in() ){\n ...
[ "0.5877249", "0.5773055", "0.5721786", "0.5715341", "0.54135823", "0.5402291", "0.53973484", "0.5394881", "0.53817725", "0.53554344", "0.5343942", "0.53348714", "0.5315233", "0.5301589", "0.5295684", "0.52753484", "0.5273519", "0.52457774", "0.52457774", "0.523847", "0.522810...
0.7050951
0
Jamie Alnasir, created. Obtain RHUL User's Student ID from currently logged in, LDAP authenticated RHUL user
function getRHUL_UserID() { global $RHUL_Non_Stu_ID; if ( is_user_logged_in() ) { global $wpdb; $wp_user = strtoupper(wp_get_current_user()->user_login); // Get currently logged-in Wordpress user $sql = "SELECT meta_value FROM cswp_usermeta WHERE meta_key = 'adi_studentno' AND user_id = " . "(SELECT use...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function student_id()\n\t\t{\n\t\t$custom = $this->custom_parsed();\n\t\tif(isset($custom['student_id']))\n\t\t\t{\n\t\t\treturn $custom['student_id'];\n\t\t\t}\n\t\telseif(isset($custom['person_id']))\n\t\t\t{\n\t\t\t$p = new Person($custom['person_id']);\n\t\t\treturn Student::addperson($p);\n\t\t\t}\n\t\telse\n...
[ "0.674963", "0.621119", "0.6153856", "0.6140616", "0.60628843", "0.5982785", "0.5963221", "0.59045786", "0.58852434", "0.5839819", "0.5813154", "0.5811203", "0.5809368", "0.5800788", "0.5797575", "0.57789135", "0.5754408", "0.5737554", "0.57173586", "0.5713428", "0.57105273",...
0.59452975
7
Jamie Alnasir, created. Obtain RHUL User's given LDAP Field from currently logged in, LDAP authenticated RHUL user
function getRHUL_LDAP_FieldValue($aField) { if ( is_user_logged_in() ) { global $wpdb; $wp_user = strtoupper(wp_get_current_user()->user_login); // Get currently logged-in Wordpress user $sql = "SELECT meta_value FROM cswp_usermeta WHERE meta_key = '" . $aFiel...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function user_create($attributes){\n //check for compulsory fields\n if (!array_key_exists(\"username\",$attributes)){ return (\"Missing compulsory field [username]\"); }\n if (!array_key_exists(\"firstname\",$attributes)){ return (\"Missing compulsory field [firstname]\"); }\n if (!arr...
[ "0.6394863", "0.63353646", "0.62664324", "0.62260175", "0.6101506", "0.6061821", "0.6053742", "0.60437", "0.600321", "0.59909856", "0.5981068", "0.59469885", "0.59184784", "0.5888247", "0.5878838", "0.5869327", "0.5850902", "0.5841218", "0.5829959", "0.5823872", "0.5796932", ...
0.62889326
2
Jamie Alnasir, created. Obtain RHUL User's Display name from currently logged in, LDAP authenticated RHUL user
function getRHUL_DisplayName() { return getRHUL_LDAP_FieldValue("adi_givenname"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function name() {\n return isset($this->_adaptee->user_info['user_displayname']) ? $this->_adaptee->user_info['user_displayname'] : null;\n }", "public function getUserDisplayName();", "public function diviroids_user_displayname($atts)\n {\n return DiviRoids_Security::get_current_u...
[ "0.701753", "0.6982576", "0.69400346", "0.68017745", "0.67323995", "0.6725332", "0.6624461", "0.66169864", "0.6601405", "0.6553752", "0.6485967", "0.6474154", "0.6438809", "0.64247125", "0.64222777", "0.6411011", "0.64054996", "0.63948095", "0.63901496", "0.63757926", "0.6370...
0.7530642
0
Jamie Alnasir, created. Obtain RHUL User's first name from currently logged in, LDAP authenticated RHUL user
function getRHUL_FirstName() { return getRHUL_LDAP_FieldValue("first_name"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRHUL_DisplayName() {\n\treturn getRHUL_LDAP_FieldValue(\"adi_givenname\");\n}", "public function diviroids_user_firstname($atts)\n {\n return DiviRoids_Security::get_current_user('user_firstname');\n }", "function getRHUL_LastName() {\n return getRHUL_LDAP_FieldValue...
[ "0.7391707", "0.72755057", "0.7143627", "0.69097334", "0.678016", "0.67243993", "0.6723048", "0.67192423", "0.6713279", "0.67096895", "0.6649425", "0.66383636", "0.66374373", "0.6618861", "0.6598477", "0.6577183", "0.6573467", "0.65643364", "0.65478337", "0.65313697", "0.6527...
0.7825748
0
Jamie Alnasir, created. Obtain RHUL User's last name from currently logged in, LDAP authenticated RHUL user
function getRHUL_LastName() { return getRHUL_LDAP_FieldValue("last_name"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function diviroids_user_lastname($atts)\n {\n return DiviRoids_Security::get_current_user('user_lastname');\n }", "function getRHUL_DisplayName() {\n\treturn getRHUL_LDAP_FieldValue(\"adi_givenname\");\n}", "function getRHUL_FirstName() {\n return getRHUL_LDAP_FieldValue(...
[ "0.7479828", "0.74220574", "0.73495203", "0.7298347", "0.7289797", "0.71917665", "0.7187261", "0.7187261", "0.7176694", "0.7137894", "0.71244526", "0.7068086", "0.70651025", "0.7016912", "0.70092475", "0.6988241", "0.6983635", "0.69517547", "0.6938907", "0.69175303", "0.69050...
0.8195224
0
Jamie Alnasir, created. Obtain RHUL User's full name from currently logged in, LDAP authenticated RHUL user
function getRHUL_FullName() { return getRHUL_FirstName() . " " . getRHUL_LastName(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRHUL_DisplayName() {\n\treturn getRHUL_LDAP_FieldValue(\"adi_givenname\");\n}", "function getRHUL_LastName() {\n return getRHUL_LDAP_FieldValue(\"last_name\");\n}", "function getRHUL_FirstName() {\n return getRHUL_LDAP_FieldValue(\"first_name\");\n}", "public function get_user_name(...
[ "0.70048314", "0.6899066", "0.6890519", "0.66397214", "0.65319425", "0.6529683", "0.65253556", "0.6507658", "0.6478806", "0.64651966", "0.64519334", "0.6428762", "0.6412827", "0.640427", "0.63621294", "0.6355641", "0.63514113", "0.6346236", "0.6326977", "0.6321939", "0.631888...
0.6109468
35
Jamie Alnasir, created. Obtain RHUL User's Display name from currently logged in, LDAP authenticated RHUL user
function getRHUL_Email() { return getRHUL_LDAP_FieldValue("adi_mail"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getRHUL_DisplayName() {\n\treturn getRHUL_LDAP_FieldValue(\"adi_givenname\");\n}", "public function name() {\n return isset($this->_adaptee->user_info['user_displayname']) ? $this->_adaptee->user_info['user_displayname'] : null;\n }", "public function getUserDisplayName();", "public function div...
[ "0.7530642", "0.701753", "0.6982576", "0.69400346", "0.68017745", "0.67323995", "0.6725332", "0.6624461", "0.66169864", "0.6601405", "0.6553752", "0.6485967", "0.6474154", "0.6438809", "0.64247125", "0.64222777", "0.6411011", "0.64054996", "0.63948095", "0.63901496", "0.63757...
0.0
-1
Jamie Alnasir, created. Obtain RHUL User's Start Year from currently logged in, LDAP authenticated RHUL user
function getRHUL_StartYear() { $dname = getRHUL_LDAP_FieldValue("adi_displayname"); if (strpos($dname, "(")) { $p = (int)strpos($dname, "("); return substr($dname, $p+1, 4); } else { return "0"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStartYear()\n {\n return $this->getParameter('startYear');\n }", "function getYearOfBirth() {\n global $USER;\n\t$yearOfBirth = date(\"Y\", $USER['dob']);\n\treturn $yearOfBirth;\n}", "private function get_start_date_for_this_ac_year() {\n\t\t\t$ac_year = $this->resolve_y...
[ "0.6580952", "0.6534069", "0.6500907", "0.64486784", "0.6407487", "0.62256145", "0.61999327", "0.6197664", "0.61660033", "0.6134222", "0.6069793", "0.6050429", "0.6046336", "0.6003379", "0.5990239", "0.5976513", "0.59656984", "0.594819", "0.59429795", "0.5912817", "0.5911117"...
0.70028317
0
Jamie Alnasir, created. Determine whether site is running from within a frame of an Android or iOS app These apps load the ChooseSurvey Wordpress site setting the RHUL_App parameter to "true" i.e. therefore it is sufficient just to check whether RHUL_App has been set, as direct access through a browser (even on a mobil...
function isRHULApp() { if (isset($_GET['RHUL_App'])) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function qa_is_mobile_probably()\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\trequire_once QA_INCLUDE_DIR . 'util/string.php';\n\n\t// inspired by: http://dangerousprototypes.com/docs/PhpBB3_MOD:_Replacement_mobile_browser_detection_for_mobil...
[ "0.58524644", "0.5750067", "0.5718198", "0.5651891", "0.5651299", "0.56134164", "0.56000686", "0.55439585", "0.5540365", "0.5510022", "0.55087036", "0.5506605", "0.5493972", "0.548934", "0.54890025", "0.5464478", "0.5461525", "0.54600227", "0.5429646", "0.5428719", "0.5418972...
0.75202775
0
Jamie Alnasir, created. Determine whether site is running in RHUL Survey Message view mode
function isMsgViewMode() { if (isset($_GET['msg_id'])) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function shouldDisplayMessage()\n\t{\n\t\t// Only on admin app\n\t\tif (!$this->app->isClient('administrator'))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only if authenticated\n\t\tif (JFactory::getUser()->guest)\n\t\t{\n\t\t\treturn false;\n\t\t}\n\n\t\t// Only on HTML documents\n\t\tif ($this->app->ge...
[ "0.608481", "0.58012897", "0.5794463", "0.55705565", "0.5557285", "0.5546865", "0.5511485", "0.5479734", "0.54782164", "0.5472729", "0.544241", "0.5423431", "0.5419479", "0.53651375", "0.53629", "0.5339953", "0.53270143", "0.53240573", "0.53018713", "0.5295207", "0.5282798", ...
0.669295
0
Jamie Alnasir, created. Determine whether site is running in RHUL Contact mode
function isContactMode() { if (isset($_GET['cont'])) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function contactIsActive()\n {\n return true ;\n }", "public function hasContactInfo() {\n return ($this->phone || $this->email || $this->pager);\n }", "public function hasContactInformation() {\n\t\treturn $this->hasContactEmail() || $this->hasContactUrl();\n\t}", "private static funct...
[ "0.64701265", "0.6431801", "0.6408887", "0.6329618", "0.6230345", "0.60684264", "0.59196275", "0.5905947", "0.5887736", "0.58697706", "0.58075714", "0.5799408", "0.57529277", "0.5729783", "0.57157534", "0.5710986", "0.56350446", "0.56303716", "0.5629863", "0.56279266", "0.561...
0.6709709
0
Jamie Alnasir, created. Determine whether site is running in RHUL Email mode
function isEmailMode() { if (isset($_POST['msg_text'])) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isMailMode() {\n return ($this->mode == Notification_NotificationTemplate::MODE_MAIL);\n }", "function templ_fetch_mail_type()\r\n{\r\n\t$tmpdata = get_option('templatic_settings');\r\n\tif(@$tmpdata['php_mail'] == 'php_mail')\r\n\t{\r\n\t\treturn true;\t\r\n\t}\r\n\treturn false;\r\n}"...
[ "0.69283617", "0.66048497", "0.6581484", "0.6540524", "0.65275234", "0.65176666", "0.6486412", "0.6423171", "0.6422441", "0.6363536", "0.6274178", "0.6256566", "0.62205285", "0.61253786", "0.607243", "0.60624963", "0.6054423", "0.60540456", "0.6052042", "0.60321015", "0.60274...
0.61971444
13
CARGA Tabla de mesas
public function cargaTablaMesas(){ $this->cargaMesas("no"); // Cabecera de tabla. echo "<div class='table-responsive'>"; echo "<table class='table table-striped table-sm table-bordered table-hover'>"; echo '<thead class="thead-dark">'; echo '<th>SALA</th>'; echo '<th>Mesa</th>'; echo '<th>Nº Comensal...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tabela($vetorComcadastros, $vetorComIndices){//Função que cria a tabela/lista recebe o vetor cos os cadsastros e outro com os indices\n retornaEscolhidos($vetorComcadastros, $vetorComIndices);//escreve a tabela\n }", "function datos_tablas(){\n\t\t$this->db->SELECT('*');\n\t\t$this->db->SELECT('...
[ "0.65467465", "0.63148", "0.6192665", "0.6175271", "0.613008", "0.60767347", "0.6075878", "0.6071638", "0.60523987", "0.59665036", "0.5959776", "0.5940634", "0.5915693", "0.59123707", "0.59095633", "0.59029126", "0.59015125", "0.5873391", "0.5813777", "0.5781051", "0.57723635...
0.57510775
24
SELECCIONA mesas desde comandas. Si enviamos miMesa es para que la seleccione por defecto. Y miesto=detalle le indica que deshabilita el control.
public function seleccionaMesas($mimesa,$miestado){ $this->cargaMesas("no"); if($miestado=="detalle"){$dis="disabled";}else{$dis="";} echo "<select class='form-control form-control-sm text-primary' ".$dis." id='inputMESA' name='inputMESA' required placeholder='Mesa de Sala en la que se situa la comanda'>"; fore...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function sesionesMes($ProximaObraAnyo,$ProximaObraMes,$nombre_obra){\n \treturn Sesion::where(\"inicio\",\">=\",$ProximaObraAnyo.\"-\".$ProximaObraMes.\"-01\".\" 00:00:00\")->\n\t\t\t\twhere(\"inicio\",\"<=\",$ProximaObraAnyo.\"-\".$ProximaObraMes.\"-31\".\" 23:59:00\")->\n\t\t\t\twhere(\"nombre_obra\",...
[ "0.60889816", "0.6005965", "0.5919875", "0.58665323", "0.58465487", "0.58387095", "0.5753883", "0.5751229", "0.5734401", "0.57342046", "0.5705258", "0.57033616", "0.568519", "0.56617665", "0.56130046", "0.5594884", "0.55743015", "0.5570555", "0.5559286", "0.5557701", "0.55551...
0.5973115
2
Ofrece un nombre coloquial de una mesa basada en el formato MMSS que se graba
public function daNombreMesa($mimesa){ $this->cargaMesas("no"); $nomMesa=""; foreach ($_SESSION['MisMesas'] as $mesa){ $ubica=$mesa['MES_ID'].'-'.$mesa['SAL_ID']; if ($ubica==$mimesa){ $nomMesa="Mesa: ".$mesa['MES_ID']." de ".$mesa['SAL_Nombre']." (".$mesa['MES_NPersonas']." personas)"; break; } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function toM($s) { \n $t = explode(\":\", $s); \n $h = settype($t[0], integer);\n $m = settype($t[1], integer);\n $mm = ($h * 60) + $m;\n return $mm;\n\t\t}", "function convert_time ($time = '') {\n $str_time = '';\n\n $time_in_second = $time / 1000;\n\n $n...
[ "0.7345122", "0.6892717", "0.64956605", "0.64817697", "0.64528304", "0.6447038", "0.63788664", "0.636109", "0.6325262", "0.62845004", "0.6275526", "0.6263237", "0.6252585", "0.62312263", "0.62256145", "0.62249804", "0.6181721", "0.61523277", "0.6103493", "0.60977066", "0.6081...
0.0
-1
Add document_root_prefix to href if needed Uses Application global
public static function href(Application $application, string $src): string { if (URL::valid($src)) { return $src; } $prefix = $application->documentRootPrefix(); if ($prefix) { return Directory::path($prefix, $src); } return $src; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function qa_path_to_root()\n{\n\tif (qa_to_override(__FUNCTION__)) { $args=func_get_args(); return qa_call_override(__FUNCTION__, $args); }\n\n\tglobal $qa_root_url_relative;\n\treturn $qa_root_url_relative;\n}", "function get_root_url() {\n return \"http://\" . $_SERVER['HTTP_HOST'] . '/' . ROOT_PATH;\n ...
[ "0.6490501", "0.6354338", "0.62335956", "0.6198966", "0.61890036", "0.61719996", "0.6144813", "0.5978498", "0.5964074", "0.59380424", "0.59124273", "0.5768808", "0.57648593", "0.5744351", "0.5740061", "0.57286316", "0.57194716", "0.56974506", "0.5693867", "0.56814", "0.567812...
0.58635354
11
Consider adding Application as a parameter, add logic for document_root
public static function img(Application $app, string $src, string $text = '', array $attrs = []): string { return self::_img(self::href($app, $src), $text, $attrs, Directory::path($app->documentRoot(), $src)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function getApplication();", "function renderApplication(){\n\tinclude getApplicationSystemPath() . \"/public/layout/layout.php\";\t\n}", "public function getApplication(){ \r\n\t\treturn \\Yaf\\Application::app();\r\n\t}", "protected function _configureApplication()\n {\n $this->getAppli...
[ "0.6591904", "0.63326937", "0.632998", "0.62831527", "0.62819225", "0.6250558", "0.6240406", "0.62358826", "0.62358826", "0.62358826", "0.62358826", "0.62358826", "0.61676306", "0.60938525", "0.6078927", "0.60218173", "0.5995663", "0.5983967", "0.59428483", "0.5934132", "0.58...
0.0
-1
Output an `` tag
public static function a(string $href, array|string $attributes, string $text = null): string { $attributes = self::toAttributes($attributes); $attributes['href'] = $href; return self::tag('a', $attributes, $text); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tag($tag_name, $op, $pref = '', $nl = false, $extra = '')\n{\n echo $pref . '<' ;\n if ($op == 'close') {\n echo '/' ;\n }\n echo $tag_name ;\n if ($extra != '') {\n echo ' ' . $extra ;\n }\n echo '>' ;\n if ($nl == true) {\n NL() ;\n }\n}", "public functi...
[ "0.6943976", "0.6933775", "0.6775729", "0.6772431", "0.6726125", "0.6718999", "0.67096645", "0.65643644", "0.6551411", "0.65505934", "0.6475362", "0.644128", "0.6438994", "0.64260095", "0.63917226", "0.638777", "0.6303655", "0.6303655", "0.6260509", "0.62432456", "0.623346", ...
0.0
-1
For speed, you must register your tag hook here in addition to $application>hooks>add Use the name returned as the hook name
public static function tag_attributes_alter_hook_name(string $name): string { $name = self::cleanTagName($name); self::$attributes_alter[$name] = true; return __CLASS__ . "::tag::$name"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hook()\n {\n \\add_action(\n $this->tag,\n $this->callback,\n $this->priority,\n $this->acceptedParams\n );\n }", "public function add_hooks()\n {\n }", "public function add_hooks()\n {\n }", "public f...
[ "0.74090123", "0.71108425", "0.71108425", "0.6898992", "0.6557372", "0.6431819", "0.64157265", "0.6414852", "0.64107656", "0.6336937", "0.6331583", "0.6303621", "0.62904334", "0.6263885", "0.62256926", "0.62168354", "0.61647487", "0.615726", "0.61542165", "0.614869", "0.61046...
0.6245951
14
Output an open tag or a single tag ($content === null)
public static function tag(string $name, array|string $attributes = [], string $content = null): string { $name = self::cleanTagName($name); if (array_key_exists($name, self::$attributes_alter)) { $attributes = Kernel::singleton()->application()->invokeTypedFilters(__METHOD__ . "::$name", $attributes, [ $att...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render($content)\n\t{\n\t\t$tag\t = $this->getTag();\n\t\t$placement = $this->getPlacement();\n\t\t$noAttribs = $this->getOption('noAttribs');\n\t\t$openOnly = $this->getOption('openOnly');\n\t\t$closeOnly = $this->getOption('closeOnly');\n\t\t$this->removeOption('noAttribs');\n\t\t$this->remove...
[ "0.643995", "0.6388431", "0.63299", "0.6290756", "0.5912245", "0.5879813", "0.58448523", "0.58430237", "0.58027333", "0.5796313", "0.5791403", "0.5789499", "0.5672085", "0.5593494", "0.5538308", "0.5500186", "0.54998213", "0.5483006", "0.54526037", "0.54419327", "0.54399914",...
0.0
-1
self::tags('li', array('class' => 'highlight'), array('first item', 'second item'))
public static function tags(string $name, string|array $attributes, array $items, string $separator = "\n"): string { $attributes = self::toAttributes($attributes); $result = []; foreach ($items as $item) { $result[] = self::tag($name, $attributes, $item); } return implode($separator, $result) . $separator...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLiClass(): string;", "function gymfitness_li_class($classes,$item,$args) {\n \n $classes[] = 'nav-item';\n \n return $classes;\n\n}", "function htmltags($args) {\r\n\t\t$args['selections'] = $this->html_tags;\r\n\t\t$args['multiple'] = false;\r\n\t\t$args['width'] = '65';\r\n\t\t...
[ "0.62824345", "0.622383", "0.62200075", "0.61833775", "0.61633223", "0.6114175", "0.6094371", "0.6051584", "0.5986998", "0.59708667", "0.59673524", "0.5915572", "0.58881956", "0.5802569", "0.5785969", "0.57782716", "0.5749228", "0.5730729", "0.5686377", "0.5682676", "0.565695...
0.0
-1
Preserve html entities e.g. foreign languages in strings, particularly when embedded in HTML attributes.
public static function specialsIterator(iterable $iter): iterable { $result = []; foreach ($iter as $k => $v) { $result[$k] = self::specials($v); } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function e_attr($string)\n{\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n}", "function _xmlEntities($string) {\n return htmlspecialchars($string, ENT_QUOTES, 'UTF-8');\n }", "function xml_entities($value) {\n\n return strtr(\n\n $value, \n\n array(\n\n \"<\" =>...
[ "0.7137126", "0.70352286", "0.68276894", "0.6807053", "0.67911935", "0.6764284", "0.6735051", "0.6665122", "0.66609544", "0.66518575", "0.6635965", "0.6626374", "0.6625847", "0.6596042", "0.6593831", "0.65612555", "0.6559145", "0.6542217", "0.6453635", "0.6453101", "0.6444092...
0.0
-1
Preserve html entities e.g. foreign languages in strings, particularly when embedded in HTML attributes.
public static function specials(string $string): string { $matches = null; if (!preg_match('/&(#[0-9]+|[A-Za-z0-9]+);/', $string, $matches)) { return htmlspecialchars($string); } $search = $replace = []; foreach ($matches as $i => $match) { $search[] = "{\x01$i\x02}"; $replace[] = $match[0]; } $s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function e_attr($string)\n{\n return htmlentities($string, ENT_QUOTES, 'UTF-8');\n}", "function _xmlEntities($string) {\n return htmlspecialchars($string, ENT_QUOTES, 'UTF-8');\n }", "function xml_entities($value) {\n\n return strtr(\n\n $value, \n\n array(\n\n \"<\" =>...
[ "0.7135114", "0.703403", "0.6827141", "0.68063325", "0.67905045", "0.6763522", "0.6735091", "0.66647345", "0.665946", "0.6651248", "0.6636116", "0.662529", "0.66252834", "0.6595712", "0.65936446", "0.65612483", "0.6557385", "0.6542779", "0.6453192", "0.6452648", "0.6444492", ...
0.0
-1
Extract Data attributes, supporting data_id formats (converted to dataid)
public static function dataAttributes(array $attributes): array { return ArrayTools::flatten(ArrayTools::filterKeyPrefixes(ArrayTools::keysReplace(array_change_key_case($attributes), '_', '-'), 'data-', true)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _retrieveFormattedDataAttributes()\n {\n $dataAttribs = '';\n $filter = new Zend_Filter_Word_CamelCaseToDash();\n foreach ($this->_dataAttribs as $key => $value) {\n $key = strtolower($filter->filter($key));\n if ($value === true) {\n $v...
[ "0.6250758", "0.6204206", "0.61354", "0.6122654", "0.59232295", "0.58402663", "0.5808955", "0.5781237", "0.5722934", "0.5690137", "0.5634834", "0.5605249", "0.55757767", "0.556094", "0.55237347", "0.55204344", "0.5520217", "0.5503675", "0.5502842", "0.5499392", "0.5451588", ...
0.58395857
6
Includes standard HTML tags and data tags.
public static function tagAttributes(string $tag, array $attributes): array { $tag = self::cleanTagName($tag); if (!isset(self::$tag_attributes_cache[$tag])) { $allowed = self::$tag_attributes[$tag] ?? []; while (is_string($allowed)) { $allowed = self::$tag_attributes[$allowed] ?? []; } self::$tag_a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function html($data) {\n $data = htmlspecialchars($data, ENT_QUOTES); // <>\n return $data;\n }", "public function tags()\n {\n return array('html');\n }", "function wrapHtml($data = '', $tag, $attrs = null, $single_tag = false)\n{\n\t$ret = '<'.$tag;\n\tif (is_array($attrs) && !...
[ "0.6832139", "0.6757433", "0.6738663", "0.65818566", "0.63663435", "0.62460446", "0.6197367", "0.6151333", "0.6102051", "0.6090518", "0.60143244", "0.60143244", "0.6010617", "0.6001316", "0.5971223", "0.5930932", "0.5915687", "0.5885128", "0.5881662", "0.5849743", "0.58408725...
0.0
-1
Add a class to an array of attributes
public static function addClass(array $attributes, string|array $class = ''): array { $attributes['class'] = CSS::addClass($attributes['class'] ?? '', $class); return $attributes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function add_class($attributes, $class) {\n if(isset($attributes['class'])) {\n $attributes['class'] .= ' '.$class;\n } else {\n $attributes['class'] = $class;\n }\n return $attributes;\n }", "public function addClass(array &$attrs, $class)\n {\n $th...
[ "0.72273797", "0.6720254", "0.6456853", "0.6435644", "0.62808985", "0.62446797", "0.6172487", "0.61095035", "0.61095035", "0.6105817", "0.6029101", "0.60069907", "0.5965965", "0.5965965", "0.5965965", "0.5908778", "0.5883147", "0.58188796", "0.5810554", "0.5805374", "0.578310...
0.68916047
1
Remove a class from an attributes "class" field
public static function removeClass(array $attributes, string $class = ''): array { $attributes['class'] = CSS::removeClass($attributes['class'] ?? '', $class); return $attributes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeClassName(string $class): void {\n\t\t$classes =& $this->m_attributes[\"class\"];\n\n\t\twhile(false !== ($i = array_search($class, $classes))) {\n\t\t\tarray_splice($classes, $i, 1);\n\t\t}\n\t}", "public function remove_class( $class = null ) {\n\t\n\t\tif ( !is_string( $class ) ) return;...
[ "0.7434001", "0.6899663", "0.67737514", "0.6621767", "0.66172886", "0.642628", "0.63793886", "0.63396084", "0.6322687", "0.62766904", "0.6256748", "0.61204183", "0.6068338", "0.60415953", "0.60201555", "0.60154986", "0.5968506", "0.59184235", "0.58833253", "0.58758694", "0.58...
0.66380715
3
Convert attributes into a string easily appended after a tag
public static function attributes(array $attributes): string { $result = []; foreach ($attributes as $name => $value) { if ($value === null || $value === false) { continue; } if ($value === true) { $value = $name; } if (is_object($value)) { $value = method_exists($value, '__toString') ? $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAttribs(): string {\n\n $attribs = '';\n\n foreach ($this->attributes as $key => $value) {\n $key = strtolower($key);\n if ($value) {\n if ($key == 'value') {\n if (is_array($value)) {\n foreach ($value ...
[ "0.7388372", "0.7255725", "0.71956015", "0.71204704", "0.709842", "0.7075592", "0.70477164", "0.7042661", "0.70360607", "0.70133597", "0.6997342", "0.6884745", "0.6820727", "0.6803763", "0.6784575", "0.67575204", "0.6753973", "0.674749", "0.6727663", "0.67265177", "0.6726126"...
0.6132563
59
Extract HTMLTags from some content. Tags are returned in the order they are found in a document.
public static function extractTags(string $tag, string|HTMLTag|array $mixed, bool $recursive = true): array { /* Handle a variety of inputs */ $contents = self::mixedToString($mixed); if (empty($contents)) { return []; } $tag = strtolower($tag); $endTag = "</$tag>"; $endTagPattern = '#</\s*' . $tag . ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_tags ($content) {\n\t\t$tags = $matches = array();\n\t\tif (empty($content)) return $tags;\n\n\t\tpreg_match_all($this->get_catchall_regex(), $content, $matches);\n\t\tif (!empty($matches[1])) $tags = $matches[1];\n\n\t\tif (!empty($tags)) foreach ($tags as $idx => $tag) {\n\t\t\t$tmp = explode...
[ "0.67558795", "0.62464356", "0.6056972", "0.6045867", "0.6034552", "0.58729476", "0.5839546", "0.577781", "0.5768152", "0.57487446", "0.5721718", "0.5692347", "0.5675597", "0.56672585", "0.5629265", "0.55759364", "0.55317855", "0.5505932", "0.5492731", "0.54720014", "0.546198...
0.52261394
49
Close a tag. Must balance tag_open calls or an error is thrown.
public static function tag_close(string $name = null): string { if (count(self::$tag_stack) === 0) { throw new SemanticsException("Closing tag without open ($name)"); } $top_name = array_pop(self::$tag_stack); if ($name !== null && strcasecmp($name, $top_name) !== 0) { throw new SemanticsException("Closin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function close_tag($tag, $pref, $nl)\n{\n tag($tag, 'close', $pref, $nl) ;\n}", "function _tag_close( $parser, $tag )\n {\n $this->curtag = &$this->curtag->parent;\n }", "function CloseTag() {\n\t\tif (!empty($this->tag)) {\n\t\t\tfor ($in=0;$in<$this->indent; $in++) {\n\t\t\t\t$this->outputCod...
[ "0.72257227", "0.70528936", "0.7035683", "0.69079286", "0.6874167", "0.67322594", "0.67303836", "0.65943414", "0.6531123", "0.65046865", "0.64132315", "0.63182795", "0.6293621", "0.62470335", "0.6213686", "0.6177745", "0.61774683", "0.61674964", "0.615795", "0.6145885", "0.61...
0.609525
32
Like etag but for divs
public static function ediv(string|array $attributes = []): string { $args = array_merge(['div', ], func_get_args()); return call_user_func_array([__CLASS__, 'etag', ], $args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getETag() {}", "#[Pure]\nfunction ob_etaghandler($data, $mode) {}", "public function getEtag()\n {\n return $this->etag;\n }", "public function getEtag()\n {\n return $this->etag;\n }", "public function getEtag()\n {\n return $this->etag;\n }", ...
[ "0.63747424", "0.62371063", "0.6232301", "0.6232301", "0.6232301", "0.6232301", "0.6232301", "0.6232301", "0.6232301", "0.6232301", "0.6100096", "0.59741014", "0.5918943", "0.5904675", "0.5896843", "0.5840765", "0.57865715", "0.57643354", "0.57092863", "0.5641326", "0.5609996...
0.6045759
11
Like etag but for divs
public static function espan(string|array $attributes = []): string { $args = array_merge(['span', ], func_get_args()); return call_user_func_array([__CLASS__, 'etag', ], $args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getETag() {}", "#[Pure]\nfunction ob_etaghandler($data, $mode) {}", "public function getEtag()\n {\n return $this->etag;\n }", "public function getEtag()\n {\n return $this->etag;\n }", "public function getEtag()\n {\n return $this->etag;\n }", ...
[ "0.63747424", "0.62371063", "0.6232301", "0.6232301", "0.6232301", "0.6232301", "0.6232301", "0.6232301", "0.6232301", "0.6232301", "0.6100096", "0.6045759", "0.59741014", "0.5918943", "0.5904675", "0.5896843", "0.5840765", "0.57865715", "0.57643354", "0.57092863", "0.5641326...
0.0
-1
Extract the first tag contents of given type from HTML
public static function extractTagContents(string $tag, string $mixed): string { $result = self::extractTag($tag, $mixed); return $result->innerHTML(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function extract_tag( $html, $tag = 'div' )\n\t{\n\t\t$html = preg_replace( \"/(\\<\" . $tag . \")(.*?)(\" . $tag . \">)/si\", \"dada\", \"$html\" );\n\t\t$html = strip_tags( $html );\n\t\t$html = str_replace( \"<!--\", \"&lt;!--\", $html );\n\t\t$html = preg_replace( \"/(\\<)(.*?)(--\\>)/mi\", \"\" . nl2br( \"\\\...
[ "0.57939667", "0.55841506", "0.55683213", "0.5513134", "0.54844743", "0.5480904", "0.54522043", "0.54499936", "0.544259", "0.54399985", "0.53832686", "0.53832686", "0.5365185", "0.53619105", "0.5337303", "0.53188205", "0.52399427", "0.5226218", "0.5213006", "0.51754427", "0.5...
0.48781708
51
Extract the first tag object of given type from HTML
public static function extractTag(string $tag, mixed $mixed): HTMLTag { $result = self::extractTags($tag, $mixed, false); if (count($result) === 0) { throw new NotFoundException('No tag {tag}', ['tag' => $tag]); } $htmlTag = array_shift($result); return $htmlTag; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_tag( $attr, $value, $html ) {\r\n\t\t\r\n\t\t\t$attr = preg_quote($attr);\r\n\t\t\t$value = preg_quote($value);\r\n\t\t \r\n\t\t\t//scan the dom for a fully matching div tag\r\n\t\t\t$tag_regex = '/<div[^>]*'.$attr.'=\"'.$value.'\">(.*?)<\\\\/div>/si';\r\n\t\t\r\n\t\t\t//return first match\r\n\t\t\tp...
[ "0.5731173", "0.55962056", "0.5541299", "0.55411303", "0.54740983", "0.5439", "0.5388184", "0.5387688", "0.53454155", "0.53454155", "0.5306569", "0.5258658", "0.5258658", "0.52158713", "0.5215122", "0.5185534", "0.5163457", "0.51577264", "0.51574975", "0.51552755", "0.5143431...
0.48350585
63
Given a string like: "bcd e f " goo="1423" e1231="agerd" Generates the following map x = array(); x["a"] = "bcd e f" x("goo"] = "1423" x["e1232"] = "agerd" If `$mixed` is already an array, just returns as is
public static function parseAttributes(array|string $mixed): array { if (is_array($mixed)) { return $mixed; } if ($mixed === '') { return []; } $mixed = trim($mixed); if (empty($mixed)) { return []; } $matches = []; $mixed .= ' '; $attr = []; if (preg_match_all('/([a-zA-Z_:][-a-zA-Z0-9_:....
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function string_to_value($mixed)\n{\n\tif(is_array($mixed)) {\n\t\tforeach($mixed as $key => $val) {\n\t\t\t$mixed[$key] = string_to_value($val);\n\t\t}\n\t}\n\telseif(is_string($mixed))\n\t{\n\t\t$str = rtrim($mixed);\n\t\tif(preg_match('`^null$`i', $str))\t\t\treturn null;\n\t\tif(preg_match('`^true$`i', $str))\...
[ "0.5898791", "0.5609636", "0.5327343", "0.52875704", "0.5141591", "0.5137075", "0.51131463", "0.51128757", "0.50913817", "0.50835985", "0.50608987", "0.500591", "0.50053555", "0.49929816", "0.49924803", "0.49763998", "0.49590722", "0.49411497", "0.4928098", "0.4925628", "0.48...
0.60718274
0
String length of HTML minus the HTML
public static function strlen(string $html_content): int { return strlen(self::strip($html_content)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getElementTextLength();", "public function getTextLength();", "public function length() {\r\n return strlen($this->contents);\r\n }", "function getLength() {\n\t\treturn $this->getAttribute(DOMIT_RSS_ATTR_LENGTH);\n\t}", "public function get_bodylength() {\n return \"Lichaamsle...
[ "0.7171381", "0.71345556", "0.7038034", "0.68024737", "0.6757246", "0.66371256", "0.66020584", "0.659037", "0.6510369", "0.6506391", "0.6506391", "0.6506391", "0.6506371", "0.64997435", "0.64997435", "0.64517134", "0.64210737", "0.6415625", "0.6415625", "0.6411896", "0.641123...
0.7199639
0
Retrieve a substring of HTML while keeping the HTML valid.
public static function substr(string $html, int $offset = 0, int $length = null): string { $matches = false; if (!preg_match_all('/(<[A-Za-z0-9:_]+\s*[^>]*>|<\/[A-Za-z0-9:_]+>)/', $html, $matches, PREG_OFFSET_CAPTURE)) { $length = $length === null ? strlen($html) : $length; return substr($html, $offset, $leng...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function get_html();", "public function str_get_html() {\n\t\treturn call_user_func_array ( '\\Remios\\Utils\\Adapters\\simplehtmldom\\str_get_html' , func_get_args() );\n\t}", "abstract function get_html();", "static public function str_get_html() {\n\t\treturn call_user_func_array ( '\\str_...
[ "0.64612013", "0.6358039", "0.62515956", "0.6195089", "0.6195089", "0.6149083", "0.59632057", "0.5939412", "0.5929724", "0.5919192", "0.5884656", "0.5807714", "0.58062893", "0.57838464", "0.57685274", "0.57540613", "0.57020235", "0.5656533", "0.5613139", "0.5597197", "0.55969...
0.59680754
6
Remove any HTML tags from a string
public static function strip(string $x): string { return preg_replace('/ +/', ' ', trim(preg_replace('/<[^>]+>/', ' ', $x))); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function strip_html_tags($string){\n return preg_replace(array('/\\<(script)(.+)>/i', '/\\<(.+)(script)>/i', '/\\<(style)(.+)>/i', '/\\<(.+)(style)>/i'), '', $string);\n }", "public static function removeHtml($string)\n\t{\n\t\t$string=trim($string);\n\t\t$string= html_entity_decode($string);\n\...
[ "0.804943", "0.8006684", "0.7999918", "0.79522073", "0.7798536", "0.7690215", "0.7681195", "0.76367205", "0.7569959", "0.7561783", "0.75556666", "0.75372773", "0.7520305", "0.7506479", "0.75035286", "0.74759746", "0.7461835", "0.7436526", "0.7379716", "0.73717606", "0.7324756...
0.0
-1
Remove any solo tags which do not have attributes in them; useless tags etc.
public static function cleanTagsWithoutAttributes(array $tags, string $html): string { $empty_tags = implode('|', ArrayTools::preg_quote($tags, '|')); return preg_replace('|<(' . $empty_tags . ')>([^<>]*)</\1>|i', '$2', $html); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeAllTags() {}", "function clean_inside_tags($txt,$tags){\n\t\t\t$txt =removeemptytags($txt);\n\t\t\tpreg_match_all(\"/<([^>]+)>/i\",$tags,$allTags,PREG_PATTERN_ORDER);\n\t\t\n\t\t\tforeach ($allTags[1] as $tag){\n\t\t\t\t$txt = preg_replace(\"/<\".$tag.\"[^>]*>/i\",\"<\".$tag.\">\",$txt);\n\...
[ "0.69604933", "0.6890917", "0.6796782", "0.6753393", "0.66087747", "0.6589336", "0.6520447", "0.64103967", "0.64019275", "0.63829416", "0.62832236", "0.6215447", "0.6178315", "0.6178284", "0.61551803", "0.613178", "0.6112124", "0.61029345", "0.60825527", "0.6067436", "0.60167...
0.6011469
22
Replace tag attributes in an HTML string
public static function cleanTagsAttributes(string $string, array $include = null, array $exclude = []): string { $matches = self::matchTags($string); if (!$matches) { return $string; } $search = []; $replace = []; foreach ($matches as $match) { if ($include === null) { $attr = []; } else { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function non_inline_attributes() {\r\n\t\t$this->code = preg_replace('/<span([^>]*) align=\"[^\"]*\"([^>]*)>/is', '<span$1$2>', $this->code);\r\n\t\t$this->code = preg_replace('/<span([^>]*) style=\"([^\"]*)text-align\\s*:\\s*[^;]*;([^\"]*)\"([^>]*)>/is', '<span$1 style=\"$2$3\"$4>', $this->code);\r\n\t}", "publ...
[ "0.6510681", "0.64560896", "0.6431701", "0.63907593", "0.6334694", "0.6184258", "0.61617935", "0.6134487", "0.61121345", "0.594832", "0.5942236", "0.5910045", "0.59010416", "0.5900244", "0.58947814", "0.5887625", "0.5885039", "0.585133", "0.585133", "0.58448493", "0.5837824",...
0.5648693
30
Remove certain tags from an HTML string
public static function cleanTags(string $string, array $allowed_tags = null, array $remove_tags = []): string { if (is_array($allowed_tags)) { $allowed_tags = ArrayTools::changeValueCase($allowed_tags); } $remove_tags = ArrayTools::changeValueCase($remove_tags); $found_tags = self::parseTags($string); if (...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sanitize(\n $html,\n $tags_to_remove = ['script', 'iframe', 'input', 'form'],\n $attributes_to_keep = ['title', 'href', 'src'],\n $text_to_keep = []\n) {\n $htmlContent = str_get_html($html);\n\n foreach ($htmlContent->find('*') as $element) {\n if (in_array($element->tag, $text_t...
[ "0.7702855", "0.7687814", "0.7651972", "0.7621255", "0.76178825", "0.7462482", "0.7444486", "0.73520255", "0.7351245", "0.72486967", "0.7241899", "0.7233726", "0.7208642", "0.7200628", "0.71803534", "0.71742386", "0.7149441", "0.71358544", "0.71317416", "0.70967954", "0.69956...
0.0
-1
Is this an end tag?
public static function isEndTag(string $string): string|false { $string = trim($string); $match = false; if (preg_match('/<\/\s*(' . self::RE_TAG_NAME . ')\s*>/', $string, $match)) { return $match[1]; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSelfClosingTag($tag)\n {\n return $tag === 'br' || $tag === 'img';\n }", "function end_tag() {\r\n\t\t$this->push_nodelist();\r\n\t\t\r\n\t}", "public function hasEnd(){\n return $this->_has(3);\n }", "public function hasEnd(){\n return $this->_has(3);\n }", "...
[ "0.7044281", "0.69920146", "0.69380814", "0.69380814", "0.6923909", "0.6865001", "0.6831585", "0.67903763", "0.6743985", "0.67231137", "0.6681599", "0.6671003", "0.6661171", "0.66099256", "0.6583321", "0.65670514", "0.656414", "0.65394676", "0.6536007", "0.6519413", "0.651709...
0.708889
0
Count the number of end tags found in this string which match the tag supplied
public static function countEndTags(string $tag, string $contents): int { $matches = []; if (preg_match_all('|</\s*' . strtolower($tag) . '\s*>|im', $contents, $matches, PREG_SET_ORDER)) { return count($matches); } return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function count_until_tag(string $string, string &$tagName, int &$nWords): int {\n\t\t$result = self::countUntilTag($string);\n\t\t$tagName = $result['tagMatch'];\n\t\t$nWords = $result['words'];\n\t\treturn $result['offset'] + $result['tagMatchLength'];\n\t}", "function endTag($parser, $data){\n ...
[ "0.6153505", "0.6100045", "0.5897448", "0.56500417", "0.5627371", "0.56252545", "0.5604992", "0.55921704", "0.5576082", "0.55704784", "0.5552491", "0.55463517", "0.55150074", "0.54925627", "0.5488568", "0.54668665", "0.54638547", "0.535061", "0.52996016", "0.5292882", "0.5276...
0.802068
0
Count the offset until the tag indicated
public static function count_until_tag(string $string, string &$tagName, int &$nWords): int { $result = self::countUntilTag($string); $tagName = $result['tagMatch']; $nWords = $result['words']; return $result['offset'] + $result['tagMatchLength']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _findStartOffset() {}", "public function getStartOffset() {}", "function offset_pos(){\n\t // $this->count_uri();\n\n\t \tif(isset($this->uri_array['osp']))\n\t\t{\n\t \t\t//ops without and with offset page value\n\t \t\tif(count($this->uri_array['osp'])==1){\n\t \t\t\t$pos = $this->count_ur...
[ "0.6571799", "0.63094324", "0.6212464", "0.5998826", "0.5920728", "0.5913247", "0.59104073", "0.5906511", "0.5826707", "0.5812679", "0.570277", "0.56299293", "0.56299293", "0.56299293", "0.5593855", "0.55527985", "0.55527985", "0.55527985", "0.55469865", "0.5542902", "0.55380...
0.60333896
3
Count the offset until the tag indicated. Returns the following attributes: int offset number of characters until the tag int tagMatchLength size of match int next offset + tagMatchLength offset to next section of HTML to parse string tagMatch matched tag int words words found until the tag string tagContents everythin...
public static function countUntilTag(string $string): array { $matches = []; if (!preg_match('/<(\/?' . self::RE_TAG_NAME . ')' . self::RE_ATTRIBUTES . '(\/?)>/', $string, $matches, PREG_OFFSET_CAPTURE)) { return []; } // dump($matches); [$tagMatch, $offset] = array_shift($matches); [$tagName] = array_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function match(int $offset): ?array\n {\n $result = null;\n\n if (\n $offset < $this->length\n && preg_match('{<!--|<(/?)([\\w\\-:\\x80-\\xFF]+)|<[!?/]}', $this->html, $match, PREG_OFFSET_CAPTURE, $offset)\n ) {\n if ($match[0][0] === '<!--') {\n ...
[ "0.5413764", "0.54076934", "0.5238103", "0.52197444", "0.51174706", "0.5096802", "0.5023371", "0.5011801", "0.49831337", "0.4967562", "0.4924539", "0.48801875", "0.4845485", "0.47762424", "0.47525552", "0.47509113", "0.47501096", "0.47448927", "0.4730054", "0.47147626", "0.46...
0.581585
0
Convert plain text into HTML which has links
public static function urlify(string $text, array $attributes = []): string { $links = self::extractLinks($text); $map = []; foreach ($links as $link) { $map[$link] = self::a($link, $attributes, $link); } $emails = self::extractEmails($text); foreach ($emails as $email) { $map[$email] = self::a('mailt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function html($text) {\n\t\t// Sanitizing html text\n\t\t$text = Sanitize::html($text);\n\t\t// Adding <br />\n\t\t$text = nl2br($text);\n\t\t// Transform http:// into links\n\t\t$text = $this->convertLinks($text);\n\n\t\treturn $text;\n\t}", "function raw_urls_to_links($text){\n\t\t$text = \" $text \";\n\t\t$te...
[ "0.7424353", "0.74196863", "0.73233753", "0.72487515", "0.72218645", "0.71576583", "0.7053427", "0.7030001", "0.6968682", "0.69464844", "0.6935972", "0.6910453", "0.6807461", "0.6800984", "0.6783039", "0.6764277", "0.6759568", "0.6755375", "0.6754978", "0.6753664", "0.6751245...
0.6073695
61
Simplistic tool to make URLs absolute in HTML. Useful for formatting emails.
public static function make_absolute_urls(string $content, string $domain_prefix): string { $domain_prefix = rtrim($domain_prefix, '/'); $map = []; foreach (['href', 'src', ] as $attr) { foreach (['"', '\'', ] as $quote) { foreach (['/' => '', '.' => '/', ] as $prefix => $append) { $map[$attr . '=' . ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function absoluteURLs($html) {\n\t\t$html = str_replace('$CurrentPageURL', $_SERVER['REQUEST_URI'], $html);\n\t\treturn HTTP::urlRewriter($html, '(substr($URL,0,1) == \"/\") ? ( Director::protocolAndHost() . $URL ) : ( (ereg(\"^[A-Za-z]+:\", $URL)) ? $URL : Director::absoluteBaseURL() . $URL )' );\n\t}", ...
[ "0.6771063", "0.6640493", "0.6540757", "0.65244406", "0.6461215", "0.64502406", "0.64234203", "0.6373596", "0.6373596", "0.6347827", "0.6319423", "0.6298491", "0.62962556", "0.6279269", "0.627378", "0.62690306", "0.6226952", "0.6217161", "0.6208363", "0.6198032", "0.6198032",...
0.57842267
67
Handles conversion of HTML entities into text
public static function entities_replace(string $html): string { $html = strtr($html, ['&ldquo;' => '"', '&rdquo;' => '"', '&lsquo;' => '\'', '&rsquo;' => '\'', ]); return html_entity_decode($html); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function convertHtmlEntities($str)\n{\n return htmlentities($str, ENT_QUOTES, \"UTF-8\");\n}", "public function htmlEntitiesToChars($str)\n {\n// if (mb_detect_encoding($str) == 'UTF-8'){\n// decode decimal HTML entities added by web browser\n $str = preg_replace('/&#\\d{2,5};/...
[ "0.73409647", "0.696678", "0.6930696", "0.68446976", "0.6817168", "0.68137956", "0.67492324", "0.67257345", "0.66874295", "0.6684183", "0.6637746", "0.65723735", "0.6524394", "0.649234", "0.6491298", "0.6488665", "0.6455984", "0.64509594", "0.64386916", "0.6438417", "0.641231...
0.68901026
3
Wrapping mapping function (_W) Mapping function which understands tags better. To apply styles or links certain elements within an i18n phrase, use brackets to delineate tags to add to the phrase, as follows: HTML::wrap(__('This is [0:bold text] and this is [1:italic].'), '[]', '[italic]') = "This is bold text and this...
public static function wrap(string $phrase): string { $args = func_get_args(); array_shift($args); if (count($args) === 1 && is_array($args[0])) { $args = $args[0]; } $skip_s = []; $skip_r = []; $match = false; $global_match_index = 0; while (preg_match('/\[([0-9]+:)?([^\[\]]*)]/', $phrase, $match,...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function renderMeWithTagStyle($toRender, $toPattern, $repla) {\n //------------Don't forget to delimit-----w+\n $pattern = '/' . $toPattern . '(\\w+)/';\n //$pattern = '/[*' . $toPattern . '(.+?)+$]/';\n //$pattern = '/[*' . $toPattern . '(.+?)$]/';\n //preg_match($pattern, $toRender, $matches);\n ...
[ "0.57288617", "0.5676275", "0.5673082", "0.54835296", "0.54248565", "0.54012007", "0.52954406", "0.527651", "0.52524143", "0.52474016", "0.523681", "0.52093154", "0.5206952", "0.52026355", "0.5194488", "0.51902485", "0.5187484", "0.5160567", "0.5159896", "0.51455426", "0.5132...
0.5390822
6
Retourne les structures du rapporteur sous forme de tableau(id, libelle)
public function getArrayRapporteurStructure() { $arrStructs=array(); foreach($this->rapporteurStructure as $structure){ $arrStructs[] = array('id'=>$structure->getId(), 'libelle'=>$structure->getLibelle()); } return $arrStructs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function &getListaLibri() {\n $libri = array();\n $query = \"select IdLibro, Titolo, Prezzo, NomeAutore, CognomeAutore, Genere from Libro\";\n \n $mysqli = Db::getInstance()->connectDb();\n if (!isset($mysqli)) {\n error_log(\"[getListaLibri] impossibile ...
[ "0.680435", "0.66138595", "0.6455577", "0.64256614", "0.636575", "0.63391405", "0.6275459", "0.61881405", "0.6144506", "0.6125668", "0.6115616", "0.6095873", "0.6091777", "0.6089776", "0.60856134", "0.6070764", "0.60647404", "0.60647404", "0.60647404", "0.6044766", "0.6030757...
0.6596486
2
Check if is manager
public function isManager() { return $this->manager; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isManager()\n {\n if ($this->getAdaptor() == 'manager') {\n return true;\n }\n\n return false;\n }", "public function isManager(){\n if($this->role->name == 'Manager' && $this->is_active == 1){\n return true;\n }\n return false...
[ "0.87303466", "0.83421856", "0.8306417", "0.79208356", "0.7351462", "0.7269674", "0.71739894", "0.71042764", "0.70206416", "0.69184846", "0.6856411", "0.68262416", "0.67852336", "0.6766466", "0.6766466", "0.6766466", "0.6750512", "0.67421764", "0.6709513", "0.66644585", "0.66...
0.8852006
0
echo "";var_dump("dmphu nhe");echo ""; exit;
function mail() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function dump_die ($data){\n echo \"<pre>\";\n var_dump($data);\n echo \"</pre>\";\n die();\n}", "function bye($msg=null){\n print $msg . \"\\n\";\n exit;\n}", "function dd($output)\n {\n var_dump($output);\n die();\n }", "function dumpX($var)\n{\n dump($var);\n ...
[ "0.64805776", "0.62948716", "0.6242443", "0.6221724", "0.6205545", "0.6193746", "0.6191055", "0.6021101", "0.5986402", "0.59495384", "0.5914317", "0.5894492", "0.5883169", "0.5867237", "0.5860828", "0.5854786", "0.5846603", "0.57911915", "0.5789847", "0.5770173", "0.57395947"...
0.0
-1
Handle command with master process.
public abstract function handle(Connection $connection, ProcessManager $manager);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function handle()\n {\n #Comentei pq o supervisor fica subindo toda hora e o arquivo fica gigante\n #como já testei e vi que fucniona tá tranquilo\n// do {\n// \\Log::info(\"Command --- initial\");\n// } while (true);\n }", "public function handle(Command $comm...
[ "0.6975492", "0.6949976", "0.6949976", "0.6621128", "0.6497215", "0.647377", "0.6436723", "0.6405593", "0.6360486", "0.6311645", "0.62663925", "0.625923", "0.6246015", "0.6243811", "0.6234491", "0.62284964", "0.6218355", "0.62181497", "0.6215085", "0.621293", "0.6212124", "...
0.0
-1
Serialize command for send from bus.
public abstract function serialize();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "public function serialize() {}", "function networkSerialize()...
[ "0.57507116", "0.57507116", "0.5749089", "0.5749089", "0.5749089", "0.5749089", "0.5749089", "0.5749089", "0.562368", "0.559865", "0.559865", "0.559865", "0.559865", "0.559865", "0.5597549", "0.5576567", "0.5532923", "0.5532923", "0.5532923", "0.5532923", "0.5532923", "0.55...
0.5347338
37
Find and create control command.
public static function find($raw) { $data = @json_decode($raw, true) ?: []; if (!array_key_exists('cmd', $data)) { return false; } $commandClass = sprintf('PHPPM\\Control\\Commands\\%sCommand', ucfirst($data['cmd'])); if (class_exists($commandClass)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function getCommand();", "public function getCommand();", "public function getCommand() {}", "public function generateCommands();", "function control($command){\n\t\tglobal $jbArr;\n\t\t\n\t\tswitch ($command){\n\t\t case \"addwhere\":\n\t\t $_SESSION['jb-addtype'] = $_POST['addplat'...
[ "0.6638124", "0.63800037", "0.62885934", "0.6281377", "0.61989665", "0.6044704", "0.58840877", "0.5823993", "0.57719284", "0.57213485", "0.57073474", "0.5648125", "0.56444454", "0.56128335", "0.56084883", "0.55366737", "0.553273", "0.5527969", "0.5511048", "0.54964226", "0.54...
0.0
-1
Build command with arguments and serialize it for send from bus.
public static function build() { return call_user_func_array([(new static), 'serialize'], func_get_args()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function buildCommand() {\n $command = $this->getCommand();\n \n if (!is_array($this->args) || count($this->args) == 0) {\n return $command;\n }\n \n $argumentOrder = $this->getArgumentOrder();\n \n $argumentString = '';\n foreach ($...
[ "0.71378326", "0.66368973", "0.64804363", "0.63345283", "0.59834695", "0.59090763", "0.58785033", "0.58448446", "0.57474583", "0.57109815", "0.5703746", "0.5587146", "0.55675906", "0.554257", "0.5539683", "0.5507162", "0.54456246", "0.53664273", "0.53636885", "0.5342467", "0....
0.5805697
8
Display a listing of the CardType. GET|HEAD /cardTypes
public function index() { $cardTypes = $this->cardTypeRepository->all(); return $this->sendResponse($cardTypes->toArray(), "CardTypes retrieved successfully"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n $cardtypes = CardType::all()->sortByDesc(\"id\");\n return view('backend.card_type.list',compact('cardtypes'));\n }", "protected function _get_card_types()\n\t{\n\t\treturn mod('card_type')->get_list(array('status' => 1));\n\t}", "public function index()\n {...
[ "0.8006593", "0.77714574", "0.7747189", "0.7200767", "0.6699193", "0.6673415", "0.6557275", "0.65284455", "0.65209764", "0.64769113", "0.6316018", "0.6305176", "0.6210645", "0.6209893", "0.6191733", "0.61816347", "0.61806655", "0.6175492", "0.61627316", "0.6161032", "0.613960...
0.7995267
1
Show the form for creating a new CardType. GET|HEAD /cardTypes/create
public function create() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n $vehicle_types = VehicleType::all();\n return view('admin.card_types.create', compact('vehicle_types'));\n }", "public function newAction()\n {\n $entity = new Cardtype();\n $form = $this->createCreateForm($entity);\n\n return array(\n ...
[ "0.77512854", "0.77071345", "0.7470313", "0.72935045", "0.7129155", "0.7129155", "0.7129155", "0.7129155", "0.7128335", "0.70886153", "0.70836544", "0.7079879", "0.7065928", "0.70650715", "0.699023", "0.6982837", "0.69462985", "0.6937143", "0.6933166", "0.692885", "0.6925652"...
0.0
-1
Store a newly created CardType in storage. POST /cardTypes
public function store(Request $request) { if(sizeof(CardType::$rules) > 0) $this->validateRequestOrFail($request, CardType::$rules); $input = $request->all(); $cardTypes = $this->cardTypeRepository->create($input); return $this->sendResponse($cardTypes->toArray(), "CardType saved successfully"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store(Request $request)\n {\n $request->validate([\n 'type' => 'required|string|max:255|unique:card_types,type',\n ]);\n $input_prices = $request->except('_token', 'type');\n $card_type = CardType::create([\n 'type' => $request->type,\n ])...
[ "0.7074834", "0.6789455", "0.669491", "0.6688449", "0.6678124", "0.6568245", "0.655998", "0.6557673", "0.6553704", "0.6515364", "0.6511342", "0.65005344", "0.64749616", "0.6472927", "0.6472759", "0.64597344", "0.6441618", "0.6421215", "0.64115596", "0.6400473", "0.639833", ...
0.73187214
0
Stock Report by date
public function stock_report_bydate($product_id) { $this->db->select(" SUM(d.quantity) as 'totalSalesQnty', SUM(b.quantity) as 'totalPurchaseQnty', (sum(b.quantity) - sum(d.quantity)) as stock "); $this->db->from('product_information a'); $this->db->join('product_purchase_details b','b.product_id...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function stock_report_bydate($product_id,$date,$limit,$page)\n\t{\t\n\n\t\t$this->db->select(\"a.product_name,a.product_id,a.price,a.product_model,sum(b.sell) as 'totalSalesQnty',sum(b.Purchase) as 'totalPurchaseQnty'\");\n\t\t$this->db->from('product_information a');\n\t\t$this->db->join('stock_history b',...
[ "0.6673559", "0.6611976", "0.64913917", "0.64118993", "0.6398449", "0.6045573", "0.5989129", "0.591034", "0.58747214", "0.5857466", "0.58574414", "0.58536905", "0.58112884", "0.58108544", "0.5806175", "0.58037215", "0.5803577", "0.5778431", "0.57490826", "0.57190955", "0.5718...
0.6725458
0
Stock Report by date
public function stock_report_bydate_pos($product_id) { $purchase = $this->db->select("SUM(quantity) as totalPurchaseQnty") ->from('product_purchase_details') ->where('product_id',$product_id) ->get() ->row(); $sales = $this->db->select("SUM(quantity) as totalSalesQnty") ->from('i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function stock_report_bydate($product_id)\n\t{\n\t\t$this->db->select(\"\n\t\t\t\tSUM(d.quantity) as 'totalSalesQnty',\n\t\t\t\tSUM(b.quantity) as 'totalPurchaseQnty',\n\t\t\t\t(sum(b.quantity) - sum(d.quantity)) as stock\n\t\t\t\");\n\n\t\t$this->db->from('product_information a');\n\t\t$this->db->join('pro...
[ "0.6725458", "0.6673559", "0.64913917", "0.64118993", "0.6398449", "0.6045573", "0.5989129", "0.591034", "0.58747214", "0.5857466", "0.58574414", "0.58536905", "0.58112884", "0.58108544", "0.5806175", "0.58037215", "0.5803577", "0.5778431", "0.57490826", "0.57190955", "0.5718...
0.6611976
2
Get Supplier rate of a product
public function supplier_rate($product_id) { $this->db->select('supplier_price'); $this->db->from('product_information'); $this->db->where(array('product_id' => $product_id)); $query = $this->db->get(); return $query->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStoreToOrderRate();", "public function getShippingRate();", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public function getRate()\n {\n return $this->rate;\n }", "public fu...
[ "0.6822923", "0.662737", "0.6521704", "0.6521704", "0.6521704", "0.6521704", "0.6521704", "0.6475667", "0.64574236", "0.64574236", "0.64202267", "0.6369425", "0.6317291", "0.6304636", "0.6234579", "0.6218331", "0.6202683", "0.6202683", "0.6196469", "0.6195779", "0.6173822", ...
0.7799357
0
Retrieve invoice Edit Data
public function retrieve_invoice_editdata($invoice_id) { $this->db->select(' a.*, b.customer_name, c.*, c.product_id, d.product_name, d.product_model, e.unit_short_name as unit, '); $this->db->from('invoice a'); $this->db->join('customer_information b','b.customer_id = a.customer_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function edit() {\n $this->wireframe->hidePrintButton();\n \n if($this->active_invoice->isNew()) {\n $this->response->notFound();\n } // if\n\n if(!$this->active_invoice->canEdit($this->logged_user)) {\n $this->response->forbidden();\n } // if\n\n $invoice_data = $t...
[ "0.8050768", "0.7603052", "0.7603052", "0.7603052", "0.7603052", "0.7603052", "0.7603052", "0.7603052", "0.7603052", "0.7603052", "0.7603052", "0.75916755", "0.7423876", "0.73912007", "0.7252808", "0.7238448", "0.7218335", "0.7190803", "0.71209985", "0.7103935", "0.7052401", ...
0.7054629
20
Retrieve company Edit Data
public function retrieve_company() { $this->db->select('*'); $this->db->from('company_information'); $this->db->limit('1'); $query = $this->db->get(); if ($query->num_rows() > 0) { return $query->result_array(); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function companyedit() {\r\n $company = $this->model->getCompany($_GET['id']);\r\n $contragentTypes = $this->model->getContragentTypes();\r\n\r\n return $this->view('company/companyedit', array('company' => $company, 'contragentType' => $contragentTypes));\r\n }", "public function ...
[ "0.8079655", "0.76925296", "0.76925296", "0.76925296", "0.76925296", "0.76925296", "0.7447546", "0.74428105", "0.7371149", "0.73032147", "0.71465385", "0.7109031", "0.7096516", "0.70388436", "0.69281536", "0.6900483", "0.68406135", "0.6832966", "0.6808973", "0.67827827", "0.6...
0.0
-1
GET TOTAL PURCHASE PRODUCT
public function get_total_purchase_item($product_id) { $this->db->select('SUM(quantity) as total_purchase'); $this->db->from('product_purchase_details'); $this->db->where('product_id',$product_id); $query = $this->db->get(); if ($query->num_rows() > 0) { return $query->result_array(); } return false;...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTotal()\n {\n return $this->getQty() * $this->getProduct()->getPrice();\n }", "public function m_totalPurchaseProduct($data){\n\n $query = $this->db->query(\"SELECT id_compra,numeroOrden,producto,cantidad,productos.almacen FROM compra INNER JOIN productos ON compra.producto...
[ "0.6669449", "0.654195", "0.6533189", "0.6500371", "0.64325404", "0.64245236", "0.64158654", "0.64075726", "0.6381002", "0.63485855", "0.6347958", "0.634005", "0.63303983", "0.63242084", "0.632249", "0.63179594", "0.62856454", "0.6283074", "0.62247974", "0.62199867", "0.62028...
0.69654757
0
GET TOTAL SALES PRODUCT
public function get_total_sales_item($product_id) { $this->db->select('SUM(quantity) as total_sale'); $this->db->from('invoice_details'); $this->db->where('product_id',$product_id); $query = $this->db->get(); if ($query->num_rows() > 0) { return $query->result_array(); } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ctrMostrarTotalProducto(){\n\n\n\n\t$tabla = 'productos';\n\n\n\n\t$respuesta = ModeloProducto::mdlMostrarTotalProducto($tabla);\n\n\n\n\treturn $respuesta;\n\n\n\n\t}", "private function total()\n\t{\n\t\t//\tObteniendo los productos del carro.\n\t\t$cart = \\Session::get('cart');\n\t\t$total = ...
[ "0.7015559", "0.69444984", "0.69252384", "0.69064814", "0.6878917", "0.678077", "0.67783475", "0.6761116", "0.6756227", "0.6721177", "0.6697802", "0.66496426", "0.6631772", "0.6604196", "0.6598614", "0.6558374", "0.6550037", "0.65467703", "0.6525937", "0.64947677", "0.6484077...
0.6968383
1
This function is used to Generate Key
public function generator($lenth) { $number=array("1","2","3","4","5","6","7","8","9"); for($i=0; $i<$lenth; $i++) { $rand_value=rand(0,8); $rand_number=$number["$rand_value"]; if(empty($con)) { $con=$rand_number; } else { $con="$con"."$rand_number";} } return $con; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function generateKey();", "public static function generateKey(){\n $key = '';\n // [0-9a-z]\n for ($i=0;$i<32;$i++){\n $key .= chr(rand(48, 90));\n }\n self::$_key = $key;\n }", "public static function generateKey()\n\t{\n\t\tToxusEncryption::...
[ "0.9017884", "0.8389013", "0.8196144", "0.8190681", "0.81611687", "0.8160369", "0.81117964", "0.8029669", "0.80217284", "0.79481924", "0.790202", "0.7835827", "0.7789329", "0.77827156", "0.77658886", "0.776351", "0.7762743", "0.77533644", "0.7742257", "0.77214", "0.7713544", ...
0.0
-1
get Product List for pos invoice page
public function product_list() { $query=$this->db->select(' a.product_id,a.product_name,a.price,a.image_thumb,a.variants,a.product_model, c.category_name,c.category_id ') ->from('product_information a') ->join('product_category c','c.category_id = a.category_id','left') ->group_by('a.produ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _generateProductsData(){\n \n $products = $this->context->cart->getProducts();\n $pagseguro_items = array();\n \n $cont = 1;\n \n foreach ($products as $product) {\n \n $pagSeguro_item = new PagSeguroItem();\n $pagSe...
[ "0.7090006", "0.70180386", "0.70119447", "0.6843399", "0.677041", "0.67395526", "0.6701655", "0.67001", "0.6697406", "0.6585714", "0.65792453", "0.65592134", "0.654061", "0.65305257", "0.6523669", "0.6523021", "0.6500217", "0.647885", "0.6465213", "0.6464189", "0.64565456", ...
0.0
-1
Validate that for the given resource, no two collections reference the same file
protected static function validateNoDuplicateFileReferences(IResource $resource) { $collections = $resource->getCollections(); // seen files mapped as file => collection name $seenFiles = []; foreach($collections as $collection) { $collectionName = $collection->...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCanNotBeManyIncludedResourcesWithEqualIdentifiers()\n {\n $apple = new ResourceObject('apples', '1');\n $apple->setAttribute('color', 'red');\n $doc = Document::fromIdentifier($apple->toIdentifier());\n $doc->setIncluded($apple, $apple);\n $this->assertJson...
[ "0.580311", "0.5745797", "0.56992567", "0.5488943", "0.5420338", "0.5297465", "0.5290393", "0.5257269", "0.5236538", "0.51356614", "0.50844944", "0.50570256", "0.5002455", "0.50001", "0.49946678", "0.4963443", "0.49577194", "0.4929965", "0.49214226", "0.49202245", "0.49069595...
0.74956924
0
Check that a value is a valid social security number format
public function isValid($value) { return (preg_match(self::REGEX, $value, $match) && $match[1] > 0 && $match[2] > 0 && $match[3] > 0 // No all zeros in digit group && $match[1] != 666 // No Number of the Beast && $match[1] <= 899); // Highest are...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function validateNumber(): bool;", "protected function validateNumber($value) {\n if (preg_match(\"/^\\-?[0-9\\ ]+[\\.|\\,]?[0-9]*$/\", $value))\n return true;\n $this->setError(t(\"Invalid number\"));\n return false;\n }", "function idFormat($value){\n \n if(!preg_match(VA...
[ "0.6689423", "0.6681912", "0.6621274", "0.6613025", "0.6588595", "0.65344244", "0.64867073", "0.6485015", "0.64309436", "0.6422654", "0.6421177", "0.6415176", "0.6403601", "0.6402164", "0.638611", "0.6364938", "0.631045", "0.6274892", "0.625382", "0.62535036", "0.6248594", ...
0.0
-1
======== public functions ========= / to construct object of the class
public function __construct() { // Register the Destructor to be called // This is needed in case of Abnormal termination of script caused by FATAL error // in which case, the object destructor is not called register_shutdown_function(array(&$this, "__destruct")); return; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function construct()\n\t\t{\n\t\t}", "function _construct() {\n \t\n\t\t\n\t}", "function _construct(){ }", "public function construct() {\n\n }", "function __constructor(){}", "public function fn_construct_class() {\n\t}", "protected function construct(){\n\n }", "function __construc...
[ "0.8545809", "0.85284656", "0.8475179", "0.8348304", "0.8105496", "0.8029864", "0.80029976", "0.7986517", "0.79752797", "0.7912979", "0.79049337", "0.78876925", "0.78876925", "0.78876925", "0.78876925", "0.78876925", "0.78876925", "0.78729856", "0.7871186", "0.7871186", "0.78...
0.0
-1
/ to unset/release/destroy varibales/resources/objects used by the class
public function __destruct() { // debug trace on function entry if( $this->vDebugTraceFlag == 1 ) tlibphp_debug_trace_func ( __METHOD__."<BR>\n" ); // return call status as VOID return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __destruct()\n {\n $vars = get_object_vars($this);\n if (is_array($vars)) {\n foreach ($vars as $key => $val) {\n $this->$key = null;\n }\n }\n\n parent::__destruct();\n }", "protected function __del__() { }", "public functi...
[ "0.7043474", "0.69609374", "0.6888887", "0.68639", "0.68632275", "0.68291247", "0.6774428", "0.67690074", "0.6729918", "0.6715911", "0.6659202", "0.664933", "0.663845", "0.66308254", "0.66252923", "0.66252923", "0.66252923", "0.6601448", "0.6581345", "0.6581345", "0.65788496"...
0.0
-1
/ to initialize varibales/acquire resources/contruct & initialize objects required by the class
public function Initialize($pDbConn = 0, $pDebugTraceFlag = 0, $pCHCInstituteListStruct=null) { // debug trace on function entry if( $pDebugTraceFlag == 1 ) tlibphp_debug_trace_func ( __METHOD__."<BR>\n" ); $this->vDebugTraceFlag = $pDebugTraceFlag; $this->vDbConn ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function _init();", "abstract protected function _init();", "abstract public function init();", "public function _init() {}", "public function _init(){}", "abstract protected function init();", "abstract protected function init();", "abstract protected function init();", "abstrac...
[ "0.7500184", "0.7500184", "0.7468289", "0.74601597", "0.7437136", "0.743282", "0.743282", "0.743282", "0.743282", "0.743282", "0.743282", "0.7430563", "0.74061453", "0.74061453", "0.74061453", "0.74061453", "0.74061453", "0.74032974", "0.74032974", "0.73860496", "0.7358536", ...
0.0
-1
/ Load TP category log date.
public function HCInstituteListData() { $sql="SELECT HID.INSTITUTE_NAME INSTITUTE_NAME, HID.RANKING RANKING, HIAD.ADDRESS_LINE1 ADDRESS_LINE1, HIAD.ADDRESS_LINE2 ADDRESS_LINE2, HIAD.PIN_CODE PIN_CODE, HCM.CITY_NAME CITY_NAME FROM TEST.INSTITUTE_DTL HID LEFT JOIN TEST.INSTITU...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index($log_date = NULL){\n // print_r(log_message('info','se ingresa dato al log'));\n //var_dump($this->session->userdata('NameUser'));\n $log_date = \"2019-02-15\";\n $this->load->library('log_library');\n if ($log_date == NULL)\n {\n // default...
[ "0.5843965", "0.53210676", "0.52958804", "0.51055026", "0.50952405", "0.50866675", "0.50654703", "0.5021907", "0.49633083", "0.49614096", "0.4911697", "0.49067274", "0.48724407", "0.48673436", "0.48669273", "0.4842863", "0.48310772", "0.48222232", "0.48164505", "0.47864208", ...
0.0
-1
Serverside rendering of the `core/calendar` block.
function render_block_core_calendar( $attributes ) { global $monthnum, $year; // Calendar shouldn't be rendered // when there are no published posts on the site. if ( ! block_core_calendar_has_published_posts() ) { if ( is_user_logged_in() ) { return '<div>' . __( 'The calendar block is hidden because there a...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function calendar()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'calendar');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('frontend')\n ->title($this->global_setting['site_ti...
[ "0.7868035", "0.7584257", "0.74829024", "0.7348144", "0.71865946", "0.7084642", "0.7071293", "0.6928249", "0.6878954", "0.6874387", "0.6786436", "0.6680422", "0.6600298", "0.6530445", "0.6496328", "0.64496005", "0.6421507", "0.63922626", "0.630482", "0.6170835", "0.61464334",...
0.73272
4
Registers the `core/calendar` block on server.
function register_block_core_calendar() { register_block_type_from_metadata( __DIR__ . '/calendar', array( 'render_callback' => 'render_block_core_calendar', ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function register_block_core_calendar()\n {\n }", "public function calendar()\n {\n $this->template->set('global_setting', $this->global_setting);\n $this->template->set('page', 'calendar');\n $this->template->set_theme('default_theme');\n $this->template->set_layout('fronten...
[ "0.85205954", "0.657037", "0.6336243", "0.61945", "0.6067849", "0.588502", "0.57776314", "0.576", "0.57515514", "0.56840575", "0.5670311", "0.5653882", "0.5611701", "0.5578838", "0.5560635", "0.5559", "0.55524904", "0.5475226", "0.5474373", "0.54522383", "0.541001", "0.5396...
0.83817387
1
Returns whether or not there are any published posts. Used to hide the calendar block when there are no published posts. This compensates for a known Core bug:
function block_core_calendar_has_published_posts() { // Multisite already has an option that stores the count of the published posts. // Let's use that for multisites. if ( is_multisite() ) { return 0 < (int) get_option( 'post_count' ); } // On single sites we try our own cached option first. $has_published_po...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function block_core_calendar_has_published_posts()\n {\n }", "public function isPublished()\n {\n return $this->postID > 0;\n }", "function block_core_calendar_update_has_published_posts() {\n\tglobal $wpdb;\n\t$has_published_posts = (bool) $wpdb->get_var( \"SELECT 1 as test FROM {$wpdb->pos...
[ "0.8337035", "0.82862324", "0.8159969", "0.7968392", "0.7810972", "0.7656198", "0.7612611", "0.7586487", "0.74971926", "0.7481633", "0.7423328", "0.74053067", "0.7374402", "0.7343217", "0.7279256", "0.72571737", "0.7216251", "0.720999", "0.7206806", "0.7197219", "0.7145267", ...
0.8156727
3
Queries the database for any published post and saves a flag whether any published post exists or not.
function block_core_calendar_update_has_published_posts() { global $wpdb; $has_published_posts = (bool) $wpdb->get_var( "SELECT 1 as test FROM {$wpdb->posts} WHERE post_type = 'post' AND post_status = 'publish' LIMIT 1" ); update_option( 'wp_calendar_block_has_published_posts', $has_published_posts ); return $has_p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isPublished()\n {\n return $this->postID > 0;\n }", "public function exists()\n {\n if (get_post($this->id)) {\n return true;\n }\n\n return false;\n }", "function block_core_calendar_update_has_published_posts()\n {\n }", "function che...
[ "0.7314679", "0.69616866", "0.6937698", "0.67566526", "0.67335445", "0.66820747", "0.6677275", "0.6634054", "0.66263545", "0.6624386", "0.6617863", "0.6604181", "0.65734166", "0.6549202", "0.65190005", "0.65065455", "0.6502604", "0.64556044", "0.6451244", "0.6451075", "0.6440...
0.68885237
3
Handler for updating the has published posts flag when a post is deleted.
function block_core_calendar_update_has_published_post_on_delete( $post_id ) { $post = get_post( $post_id ); if ( ! $post || 'publish' !== $post->post_status || 'post' !== $post->post_type ) { return; } block_core_calendar_update_has_published_posts(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function block_core_calendar_update_has_published_post_on_delete($post_id)\n {\n }", "function _update_posts_count_on_delete( $post_id ) {\n\t$post = get_post( $post_id );\n\n\tif ( ! $post || 'publish' !== $post->post_status || 'post' !== $post->post_type ) {\n\t\treturn;\n\t}\n\n\tupdate_posts_count();\n...
[ "0.773004", "0.682745", "0.6758581", "0.6699654", "0.667032", "0.66587025", "0.6580085", "0.650539", "0.6482737", "0.6432054", "0.64120334", "0.6399164", "0.63894546", "0.63894546", "0.63547784", "0.62989587", "0.62572336", "0.61983925", "0.61899203", "0.6188232", "0.6187405"...
0.75024563
1
Handler for updating the has published posts flag when a post status changes.
function block_core_calendar_update_has_published_post_on_transition_post_status( $new_status, $old_status, $post ) { if ( $new_status === $old_status ) { return; } if ( 'post' !== get_post_type( $post ) ) { return; } if ( 'publish' !== $new_status && 'publish' !== $old_status ) { return; } bl...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function block_core_calendar_update_has_published_post_on_transition_post_status($new_status, $old_status, $post)\n {\n }", "function block_core_calendar_update_has_published_posts()\n {\n }", "public function publishPost($POST) {\r\n\t\t$sql = 'UPDATE `posts` SET `post_status` = :post_status\r\n\t...
[ "0.7367959", "0.7366401", "0.7286351", "0.71697634", "0.70735866", "0.7056721", "0.7048828", "0.68865246", "0.68777025", "0.67644525", "0.67183703", "0.6718179", "0.6715238", "0.6680298", "0.6623053", "0.65785986", "0.65652233", "0.6553843", "0.65230256", "0.6519419", "0.6496...
0.732811
2
This command can be used to obtain all the invoices for a particular client or in a particular status. Parameters: none Optional Parameters: userid the client ID to retrieve invoices for status the status to filter for, Paid, Unpaid, Cancelled, etc... This field can also be set to Overdue to provide overdue invoices. l...
public function whmcs_get_invoices($params = array()) { $params['action'] = 'GetInvoices'; // return Whmcs_base::send_request($params); $load = new Whmcs_base(); return $load->send_request($params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInvoices(User $user);", "function invoices ($user_id) {\n global $sql;\n return $sql->sql_select_array_query(\"SELECT * FROM `invoice` WHERE user_id = '{$user_id}' ORDER BY invoice_date DESC\");\n }", "public function invoices() {\t\t\r\n\t\t\r\n $user = $this->sessio...
[ "0.70171547", "0.6737925", "0.65411234", "0.6535485", "0.65344656", "0.6527238", "0.64166236", "0.638292", "0.6378124", "0.63144255", "0.62796354", "0.6273689", "0.61783254", "0.6092846", "0.60784084", "0.59767044", "0.59664977", "0.59593934", "0.59463686", "0.59462917", "0.5...
0.63191724
9
This command is used to obtain an invoice for a client. Parameters: invoiceid should be the invoice id you wish to retrieve Optional Parameters: none See:
public function whmcs_get_invoice($params = array()) { $params['action'] = 'GetInvoice'; // return Whmcs_base::send_request($params); $load = new Whmcs_base(); return $load->send_request($params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInvoice($invoiceId);", "public function getInvoice($invoice_id)\n {\n return $this->remote->select()->from('invoice')->where('id', '=', $invoice_id)->fetch();\n }", "public function invoice_info( $invoice_id ) {\r\n\t\treturn $this->_send_request( 'invoices/'.$invoice_id );\r\n\...
[ "0.7854324", "0.7548646", "0.7358585", "0.73137087", "0.71643883", "0.70777", "0.68753266", "0.6853473", "0.6829568", "0.67195904", "0.669921", "0.6686736", "0.6637078", "0.65963215", "0.65792054", "0.65765613", "0.65560067", "0.6522328", "0.65116876", "0.6456902", "0.6425932...
0.66622555
12
This command is used to create a new invoice for a client. Parameters: userid should contain the user id of the client you wish to create the invoice for date the date the invoice is created in the format YYYYMMDD duedate the date the invoice is due in the format YYYYMMDD paymentmethod the payment method for the invoic...
public function whmcs_create_invoice($params = array()) { $params['action'] = 'CreateInvoice'; // return Whmcs_base::send_request($params); $load = new Whmcs_base(); return $load->send_request($params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createInvoice()\r\n {\r\n }", "public function createinvoiceAction() {\n\t\t$request = Zend_Controller_Front::getInstance ()->getRequest ();\n\t\tif (is_numeric ( $request->id )) {\n\t\t\t$invoiceID = Invoices::Create ( $request->id );\n\t\t\tif (is_numeric ( $invoiceID )) {\n\t\t\t\tInvoic...
[ "0.62431175", "0.6120787", "0.6041523", "0.593639", "0.5877455", "0.5750187", "0.5670991", "0.5654277", "0.55962294", "0.5554885", "0.5551387", "0.5549434", "0.55465764", "0.5504757", "0.5488674", "0.54754746", "0.54611015", "0.5378579", "0.5369627", "0.53639406", "0.5345843"...
0.627072
0
This command is used to update an invoice in the system. Parameters: invoiceid The ID of the invoice to update Optional Parameters: itemdescription Array of existing line item descriptions to update. Line ID from database needed itemamount and itemtaxed should be passed when updating the description itemamount Array of...
public function whmcs_update_invoice($params = array()) { $params['action'] = 'UpdateInvoice'; // return Whmcs_base::send_request($params); $load = new Whmcs_base(); return $load->send_request($params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function invoiceitem_update( $invoiceitem_id, $amount, $desc = FALSE ) {\r\n\t\t$params['amount'] = $amount;\r\n\t\t$params['currency'] = 'usd';\r\n\t\tif( $desc ) $params['description'] = $desc;\r\n\t\t\r\n\t\treturn $this->_send_request( 'invoiceitems/'.$invoiceitem_id, $params, STRIPE_METHOD_POST );\r\n\...
[ "0.70268726", "0.6774345", "0.6762693", "0.6693968", "0.6677161", "0.66056716", "0.65358084", "0.65308124", "0.6510503", "0.64811516", "0.64772123", "0.6472973", "0.63481575", "0.6290634", "0.6236428", "0.6216566", "0.6215559", "0.6207837", "0.61924034", "0.6183036", "0.61649...
0.65201837
8
This command is used to add a payment to an invoice. Parameters: nvoiceid should contact the ID number of the invoice to add the payment to transid should contain the transaction number for the payment gateway should contain the gateway used in system name format, eg. paypal, authorize, etc... Optional Parameters: amou...
public function whmcs_add_invoice_payment($params = array()) { $params['action'] = 'AddInvoicePayment'; // return Whmcs_base::send_request($params); $load = new Whmcs_base(); return $load->send_request($params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function addInvoice($money, $options)\n {\n $this->post['amount'] = $this->amount($money / 100);\n $this->post['currency'] = self::$default_currency;\n $this->post['description'] = $options['description'];\n }", "public function _add()\n {\n $type_code = post_param_st...
[ "0.6275588", "0.6158984", "0.60097563", "0.580461", "0.5773559", "0.5767235", "0.5749239", "0.5673512", "0.56638914", "0.5619304", "0.5570909", "0.55623055", "0.55480385", "0.55438316", "0.55218756", "0.5521502", "0.5521502", "0.55105996", "0.5490935", "0.5490658", "0.5448747...
0.6357757
0
This command is used to attempt to capture payment when an invoice is set to a merchant gateway module Parameters: invoiceid the ID of the invoice the capture is to be attempted for Optional Parameters: cvv can be used to pass the cards verification value in the payment request See:
public function whmcs_capture_payment($params = array()) { $params['action'] = 'CapturePayment'; // return Whmcs_base::send_request($params); $load = new Whmcs_base(); return $load->send_request($params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _doCapt($oID, $amt = 0, $currency = 'USD') {\r\n global $db, $messageStack;\r\n\r\n //@TODO: Read current order status and determine best status to set this to\r\n $new_order_status = MODULE_PAYMENT_AUTHORIZENET_ECHECK_ORDER_STATUS_ID;\r\n if ($new_order_status == 0) $new_order_status = 1;\r\n...
[ "0.6311083", "0.5891329", "0.5836351", "0.5625984", "0.55789125", "0.5550932", "0.55446655", "0.55256635", "0.5502811", "0.5426349", "0.53792167", "0.5217016", "0.5210063", "0.51768696", "0.51056033", "0.50885445", "0.5087918", "0.5087918", "0.50864136", "0.5068353", "0.50659...
0.5356843
11
This command is used to apply credit from a clients credit balance to an invoice within WHMCS. Parameters: invoiceid the ID to apply the credit to amount the amount of credit to apply (must be less than or equal to clients available credit balance) Amount can also be passed as "full" to pay the invoice with credit (wil...
public function whmcs_apply_credit($params = array()) { $params['action'] = 'ApplyCredit'; // return Whmcs_base::send_request($params); $load = new Whmcs_base(); return $load->send_request($params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function credit()\n\t{\n\t\t\\IPS\\Dispatcher::i()->checkAcpPermission( 'invoices_edit' );\n\t\t\n\t\t/* Load Invoice */\n\t\ttry\n\t\t{\n\t\t\t$invoice = \\IPS\\nexus\\Invoice::load( \\IPS\\Request::i()->id );\n\t\t}\n\t\tcatch ( \\OutOfRangeException $e )\n\t\t{\n\t\t\t\\IPS\\Output::i()->error( 'node_err...
[ "0.65179265", "0.59493154", "0.5614886", "0.54753965", "0.5434809", "0.5278258", "0.52728987", "0.51560026", "0.5145161", "0.51052094", "0.5090813", "0.50867015", "0.5053317", "0.50228125", "0.50062656", "0.5004653", "0.49184623", "0.49109846", "0.48649925", "0.4858687", "0.4...
0.51491773
8
This command is used to add a new billable item to the system. Parameters: clientid the User ID to assign the charge to description the description to be shown to a customer when invoiced hours number of hours/quantity (not required for single quantities) amount the total amount to invoice for invoiceaction noinvoice, ...
public function whmcs_add_billable_item($params = array()) { $params['action'] = 'AddBillableItem'; // return Whmcs_base::send_request($params); $load = new Whmcs_base(); return $load->send_request($params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_item()\n {\n $request = new Types\\AddItemRequestType();\n\n // An user token is required when using the Trading service.\n $request->RequesterCredentials = new Types\\CustomSecurityHeaderType();\n $request->RequesterCredentials->eBayAuthToken = $this->config->ite...
[ "0.5895181", "0.586797", "0.57233477", "0.5667949", "0.55831105", "0.55056405", "0.5445344", "0.5438714", "0.5418606", "0.5398849", "0.5356569", "0.535204", "0.5320702", "0.53193676", "0.5309789", "0.5300819", "0.52761906", "0.52751493", "0.52632713", "0.523926", "0.5233082",...
0.7137854
0
This command is used to add credit to a client Parameters: clientid the ID of the client the credit is to be added to description reason for credit being added (stored in admin credit log) amount the amount to be added Optional Parameters: none See:
public function whmcs_add_credit($params = array()) { $params['action'] = 'AddCredit'; // return Whmcs_base::send_request($params); $load = new Whmcs_base(); return $load->send_request($params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function credit()\n\t{\n\t\t\\IPS\\Dispatcher::i()->checkAcpPermission( 'invoices_edit' );\n\t\t\n\t\t/* Load Invoice */\n\t\ttry\n\t\t{\n\t\t\t$invoice = \\IPS\\nexus\\Invoice::load( \\IPS\\Request::i()->id );\n\t\t}\n\t\tcatch ( \\OutOfRangeException $e )\n\t\t{\n\t\t\t\\IPS\\Output::i()->error( 'node_err...
[ "0.61397743", "0.60845107", "0.60529935", "0.59566075", "0.5824449", "0.5804098", "0.5802511", "0.5777823", "0.5718759", "0.56875986", "0.5507631", "0.5478935", "0.54697776", "0.53985703", "0.53643626", "0.5359275", "0.5340747", "0.53281", "0.53189", "0.5306369", "0.5294766",...
0.6651065
0
This command is used to add a transaction. Parameters: mountin amount to add to the account amountout if an outgoing enter this paymentmethod gateway used in WHMCS date date of transaction (same format as your WHMCS eg DD/MM/YYYY) Optional Parameters: userid Add Transaction to a user invoiceid Add transaction to a part...
public function whmcs_add_transaction($params = array()) { $params['action'] = 'AddTransaction'; // return Whmcs_base::send_request($params); $load = new Whmcs_base(); return $load->send_request($params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function AddTransaction($options = array()){\n if( !isset($options['currency1']) ){\n $options['currency1'] = $options['currency'];\n }\n if( !isset($options['currency2']) ){\n $options['currency2'] = $options['currency1'];\n }\n\n return $this->api->...
[ "0.6663536", "0.6490498", "0.6286132", "0.6228105", "0.60515916", "0.60260266", "0.6001053", "0.5961314", "0.5954987", "0.59515584", "0.58713526", "0.5761473", "0.57506424", "0.57470787", "0.57373303", "0.5735373", "0.5711051", "0.57082266", "0.5640402", "0.56190807", "0.5562...
0.6032627
5
This command is used to obtain an XML list of transactions from your WHMCS Parameters: None Optional Parameters: clientid User ID to obtain details for invoiceid Obtain transactions for a specific invoice transid Obtain details for a specific transaction ID See:
public function whmcs_get_transactions($params = array()) { $params['action'] = 'GetTransactions'; // return Whmcs_base::send_request($params); $load = new Whmcs_base(); return $load->send_request($params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_client_transactions($client_id)\n {\n $sql=\"SELECT * FROM transactions where client_id=$client_id order by trans_date desc\";\n $q=$this->db->query($sql);\n return $q->result_array();\n }", "public function getTransactions();", "public stati...
[ "0.63802934", "0.63281214", "0.6162321", "0.6152873", "0.61202097", "0.6118184", "0.6093457", "0.5899168", "0.5872867", "0.5712852", "0.56989634", "0.56658953", "0.55668145", "0.556485", "0.5549938", "0.5540952", "0.55267894", "0.55040014", "0.54951215", "0.5487675", "0.54851...
0.66501606
0
This command is used to update a transaction. Parameters: transactionid The Transaction ID to update. tblaccounts.id (This is not the transid from the gateway) Optional Parameters: userid Add Transaction to a user currency Currency ID for a transaction gateway Gateway to assign transaction to date date of transaction Y...
public function whmcs_update_transaction($params = array()) { $params['action'] = 'UpdateTransaction'; // return Whmcs_base::send_request($params); $load = new Whmcs_base(); return $load->send_request($params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function update($user = 0, $notrigger = 0) {\n global $conf, $langs;\n $error = 0;\n\n // Clean parameters\n if (isset($this->number))\n $this->number = trim($this->number);\n if (isset($this->label))\n $this->label = trim($this->label);\n if (isset($...
[ "0.606023", "0.6050707", "0.5745061", "0.5736575", "0.5670777", "0.5571383", "0.5542231", "0.5538094", "0.547956", "0.5417745", "0.54023594", "0.5401341", "0.5371702", "0.53282005", "0.5312786", "0.53033274", "0.52986866", "0.5274729", "0.52730805", "0.5271253", "0.5269266", ...
0.56300217
5
This command is used retrieve a list of payment methods available. Parameters: None Optional Parameters: none See:
public function whmcs_get_payment_methods($params = array()) { $params['action'] = 'GetPaymentMethods'; // return Whmcs_base::send_request($params); $load = new Whmcs_base(); return $load->send_request($params); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAvailablePaymentMethods ();", "protected function getAllAvailableMethods()\n {\n /* TODO get all available payment methods from toolbox */\n }", "public function iN_PaymentMethods() {\n\t\t$query = mysqli_query($this->db, \"SELECT * FROM i_payment_methods WHERE payment_method_i...
[ "0.81378186", "0.75367045", "0.7113911", "0.7052977", "0.7023732", "0.6987148", "0.6944982", "0.6827033", "0.67784935", "0.67511505", "0.67176086", "0.6686287", "0.666047", "0.6621312", "0.65936416", "0.6592874", "0.65672445", "0.6548892", "0.65153396", "0.64885575", "0.64399...
0.69935954
5
Display a listing of the resource.
public function index() { $especialidades=DB::table('especialidad')->get(); return view('ViewAdm.FormRegistroEspecialidad')->with("especialidades",$especialidades); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function register(Request $request) { $this->validator($request->all())->validate(); $data=Request()->all(); $especialidad = new especialidad; $especialidad->nombre = $data["nombre"]; $especialidad->descripcion = $data["descripcion"]; $resul=$especialidad->sa...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show($id) { $especialidades=DB::table('especialidad')->get(); $especialidad=DB::table('especialidad')->where('id', $id)->first(); return view('ViewAdm.FormEditEspecialidad')->with("especialidades",$especialidades)->with("especialidad",$especialidad); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit($id) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.7855196", "0.76957726", "0.7273917", "0.7241426", "0.71717227", "0.7064183", "0.70528984", "0.69836885", "0.694763", "0.69469565", "0.6941572", "0.69301945", "0.6903868", "0.68989486", "0.68989486", "0.68787694", "0.68641657", "0.6860115", "0.6857286", "0.68464494", "0.683...
0.0
-1
Update the specified resource in storage.
public function update(Request $request ) { $this->validator_edit($request->all())->validate(); $data=Request()->all(); $resul=DB::table('Especialidad')->where('id',$data["id"]) ->update(['nombre'=>$data["nombre"], 'descripcio...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1