query
stringlengths
10
8.11k
document
stringlengths
17
398k
negatives
sequencelengths
19
20
metadata
dict
Open a table footer
function tabletfoot_open() { $this->doc .= DOKU_TAB.'<tfoot>'.DOKU_LF; }
[ "function tabletfoot_close() {\n $this->doc .= DOKU_TAB.'</tfoot>'.DOKU_LF;\n }", "function tabletfoot_open() {\n }", "private function _add_table_footer()\n {\n $html = \" </tbody>\\n\n </table>\\n\";\n $this->_elements['s_footer'] = $this->_form->createElement('static', 's_footer', '', $html);\n }", "function showTableFooter() {\n\techo \"\t</tbody>\";\n\techo \"</table>\";\n}", "function close_table()\n {\n if ($this->table_cells) {\n // the last table row separator has been omitted, adds the row\n $this->add_table_row();\n }\n\n $this->html[] = $this->end_tags['+-']['table'];\n $this->table_cell_type = null;\n }", "function tableheader_close() {\n }", "function table_footer()\n{\n?>\n</table>\n<?\n}", "function simpleTableFooter(){\r\n\t\treturn \"</TD></TR></TABLE>\";\r\n\t}", "function tabletbody_close() {\n $this->doc .= DOKU_TAB.'</tbody>'.DOKU_LF;\n }", "public function addTableFooter() {\n\t\t// auto width\n\t\tforeach ($this->tableParams['auto_width'] as $col)\n\t\t\t$this->xls->getActiveSheet()->getColumnDimensionByColumn($col)->setAutoSize(true);\n\t\t// filter (has to be set for whole range)\n\t\tif (count($this->tableParams['filter']))\n\t\t\t$this->xls->getActiveSheet()->setAutoFilter(PHPExcel_Cell::stringFromColumnIndex($this->tableParams['filter'][0]).($this->tableParams['header_row']).':'.PHPExcel_Cell::stringFromColumnIndex($this->tableParams['filter'][count($this->tableParams['filter']) - 1]).($this->tableParams['header_row'] + $this->tableParams['row_count']));\n\t\t// wrap\n\t\tforeach ($this->tableParams['wrap'] as $col)\n\t\t\t$this->xls->getActiveSheet()->getStyle(PHPExcel_Cell::stringFromColumnIndex($col).($this->tableParams['header_row'] + 1).':'.PHPExcel_Cell::stringFromColumnIndex($col).($this->tableParams['header_row'] + $this->tableParams['row_count']))->getAlignment()->setWrapText(true);\n\t}", "function\ttableFoot() {\n\n\t\t/**\n\t\t *\n\t\t */\n\t\t$frm\t=\t$this->myDoc->currMasterPage->getFrameByFlowName( \"Auto\") ;\n\t\tif ( $this->myDoc->pageNr >= 1) {\n\t\t\tfor ( $actRow=$this->myTable->getFirstRow( BRow::RTFooterCT) ; $actRow !== FALSE ; $actRow=$this->myTable->getNextRow()) {\n\t\t\t\tif ( $actRow->isEnabled()) {\n\t\t\t\t\t$this->punchTableRow( $actRow) ;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$frm->currVerPos\t+=\t1.5 ;\t\t// now add the height of everything we have output'\n\t\t}\n\t\tfor ( $actRow=$this->myTable->getFirstRow( BRow::RTFooterPE) ; $actRow !== FALSE ; $actRow=$this->myTable->getNextRow()) {\n\t\t\t$this->punchTableRow( $actRow) ;\n\t\t}\n\t\t$frm->currVerPos\t+=\t1.5 ;\t\t// now add the height of everythign we have output'\n\t}", "protected function _html_report_footer() {\n\t\t// construct the footer of the resulting table\n\t\t?>\n\t\t\t\t</tbody>\n\t\t\t\t<tfoot><?php $this->_html_report_columns() ?></tfoot>\n\t\t\t</table>\n\t\t<?php\n\t}", "function TableClose () {\n \t$CI =& get_instance();\n\n \t$output = '</table></div>';\n\t$output .= '<div class=\"paginate hidden\" id=\"orders-datatable_paginate\">';\n \t$output .= $CI->pagination->create_links();\n\t$output .= '<a tabindex=\"0\" class=\"\"></a></div>';\n \t$output .= '</form>\n<span class=\"hidden\" style=\"text-transform:uppercase;font-weight:500;\">' . $CI->router->fetch_class() . '</span>\n\t\t\t\t\t<div class=\"hidden\" id=\"method\">' . $CI->router->fetch_method() . '</div>\n\t\t\t\t\t<div class=\"hidden\" id=\"page\">' . $this->offset . '</div>';\n\n \treturn $output;\n }", "public function renderTableFooter() {\n\t\tif($this->getHasFooter()) {\n\t\t\tforeach($this->columns as $column) {\n\t\t\t\t$column->renderFooterCell();\n\t\t\t}\n\t\t\t$this->row++;\n\t\t}\n\t}", "public static function endTable()\n {\n ?>\n </ul>\n </div>\n <?php\n }", "function tabletbody_open() {\n $this->doc .= DOKU_TAB.'<tbody>'.DOKU_LF;\n }", "function close_table_header() {\n\t\techo '</th>';\n\t\tnewline();\n\t}", "private static function repeat_table_close() {\n echo '</tbody></table><p class=\"add-row\"><a data-selector=\"', self::$field['id'], '_repeat\" class=\"add-row-button button\" href=\"#\">' . __('Add Row', 'cmb') . '</a></p>';\n }", "public function renderTableFooter()\r\n {\r\n if(Yii::$app->controller->action->id == 'event') {\r\n $content = HTML::a('Send', '/records/emails',['class'=>'event_submit']);\r\n return \"<tfoot class='table-footer'><tr><td colspan='6'>\\n\" . $content . \"\\n</td></tr></tfoot>\";\r\n }else{\r\n return parent::renderTableFooter();\r\n }\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a disease name and its result to this sample. Does some simple checking to avoid conflicts
function addResult($testName, $status, $od1, $od2, $odav, $pp1, $pp2, $var, $ppav, $visitId){ //check that this disease is not yet assigned a result and if it is the result is the same $tempArray = array('status' => $status, 'od1' => $od1, 'od2' => $od2, 'odav' => $odav, 'pp1' => $pp1, 'pp2' => $pp2, 'var' => $var, 'ppav' => $ppav); if(in_array($tempArray, $this->results[$testName])) return 1; $this->results[$testName] = $tempArray; return 0; }
[ "protected function storeDisease()\n\t{\n\t\t$validate = Validator::make(Input::all(), array(\n\t\t\t\t'disease_name' => 'required|unique:diseases,name',\n\t\t\t));\n\n\t\tif($validate->fails())\n\t\t{\n\t\t\treturn Redirect::route('stones-home')->withErrors($validate)->with('modal', '#disease_form');\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$disease = new Disease;\n\t\t\t$disease->name = Input::get('disease_name');\n\n\t\t\tif($disease->save())\n\t\t\t{\n\t\t\t\treturn Redirect::route('stones-home')->with('success', 'Disease gespeichert'); \n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn Redirect::route('stones-home')->with('fail', 'Error on save from Disease'); \n\t\t\t}\n\t\t}\n\t}", "function addAdvisee($advisorCLID)\n{\n\tglobal $error;\n\t$studentCLID = $_POST['student_clid'];\n\tmysql_query(\"INSERT INTO advised_by VALUES ('$advisorCLID','$studentCLID');\");// or die(mysql_errno().': '.mysql_error());\n\tswitch (mysql_errno())\n\t{\n\t\t// set appropriate error output for mysql errors\n\t\tcase 1452: $error='Student CLID does not exist'; break;\n\t\tcase 1062: $error='Duplicate student CLID'; break;\n\t\tdefault: $error=''; break;\n\t}\n}", "public function createNewSampleRecord(){\n // associative array of field name => field value pairs\n $values = array($this->_name => $this->name, $this->_surname => $this->surname);\n return $result = parent::insertInformation($this->_tableName, $values);\n }", "public function addDrug()\n {\n $data = array();\n $data['title'] = $this->verifyDataRequest('title');\n $data['subname'] = $this->verifyDataRequest('subname');\n $data['bar_code'] = $this->verifyDataRequest('bar_code');\n $data['flash_code'] = $this->verifyDataRequest('flash_code');\n\n $dal = new DrugModal();\n\n $id=$dal->getFreeDrugId();\n\n $drug = new Drug($id,$data['title'],$data['subname'],$data['bar_code'],$data['flash_code']);\n\n $dal->addDrug($drug);\n echo $drug->getId();\n\n }", "private function addDescriptiveRecord()\n {\n // Record Type\n $line = self::DESCRIPTIVE_TYPE;\n\n if ($this->includeAccountNumberInDescriptiveRecord) {\n // BSB\n $line .= $this->bsb;\n\n // Account Number\n $line .= str_pad($this->accountNumber, 9, ' ', STR_PAD_LEFT);\n\n // Reserved - must be a single blank space\n $line .= ' ';\n } else {\n // Reserved - must be 17 blank spaces\n $line .= str_repeat(' ', 17);\n }\n\n // Sequence Number\n $line .= '01';\n\n // Bank Name\n $line .= $this->bankName;\n\n // Reserved - must be seven blank spaces\n $line .= str_repeat(' ', 7);\n\n // User Name\n $line .= str_pad($this->userName, 26, ' ', STR_PAD_RIGHT);\n\n // User ID\n $line .= $this->directEntryUserId;\n\n // File Description\n $line .= str_pad($this->description, 12, ' ', STR_PAD_RIGHT);\n\n // Processing Date\n $line .= date('dmy', is_numeric($this->processingDate) ? $this->processingDate : strtotime($this->processingDate));\n\n // Reserved - 40 blank spaces\n $line .= str_repeat(' ', 40);\n\n $this->addLine($line);\n }", "public function add(TestCase $test, TestResult $result);", "public function CreateAdditionalTestDNA()\n {\n $user = ['email' => 'testuno@unomaha.edu', 'password' => '!UnoSpr@2021'];\n $this->browse(function ($browser) use ($user) {\n $browser->visit(new loginPage)\n ->loginUser($user['email'], $user['password'])\n ->assertSee('Welcome');\n\n $browser->visit(new specimenPage)\n ->pause(1000)\n ->select('@search-type-selector','SE-P1')\n ->pause(1000)\n ->type('@cora-search','888')\n ->keys('@cora-search','{enter}')\n\n // Search Result Assertions for humerus ABC999-888-777-555\n ->waitForLink('ABC999-888-777-556')\n ->assertSeeLink('ABC999-888-777-556')\n ->assertSee('Radius')\n ->assertSee('Left')\n ->assertSee('Bone')\n ->assertSee('Side')\n ->assertSee('DNA Sampled')\n\n // Specimen Assertions\n ->clickLink('ABC999-888-777-556')\n ->assertSee('View Specimen - ABC999-888-777-556')\n ->click('@se-details-menu')\n\n // Navigate to the elements DNA page\n ->click('@se-dna-profile-menu')\n ->assertPathIs('/dnas/387')\n ->assertSee('DNA Profile')\n\n // Open the edit functions for the DNA profile\n ->click('@actions-button')\n ->click('@actions-edit-menu')\n ->assertPathIs('/dnas/387/edit')\n ->assertSee('Edit DNA Profile')\n\n // Create an additional DNA test\n ->click('@dna-additional-test-create')\n ->assertPathIs('/skeletalelements/1221/dnaAnalysis/create')\n\n // Edit the additional test fields\n ->select('@dna-analysistest_type','7')\n ->select('@dna-region-request-date','01012000')\n ->select('@dna-region-results','TEST CREATE')\n ->select('@dna-region-receive-date','01012000')\n\n // Save the new additional test\n ->click('@dna-analysis-save')\n ->logoutUser();\n });\n }", "function CTD_chemicals_diseases()\r\n{\r\n\t$first = true;\r\n\twhile($l = $this->GetReadFile()->Read()) {\r\n\t\tif($l[0] == '#') continue;\r\n\t\t$a = explode(\"\\t\",trim($l));\r\n\t\t$this->WriteRDFBufferToWriteFile();\r\n\r\n\t\tif($first) {\r\n\t\t\tif(($c = count($a)) != 10) {\r\n\t\t\t\ttrigger_error(\"CTD_chemicals_diseases function expects 10 fields, found $c!\".PHP_EOL, E_USER_WARNING);\r\n\t\t\t}\r\n\t\t\t$first = false;\r\n\t\t}\r\n\t\t\r\n\t\t$chemical_name = $a[0];\r\n\t\t$chemical_id = $a[1];\r\n\t\t$disease_name = $a[3];\r\n\t\t$disease = explode(\":\",$a[4]);\r\n\t\t$disease_ns = strtolower($disease[0]);\r\n\t\t$disease_id = $disease[1];\r\n\t\t\t\t\r\n\t\t$uid = \"$chemical_id$disease_id\";\r\n\t\t$uri = $this->getRes().$uid;\r\n\t\t\r\n\t\t$this->AddRDF(\r\n\t\t\tparent::describeIndividual($uri, \"association between $chemical_name ($chemical_id) and disease $disease_name ($disease_ns:$disease_id)\", $this->getVoc().\"Chemical-Disease-Association\").\r\n\t\t\tparent::triplify($uri, $this->getVoc().\"chemical\", \"mesh:\".$chemical_id).\r\n\t\t\tparent::triplify($uri, $this->getVoc().\"disease\", $disease_ns.\":\".$disease_id).\r\n\t\t\tparent::describeClass($this->getVoc().\"Chemical-Disease-Association\", \"A CTD association between a chemical and a disease\").\r\n\t\t\tparent::describeProperty($this->getVoc().\"chemical\", \"Relation between a CTD entity and a chemical\").\r\n\t\t\tparent::describeProperty($this->getVoc().\"disease\", \"Relation between a CTD entity and a disease\")\r\n\t\t);\r\n\r\n\t\tif($a[8]) {\r\n\t\t\t$omim_ids = explode(\"|\",strtolower($a[8]));\r\n\t\t\tforeach($omim_ids as $omim_id){\r\n\t\t\t\t$this->AddRDF(\r\n\t\t\t\t\tparent::triplify($uri, $this->getVoc().\"disease\", \"omim:\".$omim_id)\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(isset($a[9])) {\r\n\t\t\t$pubmed_ids = explode(\"|\",trim($a[9]));\r\n\t\t\tforeach($pubmed_ids as $pubmed_id){\r\n\t\t\t\t$this->AddRDF(\r\n\t\t\t\t\tparent::triplify($uri, $this->getVoc().\"article\", \"pubmed:\".$pubmed_id)\r\n\t\t\t\t);\r\n\t\t\t}\r\n\t\t}\r\n\t\tparent::WriteRDFBufferToWriteFile();\r\n\t}\r\n\t\r\n\treturn TRUE;\r\n}", "public function addSentence( $name,\t$description, $additional )\n\t{\t\t\t\t\t\t\n\t\tif( $name )\n\t\t{\n\t\t\t$core = Core::dbOpen();\n\t\t\t$sql = \"INSERT INTO program_sentences (programID, name, description, additional) \n\t\t\t\t\t\t\tVALUES(:programID, :name, :description, :additional)\";\n\t\t\t$stmt = $core->dbh->prepare($sql);\n\t\t\t$stmt->bindParam(':programID', $this->programID);\n\t\t\t$stmt->bindParam(':name', $name);\n\t\t\t$stmt->bindParam(':description', $description);\n\t\t\t$stmt->bindParam(':additional', $additional);\n\t\t\tCore::dbClose();\n\t\t\t\n\t\t\ttry\n\t\t\t{\n\t\t\t\tif( $stmt->execute() )\n\t\t\t\t\t\t$sentenceID = $core->dbh->lastInsertId();\t\n\t\t\t} catch ( PDOException $e ) {\n\t\t\t\techo \"Add sentance Failed!\";\n\t\t\t} \n\t\t}\t\t\t\n\t\treturn $sentenceID;\n\t}", "function add()\n { \n $this->load->library('form_validation');\n\n\t\t$this->form_validation->set_rules('disease_category_name','Disease Category Name','required|max_length[30]');\n\t\t$this->form_validation->set_rules('disease_category_description','Disease Category Description','required');\n\t\t\n\t\tif($this->form_validation->run()) \n { \n $params = array(\n\t\t\t\t'disease_category_name' => $this->input->post('disease_category_name'),\n\t\t\t\t'disease_category_description' => $this->input->post('disease_category_description'),\n );\n \n $disease_category_id = $this->Disease_category_model->add_disease_category($params);\n redirect('disease_category/index');\n }\n else\n { \n $data['_view'] = 'disease_category/add';\n $this->load->view('layouts/main',$data);\n }\n }", "public function addSurveyResult()\n\t{\n\t\t$date = date('Y-m-d H:i:s');\n\t\t$Q1 = $this->getValQ1();\n\t\t$Q2 = $this->getValQ2();\n\t\t$Q3 = $this->getValQ3();\n\t\t$Q4 = $this->getValQ4();\n\t\t$Q5 = $this->getValQ5();\n\t\t$Q6 = $this->getValQ6();\n\t\t$Q7 = $this->getValQ7();\n\t\t$Q8 = $this->getValQ8();\n\t\t$Q9 = $this->getValQ9();\n\t\t$Q10 = $this->getValQ10();\n\t\t$Q11 = $this->getValQ11();\n\t\t$comment = $this->getComment();\n\t\t$fkTraining = $this->getFormationID();\n\t\t\n\n\t\t//Query to create a new survey\n\t\t$query = \"INSERT INTO t_survey(\n\t\t\t\t\tsurDate,\n\t\t\t\t\tsurQuestion1Note,\n\t\t\t\t\tsurQuestion2Note,\n\t\t\t\t\tsurQuestion3Note,\n\t\t\t\t\tsurQuestion4Note,\n\t\t\t\t\tsurQuestion5Note,\n\t\t\t\t\tsurQuestion6Note,\n\t\t\t\t\tsurComment,\n\t\t\t\t\tfkTraining,\n\t\t\t\t\tsurQuestion7Note,\n\t\t\t\t\tsurQuestion8Note,\n\t\t\t\t\tsurQuestion9Note,\n\t\t\t\t\tsurQuestion10Note,\n\t\t\t\t\tsurQuestion11Note,\n\t\t\t\t\tsurComment,\n\t\t\t\t\tfkTraining\n\t\t\t\t\t) \n\t\t\t\t\tVALUES \n\t\t\t\t\t(\n\t\t\t\t\t:surDate,\n\t\t\t\t\t:surQuestion1Note,\n\t\t\t\t\t:surQuestion2Note,\n\t\t\t\t\t:surQuestion3Note,\n\t\t\t\t\t:surQuestion4Note,\n\t\t\t\t\t:surQuestion5Note,\n\t\t\t\t\t:surQuestion6Note,\n\t\t\t\t\t:surQuestion7Note,\n\t\t\t\t\t:surQuestion8Note,\n\t\t\t\t\t:surQuestion9Note,\n\t\t\t\t\t:surQuestion10Note,\n\t\t\t\t\t:surQuestion11Note,\n\t\t\t\t\t:surComment,\n\t\t\t\t\t:fkTraining\n\t\t\t\t\t)\";\n\n\t\t\t//Prepare the query $newSurvey\n\t\t\t$stmt = $this->dbh->prepare($query);\n\n\n\t\t\t//Bind the parameters\n\t\t\t$stmt->bindParam(':surDate',$date,PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(':surQuestion1Note',$Q1, PDO::PARAM_INT);\n\t\t\t$stmt->bindParam(':surQuestion2Note',$Q2, PDO::PARAM_INT);\n\t\t\t$stmt->bindParam(':surQuestion3Note',$Q3, PDO::PARAM_INT);\n\t\t\t$stmt->bindParam(':surQuestion4Note',$Q4, PDO::PARAM_INT);\n\t\t\t$stmt->bindParam(':surQuestion5Note',$Q5, PDO::PARAM_INT);\n\t\t\t$stmt->bindParam(':surQuestion6Note',$Q6, PDO::PARAM_INT);\n\t\t\t$stmt->bindParam(':surQuestion7Note',$Q7, PDO::PARAM_INT);\n\t\t\t$stmt->bindParam(':surQuestion8Note',$Q8, PDO::PARAM_INT);\n\t\t\t$stmt->bindParam(':surQuestion9Note',$Q9, PDO::PARAM_INT);\n\t\t\t$stmt->bindParam(':surQuestion10Note',$Q10, PDO::PARAM_INT);\n\t\t\t$stmt->bindParam(':surQuestion11Note',$Q11, PDO::PARAM_INT);\n\t\t\t$stmt->bindParam(':surComment', $comment, PDO::PARAM_STR);\n\t\t\t$stmt->bindParam(':fkTraining', $fkTraining, PDO::PARAM_INT);\n\n\t\t\t//Execute the query\n\t\t\t$stmt->execute();\n\n\n\t\t\theader(\"location: ./index.php?success_survey\");\n\t\t\n\t\t\t\n\t}", "public function add()\n {\n \t$context = Context::getCurrent();\n \n \t// Check consistency\n \tif (Generic::getTable()->cardinality('core_agent', array('identifier' => $this->identifier, 'status != ?' => 'deleted')) > 0) return 'Duplicate';\n \t$this->id = null;\n \tAgent::getTable()->save($this);\n \n \treturn ('OK');\n }", "function add()\n { \n $this->breadcrumbs->unshift(2, 'Designation', 'Designation/add');\n $this->data['breadcrumb'] = $this->breadcrumbs->show();\n $this->load->library('form_validation');\n\n\t\t$this->form_validation->set_rules('name','Name','required|max_length[255]');\n\t\t\n\t\tif($this->form_validation->run()) \n { \n $params = array(\n\t\t\t\t'name' => $this->input->post('name'),\n );\n \n $designation_id = $this->Designation_model->add_designation($params);\n redirect('Designation/index');\n }\n else\n { \n $this->template->public_render('Designation/add', $this->data);\n }\n }", "function addVariation(string $name, string $rrule) : IEventModel;", "public function addDrug($drug){\n if(!$this->conn->execute(DrugSqlStatement::ADD_DRUG, array(DrugRefTable::name => strtolower($drug) ), true) )\n throw new Exception(\"Could not add drug to table\");\n return true;\n }", "public function disease(){\n\t\tif (Input::all()) {\n\t\t\t$rules = array();\n\t\t\t$newDiseases = Input::get('new-diseases');\n\n\t\t\tif (Input::get('new-diseases')) {\n\t\t\t\t// create an array that form the rules array\n\t\t\t\tforeach ($newDiseases as $key => $value) {\n\t\t\t\t\t\n\t\t\t\t\t//Ensure no duplicate disease\n\t\t\t\t\t$rules['new-diseases.'.$key.'.disease'] = 'unique:diseases,name';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$validator = Validator::make(Input::all(), $rules);\n\n\t\t\tif ($validator->fails()) {\n\t\t\t\treturn Redirect::route('reportconfig.disease')->withErrors($validator);\n\t\t\t} else {\n\n\t\t $allDiseaseIds = array();\n\t\t\t\t\n\t\t\t\t//edit or leave disease entries as is\n\t\t\t\tif (Input::get('diseases')) {\n\t\t\t\t\t$diseases = Input::get('diseases');\n\n\t\t\t\t\tforeach ($diseases as $id => $disease) {\n\t\t $allDiseaseIds[] = $id;\n\t\t\t\t\t\t$diseases = Disease::find($id);\n\t\t\t\t\t\t$diseases->name = $disease['disease'];\n\t\t\t\t\t\t$diseases->save();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//save new disease entries\n\t\t\t\tif (Input::get('new-diseases')) {\n\t\t\t\t\t$diseases = Input::get('new-diseases');\n\n\t\t\t\t\tforeach ($diseases as $id => $disease) {\n\t\t\t\t\t\t$diseases = new Disease;\n\t\t\t\t\t\t$diseases->name = $disease['disease'];\n\t\t\t\t\t\t$diseases->save();\n\t\t $allDiseaseIds[] = $diseases->id;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t //check if action is from a form submission\n\t\t if (Input::get('from-form')) {\n\t\t\t \t// Delete any pre-existing disease entries\n\t\t\t \t//that were not captured in any of the above save loops\n\t\t\t $allDiseases = Disease::all(array('id'));\n\n\t\t\t $deleteDiseases = array();\n\n\t\t\t //Identify disease entries to be deleted by Ids\n\t\t\t foreach ($allDiseases as $key => $value) {\n\t\t\t if (!in_array($value->id, $allDiseaseIds)) {\n\n\t\t\t\t\t\t\t//Allow delete if not in use\n\t\t\t\t\t\t\t$inUseByReports = Disease::find($value->id)->reportDiseases->toArray();\n\t\t\t\t\t\t\tif (empty($inUseByReports)) {\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t // The disease is not in use\n\t\t\t \t$deleteDiseases[] = $value->id;\n\t\t\t\t\t\t\t}\n\t\t\t }\n\t\t\t }\n\t\t\t //Delete disease entry if any\n\t\t\t if(count($deleteDiseases)>0){\n\n\t\t\t \tDisease::destroy($deleteDiseases);\n\t\t\t }\n\t\t }\n\t\t\t}\n\t\t}\n\t\t$diseases = Disease::all();\n\n\t\treturn View::make('reportconfig.disease')\n\t\t\t\t\t->with('diseases', $diseases);\n\t}", "public abstract function AddExperiment($name, $data = array());", "public function disambiguate()\n {\n Container::getContext()->removeDisambiguationOptions('Geissler\\CSL\\Names\\Name');\n $this->tmpDisambiguate = $this->getDisambiguate();\n $this->tmpAmbiguous = $this->getAmbiguous();\n $firstDifferent = false;\n\n // disambiguate years and missing years\n $this->regExp = '/([0-9]{2,4}';\n if (Container::getLocale()->getTerms('do date', 'short') !== null) {\n $this->regExp .= '|' . Container::getLocale()->getTerms('do date', 'short');\n } elseif (Container::getLocale()->getTerms('do date', 'short') !== null) {\n $this->regExp .= '|' . Container::getLocale()->getTerms('do date');\n }\n $this->regExp .= ')/';\n\n // disambiguate only where names and year are identical\n foreach ($this->tmpAmbiguous as $id => $name) {\n if (preg_match($this->regExp, $name) == 0) {\n $citation = Container::getRendered()->getFirstById($id);\n\n if (preg_match($this->regExp, $citation) == 1\n && preg_match('/^' . preg_quote($this->tmpAmbiguous[$id], '/') . '/', $citation) == 1) {\n $this->tmpAmbiguous[$id] = $citation;\n }\n }\n }\n\n $ambiguous = ArrayData::ambiguous($this->tmpAmbiguous);\n if (count($ambiguous) > 0) {\n $this->tmpAmbiguous = $ambiguous;\n $this->addYearSuffix();\n } elseif ($firstDifferent == true) {\n // test if second citation is ambiguous\n $this->tmpAmbiguous = $this->getAmbiguous();\n $this->addYearSuffix();\n } elseif (is_array($this->tmpDisambiguate) == true) {\n $this->tmpDisambiguate = array_merge($this->tmpDisambiguate, $this->getAmbiguous());\n } else {\n $this->tmpDisambiguate = $this->getAmbiguous();\n }\n\n if (count($ambiguous) > 0) {\n // store already disambiguated values\n $succeedAmbiguous = array();\n if ($this->getAmbiguous() == $ambiguous) {\n $succeedAmbiguous = $ambiguous;\n }\n $this->succeed($this->getDisambiguate(), $succeedAmbiguous);\n }\n }", "public function add_drug_post() {\n\n $drug_name = !empty($this->post_data['drug_name']) ? trim($this->Common_model->escape_data($this->post_data['drug_name'])) : \"\";\n\n try {\n if (empty($drug_name)) {\n $this->bad_request();\n exit;\n }\n\n //check same drug is added by user not\n\n $where_drug = array(\n 'LOWER(drug_name)' => strtolower($drug_name),\n 'drug_user_id' => $this->user_id,\n 'drug_status' => 1\n );\n $get_drug_data = $this->drug->get_drug($where_drug);\n\n if (empty($get_drug_data)) {\n /* get random color until find unique */\n $is_found = true;\n $loop_count = 0;\n while ($is_found && $loop_count <= 100) {\n $color = random_color();\n //check into db\n $is_exist = $this->drug->check_color($color);\n if (empty($is_exist)) {\n $is_found = false;\n }\n $loop_count++;\n }\n\n $insert_drug_data = array(\n 'drug_name' => strtolower($drug_name),\n 'drug_color_code' => $color,\n 'drug_user_id' => $this->user_id,\n 'drug_created_at' => $this->utc_time_formated\n );\n\n $add_drug_id = $this->drug->add_drug($insert_drug_data);\n if ($add_drug_id > 0) {\n $this->my_response['status'] = true;\n $this->my_response['message'] = lang('drug_add');\n $this->my_response['drug_id'] = (string) $add_drug_id;\n } else {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('drug_add_failure');\n }\n } else {\n $this->my_response['status'] = false;\n $this->my_response['message'] = lang('drug_already_added');\n }\n $this->send_response();\n } catch (ErrorException $e) {\n $this->error = $e->getMessage();\n $this->store_error();\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the cum cp pris1.
public function getCumCpPris1() { return $this->cumCpPris1; }
[ "public function getCumCpPris() {\n return $this->cumCpPris;\n }", "public function getCumProvCp1() {\n return $this->cumProvCp1;\n }", "public function getCumMtCpPris1() {\n return $this->cumMtCpPris1;\n }", "public function setCumCpPris1($cumCpPris1) {\n $this->cumCpPris1 = $cumCpPris1;\n return $this;\n }", "public function getCumCpDus1() {\n return $this->cumCpDus1;\n }", "public function getCumCpPris1(): ?float {\n return $this->cumCpPris1;\n }", "public function getCumPlaf1Caisse1() {\n return $this->cumPlaf1Caisse1;\n }", "public function getCumPlafondSs1() {\n return $this->cumPlafondSs1;\n }", "public function getCumPlaf2Caisse1() {\n return $this->cumPlaf2Caisse1;\n }", "public function getCumMtCpPris() {\n return $this->cumMtCpPris;\n }", "public function getCp()\n {\n return $this->cp;\n }", "public function getCumRttPris() {\n return $this->cumRttPris;\n }", "public function getCumPlaf1Caisse2() {\n return $this->cumPlaf1Caisse2;\n }", "public function getCumPlaf1Caisse3() {\n return $this->cumPlaf1Caisse3;\n }", "public function setCumMtCpPris1($cumMtCpPris1) {\n $this->cumMtCpPris1 = $cumMtCpPris1;\n return $this;\n }", "public function setCumCpPris($cumCpPris) {\n $this->cumCpPris = $cumCpPris;\n return $this;\n }", "public function getCumTrancheC() {\n return $this->cumTrancheC;\n }", "public function getCumTrBCaisse1() {\n return $this->cumTrBCaisse1;\n }", "public function getBaseCalculoPis()\n {\n return $this->baseCalculoPis;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function that show instructors in a given department from the hint.xml file
function getAllInstructors($dpt){ $xmlHint=simplexml_load_file("hint.xml") or die("Error: sys cant open hint datamodel."); foreach($xmlHint->children() as $department) { if($department['value']==$dpt){ $instructors = $department->instructors; foreach ($instructors->children() as $instructor) { $title = $instructor['title']; $instructorView = "<li> <button type='button' class='close' title ='delete this Instructor' onclick='removeInstructor(".'"'.$instructor.'"'.")' > &times;</button> <h6>".$title." ".$instructor."</h6>"."</li>"; echo $instructorView; } } } }
[ "public function instructorsAction()\n {\n $this->_initInstructordoc();\n $this->loadLayout();\n $this->getLayout()->getBlock('instructordoc.edit.tab.instructor')\n ->setInstructordocInstructors($this->getRequest()->getPost('instructordoc_instructors', null));\n $this->renderLayout();\n }", "public function getCourseDepartment();", "function show_department($config) {\n\t\tif (isset($config['items'][0][0])) \n\t\t\tunset($config['items'][0]);\n\t\tif (!isset($config)) {\n\t\t\t$config = array();\n\t\t}\n\t\t// grab departments from db\n\t\t$enableFields = 'AND deleted=0 AND hidden=0';\n\t\t// need to grab pids...\n\t\tif ($config['row']['pid_list'])\n\t\t\t$pid_list = $config['row']['pid_list'];\n\t\telse \n\t\t\t$pid_list = $config['row']['pid'];\n\t\t// grab root storage pid\n\t\t$TSconfig = t3lib_BEfunc::getTCEFORM_TSconfig('tt_content',$config['row']);\n\t\t$rootPid = $TSconfig['_STORAGE_PID']?$TSconfig['_STORAGE_PID']:0;\n\t\tif ($rootPid) {\n\t\t\tif (strlen($pid_list)) \n\t\t\t\t$pid_list .= ',';\n\t\t\t$pid_list .= $rootPid;\n\t\t}\n\t\t\n\t\t// if we have existing flexform, then load startingPoint, if set\n\t\tif ($config['row'] && !empty($config['row']['pi_flexform'])) {\n\t\t\t$flexArray = t3lib_div::xml2array($config['row']['pi_flexform']);\n\t\t\tif (!empty($flexArray)) {\n\t\t\t\t$storagePidList = $flexArray['data']['sDEF']['lDEF']['storagePID']['vDEF'];\n\t\t\t\tif (strlen($storagePidList)) {\n\t\t\t\t\t$storagePids = t3lib_div::trimExplode(',', $storagePidList);\n\t\t\t\t\tforeach ($storagePids as $sp) {\n\t\t\t\t\t\tif (strpos($sp,'|') !== FALSE) {\n\t\t\t\t\t\t\t$spArray = t3lib_div::trimExplode('|',$sp);\n\t\t\t\t\t\t\tlist($table,$sp) = t3lib_div::trimExplode('_',$spArray[0]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (strlen($sp)) {\n\t\t\t\t\t\t\tif (strlen($pid_list))\n\t\t\t\t\t\t \t\t$pid_list .= ',';\n\t\t\t\t\t\t\t$pid_list .= $sp;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// now grab all the department names and add them to item list\n\t\t$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('department_name,uid','tx_wecstaffdirectory_department','pid IN ('.$pid_list.') '.$enableFields,'','department_name');\n\t\twhile ($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)) {\n\t\t\t$config['items'][] = Array($row['department_name'],$row['uid']);\n\t\t}\n\t\treturn $config;\n\t}", "public function instructorAllDetails()\n {\n /* code goes here */\n }", "public function getAllInstructors();", "public function getDepartmentNameLegal();", "function findInstructor($unformattedName){\r\n\r\n if(empty($unformattedName)) return false;\r\n\r\n // remove commas, periods, and such\r\n $toRemove = array(\".\",\",\");\r\n $name = str_replace($toRemove, \"\", $unformattedName);\r\n\r\n // split name into words\r\n $name = explode(' ',$name);\r\n \r\n // remove titles\r\n $titles = array(\"Dr\",\"dr\",\"Prof\",\"prof\",\"\");\r\n $name = array_diff($name,$titles);\r\n\r\n // reset indices\r\n $name = array_values($name);\r\n\r\n // with any luck, our array only contains the first and last names, and maybe middle\r\n $subQuery = \"SELECT DISTINCT `ID`, `FIRST_NAME`, `MIDDLE_NAME`, `LAST_NAME`, `WOOSTER_EMAIL` FROM `X_PNSY_FACULTY` WHERE \";\r\n\r\n if(count($name) < 2) return false;\r\n if(count($name) > 1){\r\n // FIRST LAST\r\n $query1 = \"\".$subQuery.\"`FIRST_NAME`='\".$name[0].\"' AND `LAST_NAME`='\".$name[1].\"'\";\r\n\r\n // LAST FIRST\r\n $query2 = $subQuery.\"`FIRST_NAME`='\".$name[1].\"' AND `LAST_NAME`='\".$name[0].\"'\";\r\n }\r\n if(count($name) > 2){\r\n // FIRST MIDDLE LAST\r\n $query3 = $subQuery.\"`FIRST_NAME`='\".$name[0].\"' AND `MIDDLE_NAME`='\".$name[1].\"' AND `LAST_NAME`='\".$name[2].\"'\";\r\n\r\n // LAST FIRST MIDDLE\r\n $query4 = $subQuery.\"`FIRST_NAME`='\".$name[1].\"' AND `MIDDLE_NAME`='\".$name[2].\"' AND `LAST_NAME`='\".$name[0].\"'\";\r\n }\r\n\r\n // make queries\r\n $result = mysql_query($query1);\r\n if($info = mysql_fetch_assoc($result)) return $info;\r\n $result = mysql_query($query2);\r\n if($info = mysql_fetch_assoc($result)) return $info;\r\n if(!empty($query3)){\r\n $result = mysql_query($query3);\r\n if($info = mysql_fetch_assoc($result)) return $info;\r\n }\r\n if(!empty($query4)){\r\n $result = mysql_query($query4);\r\n if($info = mysql_fetch_assoc($result)) return $info;\r\n }\r\n\r\n // return false if nothing works\r\n return false; \r\n }", "public function getInstructors()\n {\n $deptList = array();\n return $deptList;\n }", "abstract static function getDept_id(string $dept_name):int;", "public abstract function getextcoursesbyinstructor($instructor);", "function getUsersNotIntDepartment($dept){\r\n\r\n }", "public function setInstructorAndAdminName()\n {\n // Add medal stamp image.\n $this->Image('C:\\xampp\\htdocs\\Nexus\\resource\\img\\fpdf\\medal-stamp.png', 121, 162, 40, 40);\n\n // Set the font.\n $this->AddFont('BebasNeue-Regular', '', 'BebasNeue-Regular.php');\n $this->SetFont('BebasNeue-Regular', '', 18);\n\n // Line break.\n $this->Ln(26);\n\n $this->SetLeftMargin(17);\n\n $this->Cell(90, 30, $this->aAdminDetails['instructorName'], 0, 0, 'C');\n $this->Cell(224, 30, $this->aAdminDetails['adminName'], 0, 0, 'C');\n\n // Line break.\n $this->Ln(1);\n\n $this->Cell(90, 30, '____________________________________', 0, 0, 'C');\n $this->Cell(223, 30, '____________________________________', 0, 0, 'C');\n\n $this->AddFont('Calibri', '', 'Calibri.php');\n $this->SetFont('Calibri', '', 12);\n\n // Line break.\n $this->Ln(23);\n \n // Set the font.\n $this->Cell(87, 0, 'Instructor', 0, 0, 'C');\n $this->Cell(232, 0, 'Administrator', 0, 0, 'C');\n }", "public function department(){\n\t\t$data['Dept_result'] = $this->AdminModel->department();\n\t\t$data['pagename'] = \"department\";\n\t\t$data['active_menu'] = \"employee\";\n\t\t$this->load->view('Director',$data);\n\t}", "public function _load_department() {\n\t\t$sql = \"SELECT stvdept_desc FROM stvdept WHERE stvdept_code = :dept_code\";\n\t\t$this->department = \\PSU::db('banner')->GetOne($sql, array('dept_code' => $this->dept_code));\n\t}", "public function getInstructor(): string;", "function get_person_dept_markup( $post ) {\n\tif ( $post->post_type !== 'person' ) { return; }\n\n\t$depts = wp_get_post_terms( $post->ID, 'departments' );\n\t$depts = !is_wp_error( $depts ) && !empty( $depts ) && class_exists( 'UCF_Departments_Common' ) ? $depts : false;\n\n\tob_start();\n\tif ( $depts ) :\n?>\n\t<div class=\"row\">\n\t\t<div class=\"col-xl-4 col-md-12 col-sm-4 person-label\">\n\t\t\tDepartment<?php if ( count( $depts ) > 1 ) { echo 's'; } ?>\n\t\t</div>\n\t\t<div class=\"col-xl-8 col-md-12 col-sm-8 person-attr\">\n\t\t\t<ul class=\"list-unstyled mb-0\">\n\t\t\t\t<?php foreach ( $depts as $dept ): ?>\n\t\t\t\t<li><?php echo UCF_Departments_Common::get_website_link( $dept ); ?></li>\n\t\t\t\t<?php endforeach; ?>\n\t\t\t</ul>\n\t\t</div>\n\t</div>\n\t<hr class=\"my-2\">\n<?php\n\tendif;\n\treturn ob_get_clean();\n}", "public function single_course_instructors() {\n\t\t\t$course = LP_Global::course();\n\n\t\t\t$course_id = $course->get_id();\n\t\t\t$instructors = $this->get_instructors( $course_id );\n\n\t\t\tlearn_press_get_template( 'single-course-tab.php', array( 'instructors' => $instructors ), learn_press_template_path() . '/addons/co-instructors/', LP_ADDON_CO_INSTRUCTOR_TEMPLATE );\n\t\t}", "public function _load_instructors() {\n\t\t$this->data['instructors'] = array();\n\n\t\t$sql = \"SELECT * FROM sirasgn WHERE sirasgn_crn = :crn AND sirasgn_term_code = :term_code\";\n\n\t\t$args = array(\n\t\t\t'crn' => $this->crn,\n\t\t\t'term_code' => $this->term_code\n\t\t);\n\n\t\tif($results = \\PSU::db('banner')->Execute($sql, $args)) {\n\t\t\tforeach($results as $row) {\n\t\t\t\t$row = \\PSU::cleanKeys('sirasgn_', '', $row);\n\t\t\t\t$this->data['instructors'][] = $row['pidm'];\n\t\t\t}//end foreach\n\t\t}//end if\n\t}", "function admin_view($sheetId = null, $dept_id = null) {\n if (!$sheetId) {\n $this->Session->setFlash(__('Invalid Department Sheet ID', true));\n $this->redirect(array('action' => 'index'));\n }\n $sheet = $this->Sheet->read(null, $sheetId);\n\n $department_obj = ClassRegistry::init('DepartmentsUser');\n $dept_name = $department_obj->field('department_name', array('user_id' => $sheet['Sheet']['user_id'], 'department_id' => $dept_id));\n $this->set('sheet', $sheet);\n $this->set('department_name', $dept_name);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
liste des champs de l'objet
function getListeChamps() { // ATTENTION, respecter l'ordre des champs de la table dans la base de données pour construire laListeChamp $laListeChamps[]=new dbChamp("Xin_id", "entier", "get_id", "set_id"); $laListeChamps[]=new dbChamp("Xin_news_inscrit", "entier", "get_news_inscrit", "set_news_inscrit"); $laListeChamps[]=new dbChamp("Xin_newsletter", "entier", "get_newsletter", "set_newsletter"); return($laListeChamps); }
[ "function getListeChamps()\n{\n\t// ATTENTION, respecter l'ordre des champs de la table dans la base de données pour construire laListeChamp\n\t$laListeChamps[]=new dbChamp(\"Cus_id\", \"entier\", \"get_id\", \"set_id\");\n\t$laListeChamps[]=new dbChamp(\"Cus_classe\", \"entier\", \"get_classe\", \"set_classe\");\n\t$laListeChamps[]=new dbChamp(\"Cus_param\", \"text\", \"get_param\", \"set_param\");\n\t$laListeChamps[]=new dbChamp(\"Cus_valeur\", \"text\", \"get_valeur\", \"set_valeur\");\n\treturn($laListeChamps);\n}", "function getListeChamps()\n{\n\t// ATTENTION, respecter l'ordre des champs de la table dans la base de données pour construire laListeChamp\n\n\t$laListeChamps[]=new dbChamp(\"id_droit\", \"entier\", \"getId_droit\", \"setId_droit\");\n\t$laListeChamps[]=new dbChamp(\"id_content\", \"entier\", \"getId_content\", \"setId_content\");\n\t$laListeChamps[]=new dbChamp(\"user_id\", \"entier\", \"getUser_id\", \"setUser_id\");\n\n\treturn($laListeChamps);\n}", "function getListeChamps()\n{\n\t// ATTENTION, respecter l'ordre des champs de la table dans la base de données pour construire laListeChamp\n\t$laListeChamps[]=new dbChamp(\"Des_id\", \"entier\", \"get_id\", \"set_id\");\n\t$laListeChamps[]=new dbChamp(\"Des_description\", \"text\", \"get_description\", \"set_description\");\n\t$laListeChamps[]=new dbChamp(\"Des_cms_site\", \"entier\", \"get_cms_site\", \"set_cms_site\");\n\t$laListeChamps[]=new dbChamp(\"Des_statut\", \"entier\", \"get_statut\", \"set_statut\");\n\treturn($laListeChamps);\n}", "function getListeChamps()\n{\n\t// ATTENTION, respecter l'ordre des champs de la table dans la base de données pour construire laListeChamp\n\t$laListeChamps[]=new dbChamp(\"Cms_id\", \"entier\", \"get_id\", \"set_id\");\n\t$laListeChamps[]=new dbChamp(\"Cms_tableau\", \"entier\", \"get_tableau\", \"set_tableau\");\n\t$laListeChamps[]=new dbChamp(\"Cms_version\", \"entier\", \"get_version\", \"set_version\");\n\t$laListeChamps[]=new dbChamp(\"Cms_html\", \"text\", \"get_html\", \"set_html\");\n\treturn($laListeChamps);\n}", "function getListeChamps()\n{\n\t// ATTENTION, respecter l'ordre des champs de la table dans la base de données pour construire laListeChamp\n\t$laListeChamps[]=new dbChamp(\"Xja_id\", \"entier\", \"get_id\", \"set_id\");\n\t$laListeChamps[]=new dbChamp(\"Xja_cms_js\", \"entier\", \"get_cms_js\", \"set_cms_js\");\n\t$laListeChamps[]=new dbChamp(\"Xja_cms_arbo_pages\", \"entier\", \"get_cms_arbo_pages\", \"set_cms_arbo_pages\");\n\treturn($laListeChamps);\n}", "function getListeChamps()\n{\n\t// ATTENTION, respecter l'ordre des champs de la table dans la base de données pour construire laListeChamp\n\t$laListeChamps[]=new dbChamp(\"Mod_id\", \"entier\", \"get_id\", \"set_id\");\n\t$laListeChamps[]=new dbChamp(\"Mod_titre\", \"text\", \"get_titre\", \"set_titre\");\n\t$laListeChamps[]=new dbChamp(\"Mod_textelong\", \"text\", \"get_textelong\", \"set_textelong\");\n\t$laListeChamps[]=new dbChamp(\"Mod_cms_content\", \"entier\", \"get_cms_content\", \"set_cms_content\");\n\t$laListeChamps[]=new dbChamp(\"Mod_dtcrea\", \"date_formatee\", \"get_dtcrea\", \"set_dtcrea\");\n\t$laListeChamps[]=new dbChamp(\"Mod_bo_users\", \"entier\", \"get_bo_users\", \"set_bo_users\");\n\treturn($laListeChamps);\n}", "function getListeChamps()\n{\n\t// ATTENTION, respecter l'ordre des champs de la table dans la base de données pour construire laListeChamp\n\t$laListeChamps[]=new dbChamp(\"Job_id\", \"entier\", \"get_id\", \"set_id\");\n\t$laListeChamps[]=new dbChamp(\"Job_offre\", \"entier\", \"get_offre\", \"set_offre\");\n\t$laListeChamps[]=new dbChamp(\"Job_cms_pdf\", \"entier\", \"get_cms_pdf\", \"set_cms_pdf\");\n\treturn($laListeChamps);\n}", "public function lista(): array\n {\n return $this->sistema->campos;\n }", "function cextras_objets_valides(){\r\n\t$objets = array();\r\n\tforeach (array('article','auteur','breve','groupes_mot','mot','rubrique','site') as $objet) {\r\n\t\t$objets[$objet] = array(\r\n\t\t\t'table' => table_objet_sql($objet), \r\n\t\t\t'nom' => _T('cextras:table_'.$objet),\r\n\t\t);\r\n\t}\r\n\treturn $objets;\r\n}", "public static function getListaPersonas()\n\t{\n\t\t$model = self::model()->findAll();\n\t\treturn CHtml::listData($model, 'id', 'per_nom');\n\t}", "function liste_personnage(){\r\n\t\t\t$oeuvre=$_GET['idoeuvre'];\r\n\t\t\t$personnage = $this->modele->get_liste_personnage($oeuvre);\r\n\t\t\t\r\n\t\t\tif ( ! $personnage ) {\r\n\t\t\t\t\t$this->vue->vue_erreur (\"Impossible de récupérer la liste des personnages\");\r\n\t\t\t}\r\n\t\t\t\t$this->vue->vue_liste_personnage ($personnage);\r\n\t\t}", "public function get_all(){\n return get_object_vars($this);\n }", "public static function getBioAgresseursMal()\n { \n \t$result = [];\n $sql = \"select * from bioagresseur where idBioagresseur in (select idBioagresseur from ba_maladie)\"; \n $liste = DBConnex::getInstance()->query($sql); \n\t\t$liste = $liste->fetchAll(PDO::FETCH_ASSOC);\n\t\tif(!empty($liste)){\n foreach($liste as $bioAgresseur){\n \t$objet = new Bioagresseur();\n \t$objet->hydrate($bioAgresseur);\n \t$result[] = $objet; \t\n }\n }\n return $result;\n }", "public function getListeMembre() {\n $this->allowTo(['admin','membre']);\n $user = $this->getUser();\n $manager = new GeneralManager(); // execute la function qui recupere TOUTES les tables de la bdd\n $membres = $manager->findUserAll();\n $manager2 = new Fil_actuManager(); // execute la function qui recupere TOUTES les tables de la bdd\n $fil_actus = $manager2->findLastFilActu5();\n \n $auth_manager = new RafraichirManager(); \n $auth_manager->refreshUserMulti();\n\n $this->show('accueil/accueil', ['membres' => $membres, 'fil_actus' => $fil_actus]);\n\n }", "public function getCollecteurs()\n {\n $this->champs =['rowid','nom','prenom','email','telephone','etat'];\n $this->condition=[\"etat =\"=>1];\n return $this->__select() ;\n }", "public static function afficherListeMembres($liste){\r\n\r\n\t\t\techo '<ul class=\"liste_all_membres\">';\r\n\t\t\tforeach($liste as $value){\r\n\t\t\t\t$user = Utilisateur::getUserById($value);\r\n\t\t\t\techo ('<li>'.$user->getPrenom().' '.$user->getNom().'</li>');\r\n\t\t\t}\r\n\t\t\techo '</ul>';\r\n\t}", "public function getListFields();", "public function afficher_membres()\n {\n foreach ($this->liste_Util as $un_util)\n {\n echo $un_util.'<br/>';\n }\n }", "public static function getBioAgresseurs()\n { \n \t$result = [];\n $sql = \"select * from bioagresseur\"; \n $liste = DBConnex::getInstance()->query($sql); \n\t\t$liste = $liste->fetchAll(PDO::FETCH_ASSOC);\n if(!empty($liste)){\n foreach($liste as $bioAgresseur){\n \t$objet = new Bioagresseur();\n \t$objet->hydrate($bioAgresseur);\n \t$result[] = $objet; \t\n }\n }\n return $result;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Packs data from an Object into an associative array that has been BSONized. If strict is set to true, the key must match a public property of the Document. Doing so is slower (due to reflection), so it is only recommended during debugging and development.
static public function unfit($document, bool $strict): array { $props = []; if ($strict) { $reflection = new \ReflectionClass($document); $r_props = $reflection->getProperties(\ReflectionProperty::IS_PUBLIC); foreach ($r_props as $p) { $props[] = $p->getName(); } } $array = []; foreach ($document as $key => $value) { if ($strict) { if (!in_array($key, $props)) { continue; } } if (is_null($value)) continue; $array[$key] = self::BSONize($value); } return $array; }
[ "final public function bsonSerialize(): array|object {}", "final public function bsonSerialize(): object {}", "private function prepareBSON($bson, $isRoot, $sortKeys = false)\n {\n if ( ! is_array($bson) && ! is_object($bson)) {\n throw new InvalidArgumentException('$bson is not an array or object');\n }\n\n if ($isRoot && is_array($bson)) {\n $bson = (object) $bson;\n }\n\n if ($bson instanceof BSONArray || (is_array($bson) && $bson === array_values($bson))) {\n if ( ! $bson instanceof BSONArray) {\n $bson = new BSONArray($bson);\n }\n } else {\n if ( ! $bson instanceof BSONDocument) {\n $bson = new BSONDocument((array) $bson);\n }\n\n if ($sortKeys) {\n $bson->ksort();\n }\n }\n\n foreach ($bson as $key => $value) {\n if ($value instanceof BSONArray || (is_array($value) && $value === array_values($value))) {\n $bson[$key] = $this->prepareBSON($value, false, $sortKeys);\n continue;\n }\n\n if ($value instanceof BSONDocument || $value instanceof stdClass || is_array($value)) {\n $bson[$key] = $this->prepareBSON($value, false, $sortKeys);\n continue;\n }\n }\n\n return $bson;\n }", "function mongo_to_array($mongo_obj) {\n if ($mongo_obj instanceof MongoDB\\Driver\\Cursor) {\n $array = [];\n foreach ($mongo_obj as $item) {\n $array[] = $item;\n }\n } else {\n $array = (array) $mongo_obj;\n }\n\n\n foreach ($array as $key => $value) {\n if ($value instanceof MongoDB\\Model\\BSONArray || $value instanceof MongoDB\\Model\\BSONDocument) {\n $array[$key] = mongo_to_array($value);\n }\n }\n return $array;\n}", "final public function bsonSerialize(){}", "public function bsonSerialize();", "abstract public function to_associative();", "public function bsonSerialize()\n {\n return array_values($this->getArrayCopy());\n }", "public function bsonSerialize(): object\n {\n return (object) $this->index;\n }", "public function to_array()\n\t{\n\t\treturn $this->fields_as_associative_array();\n\t}", "public function asDBObject()\n {\n return [\n self::AGGREGATE_IDENTIFIER_PROPERTY => $this->aggregateIdentifier,\n self::SEQUENCE_NUMBER_PROPERTY => $this->scn,\n self::SERIALIZED_PAYLOAD_PROPERTY => $this->serializedPayload,\n self::TIME_STAMP_PROPERTY => $this->timeStamp,\n self::AGGREGATE_TYPE_PROPERTY => $this->aggregateType,\n self::PAYLOAD_TYPE_PROPERTY => $this->payloadType,\n self::PAYLOAD_REVISION_PROPERTY => $this->payloadRevision,\n self::META_DATA_PROPERTY => $this->serializedMetaData,\n self::EVENT_IDENTIFIER_PROPERTY => $this->eventIdentifier\n ];\n }", "function object_to_array($data) \n{\n if(is_array($data) || is_object($data))\n {\n $result = array(); \n foreach($data as $key => $value)\n { \n $result[$key] = object_to_array($value); \n }\n return $result;\n }\n return $data;\n}", "public function convertToArray($object);", "function toArray() {\n $document = $this->toStdClass();\n return get_object_vars($document);\n }", "function add_array($objArray) {\r\n foreach ($objArray as $key => $value) {\r\n if(!is_array($this->$key)){\r\n if(isset($this->$key)){\r\n $singleVal = $this->$key;\r\n $this->$key = array($singleVal);\r\n }else{\r\n $this->$key = array();\r\n }\r\n }\r\n array_push($this->$key, $value);\r\n }\r\n }", "public function toArray()\n {\n $document = $this->toStdClass();\n return get_object_vars($document);\n }", "public function testAssociativeArrayBehavior()\n {\n $obj = new ArrayableObject;\n $obj['a'] = 1;\n $obj['b'] = 2;\n\n $this->assertEquals(1, $obj['a']);\n $this->assertEquals(2, $obj['b']);\n $this->assertNotTrue(isset($obj['c']));\n\n unset($obj['a']);\n $this->assertNotTrue(isset($obj['a']));\n\n $expected = [ 'b' => 2 ];\n $this->assertEquals($expected, (array) $obj);\n }", "protected function convertToArray(Traversable $object) {\r\n\t\t$array = array();\r\n\t\tforeach ($object as $keyValue => $singleElement) {\r\n\t\t\t$array[$keyValue] = $singleElement;\r\n\t\t}\r\n\t\treturn $array;\r\n\t}", "public function UserObjtoArray() {\n\t\t$array = [];\n\t\t\n\t\t/* We are only concerned with keys here */\n\t\tforeach (self::$ObjToDBMapping as $key=>$value) {\n\t\t\tif (!empty($this->$key)) {\n\t\t\t\t$array[$key] = $this->$key;\n\t\t\t} \n\t\t}\n\t\t\n\t\treturn $array;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Recursize function that checks the directions from the stating position to create or extend the zone
public function get_zone($position) { //First we get the directions $directions = $this->getDirections($position); //if there are not 4 directions, it means that the zone touches the edge of the boars, and is therefore not a valid zone if (count($directions) == 4) { foreach ($directions as $next_pos) { //We see if we didn't already process the direction if (!in_array($next_pos, $this->stones)) { $val = $this->goban->getStoneOwner($next_pos); //if the value of the adjacent cell is null, it means that the zone is open, and is therefore not a valid zone if ($val == null) { $this->valid = false; $this->stones = []; } elseif ($val == $this->owner && $this->valid) { //else, if the zone is still valid and the adjacent cell contains a stone of the same owner, we add the adjacent cell's index to the zone, and we continue to extend the zone from this cell $this->stones[] = $next_pos; $this->get_zone($next_pos); } } } } else { $this->valid = false; $this->stones = []; } }
[ "function argRelocatePlaceWall()\n {\n //1)empty locations in the player's village\n \n //To more easily/efficiently do this, I'm actually going to return the spaces I want to display the arror in.\n \n $connectedEmptySpaces = array();\n $connectedDirections = array();\n\n $playerPosition = $this->getPlayerVariable('player_position', self::getActivePlayerId());\n $dangerTiles = $this->getDangerTiles($playerPosition);\n $walls = $this->getWalls();\n \n //every home space is valid so long as it has a wall\n \n foreach ($dangerTiles as $tile)\n { \n $x = $tile[0];\n $y = $tile[1];\n $dir = $tile[2];\n\n $this->moveCoords($x, $y, $dir);\n $wallFound = false;\n foreach ($walls as $wall)\n {\n if ($wall['wall_x'] == $x && $wall['wall_y'] == $y && ($dir+3)%6 == $wall['wall_rotation'])\n {\n $wallFound = true; \n }\n }\n if (!$wallFound) {\n $connectedEmptySpaces[] = array('x' => $tile[0], 'y' => $tile[1]);\n $connectedDirections[] = $dir;\n }\n }\n\n return array(\"connectedEmptySpaces\" => $connectedEmptySpaces, \"connectedDirections\" => $connectedDirections);\n }", "function deadzone($stickX, $stickY, $zoneX, $zoneY) {}", "public function verifierDeplacement($xi, $yi, $xf, $yf){\r\n if (!($xi < 0 || $xi > 6 || $xf < 0 || $xf > 6 || $yi < 0 || $yi > 6 || $yf < 0 || $yf > 6 )) { //Si la case de depart ou d'arrivee n'est pas dans la matrice\r\n if (($_SESSION[\"plateau\"][$xi][$yi] == 1) && ($_SESSION[\"plateau\"][$xf][$yf] == 0)) { //Si la case de depart a un pion et si la case d'arrivee est vide\r\n if ($xi != $xf && $yi != $yf) { //Si les case ne sont pas alignees verticalement ni horizontalement\r\n return false;\r\n }\r\n elseif ($xi == $xf) { // Si le deplacement est vertical\r\n if ($yi - $yf == 2 ) { //Si le deplacement se fait de haut en bas\r\n if (($_SESSION[\"plateau\"][$xi][$yi-1] == 1)) { //Si la case entre le depart et l'arrivee a bien un pion\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n elseif ($yi - $yf == -2 ) { //Si le deplacement se fait de bas en haut\r\n if (($_SESSION[\"plateau\"][$xi][$yf-1] == 1)) { //Si la case entre le depart et l'arrivee a bien un pion\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n elseif ($yi == $yf) { // Si le deplacement est horizontal\r\n if ($xi - $xf == 2 ) { //Si le deplacement se fait de droite a gauche\r\n if (($_SESSION[\"plateau\"][$xi-1][$yf] == 1)) { //Si la case entre le depart et l'arrivee a bien un pion\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n elseif ($xi - $xf == -2 ) { //Si le deplacement se fait de gauche a droite\r\n if (($_SESSION[\"plateau\"][$xf-1][$yi] == 1)) { //Si la case entre le depart et l'arrivee a bien un pion\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n else{\r\n return false;\r\n }\r\n }\r\n\r\n }\r\n else {\r\n return false;\r\n }\r\n }\r\n else {\r\n return false;\r\n }\r\n }", "function sloodle_random_position_in_zone($size)\n {\n // Construct the half-size array\n $halfsize = array('x'=>($size['x'] / 2.0) - 2.0, 'y'=>($size['y'] / 2.0) - 2.0, 'z'=>($size['z'] / 2.0) - 2.0);\n \n $pos = array();\n $pos['x'] = mt_rand(0.0, $size['x'] - 4.0) - $halfsize['x'];\n $pos['y'] = mt_rand(0.0, $size['y'] - 4.0) - $halfsize['y'];\n $pos['z'] = mt_rand(0.0, $size['z'] - 4.0) - $halfsize['z'];\n return $pos;\n }", "function create_space($pos,$size){\n\t\t$root = $this->get_root();\n\t\tif($pos > $root[$this->right_col] || $pos < $root[$this->left_col])return false;\n\t\t$this->db->query('UPDATE '.$this->tree_table.\n\t\t\t' SET '.$this->left_col.' = '.$this->left_col.' + '.$size.\n\t\t\t' WHERE '.$this->left_col.' >='.$pos);\n\t\t$this->db->query('UPDATE '.$this->tree_table.\n\t\t\t' SET '.$this->right_col.' = '.$this->right_col.' + '.$size.\n\t\t\t' WHERE '.$this->right_col.' >='.$pos);\n\t\treturn true;\n\t}", "public function inBounds($robot){\r\n if(($robot->x >0 && $robot->x<(self::COMPOUND_SIZE -1 )\r\n && $robot->y >0 && $robot->y<(self::COMPOUND_SIZE -1 ))){\r\n print 'moving...';\r\n $robot->relocate('M');\r\n }\r\n\r\n }", "private function _checkBoundary($newBoundary, $newBox) {}", "public function isPlaced() :bool ;", "public function deplacerPion($xi, $yi, $xf, $yf){\r\n if ($this->verifierDeplacement($xi, $yi, $xf, $yf)) { //Fonction decrite plus tard\r\n if ($xi == $xf) { // Si le deplacement est vertical\r\n if ($yi - $yf == 2 ) { //Si le deplacement se fait de haut en bas\r\n $_SESSION[\"plateau\"][$xi][$yi] = 0; // La case de depart devient vide\r\n $_SESSION[\"plateau\"][$xf][$yf] = 1; // La case d'arrivee devient pleine\r\n $_SESSION[\"plateau\"][$xi][$yi-1] = 0; // La case entre les deux devient vide\r\n }\r\n elseif ($yi - $yf == -2 ) { //Si le deplacement se fait de haut en bas\r\n $_SESSION[\"plateau\"][$xi][$yi] = 0; // La case de depart devient vide\r\n $_SESSION[\"plateau\"][$xf][$yf] = 1; // La case d'arrivee devient pleine\r\n $_SESSION[\"plateau\"][$xi][$yf-1] = 0; // La case entre les deux devient vide\r\n }\r\n }\r\n elseif ($yi == $yf) { // Si le deplacement est horizontal\r\n if ($xi - $xf == 2 ) { //Si le deplacement se fait de droite a gauche\r\n $_SESSION[\"plateau\"][$xi][$yi] = 0; // La case de depart devient vide\r\n $_SESSION[\"plateau\"][$xf][$yf] = 1; // La case d'arrivee devient pleine\r\n $_SESSION[\"plateau\"][$xi-1][$yf] = 0; // La case entre les deux devient vide\r\n }\r\n elseif ($xi - $xf == -2 ) { //Si le deplacement se fait de gauche a droite\r\n $_SESSION[\"plateau\"][$xi][$yi] = 0; // La case de depart devient vide\r\n $_SESSION[\"plateau\"][$xf][$yf] = 1; // La case d'arrivee devient pleine\r\n $_SESSION[\"plateau\"][$xf-1][$yi] = 0; // La case entre les deux devient vide\r\n }\r\n }\r\n $this->finirDeplacement(); //Fonction decrite plus tard\r\n return true;\r\n }\r\n else{\r\n return false;\r\n }\r\n }", "private function moveBoxIfExist(): void\n {\n $direction = $this->getPlayer()->getDirection();\n $x = $this->getPlayer()->getX() + self::DIRECTIONS[$direction][0];\n $y = $this->getPlayer()->getY() + self::DIRECTIONS[$direction][1];\n\n // get position n+2 of player (according to the move direction)\n $nextX = $x + ($x <=> $this->getPlayer()->getX());\n $nextY = $y + ($y <=> $this->getPlayer()->getY());\n\n $tile = $this->getTile($x, $y);\n if ($tile instanceof Tile && $tile->isMovable()\n && ($this->isEmpty($nextX, $nextY) || $this->getTile($nextX, $nextY) instanceof Hole)\n && !$this->isBorder($nextX, $nextY)) {\n\n // if destination is hole, hole is full by box and box is delete\n if ($this->getTile($nextX, $nextY) instanceof Hole) {\n if ($this->getTile($nextX, $nextY)->isTraversable() === false) {\n $this->removeTile($tile);\n }\n $this->getTile($nextX, $nextY)->setTraversable(true);\n\n } else {\n // move the box in the next position if it is box free or not map limit\n $tile->setX($nextX)->setY($nextY);\n }\n\n }\n\n }", "public function prepare_maze($cards) {\r\n\t\t$data = array(\r\n\t\t\t'room_id' => $this->session->userdata('room_id'),\r\n\t\t\t'place' => array('type' => 'maze')\r\n\t\t);\r\n\t\t\r\n\t\t// Goals' positions to be shuffled\r\n\t\t$goals = array(\r\n\t\t\tarray('x' => 48, 'y' => 40),\r\n\t\t\tarray('x' => 48, 'y' => 38),\r\n\t\t\tarray('x' => 48, 'y' => 42)\r\n\t\t);\r\n\r\n\t\tforeach($cards as $card) {\r\n\t\t\t$data['card_id'] = $card['id'];\r\n\t\t\tif ($card['type_name'] == 'start') {\r\n\t\t\t\t$data['place']['coords'] = array('x' => 40, 'y' => 40);\r\n\t\t\t\t$data['place']['face_down'] = 0;\r\n\t\t\t} else {\r\n\t\t\t\t$coord = array_pop($goals);\r\n\t\t\t\t$data['place']['coords'] = $coord;\r\n\t\t\t\t$data['place']['face_down'] = 1;\r\n\t\t\t}\r\n\t\t\t$this->insert($data);\r\n\t\t}\r\n\t}", "private function zoneLocation($size, $playerCount, $mapPlayers,$name){\n //This divides the map by the number of players\n $partitionMap = ($size*$size)/$mapPlayers;\n //This makes a section of the map for the number of player it is\n $personalMap = $partitionMap*$playerCount;\n //This selects a random zone between the players maximum zone number and the players minimum\n $this->zoneNumber = rand(($personalMap-$partitionMap),($personalMap));\n $count = 4 - (strlen((string)$this->zoneNumber));\n $finalZoneID = \"z\";\n for ($i = 0; $i < $count; $i++) {\n $finalZoneID .= \"0\";\n }\n $finalZoneID .= $this->zoneNumber;\n return $name.$finalZoneID;\n }", "public function adjustForGravity() {\n\t\t$d = $this->size;\n\t\t$height = $d['height'];\n\t\t$width = $d['width'];\n\t\t$gx = 0;\n\t\t$gy = 0;\n\t\t$cnt = count($this->xydata);\n\t\tfor ($i = 0; $i < $cnt; $i++) {\n\t\t\t$gx += $this->xydata[$i]['x'];\n\t\t\t$gy += $this->xydata[$i]['y'];\n\t\t}\n\t\t$gx /= $cnt;\n\t\t$gy /= $cnt;\n\t\t$diffx = $width / 2 - $gx;\n\t\t$diffy = $height / 2 - $gy;\n\t\tfor ($i = 0; $i < $cnt; $i++) {\n $this->xydata[$i]['x'] = $this->xydata[$i]['x']+$diffx;\n $this->xydata[$i]['y'] = $this->xydata[$i]['y']+$diffy;\n\t\t}\n\t}", "private function expandDimension()\n\t{\n\t\t$this->sortDimension();\n\n\t\t$newPocketDimension = $this->pocketDimension;\n\t\tforeach($this->pocketDimension as $w => $wDim)\n\t\t{\n\t\t\tforeach($this->pocketDimension[$w] as $z => $zDim)\n\t\t\t{\n\t\t\t\tforeach($this->pocketDimension[$w][$z] as $y => $yDim)\n\t\t\t\t{\n\t\t\t\t\tforeach($this->pocketDimension[$w][$z][$y] as $x => $value)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->setNearbyInactive($w,$z,$y,$x,$newPocketDimension);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\n\t\t$this->pocketDimension = $newPocketDimension;\n\t\tunset($newPocketDimension);\n\t}", "function tileIsReachable($fig, $fig_pos, $dest_pos)\n{\n global $board;\n\n if ($fig_pos == $dest_pos)\n return;\n $result = 0;\n $fy = floor($fig_pos / 8);\n $fx = $fig_pos % 8;\n $dy = floor($dest_pos / 8);\n $dx = $dest_pos % 8;\n /* DEBUG: echo \"$fx,$fy--> $dx,$dy: \"; */\n switch ($fig) {\n /* knight */\n case 'N':\n if (abs($fx - $dx) == 1 && abs($fy - $dy) == 2)\n $result = 1;\n if (abs($fy - $dy) == 1 && abs($fx - $dx) == 2)\n $result = 1;\n break;\n /* bishop */\n case 'B':\n if (abs($fx - $dx) != abs($fy - $dy))\n break;\n if ($dy < $fy)\n $change = -8;\n else\n $change = 8;\n if ($dx < $fx)\n $change -= 1;\n else\n $change += 1;\n if (pathIsNotBlocked($fig_pos + $change, $dest_pos, $change))\n $result = 1;\n break;\n /* rook */\n case 'R':\n if ($fx != $dx && $fy != $dy)\n break;\n if ($fx == $dx) {\n if ($dy < $fy)\n $change = -8;\n else\n $change = 8;\n } else {\n if ($dx < $fx)\n $change = -1;\n else\n $change = 1;\n }\n if (pathIsNotBlocked($fig_pos + $change, $dest_pos, $change))\n $result = 1;\n break;\n /* queen */\n case 'Q':\n if (abs($fx - $dx) != abs($fy - $dy) && $fx != $dx && $fy != $dy)\n break;\n if (abs($fx - $dx) == abs($fy - $dy)) {\n if ($dy < $fy)\n $change = -8;\n else\n $change = 8;\n if ($dx < $fx)\n $change -= 1;\n else\n $change += 1;\n } else\n if ($fx == $dx) {\n if ($dy < $fy)\n $change = -8;\n else\n $change = 8;\n } else {\n if ($dx < $fx)\n $change = -1;\n else\n $change = 1;\n }\n if (pathIsNotBlocked($fig_pos + $change, $dest_pos, $change))\n $result = 1;\n break;\n /* king */\n case 'K':\n if (abs($fx - $dx) > 1 || abs($fy - $dy) > 1)\n break;\n $kings = 0;\n $adj_tiles = getAdjTiles($dest_pos);\n foreach ($adj_tiles as $tile)\n if ($board[$tile][1] == 'K')\n $kings++;\n if ($kings == 2)\n break;\n $result = 1;\n break;\n }\n\n /* DEBUG: echo \" $result<BR>\"; */\n return $result;\n}", "public function checkMove($args)\n {\n $locInitial = $args['locInitial'];\n $locFinal = $args['locFinal'];\n $type = $args['type'];\n $pieces = $args['pieces'];\n \n $rowInit = $locInitial['row'] * 1;\n $rowEnd = $locFinal['row'] * 1;\n $rowResult = abs($rowInit - $rowEnd);\n \n $colInit = $locInitial['col'] * 1;\n $colEnd = $locFinal['col'] * 1;\n $colResult = abs($colInit - $colEnd);\n \n // Log::warning('========');\n // Log::warning($args);\n // Log::warning('========');\n \n // console.log('location difference', rowResult, yf);\n switch ($type) {\n case 1:\n {\n // tower\n if (($rowResult == 0 || $colResult == 0) && $rowResult != $colResult) {\n $ejePoints = [$colInit, $colEnd];\n $ejeFijo = $rowInit;\n $moveRow = true;\n \n if ($rowResult > $colResult) {\n $ejePoints = [$rowInit, $rowEnd];\n $ejeFijo = $colInit;\n $moveRow = false;\n }\n \n $points = $this->calcPoints(intval($ejePoints[0]), intval($ejePoints[1]));\n \n if ($moveRow) {\n foreach ($points as $point) {\n if (array_search(strval($ejeFijo).strval($point), $args['piecesMap']) !== false) {\n return false;\n }\n }\n \n return true;\n }\n \n foreach ($points as $point) {\n if (array_search(strval($point).strval($ejeFijo), $args['piecesMap']) !== false) {\n return false;\n }\n }\n \n return true;\n }\n }\n \n case 2:\n {\n // alfil\n if ($rowResult == $colResult) {\n $rows = $this->calcPoints(intval($rowInit), intval($rowEnd));\n $cols = $this->calcPoints(intval($colInit), intval($colEnd));\n \n foreach ($rows as $key => $row) {\n if (array_search(strval($row).strval($cols[$key]), $args['piecesMap']) !== false) {\n return false;\n }\n }\n \n return true;\n }\n }\n \n case 3:\n {\n // horse\n if (($rowResult + $colResult) == 3 && $rowResult > 0 && $colResult > 0) {\n return true;\n }\n }\n }\n \n return false;\n }", "public function canMoveSomewhere(): bool\n {\n $moves = [\n ['x' => $this->pos['x'] - 1, 'y' => $this->pos['y'] - 1],\n ['x' => $this->pos['x'] - 1, 'y' => $this->pos['y']],\n ['x' => $this->pos['x'] - 1, 'y' => $this->pos['y'] + 1],\n ['x' => $this->pos['x'], 'y' => $this->pos['y'] + 1],\n ['x' => $this->pos['x'] + 1, 'y' => $this->pos['y'] + 1],\n ['x' => $this->pos['x'] + 1, 'y' => $this->pos['y']],\n ['x' => $this->pos['x'] + 1, 'y' => $this->pos['y'] - 1],\n ['x' => $this->pos['x'], 'y' => $this->pos['y'] - 1],\n ];\n\n return $this->canAnyByMoves($moves);\n }", "function TEmptyXY3($loc, $amount)\n\t{\n\t\t$cont = true;\n\t\t$counter =0;\n\t\tif (!in_array($loc, array(\"Animal\", \"Tree\", \"Decoration\"))) { $cont = false;}\n\t\tif (!in_array($amount, array(\"ALL\", \"ONE\"))) { $cont = false;}\n\n\t\t$minX = $this->GB_Setting[$loc.'X1'];\n\t\t$minY = $this->GB_Setting[$loc.'Y1'];\n\t\t$maxX = $this->GB_Setting[$loc.'X2'];\n\t\t$maxY = $this->GB_Setting[$loc.'Y2'];\n\n\t\t$locations = \"ERROR\" ;\n\t\tif($cont)\n\t\t{\n\n\t\t\t@list($level, $gold, $cash, $FarmSizeX, $FarmSizeY) = explode(';', fBGetDataStore('playerinfo'));\n\t\t\tif(($FarmSizeX == '') || ($FarmSizeY == '')){ $GB_place_items = \"No\"; return;}else{ $GB_place_items = \"OK\";}\n\n\t\t\tif ($amount == \"ONE\")\n\t\t\t{\n\t\t\t\t$GBSQL = \"SELECT * FROM locations WHERE _X >= '\".$minX .\"' AND _X <= '\".$maxX .\"' AND _Y >= '\".$minY .\"' AND _Y <= '\".$maxY .\"' AND _what = 'E' LIMIT 1\";\n\t\t\t\t$result = $this->_GBUser->query($GBSQL);\n\t\t\t\tif ($result->numRows() > 0)\n\t\t\t\t{\n\t\t\t\t\t$temp = $result->fetchAll();\n\t\t\t\t\t$locations = array();\n\t\t\t\t\t$locations['x'] = $temp['0']['_X'];\n\t\t\t\t\t$locations['y'] = $temp['0']['_Y'];\n\t\t\t\t\t// reserv the spot in the DB\n\t\t\t\t\t$GBSQL =\"UPDATE locations SET _what = 'TEMP Giftbox' WHERE _X = '\".$locations['x'].\"' AND _Y = '\".$locations['y'].\"' \";\n\t\t\t\t\t$this->_GBUser->query($GBSQL);\n\t\t\t\t} else { $locations = \"fail\"; }\n\t\t\t}\n\t\t\tif ($amount == \"ALL\")\n\t\t\t{\n\t\t\t\t$GBSQL = \"SELECT count(*) FROM locations WHERE _X >= '\".$minX .\"' AND _X <= '\".$maxX .\"' AND _Y >= '\".$minY .\"' AND _Y <= '\".$maxY .\"' AND _what = 'E' \";\n\t\t\t\t$result = $this->_GBUser->query($GBSQL);\n\t\t\t\tif ($result->numRows() > 0)\n\t\t\t\t{\n\t\t\t\t\t$location = $result->fetchAll();\n\t\t\t\t\t$locations = $location['0']['count(*)'];\n\t\t\t\t} else { $locations = \"fail\"; }\n\t\t\t}\n\t\t} //else {return $locations;} // paramter wrong\n\t\treturn $locations;\n\t}", "function RecalcSizes(){}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the [calendar_description] column value.
public function getCalendarDescription () { return $this->calendar_description; }
[ "public function getCalendarDescription()\n {\n return $this->get('CalendarDescription');\n }", "public function getFieldDescription()\n\t{\n\t\treturn $this->GetDAL()->GetField(DotCoreEventDAL::EVENTS_DESCRIPTION);\n\t}", "public function col_description($event) {\n // Description.\n return $event->get_description();\n }", "public function getCalendarSummary()\n {\n return $this->calendarSummary;\n }", "public function getEventDescription() {\n\t\treturn ($this->eventDescription);\n\t}", "function getDescription() \n {\n return $this->getValueByFieldName( 'daobj_desc' );\n }", "function getEventDescription()\n {\n return ($this->__eventdescription) ;\n }", "public function description()\n\t{\n\t\treturn $this->getField('description');\n\t}", "public function getDetaildescription()\n\t{\n\t\t$prefs = ModuleService::getInstance()->getPreferencesDocument('agenda');\n\t\tif (!is_null($prefs))\n\t\t{\n\t\t\treturn $this->replaceMeta($prefs->getDetaildescription());\n\t\t}\n\t\treturn null;\n\t}", "public function getDescription()\n {\n return $this->event->getDescription();\n }", "public function get_metaDescription()\n {\n return (isset($this->dbRow['metaDescription']))? (String)$this->dbRow['metaDescription']: null;\n }", "public function getEventDescription(): string;", "function RawDescription()\n\t {\n\t \treturn $this->_FetchRawCDR('Description');\n\t }", "public function getValueDescription();", "function getEntryDescription(){\n\t\treturn $this->entryDescription;\n\t}", "public function getDescription() {\n return $this->getLanguageFieldValue('Description');\n }", "function getConferenceDescription() {\n\t\treturn $this->getLocalizedSetting('description');\n\t}", "public function getClogDesc()\n {\n return $this->clog_desc;\n }", "public function getCalendarSummary()\n {\n return $this->get('CalendarSummary');\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Caculate end date of repeat when type = day
protected function endDateByDayType() { $this->date->setTimestamp($this->begin); $position = array_search($this->ruleInfo['baseDay'], $this->ruleInfo['days']); if ($position !== 0) { $this->date->setDay($this->ruleInfo['days'][0]); } $repeatedMonth = ceil(($this->ruleInfo['times'] + $position) / count($this->ruleInfo['days'])) - 1; $mod = ($this->ruleInfo['times'] + $position) % count($this->ruleInfo['days']); $endDayPosition = $mod === 0 ? count($this->ruleInfo['days']) - 1 : $mod - 1; $this->date->addMonth($repeatedMonth * $this->ruleInfo['freq']); if ($endDayPosition === 0) { $this->ruleInfo['end'] = $this->date->getDateWithExtendedYear(); return $this->ruleInfo['end']; } // Allow over next month //$this->date->setDay($this->ruleInfo['days'][$endDayPosition]); $this->date->setField(5, $this->ruleInfo['days'][$endDayPosition]); $this->ruleInfo['end'] = $this->date->getDateWithExtendedYear(); return $this->ruleInfo['end']; }
[ "protected function endDateByRelativeDayType()\n {\n $this->date->setTimestamp($this->begin)->setDay(1);\n $this->date->addMonth(($this->ruleInfo['times'] - 1) * $this->ruleInfo['freq']);\n $this->date->gotoNthDayOfMonth($this->ruleInfo['day'], $this->ruleInfo['position']);\n\n return $this->date->getDateWithExtendedYear();\n }", "public function get_calculated_end_date();", "public function getDateEnd();", "public function check_repeat_period ($repeat_type, $start, $end) \n {\n \tswitch ($repeat_type) {\n\t case 2: //every Day\n\t \t\t\t$start = ($start->addYears(1))->isoFormat('YYYY-MM-DD HH:mm:ss');\n \t\t\tif (strtotime($start)<strtotime($end)) {\n\t\t\t\t\t\treturn \"If you are repeating schedule on every day basis then Max Repeat must be under one year.\";\n \t\t\t}\n\t break;\n\t case 3: //every Week\n\t $start = ($start->addYears(2))->isoFormat('YYYY-MM-DD HH:mm:ss');\n \t\t\tif (strtotime($start)<strtotime($end)) {\n\t\t\t\t\t\treturn \"If you are repeating schedule on every Week basis then Max Repeat must be under Two year.\";\n \t\t\t}\n\t break;\n\t case 4: //every Month \n\t $start = ($start->addYears(5))->isoFormat('YYYY-MM-DD HH:mm:ss');\n \t\t\tif (strtotime($start)<strtotime($end)) {\n\t\t\t\t\t\treturn \"If you are repeating schedule on every Month basis then Max Repeat must be under Five year.\";\n \t\t\t}\n\t break;\n\t case 5: //every Year\n\t $start = ($start->addYears(10))->isoFormat('YYYY-MM-DD HH:mm:ss');\n \t\t\tif (strtotime($start)<strtotime($end)) {\n\t\t\t\t\t\treturn \"If you are repeating schedule on every Year basis then Max Repeat must be under Ten year.\";\n \t\t\t}\n\t break;\n\t\t}\n \t\n }", "public function setEndDayOfScreen():DateTime {\n return (clone $this->setStartDayOfScreen())->modify('+' . (6 + 7 * ($this->getWeeks() - 1)) . 'days');\n }", "public function getDayEnd()\n {\n return self::mkTime(\n 23,\n 59,\n 59,\n $this->format('m'),\n $this->format('d'),\n $this->format('Y')\n );\n }", "function jr_resume_calc_end_date( $length ) {\n\t$date = strtotime( '+'.$length.' days', current_time('timestamp') );\n\treturn $date;\n\n}", "public function getEndDay()\n {\n $carbon = new Carbon($this->end_date);\n\n return $carbon->format(\"l\");\n }", "function &repeatUntilDate()\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n \n if ($this->RepeatUntilDate != '00000000000000') \n { \n $year = substr($this->RepeatUntilDate, 0, 4);\n\t $month = substr($this->RepeatUntilDate, 4, 2);\n\t $day = substr($this->RepeatUntilDate, 6, 2);\n\t \n\t $ret = \"$year-$month-$day\";\n }\n else\n $ret = false;\n \n return $ret;\n }", "public function nextWeekendDay();", "public function endOfMonth();", "public function getEndOfDayDate()\n {\n return $this->_date->date(null, '23:59:59');\n }", "public function getRuleRepeatDayOfMonth()\n {\n return $this->sRepeatDayofmonth;\n }", "function turnitintooltwo_generate_part_dates($renewdates, $datetype, $part, $i) {\n if ($renewdates) {\n switch ($datetype) {\n case 'start':\n return gmdate(\"Y-m-d\\TH:i:s\\Z\", time());\n case 'due':\n case 'post':\n return gmdate(\"Y-m-d\\TH:i:s\\Z\", strtotime(\"+1 week\"));\n default:\n return NULL;\n }\n } else {\n $attribute = \"dt\".$datetype.$i;\n return gmdate(\"Y-m-d\\TH:i:s\\Z\", $part->$attribute);\n }\n}", "public function endOfDay()\n {\n return $this->setTime(23, 59, 59, 999999);\n }", "public function updateDueDateBasedOnEndDate()\n {\n // due date set to 8 weeks (56 days) after the end date unless lay reports where end date is beyond\n // 13/11/19. Then it is 21 days (DDPB-2996)\n $this->dueDate = clone $this->endDate;\n if ($this->isLayReport() && $this->getEndDate()->format('Ymd') >= '20191113') {\n $this->dueDate->add(new \\DateInterval('P21D'));\n } else {\n $this->dueDate->add(new \\DateInterval('P56D'));\n }\n }", "public function endOfDay($date)\n\t{\n\t\t$endOfDay = null;\n\t\t// Mon to Fri end of day 5pm\n\t\tif ($date->dayOfWeek > 0 and $date->dayOfWeek < 6)\n\t\t{\n\t\t\t$endOfDay = Carbon::create($date->year, $date->month, $date->day, 17, 0, 0, $this->timeZone);\n\t\t}\n\t\t// Saturday end of day 1pm\n\t\telse if ($date->dayOfWeek === 6)\n\t\t{\n\t\t\t$endOfDay = Carbon::create($date->year, $date->month, $date->day, 13, 0, 0, $this->timeZone);\n\t\t}\n\t\treturn $endOfDay;\n\t}", "function _date_repeat_widget_validate($element, &$form_state) {\r\n require_once('./'. drupal_get_path('module', 'date_repeat') .'/date_repeat_form.inc');\r\n $form_values = $form_state['values'];\r\n $field_name = $element['#field_name'];\r\n $fields = content_fields();\r\n $field = $fields[$field_name];\r\n $item = $form_values[$field_name];\r\n $values = date_repeat_merge($element['#post'][$field_name]['rrule'], $element['rrule']);\r\n \r\n // If no start date was set, clean up the form and return.\r\n // If no repeats are set, clean up the form and return.\r\n if (empty($form_values[$field_name]['value']) || $values['FREQ'] == 'NONE') {\r\n $form_values[$field_name]['rrule'] = NULL;\r\n form_set_value($element, array($form_values[$field_name]), $form_state);\r\n return;\r\n }\r\n\r\n // Require the UNTIL date for now.\r\n // The RRULE has already been created by this point, so go back\r\n // to the posted values to see if this was filled out.\r\n $error_field = implode('][', $element['#parents']) .'][rrule][UNTIL][datetime][date';\r\n if (empty($values['UNTIL']['datetime'])) {\r\n form_set_error($error_field, t('The UNTIL value is required for repeating dates.'));\r\n }\r\n if (form_get_errors()) {\r\n return;\r\n }\r\n\r\n // If the rule, the start date, or the end date have changed, re-calculate\r\n // the repeating dates, wipe out the previous values, and populate the\r\n // field with the new values.\r\n\r\n // TODO\r\n // Is it right to not do anything unless there are changes? Will that\r\n // confuse anyone? Commenting that out for now...\r\n $rrule = $form_values[$field_name]['rrule'];\r\n if (!empty($rrule)\r\n //&& ($rrule != $element['rrule']['#prev_rrule']\r\n //|| $form_values[$field_name][0]['value'] != $element['rrule']['#prev_value']\r\n //|| $form_values[$field_name][0]['value2'] != $element['rrule']['#prev_value2'])\r\n ) {\r\n\r\n $item = $form_values[$field_name];\r\n \r\n // Avoid undefined index problems on dates that don't have all parts.\r\n $possible_items = array('value', 'value2', 'timezone', 'offset', 'offset2');\r\n foreach ($possible_items as $key) {\r\n if (empty($item[$key])) {\r\n $item[$key] = '';\r\n }\r\n } \r\n $value = date_repeat_build_dates($rrule, $values, $field, $item);\r\n form_set_value($element, $value, $form_state);\r\n }\r\n else {\r\n // If no changes are needed, move the RRULE back to the zero value\r\n // item of the field.\r\n form_set_value(array('#parents' => array($field_name, 0, 'rrule')), $rrule, $form_state);\r\n form_set_value($element['rrule'], NULL, $form_state);\r\n }\r\n}", "function _date_repeat_rrule_process($element, $edit, $form_state, $form) {\r\n require_once('./'. drupal_get_path('module', 'date_api') .'/date_api_ical.inc');\r\n \r\n if (empty($element['#date_repeat_widget'])) {\r\n $element['#date_repeat_widget'] = module_exists('date_popup') ? 'date_popup' : 'date_select';\r\n }\r\n if (is_array($element['#value'])) {\r\n $element['#value'] = date_repeat_merge($element['#value'], $element);\r\n $rrule = date_api_ical_build_rrule($element['#value']);\r\n }\r\n else {\r\n $rrule = $element['#value'];\r\n }\r\n // Empty the original string value of the RRULE so we can create\r\n // an array of values for the form from the RRULE's contents.\r\n $element['#value'] = '';\r\n\r\n $parts = date_repeat_split_rrule($rrule);\r\n $rrule = $parts[0];\r\n $exceptions = $parts[1];\r\n $timezone = !empty($element['#date_timezone']) ? $element['#date_timezone'] : date_default_timezone_name();\r\n $merged_values = date_repeat_merge($rrule, $element);\r\n \r\n $UNTIL = '';\r\n if (!empty($merged_values['UNTIL']['datetime'])) {\r\n $until_date = date_make_date($merged_values['UNTIL']['datetime'], $merged_values['UNTIL']['tz']);\r\n date_timezone_set($until_date, timezone_open($timezone));\r\n $UNTIL = date_format($until_date, DATE_FORMAT_DATETIME);\r\n }\r\n $parent_collapsed = !empty($rrule['INTERVAL']) || !empty($rrule['FREQ']) ? 0 : (!empty($element['#date_repeat_collapsed']) ? $element['#date_repeat_collapsed'] : 0);\r\n $element['#type'] = 'fieldset';\r\n $element['#title'] = t('Repeat');\r\n $element['#description'] = theme('advanced_help_topic', 'date_api', 'date-repeat-form') . t('Choose a frequency and period to repeat this date. If nothing is selected, the date will not repeat.');\r\n $element['#collapsible'] = TRUE;\r\n $element['#collapsed'] = $parent_collapsed;\r\n \r\n // Make sure we don't get floating parts where we don't want them.\r\n $element['#prefix'] = '<div class=\"date-clear\">';\r\n $element['#suffix'] = '</div>';\r\n \r\n $element['INTERVAL'] = array(\r\n '#type' => 'select',\r\n //'#title' => t('Interval'),\r\n '#default_value' => (!empty($rrule['INTERVAL']) ? $rrule['INTERVAL'] : 0),\r\n '#options' => INTERVAL_options(),\r\n '#prefix' => '<div class=\"date-repeat-input\">',\r\n '#suffix' => '</div>',\r\n );\r\n\r\n $element['FREQ'] = array(\r\n '#type' => 'select',\r\n //'#title' => t('Frequency'),\r\n '#default_value' => !empty($rrule['FREQ']) ? $rrule['FREQ'] : 'NONE',\r\n '#options' => FREQ_options(),\r\n '#prefix' => '<div class=\"date-repeat-input\">',\r\n '#suffix' => '</div>',\r\n );\r\n\r\n $element['UNTIL'] = array(\r\n '#tree' => TRUE,\r\n '#prefix' => '<div class=\"date-clear\">',\r\n '#suffix' => '</div>',\r\n 'datetime' => array(\r\n '#type' => $element['#date_repeat_widget'],\r\n '#title' => t('Until'),\r\n '#description' => t('Date to stop repeating this item.'),\r\n '#default_value' => $UNTIL,\r\n '#date_timezone' => $timezone,\r\n '#date_format' => !empty($element['#date_format']) ? $element['#date_format'] : 'Y-m-d',\r\n '#date_text_parts' => !empty($element['#date_text_parts']) ? $element['#date_text_parts'] : array(),\r\n '#date_year_range' => !empty($element['#date_year_range']) ? $element['#date_year_range'] : '-3:+3',\r\n '#date_label_position' => !empty($element['#date_label_position']) ? $element['#date_label_position'] : 'within',\r\n ),\r\n 'tz' => array('#type' => 'hidden', '#value' => $element['#date_timezone']),\r\n 'all_day' => array('#type' => 'hidden', '#value' => 1),\r\n 'granularity' => array('#type' => 'hidden', '#value' => serialize(array('year', 'month', 'day'))),\r\n );\r\n \r\n $collapsed = TRUE;\r\n if (!empty($merged_values['BYDAY']) || !empty($merged_values['BYMONTH'])) {\r\n $collapsed = FALSE;\r\n }\r\n\t// start the advanced fieldset\r\n $element['advanced'] = array(\r\n '#type' => 'fieldset',\r\n '#title' => t('Advanced'),\r\n '#collapsible' => TRUE,\r\n '#collapsed' => $collapsed,\r\n '#description' => t(\"If no advanced options are selected, the date will repeat on the day of week of the start date for weekly repeats, otherwise on the month and day of the start date. Use the options below to override that behavior to select specific months and days to repeat on. Use the 'Except' box to input dates that should be omitted from the results.\") .' ',\r\n '#prefix' => '<div class=\"date-clear\">',\r\n '#suffix' => '</div>',\r\n );\r\n\r\n $element['advanced']['BYMONTH'] = array(\r\n '#type' => 'select',\r\n '#title' => date_t('Month', 'datetime'),\r\n '#default_value' => !empty($rrule['BYMONTH']) ? $rrule['BYMONTH'] : '',\r\n '#options' => array('' => t('-- Any')) + date_month_names(TRUE),\r\n '#multiple' => TRUE,\r\n '#size' => 10,\r\n '#prefix' => '<div class=\"date-repeat-input\">',\r\n '#suffix' => '</div>',\r\n );\r\n\r\n $element['advanced']['BYMONTHDAY'] = array(\r\n '#type' => 'select',\r\n '#title' => t('Day of Month'),\r\n '#default_value' => !empty($rrule['BYMONTHDAY']) ? $rrule['BYMONTHDAY'] : '',\r\n '#options' => array('' => t('-- Any')) + drupal_map_assoc(range(1, 31)) + drupal_map_assoc(range(-1, -31)),\r\n '#multiple' => TRUE,\r\n '#size' => 10,\r\n '#prefix' => '<div class=\"date-repeat-input\">',\r\n '#suffix' => '</div>',\r\n );\r\n\r\n $element['advanced']['BYDAY'] = array(\r\n '#type' => 'select',\r\n '#title' => t('Day of Week'),\r\n '#default_value' => !empty($rrule['BYDAY']) ? $rrule['BYDAY'] : '',\r\n '#options' => array('' => t('-- Any')) + date_repeat_dow_options(),\r\n //'#attributes' => array('size' => '5'),\r\n '#multiple' => TRUE,\r\n '#size' => 10,\r\n '#prefix' => '<div class=\"date-repeat-input\">',\r\n '#suffix' => '</div>',\r\n );\r\n\r\n $element['exceptions'] = array(\r\n '#type' => 'fieldset',\r\n '#collapsible' => TRUE,\r\n '#collapsed' => empty($exceptions) ? TRUE : FALSE,\r\n '#title' => t('Except'),\r\n '#description' => t('Dates to omit from the list of repeating dates.'),\r\n '#prefix' => '<div class=\"date-repeat\">',\r\n '#suffix' => '</div>',\r\n );\r\n $max = !empty($exceptions) ? sizeof($exceptions) : 0;\r\n for ($i = 0; $i <= $max; $i++) {\r\n $EXCEPT = '';\r\n if (!empty($exceptions[$i]['datetime'])) {\r\n $EXCEPT = $exceptions[$i]['datetime'];\r\n }\r\n $element['exceptions']['EXDATE'][$i] = array(\r\n '#tree' => TRUE,\r\n 'datetime' => array(\r\n '#type' => $element['#date_repeat_widget'],\r\n '#default_value' => $EXCEPT,\r\n '#date_timezone' => !empty($element['#date_timezone']) ? $element['#date_timezone'] : date_default_timezone_name(),\r\n '#date_format' => !empty($element['#date_format']) ? $element['#date_format'] : 'Y-m-d',\r\n '#date_text_parts' => !empty($element['#date_text_parts']) ? $element['#date_text_parts'] : array(),\r\n '#date_year_range' => !empty($element['#date_year_range']) ? $element['#date_year_range'] : '-3:+3',\r\n '#date_label_position' => !empty($element['#date_label_position']) ? $element['#date_label_position'] : 'within',\r\n ),\r\n 'tz' => array('#type' => 'hidden', '#value' => $element['#date_timezone']),\r\n 'all_day' => array('#type' => 'hidden', '#value' => 1),\r\n 'granularity' => array('#type' => 'hidden', '#value' => serialize(array('year', 'month', 'day'))),\r\n );\r\n }\r\n return $element;\r\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Transforms the given collection into a SplFixedArray
protected function collectionToFixedArray($collection) { // Get the collection data as SplFixedArray and return it if ($collection instanceof DatabaseRawDataInterface) { $fixedCollection = $collection->getRawData(); } elseif (is_array($collection)) { $fixedCollection = SplFixedArray::fromArray($collection); } elseif ($collection instanceof Iterator) { $collection->rewind(); $fixedCollection = SplFixedArray::fromArray(iterator_to_array($collection)); } else { $fixedCollection = new SplFixedArray(0); } return $fixedCollection; }
[ "private function getSplFixedArray() {\n return new SplFixedArray(INVENTORY_SIZE);\n }", "public static function collectionToFixedArray($collection, $preferRaw = false, $graceful = true): SplFixedArray\n {\n if ($preferRaw && $collection instanceof DatabaseRawDataInterface) {\n return $collection->getRawData();\n }\n if ($collection instanceof DatabaseInterface) {\n return $collection->toFixedArray();\n }\n if (is_array($collection)) {\n return SplFixedArray::fromArray($collection);\n }\n if ($collection instanceof Traversable) {\n $collection->rewind();\n\n return SplFixedArray::fromArray(iterator_to_array($collection));\n }\n if ($graceful) {\n return new SplFixedArray(0);\n }\n\n throw new InvalidCollectionException(\n sprintf(\n 'Could not transform given value of type %s into a fixed array',\n GeneralUtility::getType($collection)\n ),\n 1425127655\n );\n }", "protected function mixedToFixedArray($x): SplFixedArray\n {\n if (is_numeric($x)) {\n $x = [$x];\n }\n\n if ( ! $x instanceof SplFixedArray) {\n $x = SplFixedArray::fromArray($x, false);\n }\n\n return $x;\n }", "public function makeArray(Collection $collection)\n {\n $array = [];\n foreach ($collection as $entry) {\n $entry->spent = isset($entry->spent) ? floatval($entry->spent) : 0.0;\n $id = intval($entry->id);\n if (isset($array[$id])) {\n $array[$id]['amount'] += floatval($entry->amount);\n $array[$id]['spent'] += floatval($entry->spent);\n } else {\n $array[$id] = [\n 'amount' => floatval($entry->amount),\n 'spent' => floatval($entry->spent),\n 'name' => $entry->name\n ];\n }\n }\n\n return $array;\n }", "abstract public function convertArray();", "public function testTransformToArray() {\n $inputArray = [1, 2, 3, 4, 5, 6, 7, 8, 9];\n $collection = new GenericCollection();\n $collection->addArray($inputArray);\n $transformed = $collection->transformToArray(function($object) {\n return $object - 1;\n });\n self::assertCount(\\count($inputArray), $transformed);\n foreach ($inputArray as $key => $value) {\n self::assertEquals($value - 1, $transformed[$key]);\n }\n }", "public function getPixels() : SPLFixedArray;", "abstract function to_array();", "public function toFlatArray();", "public function transformCollection($collection);", "protected function asCollection(): Collection\n {\n $this->data = Collection::fromArray($this->asArray());\n return $this->data;\n }", "public function toArray() {}", "public function testArrayToCollection()\n {\n $source = array();\n $collectionType = CollectionInterface::class;\n $return = openssl_random_pseudo_bytes(3);\n \n $mockManager = $this->getMockForAbstractClass(\n ArrayCasterManagerInterface::class\n );\n $mockManager->expects($this->once())\n ->method(\"process\")\n ->with($this->equalTo($source), $this->equalTo($collectionType))\n ->will($this->returnValue($return));\n \n $reflection = new \\ReflectionClass(AbstractCollectionHelper::class);\n $managerProperty = $reflection->getProperty(\"manager\");\n \n $managerProperty->setAccessible(true);\n $managerProperty->setValue($this->testInstance, $mockManager);\n \n $this->assertEquals(\n $return,\n $this->testInstance->arrayToCollection($source, $collectionType),\n sprintf(\n \"The instance of %s is expected to the result\".\n \" of the manager %s method when the method %s is called\",\n AbstractCollectionHelper::class,\n \"process\",\n \"arrayToCollection\"\n )\n );\n }", "private static function initEmpty() : SPLFixedArray {\n if (!self::$oEmpty) {\n self::$oEmpty = SPLFixedArray::fromArray(array_fill(0, Context::get()->getPacketLength(), 0.0));\n }\n return clone self::$oEmpty;\n }", "public function testFixedList()\n {\n $c = Collection::fixedList( new \\Xyster\\Collection\\ArrayList() );\n $c->clear();\n }", "function collection_shallow_to_array($collection)\n{\n $array = [];\n\n $collection->each(function($data) use (&$array) {\n $array[] = $data;\n });\n\n return $array;\n}", "public function testArrayToCollectionError()\n {\n $this->testInstance->arrayToCollection(\n array(),\n CollectionInterface::class\n );\n }", "public function convertPlainArrayToTypoScriptArrayTestdata() {}", "public function toArray() {\r\n\t return $this->_collection;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets as noteText This field is needed if the Action is AddOrUpdate. The text supplied in this field will completely replace any existing My eBay note for the specified item.
public function getNoteText() { return $this->noteText; }
[ "function my_omeka_get_user_note_for_item($user = null, $item = null)\n{\n if (!$item) {\n $item = get_current_item();\n }\n\n if (!$user) {\n $user = current_user();\n }\n\n $note = get_db()->getTable('MyOmekaNote')->findByUserIdAndItemId($user->id, $item->id);\n\n return $note->text;\n}", "public function getNote()\n {\n return $this->note;\n }", "public function getnote()\n {\n return $this->note;\n }", "public function getNote()\n {\n return isSetNotEmpty($this->requestData, 'note') ?: null;\n }", "public function getInternalNote(): string;", "function ShowFormNoteText()\n\t{\n\t\treturn $this->strFormNote;\n\t}", "public function getNote()\n {\n $this->addFieldCache('note');\n\n if (!isset($this->data['fields']['note']) &&\n !$this->isFieldInQuery('note'))\n {\n $this->loadFull();\n }\n // Still not set? It can only be null\n if (!isset($this->data['fields']['note'])) {\n $this->data['fields']['note'] = null;\n }\n\n return $this->data['fields']['note'];\n }", "function note() {\n return $this->_parsed->note;\n }", "public function getChangeNote()\n {\n return $this->changeNote;\n }", "public function note()\n {\n if (!is_null($this->email))\n return $this->email->getAttribute('note');\n\n return '';\n }", "public function get_note(){\n\n\n $message = \"Paypal Payment Note: \\n\\r\";\n if(isset($this->ipn[\"txn_id\"]) ) {\n $message .= sprintf('Txn Id : %s ', $this->ipn[\"txn_id\"]) . \" \\n\\r\";\n }\n if(isset($this->ipn[\"address_name\"]) ) {\n $message .= sprintf('Payer name : %s ', $this->ipn[\"address_name\"]) . \" \\n\\r\";\n }\n if(isset($this->ipn[\"address_country\"]) ) {\n $message .= sprintf('Country : %s ', $this->ipn[\"address_country\"]) . \" \\n\\r\";\n }\n if(isset($this->ipn[\"payer_email\"]) ) {\n $message .= sprintf('Payer : %s ', $this->ipn[\"payer_email\"]) . \" \\n\\r\";\n }\n\n return $message;\n\n }", "public function flashNote() {\n return $this->flash('note');\n }", "public function getNoteContent()\n\t{\n\t\treturn $this->noteContent; \n\n\t}", "function getNote()\n {\n return $this->row['srcnote'];\n }", "public function getUserNote()\n {\n return $this->user_note;\n }", "public function setItemNote($value)\n {\n return $this->set('ItemNote', $value);\n }", "public function get_notice_text() {\n\t\treturn \\__(\n\t\t\t'The original post has been edited in the meantime. If you click \"Republish\", this rewritten post will replace the original post.',\n\t\t\t'duplicate-post'\n\t\t);\n\t}", "public function getNoteContent() {\n\t\treturn($this->noteContent);\n\t}", "function getGiftNote() {\n\t\treturn $this->getData('giftNote');\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
returns a matrix with the folder's file information
function getFileMatrix() { $files = array( ); $files['name'] = array(); $files['size'] = array(); $files['type'] = array(); $files['date'] = array(); $counFiles = 0; for( $x=0; $x < $this->filesCollection->size( ); $x++ ) { if( ( $this->filesCollection->get( $x )->getType( ) ) == 'folderFile' ) { $files['name'][$counFiles] = $this->filesCollection->get( $x )->getName( ); $files['date'][$counFiles] = date( "d/m/Y", $this->filesCollection->get( $x )->getDate( ) ); $files['size'][$counFiles] = ' '; $files['type'][$counFiles] = $this->filesCollection->get( $x )->getType( ); $counFiles++; } } for( $x=0; $x < $this->filesCollection->size( ); $x++ ) { if( ( $this->filesCollection->get( $x )->getType( ) ) != 'folderFile' ) { $files['name'][$counFiles] = $this->filesCollection->get( $x )->getName( ); $files['date'][$counFiles] = date( "d/m/Y", $this->filesCollection->get( $x )->getDate( ) ); $files['size'][$counFiles] = bcdiv( $this->filesCollection->get( $x )->getSize( ), 1024, 1 ).' Kb'; $files['type'][$counFiles] = $this->filesCollection->get( $x )->getType( ); $counFiles++; } } return $files; }
[ "private function constructFileArray() {\n $folders = Folder::where('selected', 1)->get();\n\n foreach ($folders as $folder) {\n $this->scanDirectory($folder->path);\n }\n }", "public function fetch_all_folder_files()\n {\n $entries = scandir(public_path());\n\n $root = public_path();\n \n foreach (File::allFiles($root) as $file) {\n $data[] = $file->getFilename();\n }\n echo \"<pre>\"; print_r($data);die;\n \n }", "abstract function folder_info($folder);", "public function listFiles(){\n $fileList = [];\n $d = dir($this->imageFolder);\n while (false !== ($entry = $d->read())) {\n if ($this->isImageFile($this->imageFolder, $entry)){\n $fileList[$this->filename2key($entry)] = $this->imageFolder . '/' . $entry;\n }\n }\n $d->close();\n return $fileList;\n }", "function directory_array() {\r\n\t\t$file_array = Array(); // Holds files\r\n\t\t$dir_array = Array(); // Holds directories\r\n\r\n\t\t// Open the directory and put everything into $dir_array or $file_array\r\n\t\tif($open_dir = @opendir($this->clean_path)) {\r\n\t\t\twhile(FALSE != ($spiff = readdir($open_dir))) {\r\n\r\n\t\t\t\t// File is not in black list\r\n\t\t\t\tif(!in_array($spiff, $this->blacklist)) {\r\n\r\n\t\t\t\t\t// File is directory\r\n\t\t\t\t\tif(is_dir($this->path . \"/\" . $spiff)) {\r\n\r\n\t\t\t\t\t\t// Is directory so open up and see how many files are inside\r\n\t\t\t\t\t\t$dir_contents_count = 0;\r\n\t\t\t\t\t\t$dir_contents_size = 0;\r\n\t\t\t\t\t\tif($f_dir = @opendir($this->clean_path . \"/\" . $spiff)) {\r\n\t\t\t\t\t\t\twhile(FALSE != ($f_name = readdir($f_dir))) {\r\n\t\t\t\t\t\t\t\t$dir_contents_count++;\r\n\t\t \r\n\t\t\t\t\t\t\t\t// Might as well add up size too\r\n\t\t\t\t\t\t\t\t$dir_contents_size += filesize($this->clean_path . \"/\" . $spiff . \"/\". $f_name);\r\n\t\t\t\t\t\t\t}\r\n\t\t\r\n\t\t\t\t\t\t\t$dir_contents_count -= 2; // Remove values for . and ..\r\n\t\t\t\t\t\t\t$dir_contents_count = ($dir_contents_count > 0) ? $dir_contents_count : 0;\r\n\t\t\r\n\t\t\t\t\t\t\t$dir_contents_size_human = $dir_contents_size;\r\n\t\t\r\n\t\t\t\t\t\t\t$dir_contents_size = ($dir_contents_size == 0) ? '-' : $dir_contents_size_human;\r\n\t\t\t\t\t\t\tclosedir($f_dir);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\t// End files inside\r\n\t\t\t\t\t\tif($this->order == \"on\") {\r\n\t\t\t\t\t\t\t// order is on\r\n\r\n\t\t \t\t\t\t\t// Insert into array $spiff == file name\r\n\t\t\t\t\t\t\t$dir_array[$spiff]['name'] = $spiff;\r\n\t\t\t\t\t\t\t$dir_array[$spiff]['details'] = $dir_contents_size;\r\n\t\t\t\t\t\t\t$dir_array[$spiff]['type'] = $dir_contents_count; // Holds number of files in directory\r\n\t\t\t\t\t\t\t$dir_array[$spiff]['mod_date'] = filemtime($this->clean_path . \"/\" . $spiff);\r\n\t \r\n\t\t\t\t\t\t\t// Total file counter\r\n\t\t\t\t\t\t\t$this->file_count++;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t$contents[$spiff]['name'] = $spiff;\r\n\t\t\t\t\t\t\t$contents[$spiff]['details'] = $dir_contents_size;\r\n\t\t\t\t\t\t\t$contents[$spiff]['type'] = '';\r\n\t\t\t\t\t\t\t$contents[$spiff]['mod_date'] = '';\r\n\t\t\t\t\t\t\t$this->file_count++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t} else { \r\n\t\t\t\t\t\tif($this->order == \"on\") {\r\n\t\t\t\t\t\t\t\t$file_array[$spiff]['name'] = $spiff;\r\n\t\t\t\t\t\t\t\t$file_array[$spiff]['details'] = filesize($this->clean_path . \"/\" . $spiff);\r\n\t\t\t\t\t\t\t\t$file_array[$spiff]['type'] = $this->mimetype($this->clean_path . \"/\" . $spiff);\r\n\t\t\t\t\t\t\t\t$file_array[$spiff]['mod_date'] = filemtime($this->clean_path . \"/\" . $spiff);\r\n\t\t\t\t\t\t\t\t$this->file_count++;\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\t\t$contents[$spiff]['name'] = $spiff;\r\n\t\t\t\t\t\t\t\t$contents[$spiff]['details'] = $this->human_file_size(filesize($this->clean_path . \"/\" . $spiff));\r\n\t\t\t\t\t\t\t\t$contents[$spiff]['type'] = $this->mimetype($this->clean_path . \"/\" . $spiff);\r\n\t\t\t\t\t\t\t\t$contents[$spiff]['mod_date'] = filemtime($this->clean_path . \"/\" . $spiff);\r\n\t\t\t\t\t\t\t\t$this->file_count++;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t} // END if file is not in blacklist\r\n\r\n\t\t\t} // END while\r\n\r\n\t\t\t// Begin sorting: Sort arrays and merge file and directory arrays\r\n\t\t\tif($this->order == \"on\") {\r\n\r\n\t\t\t\t// Two years later proper sorting...\r\n\t\t\t\tswitch ($this->xss_f($_GET['c'])) {\r\n\t\t\t\t\tcase 'details':\r\n\t\t\t\t\t\t$contents = array_merge($dir_array, $file_array);\r\n\t\t\t\t\t\tusort($contents, array('index0r','sizeCmp'));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'type':\r\n\t\t\t\t\t\t$contents = array_merge($dir_array, $file_array);\r\n\t\t\t\t\t\tusort($contents, array('index0r','sizeCmp'));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tcase 'mod_date':\r\n\t\t\t\t\t\t$contents = array_merge($dir_array, $file_array);\r\n\t\t\t\t\t\tusort($contents, array('index0r','sizeCmp'));\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t$lowerCaseDirArray = $this->lower_case_array($dir_array);\r\n\t\t\t\t\t\t$lowerCaseFileArray = $this->lower_case_array($file_array);\r\n\r\n\t\t\t\t\t\tarray_multisort($dir_array, SORT_ASC, SORT_STRING, $lowerCaseDirArray);\r\n\t\t\t\t\t\tarray_multisort($file_array, SORT_ASC, SORT_STRING, $lowerCaseFileArray);\r\n\r\n\t\t\t\t\t\t$contents = array_merge($dir_array, $file_array);\r\n\t\t\t\t}\r\n\r\n\t\t\t\t\treturn $contents;\r\n\t\t\t\t} else {\r\n\t\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t} // END is_open()\r\n\t}", "public function getFilesArray();", "function iteratorFile(){\n$iterator = new DirectoryIterator(DIR_IMAGES);\nforeach($iterator as $fileinfo){\n\tif($fileinfo->isFile() && $fileinfo->getFilename() !== 'data.txt') \n\t\t$arr_path[$fileinfo->getFilename()] = $fileinfo->getPathname();\n }\n return $arr_path;\n}", "function get_files() {\n\n\t\t// Define path\n\t\t$path = \"assets_html/\";\n\t\t// Create data array\n\t\t$data = array();\n\t\n\t\t// If files are found loop over all \n\t\tif ($handle = opendir($path)) {\n\t\t\n\t\t\twhile (false !== ($file = readdir($handle))) {\n\n\t\t\t\t// Ignore files we're not interested in\n\t\t\t\tif ('.' === $file) continue;\n\t\t\t\tif ('..' === $file) continue;\n\n\t\t\t\t// If the file is a meta file extract the contents and assign to our data array\n\t\t\t\tif (strpos($file, '.meta') !== false) {\n\t\t\t\t\n\t\t\t\t\t$meta_data = file_get_contents('' . $path . '' . $file . '');\n\t\t\t\t\t$meta_elements = explode(\",\", $meta_data);\n \t\t\t$title = $meta_elements[0];\n\t\t\t\t\t$file_name = $meta_elements[1];\n\t\t\t\t\t$file_name = str_replace(array(\"\\n\", \"\\t\", \"\\r\"), '', $file_name);\n\t\t\t\t\t//echo $file_name;\n\t\t\t\t\t//echo $title;\n\t\t\t\t\t$data += [$title => $file_name];\n\n\t\t\t\t}\n\n\t\t\t\t// Otherwise skip over the file\n\t\t\t\telse\n\t\t\t\n\t\t\t\t{\t\n\t\t\t\n\t\t\t\t\tcontinue;\n\t\t\t\n\t\t\t\t}\n\n\n\t\t\t}\t\n\t\t\n\t\t\t// Close all open files\n\t\t\tclosedir($handle);\n\t\t\n\t\n\t\t}\n\n\t\t// return the arry\n\t\treturn $data;\n\n}", "function read_all_files($root = '/content/manuscriptlink'){ //directory path for images of manuscript.\r\n $files = array('dirs'=>array(),'files'=>array());\r\n $directories = array();\r\n $last_letter = $root[strlen($root)-1];\r\n $root = ($last_letter == '\\\\' || $last_letter == '/') ? $root : $root.DIRECTORY_SEPARATOR;\r\n \r\n $directories[] = $root;\r\n \r\n $file_w = fopen(\"imagePaths.txt\", 'w');\r\n while (sizeof($directories)) {\r\n $dir = array_pop($directories);\r\n if ($handle = opendir($dir)) {\r\n while (false !== ($file = readdir($handle))) {\r\n if ($file == '.' || $file == '..') {\r\n continue;\r\n }\r\n $file = $dir.$file;\r\n if (is_dir($file)) {\r\n $directory_path = $file.DIRECTORY_SEPARATOR;\r\n array_push($directories, $directory_path);\r\n $files['dirs'][] = $directory_path;\r\n } elseif (is_file($file)) {\r\n if(strpos(realpath($file), '.tif') == false ){\r\n $files['files'][] = $file;\r\n fputs($file_w, realpath($file).\"\\n\");\r\n }\r\n \r\n }\r\n }\r\n closedir($handle);\r\n }\r\n }\r\n \r\n fclose($file_w);\r\n return $files;\r\n}", "public function files() :array\n {\n $files = DB::query(\"SELECT `ft_filename` AS 'filename', `ft_size` AS 'size' FROM `file_table` WHERE `ft_ut_id` = :u_id ORDER BY `ft_filename` ASC\", array(':u_id'=>$_SESSION['user_id']));\n\n $list = [];\n $i = 0;\n\n foreach($files as $file){\n $list[$i] = array($file['filename'], round($file['size']/1024, 2));\n $i++;\n }\n return $list;\n }", "function scan($dir)\n{\n $files = array();\n $_dir = $dir;\n $dir = FM_ROOT_PATH.'/'.$dir;\n // Is there actually such a folder/file?\n if(file_exists($dir)) {\n foreach (scandir($dir) as $f) {\n if(!$f || $f[0] == '.') {\n continue; // Ignore hidden files\n }\n\n if(is_dir($dir.'/'.$f)) {\n // The path is a folder\n $files[] = array(\n \"name\" => $f,\n \"type\" => \"folder\",\n \"path\" => $_dir.'/'.$f,\n \"items\" => scan($dir.'/'.$f), // Recursively get the contents of the folder\n );\n } else {\n // It is a file\n $files[] = array(\n \"name\" => $f,\n \"type\" => \"file\",\n \"path\" => $_dir,\n \"size\" => filesize($dir.'/'.$f) // Gets the size of this file\n );\n }\n }\n }\n return $files;\n}", "abstract protected function getFolderData();", "private static function getAllFilesFromMapFolder()\n {\n $resultSet = array();\n if (is_dir(self::mapFolder)) {\n if ($dh = opendir(self::mapFolder)) {\n while (($file = readdir($dh)) !== false) {\n if (strpos($file, \".kml\") > 0) {\n array_push($resultSet, $file);\n }\n }\n closedir($dh);\n }\n }\n return $resultSet;\n }", "public function getFileList()\n { \n $folders;\n $files;\n\n DropGalleryMain::debug(\"Start get files\");\n\n if ( ! file_exists($this->galleryPath) ) \n {\n echo \"File not found: \".$this->galleryPath;\n return;\n\n }elseif( ! is_dir($this->galleryPath))\n {\n\n echo \"Path not a folder: \".$this->galleryPath;\n return;\n }\n \n $galdir = new DirectoryIterator($this->galleryPath);\n foreach( $galdir as $entry )\n { \n if ( ! $entry->isDot() ) \n {\n if ( $entry->isFile() )\n {\n\n\t\t \t$id=$this->quickhash($this->galleryPath.'/'.$entry->getFilename());\n\t\t \t$newFileTest = $this->db->checkForQuickHash($id);\n\t\t \tif($newFileTest)\n\t\t \t{\n\t\t \t\t$this->addNewFile($id,$entry->getFilename());\n\t\t \t}\n\n\t\t \t$this->dirContents[] = $this->getFileInfo($id,$entry->getFilename());\n\t\t \t\n\n }\n elseif( $entry->isDir() )\n {\n \n //--Generate sub-folder list\n $folderItems = 0;\n $subdir = new DirectoryIterator($this->galleryPath.'/'.$entry);\n foreach( $subdir as $subentry )\n { \n if ( ! $subentry->isDot() ) \n {\n $folderItems++;\n }\n }\n unset($subdir);\n $this->dirSubFolders[] = array( \n 'name' => basename($subentry->getPath()),\n 'numItems' => $folderItems\n \n );\n }\n }\n }\n\n DropGalleryMain::debug(\"End get files\");\n }", "function GetFilePathArray()\n{\n\tif(!isset($_GET['MLS']))\n\t{\n\t\techo \"ERROR: You are trying to view a detailed listing without an MLS number in the URL.\";\n\t\texit();\n\t}\n\t$FilePathArray = null;\n\t$dir = \"Listing/photos/\" . $_GET['MLS'] . \"/\";\n\tif (is_dir($dir))\n\t{\n\t\tif ($dh = opendir($dir))\n\t\t{\n\t\t\twhile (($file = readdir($dh)) !== false)\n\t\t\t{\n\t\t\t\tif(!is_dir($dir . $file) && exif_imagetype($dir . $file))\n\t\t\t\t{\n\t\t\t\t\tif($FilePathArray == null)\n\t\t\t\t\t{\n\t\t\t\t\t\t$FilePathArray = array($dir . $file);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tarray_push($FilePathArray, $dir . $file);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tclosedir($dh);\n\t\t\treturn $FilePathArray;\n\t\t}\n\t}\n}", "function getFiles(){\n\t\t$output = array();\n\n\t\tforeach(scandir(DATA_DIR . $this->photoDir) as $v){\n\t\t\tif($v[0] != '.')\n\t\t\t\t$output[] = DATA_DIR . $this->photoDir . \"/$v\";\n\t\t}\n\n\t\treturn $output;\n\t}", "private function readFromDirectory(){\n \n $dir_name = $this -> dir . \"/\" . $this -> file['fid'];\n if(!is_dir($dir_name)){\n return array();\n }\n \n $array = array();\n \n $data = opendir($dir_name);\n if(!$data){\n return array();\n }\n \n while($all = readdir($data)){\n if(is_dir($dir_name . \"/\" . $all)) {\n continue;\n }\n $array[] = $dir_name . \"/\" . $all; \n }\n \n return $array; \n }", "private function _directory_info($dir)\n\t{\n\t\tee()->load->model('file_model');\n\n\t\treturn array(\n\t\t\t'url' \t\t\t=> $dir['url'],\n\t\t\t'file_count'\t=> ee()->file_model->count_files($dir['id']),\n\t\t\t'image_count'\t=> ee()->file_model->count_images($dir['id'])\n\t\t);\n\t}", "private static function getFolderFilePathAsArray() {\n\t\t$filePathArray = array();\n\t\t$fileArray = @scandir(PAGE_FOLDER_PATH);\n\t\tif (is_array($fileArray)) {\n\t\t\tforeach ($fileArray as $file) {\n\t\t\t\tif (!is_dir(PAGE_FOLDER_PATH . $file)) {\n\t\t\t\t\tarray_push($filePathArray, PAGE_FOLDER_PATH . $file);\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $filePathArray;\n\t\t} else {\n\t\t\tdie(\"Probable Configuration error (PAGE_FOLDER_PATH) is wrong: \" . PAGE_FOLDER_PATH);\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Change user profile gravatar size.
function kultalusikka_user_details_avatar_size() { return 80; }
[ "function setup_author_box_gravatar_size( $size ) {\n\treturn 90;\n}", "function modify_size_of_gravatar_in_authorbox( $size ) {\n\treturn 90;\n}", "function wpwebapp_get_gravatar_size() {\n\t$options = wpwebapp_get_plugin_options_user_profile();\n\t$setting = $options['gravatar_size'];\n\tif ( $setting === '' ) {\n\t\treturn '96';\n\t} else {\n\t\treturn $setting;\n\t}\n}", "function coaching_pro_author_box_gravatar( $size ) {\n\treturn 90;\n}", "function author_box_gravatar( $size ) {\n\n\treturn 90;\n\n}", "function setup_author_box_gravatar( $size ) {\n\treturn 90;\n}", "function twenty_twenty_one_get_avatar_size() {\n\treturn 60;\n}", "function genesis_child_author_box_gravatar( $size ) {\n\n\treturn 90;\n\n}", "function genesis_sample_author_box_gravatar( $size ) {\n\n\treturn 90;\n\n}", "function GravatarPicture($username,$size) {\n $Table_User = $GLOBALS['user_table'];\n $username = strip_tags($username);\n $sql = mysql_query(\"SELECT email FROM $Table_User WHERE username='$username'\") or die(mysql_error());\n while($row = mysql_fetch_array($sql)){$user_email = $row[\"email\"];}\n return \"http://www.gravatar.com/avatar/\" . md5(strtolower(trim(\"$user_email\"))) . \"?s=\" . $size;\n }", "function twentynineteen_get_avatar_size() {\n\treturn 60;\n}", "function course_maker_author_box_gravatar( $size ) {\n\treturn 90;\n}", "function td_bbp_change_avatar_size($author_avatar, $topic_id, $size) {\r\n$author_avatar = '';\r\nif ($size == 14) {\r\n$size = 40;\r\n}\r\n\r\n$topic_id = bbp_get_topic_id( $topic_id );\r\nif ( !empty( $topic_id ) ) {\r\nif ( !bbp_is_topic_anonymous( $topic_id ) ) {\r\n$author_avatar = get_avatar( bbp_get_topic_author_id( $topic_id ), $size );\r\n} else {\r\n$author_avatar = get_avatar( get_post_meta( $topic_id, '_bbp_anonymous_email', true ), $size );\r\n}\r\n}\r\nreturn $author_avatar;\r\n}", "function getGravatarURL($sizePx=40) {\n\t$email = $_SESSION['email'];\n\t$size = $sizePx; // set the size of the returned photo\n\t$default = 'mm'; // need to set this to be somedefault not signed in avatar\n\t$grav_url = \"http://www.gravatar.com/avatar/\" . md5( strtolower( trim( $email ) ) ) . \"?d=\" . urlencode( $default ) . \"&s=\" . $size;\n\treturn $grav_url;\n}", "function td_bbp_change_avatar_size($author_avatar, $topic_id, $size) {\r\n\t$author_avatar = '';\r\n\tif ($size == 14) {\r\n\t\t$size = 40;\r\n\t}\r\n\t$topic_id = bbp_get_topic_id( $topic_id );\r\n\tif ( !empty( $topic_id ) ) {\r\n\t\tif ( !bbp_is_topic_anonymous( $topic_id ) ) {\r\n\t\t\t$author_avatar = get_avatar( bbp_get_topic_author_id( $topic_id ), $size );\r\n\t\t} else {\r\n\t\t\t$author_avatar = get_avatar( get_post_meta( $topic_id, '_bbp_anonymous_email', true ), $size );\r\n\t\t}\r\n\t}\r\n\treturn $author_avatar;\r\n}", "public function saveGravatarAvatar(User $user): void;", "public function ThisUserAvatar( $size ){\r\n\t\tif( is_user_logged_in() ){\r\n\t\t\treturn get_avatar(get_current_user_id(), $size);\r\n\t\t}\r\n\t}", "function csco_powerkit_widget_author_avatar_size() {\n\treturn 160;\n}", "function rovoko_update_avatar(){\n\t$ef5_avatar = get_template_directory_uri() . '/assets/images/avatar.png';\n\tif (get_option($ef5_avatar, '') != $ef5_avatar)\n\t\tupdate_option( 'avatar_default' , $ef5_avatar );\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fires a local (server) event This method fires an event on the server side, which does not go through the client. Events fired through this method do not have to be valid clientside events, and can be used to build eventdriven applications.
public function fireLocalEvent( $event, $args = NULL ) { if( $args === NULL ) $args = array(); $eventobj = $this->commandHandler( $event, $args ); return $eventobj; }
[ "public function onServerEvent($event, $host) {}", "public function fireGlobalEvent( $event, $data = NULL ) {\n ApplicationProcess::SendGlobalEvent( $event, $data );\n }", "public function send_events()\n {\n }", "public function trigger($server, $request);", "public function triggerAction()\n {\n /* @var $client \\Proletarier\\Client\\ClientInterface */\n $client = $this->getServiceLocator()->get('Proletarier\\Client');\n\n $event = $this->getRequest()->getParam('event');\n $params = $this->getRequest()->getParam('params');\n\n if ($params) {\n $params = json_decode($params, true);\n }\n\n if (! $params) {\n $params = array();\n }\n\n $client->trigger($event, $params);\n }", "public function outputLocalEvent()\n\t{\n\t\t$this->load->model('event_model');\n\t\t$data['events'] = $this->event_model->localEvent('Winnipeg');\n\t\t$this->load->view('main_page',$data);\n\t}", "public function send_events() {\n\t\tif ( ! $this->tracking_enabled ) {\n\t\t\treturn;\n\t\t}\n\n\t\tif ( ! empty( $this->events ) && is_array( $this->events ) ) {\n\t\t\tforeach ( $this->events as $event_info ) {\n\t\t\t\t$this->send_request( $event_info );\n\t\t\t}\n\t\t}\n\n\t}", "public function doFireEvent(IEntity $entity, $event);", "function event()\n {\n $this->load->library('service');\n $data = file_get_contents('php://input');\n $ret = array(\n 'out' => $this->service->handle('event', $data)\n );\n $this->output($ret);\n }", "private function fireSendingEvent(SMSCMessage $message)\n {\n $this->dispatcher->fire(new SendingMessage($message));\n }", "public function testLocalClientServer(): void\n {\n if (PHP_MAJOR_VERSION < 9) {\n self::dummyAssert();\n return;\n }\n\n $testCaseHandle = $this->getTestCaseHandle();\n $serverAppCode = $testCaseHandle->ensureAdditionalHttpAppCodeHost();\n $clientAppCode = $testCaseHandle->ensureMainAppCodeHost();\n $clientAppCode->sendRequest(\n AppCodeTarget::asRouted([__CLASS__, 'appCodeClient']),\n function (AppCodeRequestParams $reqParams) use ($serverAppCode): void {\n $dataPerRequest = $serverAppCode->buildDataPerRequest(\n AppCodeTarget::asRouted([__CLASS__, 'appCodeServer'])\n );\n $additionalAppCodeHostPort = $serverAppCode->getHttpServerHandle()->getMainPort();\n $reqParams->setAppCodeArgs([self::SERVER_PORT_KEY => $additionalAppCodeHostPort, self::DATA_PER_REQUEST_FOR_SERVER_SIDE_KEY => $dataPerRequest->serializeToString()]);\n }\n );\n\n /**\n * transactions (2): client side + server side\n * spans (1): curl client side\n */\n $testCaseHandle->waitForDataFromAgent((new ExpectedEventCounts())->transactions(2)->spans(1));\n }", "public function send(Event $event): void;", "public function triggerEvent($eventId);", "public function testGetEventWithServerRequest()\n {\n $this->acceptAllCommands();\n $connection = $this->getMockConnection();\n $this->driver->setConnection($connection);\n $this->driver->doConnect();\n $this->writeEventToSocket(\n 0, ':verne.freenode.net NOTICE * :*** Looking up your hostname...'\n );\n\n $event = $this->driver->getEvent();\n $this->assertInstanceOf('Phergie_Event_Request', $event);\n $this->assertEquals('notice', $event->getType());\n $this->assertEquals(\n array('*', '*** Looking up your hostname...'), $event->getArguments()\n );\n\n $hostmask = $event->getHostmask();\n $this->assertInstanceOf('Phergie_Hostmask', $hostmask);\n $this->assertNull($hostmask->getNick());\n $this->assertNull($hostmask->getUsername());\n $this->assertEquals('verne.freenode.net', $hostmask->getHost());\n }", "public function broadcastEventReceived($sender,$param);", "private function trigger_event() {\n switch ($this->view) {\n case SURVEYPRO_NOVIEW:\n case SURVEYPRO_EDITRESPONSE: // Item_modified will be, eventually, logged.\n case SURVEYPRO_NEWRESPONSE: // Item_created will be, eventually, logged.\n break;\n case SURVEYPRO_READONLYRESPONSE:\n // Event: submission_viewed.\n $eventdata = array('context' => $this->context, 'objectid' => $this->surveypro->id);\n $eventdata['other'] = array('view' => SURVEYPRO_READONLYRESPONSE);\n $event = \\mod_surveypro\\event\\submission_viewed::create($eventdata);\n $event->trigger();\n break;\n default:\n $message = 'Unexpected $this->view = '.$this->view;\n debugging('Error at line '.__LINE__.' of '.__FILE__.'. '.$message , DEBUG_DEVELOPER);\n }\n }", "public function trigger_event() {\n $eventdata = ['context' => $this->context, 'objectid' => $this->surveypro->id];\n $event = \\mod_surveypro\\event\\all_submissions_exported::create($eventdata);\n $event->trigger();\n }", "public function testTriggerEvent()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function sendFacebookAppEvent()\n {\n $this->initializeFacebookEvent();\n $eventFields = array(\n 'event' => urlencode('CUSTOM_APP_EVENTS'),\n 'access_token' => urlencode($this->fbAccessToken),\n 'application_tracking_enabled' => 1,\n 'advertiser_tracking_enabled' => 1,\n //\"advertiser_id=1383-6676-5853-8751\", \n 'custom_events' => '['.json_encode($this->customEventsFields).']'\n );\n $this->attemptToSendFacebookAppEvent($eventFields);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the subfolder array
private function setSubfolders($subfolders) { $this->subfolders=$subfolders; }
[ "public function setChildFolders(?array $value): void {\n $this->getBackingStore()->set('childFolders', $value);\n }", "private static function setDirs() \n\t{ \n\t\t//blow up the dirs property to get dir array property\n\t\tself::$dirs = explode(\"/\", self::$path);\n\t\t\n\t}", "public function set_folder_data()\r\n\t{\r\n\t\t$folder = new Plugin\\Folder($this->folder_id);\r\n\t\t\r\n\t\t$this->folders_list = $folder->get_folders();\r\n\t\t$this->folder_list = $folder->get_paths($this->folder_id, false);\r\n\t\t$this->folder_hidden = $folder->get_hidden($this->folder_id, $this->per_page, $this->page_num);\r\n\t\t$this->folder_tree = $folder->view_tree();\r\n\t}", "public function getSubfolders();", "function FolderSet(){\n $Folderarray=explode(\",\",FOLDER_ARRAY);\n if (isset($_GET['folder'])){\n $nav_array=explode(\"/\",$_GET['folder']);\n $rootFolder=$nav_array[0];\n if(isset($rootFolder) && in_array($rootFolder, $Folderarray)){\n define('UPLOAD_FOLDER',''.$rootFolder.'/'.USER_FOLDER);//upload directory \n }else{\n define('UPLOAD_FOLDER',''.$Folderarray[0].'/'.USER_FOLDER);//upload directory \n }\n }else{\n define('UPLOAD_FOLDER',''.$Folderarray[0].'/'.USER_FOLDER);//upload directory\n }\n}", "public function setTaskFolders(?array $value): void {\n $this->getBackingStore()->set('taskFolders', $value);\n }", "function setVar( &$array, $path, $key, $value ) {\n\t\t$pathArr = explode( '/', $path );\n\t\t$target =& $array;\n\t\tif ( $path !== '' ) {\n\t\t\tforeach ( $pathArr as $p ) {\n\t\t\t\tif ( !isset( $target[$p] ) ) {\n\t\t\t\t\t$target[$p] = array();\n\t\t\t\t}\n\t\t\t\t$target =& $target[$p];\n\t\t\t}\n\t\t}\n\t\tif ( !isset( $target[$key] ) ) {\n\t\t\t$target[$key] = $value;\n\t\t}\n\t}", "protected function _setNaviFolderReload($arr)\n\t{\n\t\t$vars = $this->getVars(array(\n\t\t\t'path' => $arr['pathVars'],\n\t\t));\n\n\t\t$vars['portal']['varsNavi']['templateFolder']['varsDetail']['varsDetail'] = $this->_getMemo(array(\n\t\t\t'strTable' => $arr['strTable'],\n\t\t\t'strColumn' => $arr['strColumn'],\n\t\t\t'flagEntity' => $arr['flagEntity'],\n\t\t\t'flagAccount' => $arr['flagAccount'],\n\t\t));\n\n\t\tif (!$vars['portal']['varsNavi']['templateFolder']['varsDetail']['varsDetail']) {\n\t\t\t$varsDetail = $vars['portal']['varsNavi']['templateFolder']['varsDetail']['templateDetail']['dir'];\n\t\t\t$vars['portal']['varsNavi']['templateFolder']['varsDetail']['varsDetail'][] = $varsDetail;\n\t\t}\n\n\t\t$this->sendVars(array(\n\t\t\t'stamp' => $this->getStamp(),\n\t\t\t'numNews' => $this->getNumNews(),\n\t\t\t'vars' => array(\n\t\t\t\t'varsDetail' => $vars['portal']['varsNavi']['templateFolder']['varsDetail']['varsDetail'],\n\t\t\t),\n\t\t));\n\t}", "public function setSubmodules()\n {\n if (file_exists(self::MODULES_FILE)) {\n $content = explode(\"\\n\", file_get_contents(self::MODULES_FILE));\n\n for ($i = 0; $i < count($content) - 3; $i += 3) {\n $path = $this->parseSubmoduleLine($content[$i+1]);\n $url = $this->parseSubmoduleLine($content[$i+2]);\n\n $this->submodules[$path] = $url;\n }\n }\n }", "public function setFolderLocation() {\n if (!$this->title) {\n $this->title = $this->setTitle($this->id);\n }\n $folder[] = $this->repository;\n $folder[] = $this->title->tfolder;\n $folder[] = $this->title->folder;\n $folder[] = $this->title->subfolder;\n $folder[] = $this->title->fileprefix;\n if (!is_dir(implode('/', $folder))) {\n array_pop($folder);\n }\n return $this->folder = implode('/', $folder);\n }", "function rebuildFoldersPaths ()\n {\n $folders = DocumentUtil::getFolders ($where, '', false, true);\n $paths = DocumentUtil::buildFoldersPath ($folders);\n\n foreach ($folders as $key => $folder)\n {\n $folder['path'] = $paths[$key];\n $res = DBUtil::updateObject ($folder, 'os_docmgmt_folders', '', false);\n }\n }", "protected function _setNaviFolderSave($arr)\n\t{\n\t\tglobal $varsRequest;\n\n\t\t$vars = $this->getVars(array(\n\t\t\t'path' => $arr['pathVars'],\n\t\t));\n\n\t\t$varsJson = $this->checkValueFolder(array(\n\t\t\t'varsValue' => ($varsRequest['query']['jsonValue']['vars'])? $varsRequest['query']['jsonValue']['vars'] : array(),\n\t\t\t'varsTemplate' => $vars['portal']['varsNavi']['templateFolder']['varsDetail']['templateDetail'],\n\t\t));\n\n\t\t$this->_setNaviFolderSaveUpdate(array(\n\t\t\t'pathVars' => $arr['pathVars'],\n\t\t\t'varsJson' => $varsJson,\n\t\t\t'strTable' => $arr['strTable'],\n\t\t\t'strColumn' => $arr['strColumn'],\n\t\t\t'flagEntity' => $arr['flagEntity'],\n\t\t\t'flagAccount' => $arr['flagAccount'],\n\t\t));\n\t}", "protected function setDirs(){\n\t\t$dirs = scandir($this->configuration['path']);\n\t\tarray_shift($dirs);\n\t\tarray_shift($dirs);\n\t\t\n\t\t$this->dirs = $dirs;\n\t}", "function array_path_set(&$array, $path, $value)\n\t{\n\t\t$path_segments = preg_split('/\\\\//', $path);\n\t\t\n\t\tif ( sizeof($path_segments) > 1 ) {\n\t\t\t$current_array =& $array;\n\t\t\t$last_node = end($path_segments);\n\t\t\t\n\t\t\tforeach ( $path_segments as $p ) {\n\t\t\t\tif ( $p == $last_node ) {\n\t\t\t\t\t$element = $value;\n\t\t\t\t} else {\n\t\t\t\t\tif ( isset($current_array[$p]) ) {\n\t\t\t\t\t\t$element = $current_array[$p];\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$element = array();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$current_array[$p] = $element;\n\t\t\t\t$current_array =& $current_array[$p];\n\t\t\t}\n\t\t} else {\n\t\t\t$array[$path] = $value;\n\t\t}\n\t}", "private function setFolder($folder) {\n\t\t$array = explode('/',$folder);\n\t\t$this->folder = str_replace('/','',$array[0]);\n\t}", "public function setArray($array, $path = array()) {\n\n foreach($array as $k=>$v) {\n if(is_array($v)) {\n $this->setArray($v, array_merge($path, array($k)));\n } else {\n $this->set(implode('.', array_merge($path, array($k))), (string) $v);\n }\n }\n\n }", "public function getSubDirectories();", "function setDirs(){\n\t\tif (!is_array($this->ResourceDirs)){\n\t\t\t$this->ResourceDirs = array($this->ResourceDirs);\n\t\t}\n\n\t\t//get resources root\n\t\t$this->ResourcesRoot = $this->ResourceDirs[0];\n\n\t\t//Set template directories array\n\t\t$this->TemplateDirs = (is_array($this->Settings->GetItem(\"path\",\"TemplatePath\"))?$this->Settings->GetItem(\"path\",\"TemplatePath\"):array($this->Settings->GetItem(\"path\",\"TemplatePath\")));\n\n\t\t//Set classes directories array\n\t\t$this->ClassesDirs = (is_array($this->Settings->GetItem(\"path\",\"ClassPath\"))?$this->Settings->GetItem(\"path\",\"ClassPath\"):array($this->Settings->GetItem(\"path\",\"ClassPath\")));\n\n\t\t//Set pages directories array\n\t\t$this->PagesDirs = (is_array($this->Settings->GetItem(\"path\",\"PagePath\"))?$this->Settings->GetItem(\"path\",\"PagePath\"):array($this->Settings->GetItem(\"path\",\"PagePath\")));\n\t}", "public function setSubArray($setting, $subArray, $value)\n { \n //Extracts the key for this level of the subArray from the $setting array.\n $settingName = array_shift($setting);\n\n //Checks if the given $settingName is set and is an array.\n if (isset($subArray[$settingName]) && is_array($subArray[$settingName])) {\n //The given key is set, and it is an array.\n if (count($setting) > 0) {\n //In addition, there are more levels to drill down. Continue down deeper into the SubArray until we find the right key to set.\n $subArray[$settingName] = $this->setSubArray($setting, $subArray[$settingName], $value);\n return $subArray;\n }\n } \n\n //Either this is the lowest level of search, we didn't find a key at this level (making this the end of the search), \n //or we ran out of search levels. Set the value associated to our given key and return the $subArray.\n $subArray[$settingName] = $value;\n return $subArray;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set the code chef2.
public function setCodeChef2(?string $codeChef2): Collaborateurs { $this->codeChef2 = $codeChef2; return $this; }
[ "public function set_code($value)\r\n\t{\r\n\t\treturn $this->set_attr('code', $value);\r\n\t}", "public function setCode( $code );", "public function testSetCodeChef1() {\n\n $obj = new Collaborateurs();\n\n $obj->setCodeChef1(\"codeChef1\");\n $this->assertEquals(\"codeChef1\", $obj->getCodeChef1());\n }", "public function setAuthenticationCode2($value)\n {\n return $this->set('AuthenticationCode2', $value);\n }", "private function setServiceCode()\r\n {\r\n\r\n }", "public function setCode( string $value ) : \\Aimeos\\MShop\\Review\\Item\\Iface\n\t{\n\t\treturn $this->set( 'review.code', $this->checkCode( $value ) );\n\t}", "public function setCheckcode($value) {\n return $this->set(self::CHECKCODE, $value);\n }", "public function setCodeAttribute($value)\n {\n $this->attributes['code']=mb_strtoupper($value);\n }", "public function setImagel2c2(RichText $value) {\n return $this->set(self::IMAGEL2C2, $value);\n }", "public function setTwoFactorCode(): void\n {\n $this->twoFactorToken = '';\n for ($i = 0; $i < 6; ++$i) {\n $this->twoFactorToken .= random_int(0, 9);\n }\n }", "public function setImagel3c2(RichText $value) {\n return $this->set(self::IMAGEL3C2, $value);\n }", "public function code()\n {\n }", "public function setCode($v)\n\t{\n\r\n\t\t// Since the native PHP type for this column is string,\r\n\t\t// we will cast the input to a string (if it is not).\r\n\t\tif ($v !== null && !is_string($v)) {\r\n\t\t\t$v = (string) $v; \r\n\t\t}\r\n\n\t\tif ($this->code !== $v) {\n\t\t\t$this->code = $v;\n\t\t\t$this->modifiedColumns[] = ProductPeer::CODE;\n\t\t}\n\n\t}", "public function setAppCode($code)\n {\n return $this->setOption('app_code', $code);\n }", "public function setPanell2c2(RichText $value) {\n return $this->set(self::PANELL2C2, $value);\n }", "public function setCode()\n {\n $this->code = self::CODE_SYMBOL . date('Y') . '-' . date('m') . '-' . sprintf(\"%'.06d\", $this->id);\n }", "function setInitCode($code) \n {\n $this->initCode = $code;\n return true;\n }", "public function setCodeRef2($codeRef2) {\n $this->codeRef2 = $codeRef2;\n return $this;\n }", "public function setEquipo2()\n {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return specific Pipeline Item for authenticated user.
public function show(Request $request, $item) { $pipelineItem = $request->user() ->pipelineItems() ->where('id', $item) ->with(['phoneNumbers', 'notes', 'status', 'marketColor']) ->get(); return response()->json([ 'success' => true, 'data' => $pipelineItem, ]); }
[ "private function getServiceItemUser()\n {\n return $this->container->get('app_service_item_user');\n }", "public function getAuthItem() {\n\t\tif(!isset($this->authorisationItem)) {\n\t\t\t// Auth item is not specified default to ModelName.ActionName\n\t\t\t// e.g. Company.create or Person.update\n\t\t\t$this->authorisationItem = $this->model.'.'.$this->id;\n\t\t}\n\t\treturn $this->authorisationItem;\n\t}", "public function getPipelineByID($pid) {\n\t\t$conn = $this->getConnection ();\n\t\t\n\t\tif (! ($stmt = $conn->prepare ( \"SELECT queryID, viewURI, viewerURI, outputFormat, \n\t\t\t\t\ttoolkit, requiresInputURL\n\t\t\t\tFROM Pipelines\n\t\t\t\tWHERE id = ?\" ))) {\n\t\t\t$this->handlePrepareError ( $conn );\n\t\t} else {\n\t\t\t$stmt->bind_param ( 'i', $pid );\n\t\t\t\n\t\t\tif (! $stmt->execute ()) {\n\t\t\t\t$this->handlePrepareError ( $stmt );\n\t\t\t} else {\n\t\t\t\t// first get general information\n\t\t\t\t$stmt->bind_result ( $queryID, $viewURI, $viewerURI, $outputFormat, $toolkit, $requiresInputURL );\n\t\t\t\t\n\t\t\t\twhile ( $stmt->fetch () ) {\n\t\t\t\t}\n\t\t\t\t;\n\t\t\t\t\n\t\t\t\tif ($queryID == null) {\n\t\t\t\t\tthrow new ManagerException ( 'No Pipeline with id ' . $pid );\n\t\t\t\t}\n\t\t\t\t// get services and viewersets\n\t\t\t\t$services = $this->collectServices ( $pid );\n\t\t\t\t$viewerSets = $this->collectViewerSets ( $pid );\n\t\t\t\t\n\t\t\t\t$pipe = new Pipeline ( $queryID, $viewURI, $viewerURI, $toolkit, $requiresInputURL, $outputFormat, $services, $viewerSets, $pid );\n\t\t\t\t\n\t\t\t\t// TODO move this\n\t\t\t\t$stmt->close ();\n\t\t\t\treturn $pipe;\n\t\t\t}\n\t\t\t\n\t\t\t$stmt->close ();\n\t\t}\n\t}", "public function getAuthItem($name);", "public function get_portfolio_virtual_user();", "public function getSinglePipeline($pipelinekey = null) \n\t{\n\t\t$requestor \t= new \\Streak\\ApiRequestor();\n\t\t$endpoint \t= \"/v1/pipelines/\".$pipelinekey;\n\t\t$data \t\t= $requestor->request($endpoint);\n return $data;\n\t}", "function getUserPipelines() {\n\t\t$requestURL = baseURL.\"/pipelines\";\n $data = sendGetRequest($requestURL);\n return $data;\n\t}", "public function getAuthItem($name, $allowCaching=true)\n\t{\n\t\t// Get all items if necessary and cache them.\n\t\tif( $allowCaching && $this->_items===array() )\n\t\t\t$this->_items = $this->getAuthItems();\n\n\t\t// Get the items from cache if possible.\n\t\tif( $allowCaching && isset($this->_items[ $name ]) )\n\t\t{\n\t\t\treturn $this->_items[ $name ];\n\t\t}\n\t\t// Attempt to get the item.\n\t\telse if( ($item = parent::getAuthItem($name))!==null )\n\t\t{\n\t\t\treturn $item;\n\t\t}\n\n\t\t// Item does not exist.\n\t\treturn null;\n\t}", "public function getItem()\n {\n return $this->app['publishing.active_item'];\n }", "public function getAuthorizationItem() \n {\n return $this;\n }", "public function getAuthItem ($name) {\r\n return isset( $this->_items[$name] ) ? $this->_items[$name] : null;\r\n }", "function get_user_item($challenge)\n{\n\t$userItems = new item();\n\t$propertyArray = array('health','stamina','speed','strength'); //default user property\n\tforeach($propertyArray as $value){\n\t\tif(array_key_exists($value,$challenge)){ // get challenge property type\n\t\t\treturn $userItems->get_items_list($value); // get item based on challenge property\n\t\t}\n\t}\n}", "private function getInternalPipeline()\n {\n $r = new ReflectionProperty($this->pipeline, 'pipeline');\n $r->setAccessible(true);\n return $r->getValue($this->pipeline);\n }", "public function getUser()\r\n {\r\n return $this->getComponent('user');\r\n }", "public function getItem()\n {\n return $this->item;\n }", "public function getPipelineId()\n {\n return $this->pipeline_id;\n }", "public function getItem()\n {\n return parent::getValue('item');\n }", "public function pipeline()\n {\n return $this->belongsTo(PipelineProxy::modelClass(), 'lead_pipeline_id');\n }", "public function getUser()\n\t{\n\t\treturn $this->getComponent('user');\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Gets the public 'doctrine_migrations.status_command' shared service.
protected function getDoctrineMigrations_StatusCommandService() { return $this->services['doctrine_migrations.status_command'] = new \Doctrine\Bundle\MigrationsBundle\Command\MigrationsStatusDoctrineCommand(); }
[ "protected function getDoctrineMigrations_StatusCommandService()\n {\n $this->privates['doctrine_migrations.status_command'] = $instance = new \\Doctrine\\Migrations\\Tools\\Console\\Command\\StatusCommand(($this->privates['doctrine.migrations.dependency_factory'] ?? $this->getDoctrine_Migrations_DependencyFactoryService()), 'doctrine:migrations:status');\n\n $instance->setName('doctrine:migrations:status');\n\n return $instance;\n }", "protected function getDoctrineMigrations_StatusCommandService()\n {\n include_once \\dirname(__DIR__, 4).'/vendor/symfony/console/Command/Command.php';\n include_once \\dirname(__DIR__, 4).'/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/DoctrineCommand.php';\n include_once \\dirname(__DIR__, 4).'/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/StatusCommand.php';\n\n $this->privates['doctrine_migrations.status_command'] = $instance = new \\Doctrine\\Migrations\\Tools\\Console\\Command\\StatusCommand(($this->privates['doctrine.migrations.dependency_factory'] ?? $this->getDoctrine_Migrations_DependencyFactoryService()), 'doctrine:migrations:status');\n\n $instance->setName('doctrine:migrations:status');\n\n return $instance;\n }", "protected function getStatusCommand()\n {\n return new StatusCommand($this->app['migrator']);\n }", "protected function getConsole_Command_SymfonyBundleWebserverbundleCommandServerstatuscommandService()\n {\n return $this->services['console.command.symfony_bundle_webserverbundle_command_serverstatuscommand'] = new \\Symfony\\Bundle\\WebServerBundle\\Command\\ServerStatusCommand();\n }", "protected function getDoctrineMigrations_VersionCommandService()\n {\n return $this->services['doctrine_migrations.version_command'] = new \\Doctrine\\Bundle\\MigrationsBundle\\Command\\MigrationsVersionDoctrineCommand();\n }", "protected function getDoctrineMigrations_VersionCommandService()\n {\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\symfony\\\\console\\\\Command\\\\Command.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\doctrine\\\\migrations\\\\lib\\\\Doctrine\\\\Migrations\\\\Tools\\\\Console\\\\Command\\\\AbstractCommand.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\doctrine\\\\migrations\\\\lib\\\\Doctrine\\\\Migrations\\\\Tools\\\\Console\\\\Command\\\\VersionCommand.php';\n include_once \\dirname(__DIR__, 4).'\\\\vendor\\\\doctrine\\\\doctrine-migrations-bundle\\\\Command\\\\MigrationsVersionDoctrineCommand.php';\n\n $this->privates['doctrine_migrations.version_command'] = $instance = new \\Doctrine\\Bundle\\MigrationsBundle\\Command\\MigrationsVersionDoctrineCommand();\n\n $instance->setName('doctrine:migrations:version');\n\n return $instance;\n }", "protected function getDoctrineMigrations_CurrentCommandService()\n {\n include_once \\dirname(__DIR__, 4).'/vendor/symfony/console/Command/Command.php';\n include_once \\dirname(__DIR__, 4).'/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/DoctrineCommand.php';\n include_once \\dirname(__DIR__, 4).'/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/CurrentCommand.php';\n\n $this->privates['doctrine_migrations.current_command'] = $instance = new \\Doctrine\\Migrations\\Tools\\Console\\Command\\CurrentCommand(($this->privates['doctrine.migrations.dependency_factory'] ?? $this->getDoctrine_Migrations_DependencyFactoryService()), 'doctrine:migrations:current');\n\n $instance->setName('doctrine:migrations:current');\n\n return $instance;\n }", "protected function getDoctrineMigrations_VersionCommandService()\n {\n include_once \\dirname(__DIR__, 4).'/vendor/symfony/console/Command/Command.php';\n include_once \\dirname(__DIR__, 4).'/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/DoctrineCommand.php';\n include_once \\dirname(__DIR__, 4).'/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/VersionCommand.php';\n\n $this->privates['doctrine_migrations.version_command'] = $instance = new \\Doctrine\\Migrations\\Tools\\Console\\Command\\VersionCommand(($this->privates['doctrine.migrations.dependency_factory'] ?? $this->getDoctrine_Migrations_DependencyFactoryService()), 'doctrine:migrations:version');\n\n $instance->setName('doctrine:migrations:version');\n\n return $instance;\n }", "public function migrationStatusCommand() {\n\t\t\t// \"driver\" is used only for Doctrine, thus we (mis-)use it here\n\t\t\t// additionally, when no path is set, skip this step, assuming no DB is needed\n\t\tif ($this->settings['backendOptions']['driver'] !== NULL && $this->settings['backendOptions']['path'] !== NULL) {\n\t\t\t$this->response->appendContent($this->doctrineService->getMigrationStatus());\n\t\t} else {\n\t\t\t$this->response->appendContent('Doctrine migration status not available, the driver and path backend options are not set in /Configuration/Settings.yaml.');\n\t\t\t$this->response->setExitCode(1);\n\t\t}\n\t}", "protected function getSonata_MediaBundle_Command_UpdateCdnStatusCommandService()\n {\n return $this->services['Sonata\\MediaBundle\\Command\\UpdateCdnStatusCommand'] = new \\Sonata\\MediaBundle\\Command\\UpdateCdnStatusCommand();\n }", "protected function getDoctrineMigrations_VersionCommandService()\n {\n $this->privates['doctrine_migrations.version_command'] = $instance = new \\Doctrine\\Migrations\\Tools\\Console\\Command\\VersionCommand(($this->privates['doctrine.migrations.dependency_factory'] ?? $this->getDoctrine_Migrations_DependencyFactoryService()), 'doctrine:migrations:version');\n\n $instance->setName('doctrine:migrations:version');\n\n return $instance;\n }", "protected function getDoctrineMigrations_DiffCommandService()\n {\n return $this->services['doctrine_migrations.diff_command'] = new \\Doctrine\\Bundle\\MigrationsBundle\\Command\\MigrationsDiffDoctrineCommand();\n }", "public function getStatus()\n {\n return $this->driverCommand(BaseConstants::$GET, '/status');\n }", "protected function getDoctrineMigrations_ExecuteCommandService()\n {\n return $this->services['doctrine_migrations.execute_command'] = new \\Doctrine\\Bundle\\MigrationsBundle\\Command\\MigrationsExecuteDoctrineCommand();\n }", "protected function getDoctrineMigrations_LatestCommandService()\n {\n return $this->services['doctrine_migrations.latest_command'] = new \\Doctrine\\Bundle\\MigrationsBundle\\Command\\MigrationsLatestDoctrineCommand();\n }", "protected function getDoctrineMigrations_GenerateCommandService()\n {\n return $this->services['doctrine_migrations.generate_command'] = new \\Doctrine\\Bundle\\MigrationsBundle\\Command\\MigrationsGenerateDoctrineCommand();\n }", "protected function getDoctrineMigrations_ExecuteCommandService()\n {\n $this->privates['doctrine_migrations.execute_command'] = $instance = new \\Doctrine\\Migrations\\Tools\\Console\\Command\\ExecuteCommand(($this->privates['doctrine.migrations.dependency_factory'] ?? $this->getDoctrine_Migrations_DependencyFactoryService()), 'doctrine:migrations:execute');\n\n $instance->setName('doctrine:migrations:execute');\n\n return $instance;\n }", "protected function getDoctrineMigrations_DiffCommandService()\n {\n include_once \\dirname(__DIR__, 4).'/vendor/symfony/console/Command/Command.php';\n include_once \\dirname(__DIR__, 4).'/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/DoctrineCommand.php';\n include_once \\dirname(__DIR__, 4).'/vendor/doctrine/migrations/lib/Doctrine/Migrations/Tools/Console/Command/DiffCommand.php';\n\n $this->privates['doctrine_migrations.diff_command'] = $instance = new \\Doctrine\\Migrations\\Tools\\Console\\Command\\DiffCommand(($this->privates['doctrine.migrations.dependency_factory'] ?? $this->getDoctrine_Migrations_DependencyFactoryService()), 'doctrine:migrations:diff');\n\n $instance->setName('doctrine:migrations:diff');\n\n return $instance;\n }", "public function getStatus()\n {\n if (null === $this->status) {\n $this->status = MigrationServiceInterface::STATUS_ERROR;\n\n try {\n $this->verifyDatabase();\n $this->status = MigrationServiceInterface::STATUS_READY;\n } catch (\\RuntimeException $e) {\n $this->errorMessage = $e->getMessage();\n }\n }\n\n return $this->status;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets a new consigneeName
public function setConsigneeName($consigneeName) { $this->consigneeName = $consigneeName; return $this; }
[ "public function getConsigneeName()\n {\n return $this->consignee_name;\n }", "public function setNameOfRecipient($nameOfRecipient){\r\n\t\t$this->nameOfRecipient = $nameOfRecipient;\r\n\t}", "function set_CCName($name)\r\n{\r\n\t$this->CCName = $name;\r\n}", "public function setCreditorName($cdtr)\n {\n $cdtr = URLify::downcode($cdtr, \"de\");\n\n if (strlen($cdtr) == 0 || strlen($cdtr) > 70) {\n throw new SEPAException(\"Invalid creditor name (max. 70 characters).\");\n }\n\n $this->creditorName = $cdtr;\n }", "public function setNameOfRecipient($nameOfRecipient) {\r\n\t\t$this->nameOfRecipient = $nameOfRecipient;\r\n\t}", "public function setNameOfRecipient($nameOfRecipient) {\n\t\t$this->nameOfRecipient = $nameOfRecipient;\n\t}", "public function setName($name)\n {\n $this->resourceOwnerName = $name;\n }", "function setClientName($s)\n\t{\n\t\tupdateTableByTaskID('Tasks', 'ClientName', $s, $this->getTaskID());\n\t\t$this->ClientName = $s;\n\t}", "public function setGiftcardRecipientName($value);", "public function setName($name){\n $this->auth_name = $name;\n }", "public function setApplicantName($name);", "public function setCurrentUser($name) {\n\t\t$this->channel_name = $name;\n\t}", "public function setFiarCCName($value)\n {\n $this->setOption('fiarCCName', $value);\n }", "public function setCommitterName(string $value): self {\n $this->committerName = $value;\n return $this;\n }", "public function setEmailToName($value) {\n $this->_emailToName = $value;\n }", "private function setCollectionName()\n {\n //Set default collection name\n $this->collectionName = mb_strtolower(preg_replace(\"/Model$/\", '', $this->modelName));\n //Get user data\n $name = $this->option('collection');\n //if name is null\n if ($name === null) {\n $this->collectionName = $this->ask('Enter collection name',$this->collectionName);\n return;\n }\n $this->collectionName = $name;\n }", "public function setContactName($cname) { $this->contactName = $cname; }", "public function setOwnerUserPrincipalName(?string $value): void {\n $this->getBackingStore()->set('ownerUserPrincipalName', $value);\n }", "public function setCnName($value) {\n return $this->set(self::CN_NAME, $value);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Making the subscription for a forum
public function subscribeForum() { $user = $this->Session->read('UserData.userName'); $course = $this->Session->read('UserData.usersCourses'); // is an array.. //$explored_course = explode('-', $course[0]);//separate to course and section by '-' character. //get user course-section info $course_info = $this->getCourseNameOfUser($course[0]); // $contentpage_id = $explored_course[0]; //@TODO we have to change it by the session value. $value = $this->request->data['subscribe_value']; $contentPageId = $this->request->data['forums']['contId']; if($value) $data['PleForumSubscription']['setting_value'] = 0; else $data['PleForumSubscription']['setting_value'] = 1; $result = $this->PleForumSubscription->find('first', array('conditions'=>array('PleForumSubscription.user_id'=>$user, 'PleForumSubscription.user_coursename'=>$course_info->course_name, 'PleForumSubscription.contentpage_id'=>$contentPageId))); if($result) $data['PleForumSubscription']['id'] = $result['PleForumSubscription']['id']; else { $data['PleForumSubscription']['user_id'] = $user; $data['PleForumSubscription']['user_coursename'] = $course_info->course_name; $data['PleForumSubscription']['user_sectionname'] = $course_info->section_name; $data['PleForumSubscription']['contentpage_id'] = $contentPageId; } $this->PleForumSubscription->save($data); if ($value) { $this->__sendSubscriptionNotification($value,$contentPageId); $this->Session->setFlash('You have unsubscribed to this forum'); } else { $this->__sendSubscriptionNotification($value,$contentPageId); $this->Session->setFlash('You have subscribed to this forum'); } $this->redirect(array('controller'=>'forums', 'action'=>'forumlist',$contentPageId)); }
[ "function bbp_form_forum_subscribed()\n{\n}", "function target_add_forum_subscription($sub)\n{\n\tif ($sub['user_id'] == 1 && isset($GLOBALS['hack_id'])) {\n\t\t$sub['user_id'] = $GLOBALS['hack_id'];\n\t}\n\tq('INSERT INTO '. $GLOBALS['DBHOST_TBL_PREFIX'] .'forum_notify (user_id, forum_id) VALUES('. (int)$sub['user_id'] .', '. (int)$sub['forum_id'] .')');\n}", "function bbp_form_topic_subscribed()\n{\n}", "public function ajax_forum_subscription() {\n\n\t\t// Bail if subscriptions are not active\n\t\tif ( ! bbp_is_subscriptions_active() ) {\n\t\t\tbbp_ajax_response( false, __( 'Subscriptions are no longer active.', 'bbpress' ), 300 );\n\t\t}\n\n\t\t// Bail if user is not logged in\n\t\tif ( ! is_user_logged_in() ) {\n\t\t\tbbp_ajax_response( false, __( 'Please login to subscribe to this forum.', 'bbpress' ), 301 );\n\t\t}\n\n\t\t// Get user and forum data\n\t\t$user_id = bbp_get_current_user_id();\n\t\t$id = intval( $_POST['id'] );\n\n\t\t// Bail if user cannot add favorites for this user\n\t\tif ( ! current_user_can( 'edit_user', $user_id ) ) {\n\t\t\tbbp_ajax_response( false, __( 'You do not have permission to do this.', 'bbpress' ), 302 );\n\t\t}\n\n\t\t// Get the forum\n\t\t$forum = bbp_get_forum( $id );\n\n\t\t// Bail if forum cannot be found\n\t\tif ( empty( $forum ) ) {\n\t\t\tbbp_ajax_response( false, __( 'The forum could not be found.', 'bbpress' ), 303 );\n\t\t}\n\n\t\t// Bail if user did not take this action\n\t\tif ( ! isset( $_POST['nonce'] ) || ! wp_verify_nonce( $_POST['nonce'], 'toggle-subscription_' . $forum->ID ) ) {\n\t\t\tbbp_ajax_response( false, __( 'Are you sure you meant to do that?', 'bbpress' ), 304 );\n\t\t}\n\n\t\t// Take action\n\t\t$status = bbp_is_user_subscribed( $user_id, $forum->ID ) ? bbp_remove_user_subscription( $user_id, $forum->ID ) : bbp_add_user_subscription( $user_id, $forum->ID );\n\n\t\t// Bail if action failed\n\t\tif ( empty( $status ) ) {\n\t\t\tbbp_ajax_response( false, __( 'The request was unsuccessful. Please try again.', 'bbpress' ), 305 );\n\t\t}\n\n\t\t// Put subscription attributes in convenient array\n\t\t$attrs = array(\n\t\t\t'forum_id' => $forum->ID,\n\t\t\t'user_id' => $user_id\n\t\t);\n\n\t\t// Action succeeded\n\t\tbbp_ajax_response( true, bbp_get_forum_subscription_link( $attrs, $user_id, false ), 200 );\n\t}", "function bbp_get_forum_subscription_link($args = array())\n{\n}", "function add_subscribed_forum($fid, $uid=0)\r\n{\r\n\tglobal $mybb, $db;\r\n\r\n\tif(!$uid)\r\n\t{\r\n\t\t$uid = $mybb->user['uid'];\r\n\t}\r\n\r\n\tif(!$uid)\r\n\t{\r\n\t\treturn false;\r\n\t}\r\n\r\n\t$fid = (int)$fid;\r\n\t$uid = (int)$uid;\r\n\r\n\t$query = $db->simple_select(\"forumsubscriptions\", \"*\", \"fid='\".$fid.\"' AND uid='{$uid}'\", array('limit' => 1));\r\n\t$fsubscription = $db->fetch_array($query);\r\n\tif(!$fsubscription['fid'])\r\n\t{\r\n\t\t$insert_array = array(\r\n\t\t\t'fid' => $fid,\r\n\t\t\t'uid' => $uid\r\n\t\t);\r\n\t\t$db->insert_query(\"forumsubscriptions\", $insert_array);\r\n\t}\r\n\r\n\treturn true;\r\n}", "public function send_subscriptions(){\r\n //send email to all those who have subscribed to posts from this author\r\n\r\n }", "function subscribe() \n\t{\n\n\t\t$uid = JRequest::getVar( 'uid', '0', 'request');\n\t \t$redirect = 'index.php?option=com_phplist&controller=newsletters&task=list';\n\t \t$redirect = JRoute::_( PhplistUrl::siteLink($redirect), false );\n\t \t\n\t \t// Validation is by JS validate() function . Duplicated here as a backup for if no JS.\n\t\t//check a newsletter is selected in list\n\t\t$cids = JRequest :: getVar('cid', array(0), 'request', 'array');\n\t\tif (intval($cids['0']) == '0')\n\t\t{\n\t\t\t$this->message = JText::_( \"PLEASE_SELECT_A_NEWSLETTER\" );\n\t\t\t$this->messagetype\t= 'notice';\n\t\t\t$this->setRedirect( $redirect, $this->message, $this->messagetype );\n\t\t\treturn false;\n\t\t}\n\t\t\n\t\tif ($uid)\n\t\t{\n\t\t\t// get phplist user from unique id\n\t\t\t$phplistUser = PhplistHelperUser::getUser( $uid, '1', 'uid' );\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// get phplist user from joomla user\n\t\t\t$user = JFactory::getUser();\n\t\t\t$phplistUser = PhplistHelperUser::getUser( $user->id, '1', 'foreignkey' );\n\t\t}\n\t\t\n\t\t// get phplist user details\n\t\t$details = new JObject();\n\t\t$details->userid = $phplistUser->id;\n\t\t\n\t\t$switch = PhplistHelperSubscription::switchSubscriptions($details);\n\t\t\n\t\t$this->setRedirect( $redirect, $this->message, $this->messagetype );\t\t\n\t}", "function createForum()\r\n {\r\n\r\n }", "private function step_topic_subscriptions()\n {\n }", "function focus_groups_simplenews_subscribe_action($account, $context) {\n\tif($group_id = focus_groups_get_group_id()) {\n\t\t$group = node_load($group_id);\n\n\t\t$term = taxonomy_get_term_by_name('Newsletter ' . $group->title);\n\t\tif(!$term){\n\t\t\t//creating a new term\n\t\t\t$term = array('name' => 'Newsletter ' . $group->title, 'vid' => 7);\n\t\t\ttaxonomy_save_term($term);\n\t\t\t$term = taxonomy_get_term_by_name('Newsletter ' . $group->title);\n\t\t}\n\t\t$term = array_pop($term);\n\t\tsimplenews_subscribe_user($account->mail, $term->tid, false);\n\t\twatchdog('focus_groups', 'Subscribed user id %id to newsletter %newsletter.', array('%id' => $account->uid, '%newsletter' => $group->title));\n\t}\n}", "function moodleforum_instance_created($context, $moodleforum) {\n\n // Check if users are forced to be subscribed to the moodleforum instance.\n if ($moodleforum->forcesubscribe == moodleforum_INITIALSUBSCRIBE) {\n\n // Get a list of all potential subscribers.\n $users = \\mod_moodleforum\\subscriptions::get_potential_subscribers($context, 'u.id, u.email');\n\n // Subscribe all potential subscribers to this moodleforum.\n foreach ($users as $user) {\n \\mod_moodleforum\\subscriptions::subscribe_user($user->id, $moodleforum, $context);\n }\n }\n}", "function AnnounceTopic()\n{\n\tglobal $context, $txt;\n\n\tif (!allowedTo('announce_topic'))\n\t\tfatal_lang_error(1, false);\n\n\tvalidateSession();\n\n\tloadTemplate('ManageMembers');\n\tloadLanguage('Post');\n\n\t$subActions = array(\n\t\t'selectgroup' => 'AnnouncementSelectMembergroup',\n\t\t'send' => 'AnnouncementSend',\n\t);\n\n\t$context['page_title'] = $txt['announce_topic'];\n\n\t// Call the function based on the sub-action.\n\t$subActions[isset($_REQUEST['sa']) && isset($subActions[$_REQUEST['sa']]) ? $_REQUEST['sa'] : 'selectgroup']();\n}", "function forumHandler() {}", "function subscribeUser()\n {\n // validate token\n $mj_sub_token = $_GET['mj_sub_token'];\n unset($_GET['mj_sub_token']);\n if (sha1(http_build_query($_GET) . self::WIDGET_HASH) !== $mj_sub_token) {\n echo '<p class=\"error\" listId=\"' . $_GET['list_id'] . '\">';\n echo __('Error. Token verification failed.', 'wp-mailjet-subscription-widget');\n echo '</p>';\n die;\n }\n\n $email = $_GET['email'];\n\n $contacts[] = array(\n 'Email' => $email\n );\n\n // Add the contact to the contact list\n $result = $this->api->addContact(array(\n 'action' => 'addforce',\n 'ListID' => $_GET['list_id'],\n 'contacts' => $contacts\n ));\n\n $metaProperties = $this->getContactMetaProperties(false);\n\n $properties = array();\n if (is_object($metaProperties)) {\n foreach ($metaProperties->Data as $i => $prop) {\n if (!array_key_exists($prop->Name, $_GET)) {\n continue;\n }\n $properties[] = array(\n 'Name' => $prop->Name,\n 'Value' => $_GET[$prop->Name]\n );\n }\n }\n\n if (is_object($result)) {\n if (!empty($result->Data)) {\n $result2 = $this->api->updateContactData(array(\n 'method' => 'JSON',\n 'ID' => $email,\n 'Data' => $properties\n ));\n\n }\n }\n\n\n echo '<p class=\"success\" listId=\"' . $_GET['list_id'] . '\">';\n echo sprintf(__(\"Thanks for subscribing with %s\", 'wp-mailjet-subscription-widget'), $email);\n echo '</p>';\n die();\n }", "private function subscribe()\n {\n $this->botman->hears('subscribe', function (BotMan $bot) {\n $userId = $bot->getUser()->getId();\n $user = Subscriber::where('telegram_user_id', $userId)->first();\n $userMsg = 'You are already subscribed';\n\n if(is_null($user))\n {\n Subscriber::create(['telegram_user_id' => $userId]);\n $userMsg = 'You have just subscribed to our updates!';\n }\n\n $bot->reply($userMsg);\n });\n }", "function fe_subscribe_form() {\r\n\r\n $this->showerror();\r\n\r\n echo '<form method=post action=\"'.$_SERVER['PHP_SELF'].'\">';\r\n echo '<input type=hidden name=act value=\"fe_form\">'; # contains the action (edit/new)\r\n echo '<input type=hidden name=save value=\"1\">'; # marker to indicate form submitation\r\n echo '<input type=hidden name=go value=\"'.htmlentities($this->_go).'\">'; # url to go after successful submitation\r\n echo '<input type=hidden name=sub_type value=\"sub\">'; # marker to indicate form submitation\r\n\r\n echo '<p>Email:<br>';$this->input_widget(\"field[email][0]\", $this->ds->email[0], 'email');echo '</p>';\r\n echo '<p>Pick newsletter category to subscribe:<br>';$this->input_widget(\"field[category][0]\", $this->ds->category[0], 'category');echo '</p>';\r\n echo '<p><input type=submit value=\"Subscribe\"></p>';\r\n echo '</form>';\r\n\r\n }", "function afww_subscriptions_create( $appid, $authtoken, $sub )\n{\n return afww_curl_api_post( \"/installedapps/$appid/subscriptions\", $authtoken, $sub );\n}", "function bbp_member_forums_screen_subscriptions() {\n\tadd_action( 'bp_template_content', 'bbp_member_forums_subscriptions_content' );\n\tbp_core_load_template( apply_filters( 'bbp_member_forums_screen_subscriptions', 'members/single/plugins' ) );\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ update user invite code and return TRUE/FALSE
function _update_invite_code($query=array()){ if (is_array($query) && sizeof($query)==0){ return FALSE; } foreach($query as $k=>$v) { switch($k) { case "set_use": $this->db->set('user_id', $query['user_id']); $this->db->set('usedate', date("Y-m-d H:i:s")); break; case "user_id": break; default: $this->db->where($k, $v); break; } } $return = $this->db->update('invite_code'); log_message('debug', "Last Query: ".$this->db->last_query()); $this->db->flush_cache(); if($return){ return TRUE; } return FALSE; }
[ "public function updateInvite($code) {\n\t\n\t\tDB::table('invite_codes')\n\t\t\t->where('ic_code',$code)\n\t\t\t->update(\n\t\t\t\tarray(\n\t\t\t\t'ic_status' => '1',\n\t\t\t\t'ic_date' => date('d M Y H:i:s', time())\n\t\t\t\t)\n\t\t\t);\n\t\t\n\t}", "protected function checkInvitedCode($code)\n\t{\n\t\t$helpText = '';\n\t\tif ($this->hasIdentity()) {\n\t\t\t$errorMessage = $this->translate('You are already registered.');\n\t\t\t$helpText = $this->translate('If you believe this is not your account then please logout'\n\t\t\t\t\t. ' and click invitation link again to register an account.');\n\t\t\treturn $this->showErrorActivate($errorMessage, $helpText);\n\t\t\t\n\t\t}\n\t\t$sl = $this->getServiceLocator();\n\t\t/* @var $invite \\HtUser\\Model\\Invite */\n\t\t$invite = $sl->get('Invite');\n\t\tif (!$invite->loadByCode($code)) {\n\t\t\t$errorMessage = $this->translate('Invalid activation key.');\n\t\t\treturn $this->showErrorActivate($errorMessage, $helpText);\n\t\t}\n\t\tif ($invite->isInvitationExpired()) {\n\t\t\t$errorMessage = $this->translate('Invitation code activation time is over. You can contact administrator to resend new code.');\n\t\t\treturn $this->showErrorActivate($errorMessage, $helpText);\n\t\t} else {\n\t\t\treturn $invite;\n\t\t}\n\t}", "public function accept_invite_() {\n\t\teval(USER);\n\t\t$this->assign('waitSecond',1);\n\n\t\t$cond['team_id'] = $_GET['team'];\n\t\t$cond['user_id'] = session('userid');\n\t\t$data['statecode'] = 1;\n\n\t\ttry {\n\t\t\t$res = DBModel::updateDB('cernet_teammate', $cond, $data);\n\t\t\tunset($cond['team_id']);\n\t\t\t$cond['statecode'] = 0;\n\t\t\t$data['statecode'] = -1;\n\t\t\t$res = DBModel::updateDB('cernet_teammate', $cond, $data);\n\t\t\t$this->move2state3();\n\n\t\t\t$this->success('','__ROOT__/User/currentstage');\n\t\t}catch(Exception $e){\n\t\t\tthrow_exception($e->getMessage());\n\t\t}\t\n\t}", "function sl_confirm_company_invitation($username, $company_id, $invitor_id, $asAdmin, $token)\n{\n /* Verify that the invitation link wasn't forged.\n */\n if ($token != urlencode(sha1(SALT.\"$company_id/$invitor_id/$asAdmin\"))) return false;\n\n /* Update the user's record with the new company, admin status, and invitor.\n */\n $qry=\"update \".USERS.\" SET confirmed='1', company_id='\".$company_id.\"', company_admin='\".$asAdmin.\"', company_confirm='\".$invitor_id.\"' where username='\".mysql_real_escape_string($username).\"'\";\n mysql_query($qry);\n\n return true;\n}", "public function resend_code() {\n $this->authenticate();\n $updated_code = $this->account->update_activation_code_by_id($this->session->userdata(Constant::SESSION_USSID));\n if (!is_null($updated_code)) {// send activation code to user mail\n $this->send_activation_mail($this->session->userdata(Constant::SESSION_EMAIL), $updated_code);\n }\n $this->load_view(Constant::CONFIRMATION_VIEW, [\n Constant::VDN_SESSION_EMAIL => $this->session->userdata(Constant::SESSION_EMAIL),\n Constant::LINK_PARAM_RESEND_CONCODE => $updated_code\n ]);\n }", "function acceptInvite() {\n\t\tmysql_query(\"UPDATE games SET player1='$_SESSION[LOGIN]', invited='' WHERE player0='$_SESSION[INVITEDBY]'\");\n\t\t\n\t\t//update user w gameid\n\t\t$id_result=mysql_query(\"SELECT * FROM games WHERE player0='$_SESSION[INVITEDBY]'\");\n\t\tif($id_result) {\n\t\t\tif(mysql_num_rows($id_result) == 1) {\n\t\t\t\t$g = mysql_fetch_assoc($id_result);\n\t\t\t\t$id = $g['id'];\n\t\t\t\tmysql_query(\"UPDATE users SET game_id='$id' WHERE login='$_SESSION[LOGIN]'\");\n\t\t\t\t\n\t\t\t\t$_SESSION['GAMEID'] = $id;\n\t\t\t}\n\t\t}\n\t\t\n\t\tunset($_SESSION['INVITEDBY']);\n\t}", "public function updateVerificationCode($param) {\n $user = $this->_user->where ( StringLiterals::EMAIL, $this->decodeParam ( $param ) )->first ();\n if (count ( $user ) > 0) {\n $user->otp = '123456';\n $user->save ();\n return true;\n } else {\n\n return false;\n }\n }", "public function resendCode() {\r\n $user_id = $_POST['id'];\r\n $app_id = $_POST['app_id'];\r\n\r\n $result = mysql_query(\"select * from user where id=\" . $user_id);\r\n $row = mysql_fetch_array($result);\r\n if ($row['id'] > 0) {\r\n //----SMS------\r\n $message_template = \"verified_code_sms\";\r\n $app_detail=$this->getAppDetail($app_id);\r\n $values['app_name']=$app_detail['name'];\r\n $values['verified_code'] = $row['verified_code'];\r\n $this->buildSMS($message_template, $values, $row['mobile'], $app_id);\r\n return 1;\r\n } else {\r\n return 0;\r\n }\r\n }", "public function changeCode($emailAddress,$sendUserTo) {\n\t\t\t\tif(($this->isEmailAddressInUse($emailAddress))) {\n\t\t\t\t\t$checkUser = \"SELECT userName FROM user WHERE email=:email\";\n\t\t\t\t\ttry {\n\t\t\t\t\t\t$stmt = $this->_db->prepare($checkUser);\n\t\t\t\t\t\t$stmt->bindParam(\":email\", $emailAddress, PDO::PARAM_STR);\n\t\t\t\t\t\t$stmt->execute();\n\t\t\t\t\t\t$row=$stmt->fetch();\n\t\t\t\t\t\t$username=$row['userName'];\n\t\t\t\t\t\t\tif(isset($username)){\n\t\t\t\t\t\t\t\tif(!($this->isUserActivated($username))) return \"false\";\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t$stmt->closeCursor();\n\t\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tcatch(PDOException $e) {\n\t\t\t\t\t\t\treturn false;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\treturn false;\t\t\t\t\n\t\t\t\t}\n\t\t\t\t//generate a new random code and add it to the database\n\t\t\t\t$confirmCode = md5(uniqid(rand()));\n\t\t\t\t$sql = \"UPDATE user SET confirmcode=:code WHERE email=:email\";\n\t\t\t\ttry{\n\t\t\t\t\t$stmt = $this->_db->prepare($sql);\n\t\t\t\t\t$stmt->bindParam(\":email\", $emailAddress, PDO::PARAM_STR);\n\t\t\t\t\t$stmt->bindParam(\":code\", $confirmCode, PDO::PARAM_STR);\n\t\t\t\t\t$stmt->execute();\n\t\t\t\t\tif($this->sendUpdatePassMail($emailAddress, $username, $confirmCode,$sendUserTo)){\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t}catch(PDOException $e){\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t\t\n\t}", "public function getInviteCode()\n {\n return $this->invite_code;\n }", "function send_invitecode($user_info, $invite_emails, $invite_message=\"\") {\n\tglobal $database, $setting, $url;\n\n\t// SET VARIABLES\n\t$time = time();\n\t$invites_left = $user_info[user_invitesleft];\n\n\t// GET SERVER INFO\n\t$prefix = $url->url_base;\n \n\t$emails = explode(\",\", $invite_emails);\n\tfor($e=0;$e<5;$e++) {\n\t $email = str_replace(\" \", \"\", $emails[$e]);\n\t if($email != \"\" & $invites_left > 0) {\n\n\t // CREATE CODE AND INSERT INTO DATABASE\n\t $invite_code = randomcode();\n\t $database->database_query(\"INSERT INTO se_invites (invite_user_id, invite_date, invite_email, invite_code) VALUES ('$user_info[user_id]', '$time', '$email', '$invite_code')\");\n\n\t // DECODE SUBJECT AND EMAIL FOR SENDING\n\t $subject = htmlspecialchars_decode($setting[setting_email_invitecode_subject], ENT_QUOTES);\n\t $message = htmlspecialchars_decode($setting[setting_email_invitecode_message], ENT_QUOTES);\n \n\t // REPLACE VARIABLES IN EMAIL SUBJECT AND MESSAGE\n\t $subject = str_replace(\"[username]\", $user_info[user_username], $subject);\n\t $message = str_replace(\"[username]\", $user_info[user_username], $message);\n\t $subject = str_replace(\"[email]\", $user_info[user_email], $subject);\n\t $message = str_replace(\"[email]\", $user_info[user_email], $message);\n\t $subject = str_replace(\"[message]\", $invite_message, $subject);\n\t $message = str_replace(\"[message]\", $invite_message, $message);\n\t $subject = str_replace(\"[code]\", $invite_code, $subject);\n\t $message = str_replace(\"[code]\", $invite_code, $message);\n\t $subject = str_replace(\"[link]\", \"<a href=\\\"$prefix\".\"signup.php?signup_email=$email&signup_invite=$invite_code\\\">$prefix\".\"signup.php?signup_email=$email&signup_invite=$invite_code</a>\", $subject);\n\t $message = str_replace(\"[link]\", \"<a href=\\\"$prefix\".\"signup.php?signup_email=$email&signup_invite=$invite_code\\\">$prefix\".\"signup.php?signup_email=$email&signup_invite=$invite_code</a>\", $message);\n\n\t // ENCODE SUBJECT FOR UTF8\n\t $subject=\"=?UTF-8?B?\".base64_encode($subject).\"?=\";\n\n\t // REPLACE CARRIAGE RETURNS WITH BREAKS\n\t $message = str_replace(\"\\n\", \"<br>\", $message);\n\n\t // SET HEADERS\n\t $from_email = \"$setting[setting_email_fromname] <$setting[setting_email_fromemail]>\";\n\t $headers = \"MIME-Version: 1.0\".\"\\n\";\n\t $headers .= \"Content-type: text/html; charset=utf-8\".\"\\n\";\n\t $headers .= \"Content-Transfer-Encoding: 8bit\".\"\\n\";\n\t $headers .= \"From: $from_email\".\"\\n\";\n\t $headers .= \"Return-Path: $from_email\".\"\\n\";\n\t $headers .= \"Reply-To: $from_email\";\n\n\t // SEND MAIL\n\t @mail($email, $subject, $message, $headers);\n \n \t // DECREASE INVITES IF NOT ADMIN\n\t if($user_info[user_id] != 0) { $invites_left--; }\n\t }\n\t}\n \n\t// UPDATE NEW INVITES LEFT IF NOT ADMIN\n\tif($user_info[user_id] != 0) {\n\t $database->database_query(\"UPDATE se_users SET user_invitesleft='$invites_left' WHERE user_id='$user_info[user_id]'\");\n\t}\n\n\treturn true;\n}", "function update_user_validation_code($p_id, $p_validation_code) {\n\t$con = open_connection();\n\tmysqli_query($con,\"UPDATE user SET validation_code = \". $p_validation_code .\" WHERE user_id = '\". $p_id .\"'\");\n\tmysqli_close($con);\n}", "function update_invitation_status($fbId) {\n\t$check_for_invited_friends = Zzinvitefriends::model()->findByAttributes(array('fbid'=>$fbId,'zzinvitefriends_status'=>'invited'));\n\tif(isset($check_for_invited_friends)) {\n\t\t$check_for_invited_friends->zzinvitefriends_status = 'accepted';\n\t\t$check_for_invited_friends->save();\n\t}\n}", "function pmproio_getUserFromInviteCode( $invite_code ) {\r\n\t$user_id = hexdec( substr( $invite_code, 0, 4 ) );\r\n\t\r\n\treturn $user_id;\r\n}", "public function updateByInviteCode(UpdateUserRequest $request, $invite_code)\n {\n $invite = UserInvite::getByCode($invite_code);\n\n if (!$invite) {\n return $this->errorResponse('Invite not found.');\n }\n\n if ($invite->used) {\n return $this->errorResponse('Invite already used.');\n }\n \n $user = $invite->invitedUser;\n\n if (!$user) {\n return $this->errorResponse('User not found.');\n }\n\n $validated = $request->validated();\n $user->fill($validated);\n\n if (!$user->save()) {\n return $this->errorResponse('User could not be updated.', 500);\n }\n\n $invite->used = true;\n $invite->save();\n\n if (!is_null($request->password)) {\n $user->password = bcrypt($request->password);\n $user->save();\n }\n\n $user->profile->updateInformation(\n $request->email, \n $request->phone, \n $request->fax, \n $request->office, \n $request->skype\n );\n\n return $this->wrapResponse(new UserResource($user));\n }", "function update_count_invited($survey_code)\n\t{\n\t\t// Database table definition\n\t\t$table_survey_invitation \t= Database :: get_course_table(TABLE_SURVEY_INVITATION);\n\t\t$table_survey \t\t\t\t= Database :: get_course_table(TABLE_SURVEY);\n\t\n\t\t// counting the number of people that are invited\n\t\t$sql = \"SELECT count(user) as total FROM $table_survey_invitation WHERE survey_code = '\".Database::escape_string($survey_code).\"'\";\n\t\t$result = api_sql_query($sql, __FILE__, __LINE__);\n\t\t$row = Database::fetch_array($result);\n\t\t$total_invited = $row['total'];\n\t\n\t\t// updating the field in the survey table\n\t\t$sql = \"UPDATE $table_survey SET invited = '\".Database::escape_string($total_invited).\"' WHERE code = '\".Database::escape_string($survey_code).\"'\";\n\t\t$result = api_sql_query($sql, __FILE__, __LINE__);\n\t}", "public function updateInviteCodes($groupName) {\n\t\t$codes = [\n\t\t\tRoles::PROJECT_ADMIN => Input::get('adminsICode'),\n\t\t\tRoles::PROJECT_MEMBER => Input::get('membersICode'),\n\t\t\tRoles::PROJECT_GUEST => Input::get('guestsICode')\n\t\t];\n\t\t\n\t\tforeach(Roles::$PROJECT_ROLES as $role) {\n\t\t\t$sentryGroup = Sentry::findGroupByName(str_replace('#', $groupName, $role));\n\t\t\t$sentryGroup['invite_code'] = $codes[$role];\n\t\t\t$sentryGroup->save();\n\t\t}\n\t\t\n\t\treturn Redirect::back()\n\t\t\t->with('flashSuccess', 'Invitation code successfully updated.');\n\t}", "public function sendActivationCode()\n\t\t\t{\n\t\t\t\t$code = urlencode($this->getActivationCode('Signup', $this->fields_arr['user_id']));\n\t\t\t\t$activation_link = getUrl('verify', '?code='.$code, '?code='.$code);\n\t\t\t\t$activation_link = $activation_link;\n\n\t\t\t\t$activation_subject = $this->LANG['reactivation_login_subject'];\n\n\t\t\t\t$link = $this->CFG['site']['url'];\n\t\t\t\t$activation_message = $this->LANG['reactivation_login_message'];\n\n\t\t\t\t$this->setEmailTemplateValue('link', $link);\n\t\t\t\t$this->setEmailTemplateValue('user_name', $this->fields_arr['username']);\n\t\t\t\t$this->setEmailTemplateValue('activation_link', $activation_link);\n\n\t\t\t\t$is_ok = $this->_sendMail($this->fields_arr['email'], $activation_subject, $activation_message, $this->CFG['site']['noreply_name'], $this->CFG['site']['noreply_email']);\n\n\t\t\t\tif($is_ok)\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->setCommonSuccessMsg($this->LANG['login_activation_code_sent']);\n\t\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->setCommonSuccessMsg($this->LANG['login_activation_code_not_sent']);\n\t\t\t\t\t}\n\t\t\t}", "public function invited_friend() {\n\n $user_code = 1;\n $invited_code = \"\";\n $status = 0;\n $data = [\n 'user_id' => $user_code,\n 'status' => $status,\n 'link_user_id' => $invited_code\n ];\n $res = $this->Settings->insert_sharing($data);\n $user_total_points = $this->Settings->total_user_points($user_code);\n $user_total_point = $user_total_points[0]->points;\n $user_result = $this->Settings->get_invited_friend_points();\n $user_win_point = $user_result[0]->invite_friend;\n $update = $user_total_point + $user_win_point;\n $res = $this->Settings->update_user_points_for_invite_friend($user_code, $update);\n redirect();\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Find a companies that exceeded limit over the given period.
public function findExceededLimit(\DateTime $from, \DateTime $to) { $query = $this->getEntityManager()->createQuery( 'SELECT c.id, c.name, c.quota, SUM(t.transferred) AS used' . ' FROM VPNAdminApiBundle:Transfer t' . ' JOIN t.user u' . ' JOIN u.company c' . ' WHERE t.created BETWEEN :from AND :to' . ' GROUP BY c.id' . ' HAVING used > c.quota' . ' ORDER BY used DESC' ); $query->setParameter('from', $from->format('Y-m-d H:i:s')); $query->setParameter('to', $to->format('Y-m-d H:i:s')); return $query->getResult(); }
[ "private function checkExceededLimitOfCompanies()\n {\n if (!empty($this->firms)) {\n $planUnits = $this->planUnits;\n if (count($this->firms) > $planUnits['num_firms']) {\n // pages that are allowed to view\n if (uri_string() != 'user/managefirms' &&\n uri_string() != $this->language->getUrlAbbrevation() . '/user/managefirms' &&\n $this->uri->segment(2) != 'plans' &&\n $this->uri->segment(2) != 'plan' &&\n $this->uri->segment(2) != 'myplan') {\n redirect(lang_url('user/managefirms'));\n }\n }\n }\n }", "public function get_companies_having_active_jobs($limit)\n\t{\n\t\t$this->db->select('\n\t\t\txx_job_post.company_id, \n\t\t\txx_job_post.is_status, \n\t\t\txx_companies.company_slug, \n\t\t\txx_companies.company_logo,\n\t\t');\n\t\t$this->db->join('xx_job_post','xx_job_post.company_id = xx_companies.id');\n\t\t$this->db->where('xx_job_post.is_status','active');\n\t\t$this->db->limit($limit);\n\t\t$this->db->group_by('xx_companies.company_slug');\n\t\t$this->db->from('xx_companies');\n\t\t$query = $this->db->get();\n\t\treturn $query->result_array();\n\t}", "function findOutstanding($company = null) {\n $today = new DateValue(time() + get_user_gmt_offset());\n if ($company) {\n return Invoices::find(array(\n 'condition' => array('status = ? AND due_on >= ? AND company_id = ?', INVOICE_STATUS_ISSUED, $today, $company->getId()),\n 'order' => 'due_on DESC',\n ));\n } else {\n return Invoices::find(array(\n 'condition' => array('status = ? AND due_on >= ?', INVOICE_STATUS_ISSUED, $today),\n 'order' => 'due_on DESC',\n ));\n } // if\n }", "public function findSuppliersExpiredDue();", "private function getMaxDelinquencyLimit()\n\t{\n\t\t\n\t\t//get all the diffferent values for full_pulls->days_delinquent\n\t\t$query = \"\n\t\t\tSELECT \n\t\t\t\trscpv.parm_value\n\t\t\tFROM \n\t\t\t\trule_set_component_parm_value rscpv\n\t\t\tJOIN\n\t\t\t\trule_component_parm rcp ON rcp.rule_component_parm_id = rscpv.rule_component_parm_id\n\t\t\tJOIN\n\t\t\t\trule_component rc ON rc.rule_component_id = rscpv.rule_component_id\n\t\t\tJOIN \n\t\t\t\trule_set rs ON rs.rule_set_id = rscpv.rule_set_id\n\t\t\tJOIN \n\t\t\t\tloan_type lt ON lt.loan_type_id = rs.loan_type_id\n\t\t\tWHERE\n\t\t\t\trc.name_short = 'days_to_ext_collections'\n\t\t\tAND\n\t\t\t\trcp.parm_name = 'days_to_ext_collections'\n\t\t\tAND\n\t\t\t\tlt.company_id = {$this->company_id}\n\t\t\t\";\n\t\t$results = $this->db->query($query);\n\t\t\n\t\t//get the highest number of all the values\t\t\n\t\twhile ($row = $results->fetch(PDO::FETCH_OBJ))\n\t\t{\n\t\t\tif($row->parm_value > $limit)\n\t\t\t{\n\t\t\t\t$limit = $row->parm_value;\n\t\t\t}\n\t\t}\n\t\t//return the highest number\n\t\t$limit = $limit ? $limit : 30;\n\t\t\n\t\treturn $limit;\n\t}", "public function getUserLimiter(empresa $company);", "private function gelAllOffersInactive($company) {\n\t\t\t\t\t$paramsInativas = array(\n\t\t\t\t\t\t'Offer' => array(\n\t\t\t\t\t\t\t'conditions' => array(\n\t\t\t\t\t\t\t\t'Offer.company_id' => $company['Company'] ['id'],\n\t\t\t\t\t\t\t\t'Offer.status' => 'INACTIVE'\n\t\t\t\t\t\t\t),\n\t\t\t\t\t\t\t'order' => array(\n\t\t\t\t\t\t\t\t'Offer.id' => 'DESC'\n\t\t\t\t\t\t\t)\n\t\t\t\t\t\t)\n\t\t\t\t\t);\n\t\t\t\t\t\n\t\t\t\t\t$offersInactive = $this->AccentialApi->urlRequestToGetData('offers', 'all', $paramsInativas);\n\t\t\t\t\t$inactiveWithStatistics = '';\n\t\t\t\t\tif (!empty($offersInactive)) {\n\t\t\t\t\t\tforeach ($offersInactive as $offer) {\n\t\t\t\t\t\t\t$statisticsQuery = \"select details_click, checkouts_click, purchased_billet, purchased_card from offers_statistics where offers_statistics.offer_id =\" . $offer['Offer']['id'] . \";\";\n\n\t\t\t\t\t\t\t$statisticsParams = array(\n\t\t\t\t\t\t\t\t'User' => array(\n\t\t\t\t\t\t\t\t\t'query' => $statisticsQuery\n\t\t\t\t\t\t\t\t)\n\t\t\t\t\t\t\t);\n\t\t\t\t\t\t\t$statistics = $this->AccentialApi->urlRequestToGetData('users', 'query', $statisticsParams);\n\t\t\t\t\t\n\t\t\t\t\t\t\t$offer['Statistics'] = $statistics[0];\n\t\t\t\t\t\t\t $offer['Statistics'][0]['evaluation'] = 0;\n\t\t\t\t\t\t\t $offer['Statistics'][0]['votantes'] = 0;\n\t\t\t\t\t\t\t$inactiveWithStatistics[] = $offer;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\treturn $inactiveWithStatistics;\n\t\t\t\t}", "public function deleteCountsUntil(\\DateTime $limit);", "function limit_reached($response);", "public function findForwardersExpiredDue();", "public function findExceededTasks()\n\t{\n\t\t$now = new DateTime();\n\t\treturn $this->mapper->findBy([\"exceedDateTime <=\" => $now]);\n\t}", "public function filterDailyLimit($sql)\n\t{\n\t loop :$ret_array = array();\n\t \n\t\t\t//if no result retun 0;\n\t\t\tif($sql->num_rows()<1)\n\t\t\t{\n\t\t\t return 0;\n\t\t\t}\n\t\t\tforeach($sql->result() as $user)\n\t\t\t{ \n\t\t\t $priority = 0; //initially priority set as o , \n\t\t\t $username = $user->username;\n\t\t\t $permonth = $user->per_month; // avail quata\n\t\t\t $site_id = $user->site_id;\n\t\t\t $rule_priority = $user->rule_priority;\n\t\t\t $user_present = $user->present; \n\t\t\t //if user have larger priority than current priority then priority set to larger one\n\t\t\t if($rule_priority > $priority){$priority = $rule_priority;}\n\t\t\t \n\t\t\t //check is absent\n\t\t\t if($user_present == 0){continue;}\n\t\t\t //no limittaion or threshold add to array\n\t\t\t if($permonth=='' || $permonth ==NULL)\n\t\t\t {\n\t\t\t $ret_array[] = $username;\n\t\t\t }\n\t\t\t else \n\t\t\t {\n\t\t\t //get monthly limit\n\t\t\t\t $month_count = \"select count(*) as monthcount from sample_assign_orders \n\t\t\t\t where username = '$username' and site_id = $site_id \n\t\t\t\t\t\t\t\t\t and MONTH(CURDATE())= MONTH(assign_date) AND YEAR(CURDATE())=YEAR(assign_date)\";\n\t\t\t\t $sql_month_count = $this->opasa->query($month_count);\t\n\t\t\t\t $row_month_count = $sql_month_count->row();\n\t\t\t\t $month_count = $row_month_count->monthcount;\n\t\t\t\t //check this user exceeds the monthly limit\n\t\t\t\t //if exceeds continue the for loop\n\t\t\t\t if($permonth <= $month_count)\n\t\t\t\t {\n\t\t\t\t continue;\n\t\t\t\t }\n\t\t\t\t //then check per day limit exceeds\n\t\t\t\t //get current day order count\n\t\t\t\t $day_count = \"select count(*) as daycount from sample_assign_orders \n\t\t\t\t where username = '$username' and site_id = $site_id and assign_date = CURDATE()\";\n\t\t\t\t $sql_day_count = $this->opasa->query($day_count);\t\n\t\t\t\t $row_day_count = $sql_day_count->row();\n\t\t\t\t $day_count = $row_day_count->daycount;\t\n\t\t\t\t //calculate daily limit from per_month\n\t\t\t\t //check is that limit exceeds in current day\n\t\t\t\t $remaining_days = countDays(date('y'), date('n'), date('j'),array(0, 6));\n\t\t\t\t $daily_limit = ceil(($permonth-$month_count)/$remaining_days);\n\t\t\t\t //if exceeds the daily limit continue for loop\n\t\t\t\t if($daily_limit <= $day_count)\n\t\t\t\t {\n\t\t\t\t continue;\n\t\t\t\t }\n\t\t\t\t //if usr have avail quata that username add to array\t\t\n\t\t\t\t $ret_array[] = $username; \n\t\t\t }//else end - no limitation, per_count is not defined\n\t\t\t}//for each end\n\t\t //check atleast one user satisfy the rule \n\t\t //if $ret_array[] is null go to next level and repeat the loop.\n\t\t if(count($ret_array) > 0)\n\t\t {\n\t\t return $ret_array;\n\t\t }\n\t\t else\n\t\t {\n\t\t //get next level users\n\t\t\t $sql = \"SELECT a.username,a.site_id,a.`per_month`,a.`rule_priority`,b.present from order_assign_rule a \n join attendance b on a.username = b.username \n where b.work_date = CURDATE() and a.site_id = $site_id \n\t\t\t\t\t and a.rule_priority = (select rule_priority from order_assign_rule where rule_priority > $priority and site_id = $site_id and rule_type = '3' order by rule_priority limit 1)\n\t\t\t\t\t and a.rule_type = '3'\n\t\t\t\t\t \";\t\t \n\t\t\t\t\t\n\t\t\t $sql = $this->opasa->query($sql);\t \n\t\t\t goto loop; \t\t \n\t\t }\t\n\t}", "public function scopeWithinPeriod(Builder $query, Period $period);", "function countOverdue($company = null) {\n $today = new DateValue(time() + get_user_gmt_offset());\n if ($company) {\n return Invoices::count(array('status = ? AND due_on < ? AND company_id = ?', INVOICE_STATUS_ISSUED, $today, $company->getId()));\n } else {\n return Invoices::count(array('status = ? AND due_on < ?', INVOICE_STATUS_ISSUED, $today));\n } // if\n }", "public function findAllFullBookingInPeriod(\\DateTime $start, \\DateTime $end, $maxNumberOfBookedTickets);", "function sendsms_throttle_isoverlimit($uid, $limit = 0, $period = 60) {\n\tglobal $core_config;\n\t\n\t$limit = ((int) $limit ? (int) $limit : $core_config['main']['sms_limit_per_hour']);\n\t$period = ((int) $period ? (int) $period * 60 : 3600);\n\t\n\tif (!$limit) {\n\t\t// no limit no over limit\n\t\treturn FALSE;\n\t}\n\t\n\tif (!$period) {\n\t\t// no period no over limit\n\t\treturn FALSE;\n\t}\n\t\n\t// get start time, UTC\n\t$reg = registry_search($uid, 'core', 'sendsms', 'throttle_start');\n\t$start = $reg['core']['sendsms']['throttle_start'];\n\t\n\tif ($start) {\n\t\t// get sum of sent SMS over the hour\n\t\t$reg = registry_search($uid, 'core', 'sendsms', 'throttle_sum');\n\t\t$sum = $reg['core']['sendsms']['throttle_sum'];\n\t\t\n\t\t//check bucket expired\n\t\tif (strtotime($start) + $period < strtotime(core_get_datetime())) {\n\t\t\t// is expired\n\t\t\t// _log('is expired', 3, 'sendsms_throttle_isoverlimit');\n\t\t\t\n\n\t\t\treturn FALSE;\n\t\t} else {\n\t\t\t// not expired\n\t\t\tif ((int) $sum > $limit) {\n\t\t\t\t// is over limit\n\t\t\t\t// _log('is overlimit', 3, 'sendsms_throttle_isoverlimit');\n\t\t\t\t\n\n\t\t\t\treturn TRUE;\n\t\t\t} else {\n\t\t\t\t// not over limit\n\t\t\t\t_log('under quota not overlimit sum:' . $sum, 3, 'sendsms_throttle_isoverlimit');\n\t\t\t\t\n\t\t\t\treturn FALSE;\n\t\t\t}\n\t\t}\n\t} else {\n\t\t_log('just started not overlimit', 3, 'sendsms_throttle_isoverlimit');\n\t\t\n\t\treturn FALSE;\n\t}\n\t\n\t// _log('default overlimit', 3, 'sendsms_throttle_isoverlimit');\n\treturn TRUE;\n}", "public function isOverLimit() {\n\t\t$limit = $this->getCache()->load('dailyLimit');\n\t\tif(empty($limit)) return false;\n\t\t\n\t\t// This service has exceeded the limit if the last limit was reached less than 24 hours ago \n\t\t$lastLimited = time() - $limit;\n\t\treturn $lastLimited < (3600 * 24);\n\t}", "function contact_limit_expired($profileid,$allowed_limit)\t\n\t{\n\t\t$current_time=date(\"Y-m-d\");\n\t\t$current_date_start=$current_time.\" 00:00:00\";\n\t\t$current_date_end=$current_time.\" 23:59:59\";\t\t\n\t\t//$sql=\"select count(*) as count from CONTACTS where SENDER='$profileid' and TYPE='I' and TIME > '$current_date_start'\";\n\t\t$sql=\"select count(*) as count from CONTACTS_ONCE where SENDER='$profileid' and TIME > '$current_date_start'\";\n\t\t$result=mysql_query_decide($sql) or logError(\"Due to a temporary problem your request could not be processed. Please try after a couple of minutes\",$sql,\"ShowErrTemplate\");\n\t\t\n\t\t$myrow=mysql_fetch_array($result);\n\t\tif($myrow[\"count\"]<$allowed_limit)\n\t\t\treturn false;\n\t\telse \t\n\t\t\treturn true;\n\t\t\n\t}", "public static function GetClosedFlows($limit)\n {\n $time = mktime(date('H')-1, date('i'), date('s'), date(\"m\"), date(\"d\"), date(\"Y\"));//3 hours ago\n $flows = BroadcastFlowsQuery::create()->select(array('Id', 'Flow', 'EventId', 'UserId', 'Status', 'Pdate'))\n ->where('used > 0 AND status !='.BROADCAST_DOWNLOADED.' AND (status = '.BROADCAST_CLOSED.' OR pdate <= ' . $time . ')')->limit($limit)->find()->toArray();\n return $flows;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return fan club name
public function getFanClubName() { if(!isset($this->fanclubname) || $this->fanclubname === null) { $this->fanclubname = $this->getXml()->getElementsByTagName('FanclubName')->item(0)->nodeValue; } return $this->fanclubname; }
[ "public function getClubName() {\n $clubName = '';\n $homeClubId = esc_attr( get_option('gw_tennis_home_club', 0) );\n $clubs = $this->getEvent()->getClubs();\n foreach( $clubs as $club ) {\n if( $homeClubId === $club->getID()) {\n $clubName = $club->getName();\n }\n }\n return $clubName;\n }", "public function getClubname()\n\t{\n\t\treturn $this->clubname;\n\t}", "public function getFanClubName()\r\n\t{\r\n\t\tif($this->isHtSupporter())\r\n\t\t{\r\n\t\t\tif(!isset($this->fanClubName) || $this->fanClubName === null)\r\n\t\t\t{\r\n\t\t\t\t$this->fanClubName = $this->getXml()->getElementsByTagName('FanclubName')->item(0)->nodeValue;\r\n\t\t\t}\r\n\t\t\treturn $this->fanClubName;\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public function getClubName()\n {\n return $this->clubName;\n }", "public function getName()\n {\n return $this->getXml()->getElementsByTagName('FanclubName')->item(0)->nodeValue;\n }", "function getClubOrPoolName()\n {\n return ($this->__teamcluborpoolname) ;\n }", "public function getname()\r\n {\r\n \r\n if($this->idol)\r\n {\r\n return $this->idol->getSlug();\r\n \r\n }else return $this->playername;\r\n \r\n return $this->half;\r\n }", "function pzdc_hub_community_name($echo = TRUE) {\n global $PraizedCommunity;\n return $PraizedCommunity->tpt_attribute_helper('hub_community', 'name', $echo);\n}", "public static function team() : string\n {\n return static::teamName();\n }", "public function getName(){\r\n \t\treturn $this->teamname;\r\n \t}", "public function name()\n {\n switch ($this->suit) {\n case 100: return 'club';\n case 101: return 'diamond';\n case 102: return 'heart';\n case 103: return 'spade';\n }\n }", "public function getClub()\n {\n return $this->club;\n }", "function GetClubName($club_id, $clubs)\n{\n return $clubs[\"$club_id\"]['name']; \n}", "public function get_name() {\n\t\treturn $this->steam_object->get_name();\n\t}", "public function getChatbotName() : string ;", "public function getName()\n {\n return $this->guildName;\n }", "public function get_display_name() {\n\t\treturn h( $this->steam_object->get_name() );\n\t}", "function pzdc_community_name($echo = TRUE) {\n global $PraizedCommunity;\n return $PraizedCommunity->tpt_attribute_helper('community', 'name', $echo);\n}", "abstract public function getGameName ();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Filter the query on the updated_by column Example usage: $query>filterByUpdatedBy(1234); // WHERE updated_by = 1234 $query>filterByUpdatedBy(array(12, 34)); // WHERE updated_by IN (12, 34) $query>filterByUpdatedBy(array('min' => 12)); // WHERE updated_by >= 12 $query>filterByUpdatedBy(array('max' => 12)); // WHERE updated_by
public function filterByUpdatedBy($updatedBy = null, $comparison = null) { if (is_array($updatedBy)) { $useMinMax = false; if (isset($updatedBy['min'])) { $this->addUsingAlias(NewsletterPeer::UPDATED_BY, $updatedBy['min'], Criteria::GREATER_EQUAL); $useMinMax = true; } if (isset($updatedBy['max'])) { $this->addUsingAlias(NewsletterPeer::UPDATED_BY, $updatedBy['max'], Criteria::LESS_EQUAL); $useMinMax = true; } if ($useMinMax) { return $this; } if (null === $comparison) { $comparison = Criteria::IN; } } return $this->addUsingAlias(NewsletterPeer::UPDATED_BY, $updatedBy, $comparison); }
[ "public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (is_array($updatedBy)) {\n $useMinMax = false;\n if (isset($updatedBy['min'])) {\n $this->addUsingAlias(SchoolClassPeer::UPDATED_BY, $updatedBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedBy['max'])) {\n $this->addUsingAlias(SchoolClassPeer::UPDATED_BY, $updatedBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(SchoolClassPeer::UPDATED_BY, $updatedBy, $comparison);\n }", "public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (is_array($updatedBy)) {\n $useMinMax = false;\n if (isset($updatedBy['min'])) {\n $this->addUsingAlias(SearchIndexPeer::UPDATED_BY, $updatedBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedBy['max'])) {\n $this->addUsingAlias(SearchIndexPeer::UPDATED_BY, $updatedBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(SearchIndexPeer::UPDATED_BY, $updatedBy, $comparison);\n }", "public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (is_array($updatedBy)) {\n $useMinMax = false;\n if (isset($updatedBy['min'])) {\n $this->addUsingAlias(DocumentationPeer::UPDATED_BY, $updatedBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedBy['max'])) {\n $this->addUsingAlias(DocumentationPeer::UPDATED_BY, $updatedBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(DocumentationPeer::UPDATED_BY, $updatedBy, $comparison);\n }", "public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (is_array($updatedBy)) {\n $useMinMax = false;\n if (isset($updatedBy['min'])) {\n $this->addUsingAlias(JournalEntryPeer::UPDATED_BY, $updatedBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedBy['max'])) {\n $this->addUsingAlias(JournalEntryPeer::UPDATED_BY, $updatedBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(JournalEntryPeer::UPDATED_BY, $updatedBy, $comparison);\n }", "public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (is_array($updatedBy)) {\n $useMinMax = false;\n if (isset($updatedBy['min'])) {\n $this->addUsingAlias(NewsletterMailingPeer::UPDATED_BY, $updatedBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedBy['max'])) {\n $this->addUsingAlias(NewsletterMailingPeer::UPDATED_BY, $updatedBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(NewsletterMailingPeer::UPDATED_BY, $updatedBy, $comparison);\n }", "public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (is_array($updatedBy)) {\n $useMinMax = false;\n if (isset($updatedBy['min'])) {\n $this->addUsingAlias(ContactPeer::UPDATED_BY, $updatedBy['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updatedBy['max'])) {\n $this->addUsingAlias(ContactPeer::UPDATED_BY, $updatedBy['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(ContactPeer::UPDATED_BY, $updatedBy, $comparison);\n }", "public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($updatedBy)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $updatedBy)) {\n $updatedBy = str_replace('*', '%', $updatedBy);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(TbalunoPeer::UPDATED_BY, $updatedBy, $comparison);\n }", "public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($updatedBy)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $updatedBy)) {\n $updatedBy = str_replace('*', '%', $updatedBy);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(TbhistoricoPeer::UPDATED_BY, $updatedBy, $comparison);\n }", "public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($updatedBy)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $updatedBy)) {\n $updatedBy = str_replace('*', '%', $updatedBy);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(JugadorMesaPeer::UPDATED_BY, $updatedBy, $comparison);\n }", "public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($updatedBy)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $updatedBy)) {\n $updatedBy = str_replace('*', '%', $updatedBy);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(PlanPeer::UPDATED_BY, $updatedBy, $comparison);\n }", "public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($updatedBy)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $updatedBy)) {\n $updatedBy = str_replace('*', '%', $updatedBy);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(TbprofessorPeer::UPDATED_BY, $updatedBy, $comparison);\n }", "public function filterByUpdatedBy($updatedBy = null, $comparison = null)\n {\n if (null === $comparison) {\n if (is_array($updatedBy)) {\n $comparison = Criteria::IN;\n } elseif (preg_match('/[\\%\\*]/', $updatedBy)) {\n $updatedBy = str_replace('*', '%', $updatedBy);\n $comparison = Criteria::LIKE;\n }\n }\n\n return $this->addUsingAlias(TbofertaPeer::UPDATED_BY, $updatedBy, $comparison);\n }", "public function filterByupdated($updated = null, $comparison = null)\n {\n if (is_array($updated)) {\n $useMinMax = false;\n if (isset($updated['min'])) {\n $this->addUsingAlias(UserTableMap::COL_USER_UPDATED, $updated['min'], Criteria::GREATER_EQUAL);\n $useMinMax = true;\n }\n if (isset($updated['max'])) {\n $this->addUsingAlias(UserTableMap::COL_USER_UPDATED, $updated['max'], Criteria::LESS_EQUAL);\n $useMinMax = true;\n }\n if ($useMinMax) {\n return $this;\n }\n if (null === $comparison) {\n $comparison = Criteria::IN;\n }\n }\n\n return $this->addUsingAlias(UserTableMap::COL_USER_UPDATED, $updated, $comparison);\n }", "public function scopeUpdatedBy($query,$user)\n {\n\t\t$authModel = config('auth.providers.users.model');\n\t\tif($user instanceof $authModel){\n\t\t\t$user = $user->getAuthIdentifier();\n\t\t}elseif($user instanceof Model){\n\t\t\t$user = $user->getKey();\n\t\t}\n return $query->where($this->getUpdatedByColumn(),$user);\n }", "public function setUpdatedBy($value);", "public function set_update_by($_update_by)\n {\n $this->_update_by = $_update_by;\n\n return $this;\n }", "public function scopeUpdatedByUser($query,$userId)\n {\n return $query->where('updated_by',$userId);\n }", "protected function updateFilter()\n {\n return $this->update->data()->only($this->update->columns()->all())->all();\n }", "public function getUpdatedBy()\r\n\t{\r\n\r\n\t\treturn $this->updated_by;\r\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Makes parser parse specific token
protected function parse_token($token, $parser) { $constant = $this->major_code_for($token); // Note that this comment added to hint types for IDE. /** @var block_formal_langs_parser_cpp_language $parser */ $parser->doParse($constant, $token); }
[ "public function parse(string $token): Token\n {\n }", "abstract protected function nextToken();", "abstract public function nextToken();", "public function getToken() {\n\t\t$this->token = $this->lexer->get ();\n\t}", "private function nextToken()\r\n {\r\n $symbol = $this->lookahead;\r\n $token = ['value' => $symbol];\r\n //input overflow\r\n if ($this->position >= $this->length)\r\n throw new DParseException(\"Unexpected end of input.\");\r\n //check if symbol is numeric\r\n if (is_numeric($symbol))\r\n {\r\n //fetch number and set token type to number\r\n $number = $this->fetchNumber();\r\n $token['type'] = 'number';\r\n $token['value'] = $number['value'];\r\n //add number length to position\r\n $this->position += $number['length'];\r\n }\r\n //then it's operator\r\n else if (array_key_exists($symbol, $this->operators))\r\n {\r\n $token['type'] = 'operator';\r\n $token['precedence'] = $this->operators[$symbol]['precedence'];\r\n }\r\n //if it's neither, then throw exception\r\n else\r\n throw new DParseException(\"Wrong symbol '{$symbol}'' at position {$this->position}.\");\r\n\r\n return $token;\r\n }", "protected static function parseOption($token)\n {\n\n }", "public abstract function process_token($stackPtr);", "function get_token(){\n global $token;\n global $identifier;\n global $array_stream;\n global $key_val;\n global $keywords;\n\n global $c_commentary;\n\n $token_end = True;\n $token_type = tokenType::start;\n init_token();\n\n while($token_end){\n /**\n * @warning end of Array works only for PHP7.3!!!!\n */\n if($key_val === array_key_last($array_stream)){\n $token->last = False;\n if($token->data !== PHP_EOL){\n $token->type = tokenType::EOL;\n $token_end = False;\n }\n }\n /* State automaton for lexical analysis combined with usage of regular expressions */\n switch ($token_type) {\n case tokenType::start:\n {\n if($array_stream[$key_val] === \".\"){ //header dection\n $token_type = tokenType::header;\n break;\n }\n elseif($array_stream[$key_val] === \"@\"){ //at mark detected\n $token->data = $array_stream[$key_val];\n $token->type = tokenType::marker;\n identify_operand();\n preset_label();\n $key_val++;\n $token_end = False;\n break;\n }\n elseif($array_stream[$key_val] === \"#\"){ //start of commentary\n $token_type = tokenType::commentary;\n break;\n }\n elseif($array_stream[$key_val] === PHP_EOL){ //EOL detected\n $token_type = tokenType::EOL;\n break;\n }\n elseif($array_stream[$key_val] === \"\\t\" || $array_stream[$key_val] === \" \"){ //white spaces before instruction/commentary\n $key_val++;\n preset_identifier();\n }\n elseif(ctype_alpha($array_stream[$key_val]) || ctype_digit($array_stream[$key_val]) || preg_match(\"/^_|\\-|\\$|&|%|\\*|!|\\?$/\", $array_stream[$key_val])){ //var/string/int catch\n $token_type = tokenType::charStream;\n break;\n }\n else {\n fwrite(STDERR, \"ERROR : Input doesn't start with .IPPcode19 header\\n\");\n exit(21);#appropriate exit code\n }\n break;\n }\n case tokenType::header:\n {\n /* Load header in loop, until new line space or commentary right after header */\n while(1){\n if($array_stream[$key_val] === PHP_EOL || preg_match(\"/^[ \\t#]$/\",$array_stream[$key_val]) || $key_val === array_key_last($array_stream)){\n if(preg_match(\"/^.ippcode19$/\", strtolower($token->data))){\n $token->type = tokenType::header;\n $token_end = False;\n break;\n }\n else {\n fwrite(STDERR,\"ERROR : Innapropriate header detected\\n\");\n exit(21);//no ippcode header;\n }\n }\n $token->data .= $array_stream[$key_val];\n $key_val++;\n }\n break;\n }\n /* Creates EOL token */\n case tokenType::EOL:\n {\n $token->data = $array_stream[$key_val];\n $token->type = tokenType::EOL;\n $key_val++;\n preset_identifier();\n preset_label();\n $token_end = False;\n break;\n }\n /* Catches commentary, all character are trimmed until EOL*/\n case tokenType::commentary:\n {\n while($array_stream[$key_val] !== PHP_EOL)\n {\n if($key_val === array_key_last($array_stream)) break;\n $key_val++;\n }\n $c_commentary++;\n $token_type = tokenType::EOL;\n break;\n }\n /* string/int or var stream stored into token */\n case tokenType::charStream:\n {\n while(1){\n if(preg_match(\"/^[ \\t@]$/\",$array_stream[$key_val])){\n $token_type = tokenType::identifyStream;\n break;\n }\n elseif($array_stream[$key_val] === PHP_EOL || $array_stream[$key_val] === \"#\"){ //read until newline or commentary start\n $token_type = tokenType::identifyStream;\n break;\n }\n elseif($key_val === array_key_last($array_stream)){ //read until EOF and add last character to token\n $token->data .= $array_stream[$key_val];\n $token_type = tokenType::identifyStream;\n break;\n }\n $token->data .= $array_stream[$key_val];\n $key_val++;\n }\n break;\n }\n case tokenType::identifyStream:\n {\n if(preg_match(\"/^[a-zA-Z_\\-\\$&%\\*!?][a-zA-Z_\\-\\$&%\\*!?0-9]*$/\", $token->data)){ //matching the identifier\n $token->type = tokenType::identifier;\n foreach ($keywords as $key => $value) { //searching for keyword\n $match_pattern = \"/\\b\" . \"$value\" . \"\\b/i\";\n if(preg_match($match_pattern, strtolower($token->data))){\n $token->type = $key + 110;\n if(preg_match(\"/^(bool)|(int)|(string)|(nil)|(gf)|(lf)|(tf)$/\", $token->data)){\n identify_operand();\n }\n break;\n }\n }\n isset_identif();\n $token_end = False;\n break;\n }\n if(preg_match(\"/^[+|-]?[0-9]*$/\", $token->data)){ //matching numbers //^[+|-]?[1-9][0-9]*|[+|-][0]|[0]$\n $token->type = tokenType::number;\n $token_end = False;\n break;\n }\n /* Match for string literal - all unicode numbers and escape sequences */\n elseif(preg_match(\"/^([\\x{0024}-\\x{005B}]|[\\x{0021}\\x{0022}]|[\\x{005D}-\\x{FFFF}]|[ěščřžýáíéóúůďťňĎŇŤŠČŘŽÝÁÍÉÚŮa-zA-Z0-9]|([\\\\\\\\][0-9]{3})?)*$/\", $token->data)){ //^([ěščřžýáíéóúůďťňĎŇŤŠČŘŽÝÁÍÉÚŮa-zA-Z0-9]|([\\\\\\\\][0-9]{3})?)*$\n $token->type = tokenType::stringStream;\n $token_end = False;\n }\n else {\n fwrite(STDERR,\"ERROR : LEX : detected lexical error in: $token->data\\n\");\n exit(23);\n }\n break;\n }\n\n default:\n break;\n }\n }\n }", "public function setToken();", "public function fromTokenString(string $token): TokenInterface;", "public function parse(array $tokenStruct);", "public function handleText(&$token) {}", "private function buildRuleToken(bool $buildRule = true)\n {\n $tokenType = $buildRule ? TokenRule::class : TokenSubRule::class;\n\n // 1. read Identifier lexeme\n $this->skipSpaces();\n try {\n $this->expect(\":\");\n } catch (UnexpectedCharacter $e) {\n throw new NotLexeme($this->pos);\n }\n\n $idLexeme = $this->expect(self::PATTERN_IDENTIFIER);\n try {\n $this->expect('\\?');\n $tokenType = TokenNullableRule::class;\n } catch (UnexpectedCharacter $e) {\n //\n } finally {\n if (($tokenType === TokenNullableRule::class)) {\n if (!$buildRule) $this->fail();\n if ($this->strategy & self::STRATEGY_DISABLE_NULLABLE) $this->fail();\n }\n }\n\n $token = call_user_func([$tokenType, 'make'], $idLexeme, []);\n\n // 2. read optional Arguments lexeme\n try {\n if ($this->cur() !== \"(\") return $token;\n } catch (Eof $e) {\n return $token;\n }\n\n $this->expect(\"\\(\");\n $this->skipSpaces();\n\n $expectArgument = true;\n\n while (\n [$matchedPattern, $lexeme] = $this->expectAny([\n \"\\)\",\n \",\",\n '\"',\n \"'\",\n self::PATTERN_NUMBER,\n ])\n ) {\n switch ($matchedPattern) {\n case \"\\)\":\n if ($expectArgument) $this->fail();\n return $token;\n case \",\":\n if ($expectArgument) $this->fail();\n $this->skipSpaces();\n $expectArgument = true;\n break;\n case '\"':\n case \"'\":\n if (!$expectArgument) $this->fail();\n $lexeme = $this->readStringLiteralUntil($matchedPattern);\n $token = call_user_func(\n [$tokenType, 'make'],\n $token->name(),\n array_merge($token->arguments(), [$lexeme])\n );\n $expectArgument = false;\n break;\n case self::PATTERN_NUMBER:\n if (!$expectArgument) $this->fail();\n //convert the number to proper type\n $number = (float)$lexeme;\n if ($number == intval($number)) $number = intval($number);\n\n $token = call_user_func(\n [$tokenType, 'make'],\n $token->name(),\n array_merge($token->arguments(), [$number])\n );\n $expectArgument = false;\n break;\n default:\n $this->fail();\n }\n }\n }", "public static function resolveSimpleToken($token)\n {\n $newToken = [];\n\n switch ($token) {\n case '{':\n $newToken['type'] = 'T_OPEN_CURLY_BRACKET';\n break;\n case '}':\n $newToken['type'] = 'T_CLOSE_CURLY_BRACKET';\n break;\n case '[':\n $newToken['type'] = 'T_OPEN_SQUARE_BRACKET';\n break;\n case ']':\n $newToken['type'] = 'T_CLOSE_SQUARE_BRACKET';\n break;\n case '(':\n $newToken['type'] = 'T_OPEN_PARENTHESIS';\n break;\n case ')':\n $newToken['type'] = 'T_CLOSE_PARENTHESIS';\n break;\n case ':':\n $newToken['type'] = 'T_COLON';\n break;\n case '.':\n $newToken['type'] = 'T_STRING_CONCAT';\n break;\n case ';':\n $newToken['type'] = 'T_SEMICOLON';\n break;\n case '=':\n $newToken['type'] = 'T_EQUAL';\n break;\n case '*':\n $newToken['type'] = 'T_MULTIPLY';\n break;\n case '/':\n $newToken['type'] = 'T_DIVIDE';\n break;\n case '+':\n $newToken['type'] = 'T_PLUS';\n break;\n case '-':\n $newToken['type'] = 'T_MINUS';\n break;\n case '%':\n $newToken['type'] = 'T_MODULUS';\n break;\n case '^':\n $newToken['type'] = 'T_BITWISE_XOR';\n break;\n case '&':\n $newToken['type'] = 'T_BITWISE_AND';\n break;\n case '|':\n $newToken['type'] = 'T_BITWISE_OR';\n break;\n case '~':\n $newToken['type'] = 'T_BITWISE_NOT';\n break;\n case '<':\n $newToken['type'] = 'T_LESS_THAN';\n break;\n case '>':\n $newToken['type'] = 'T_GREATER_THAN';\n break;\n case '!':\n $newToken['type'] = 'T_BOOLEAN_NOT';\n break;\n case ',':\n $newToken['type'] = 'T_COMMA';\n break;\n case '@':\n $newToken['type'] = 'T_ASPERAND';\n break;\n case '$':\n $newToken['type'] = 'T_DOLLAR';\n break;\n case '`':\n $newToken['type'] = 'T_BACKTICK';\n break;\n default:\n $newToken['type'] = 'T_NONE';\n break;\n }//end switch\n\n $newToken['code'] = constant($newToken['type']);\n $newToken['content'] = $token;\n\n self::$resolveTokenCache[$token] = $newToken;\n return $newToken;\n\n }", "private function parse_particular_command_tokens() {\n\t\t$matches = null;\n\t\tforeach ($this->parsed_command_tokens as $index => &$command_token) {\n\t\t\tif ($command_token['recognized']) {\n\t\t\t\tpreg_match($this->hash_token_dialect['tokens'][$command_token['token']]['pattern'],$this->statement_text,$matches);\n\t\t\t\t$command_token['subject'] = $matches[$this->hash_token_dialect['tokens'][$command_token['token']]['subject_index']];\n\t\t\t}\n\t\t}\t\n\t}", "private function setToken() {\n $this->tokenText = substr($this->sql_string, $this->tokenStart, $this->tokenLength);\n $this->tokenStart = $this->tokenPointer;\n $this->skipText = substr($this->sql_string, $this->tokenAbsStart, $this->tokenStart - $this->tokenAbsStart);\n }", "public function handleText(&$token)\n {\n }", "public function setToken($token);", "function handleToken()\n {\n $this->debug('handling token ' . $this->matchedToken['token'] . ' [' . $this->matchedToken['match'] . ']');\n switch ($this->token()) {\n case 'T_COLOR_DEFAULT':\n case 'T_COLOR':\n $this->stackPop();\n $this->stackPush();\n break;\n\n case 'T_UNDERLINE_START':\n case 'T_ITALICS_START':\n case 'T_BOLD_START':\n $this->stackPush();\n break;\n\n case 'T_UNDERLINE_END':\n case 'T_ITALICS_END':\n case 'T_BOLD_END':\n $this->stackPop();\n break;\n\n case 'T_NEWLINE':\n $this->converted_html .= '<br />';\n break;\n\n case 'T_TEXT':\n $this->converted_html .= $this->matchedToken['match'];\n break;\n\n case 'T_ESCAPE_BACKSLASH':\n $this->converted_html .= '\\\\';\n break;\n\n CASE 'T_ESCAPE_OPENBRACE':\n $this->converted_html .= '{';\n break;\n\n CASE 'T_ESCAPE_CLOSEBRACE':\n $this->converted_html .= '}';\n break;\n }\n $this->debug(\"after handling token we have: \\n\" . $this->converted_html);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Listar algunos Tarea dado $tareaDescripcion
public function listTareasByTareaDescripcion($tareaDescripcion, $performSize = false, $firstResultNumber = null, $numResults = null, $orderBy = null, $orderPriority = SQL_ASCENDING_ORDER){ # Validamos los campos if($firstResultNumber !== null && !EntityValidator::validatePositiveNumber($firstResultNumber)){ throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 11); } if(!EntityValidator::validateGlobalOrderPriority($orderPriority)){ throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 13); } if( !(EntityValidator::validateString($tareaDescripcion))){ throw new Exception(SALAS_COMP_ALERT_E_VALIDATION_FAIL, $this->ID + 15); } # Listamos las entidades if($performSize){ $this->lastRequestSize = $this->tareaBean->countGetTareasByTareaDescripcion($tareaDescripcion); } return TareaDTO::loadFromEntities($this->tareaBean->listTareasByTareaDescripcion($tareaDescripcion, $firstResultNumber, $numResults, $orderBy, $orderPriority)); }
[ "public function Listar()\n {\n $tareas = $this->model->GetTareas();\n\n // En un planteamiento real puede que incluyesemos más cosas\n $this->Ver('Listado de tarea', CargaVista('listar', array('tareas'=>$tareas)));\n }", "public function Listar()\n { \n $array = $this->model->GetTareas();\n $pags = $this->model->NumPag();\n $this->Ver('Listado de tareas',\n CargaVista('VistaListar', array(\n 'list'=>$array, 'pags'=>$pags)));\n }", "public static function listaTareas()\n {\n $consulta = DbConnect::conexion()->prepare(\n \"SELECT id, nombre, descripcion FROM tareas WHERE activo = 1\"\n );\n\n $consulta->execute();\n\n return $consulta->fetchAll();\n }", "public function listaTareas() {\n $connection = Yii::app()->db;\n $userId = Yii::app()->user->getId();\n $diariaNo = Tarea::DIARIANO;\n $sql = \"SELECT CONCAT(CONVERT(COUNT(*), CHAR), ' Tareas') AS \\\"title\\\",\"\n . \" DATE(fecha_inicio) AS \\\"start\\\", \"\n . \" DATE(fecha_inicio) AS \\\"end\\\" \"\n . \" FROM tarea \"\n . \" WHERE id_usuario = {$userId} \"\n . \" AND diaria = '{$diariaNo}'\"\n . \" GROUP BY DATE(fecha_inicio)\";\n $command = $connection->createCommand($sql);\n $dataReader = $command->query();\n $rows = $dataReader->readAll();\n return $rows;\n }", "public function listarTareas(){\n\t$sql=\"\";\n\treturn ejecutarConsulta($sql);\n}", "function detaTareas($id_listarea){\n\n\t\t$this->db->select('tbl_listarea.id_listarea,\n\t\t\t\t\t\t\ttbl_listarea.id_orden,\n\t\t\t\t\t\t\ttareas.duracion_std,\n\t\t\t\t\t\t\ttbl_listarea.tareadescrip,\n\t\t\t\t\t\t\ttbl_listarea.id_tarea,\n\t\t\t\t\t\t\ttbl_listarea.id_usuario,\n\t\t\t\t\t\t\ttbl_listarea.estado,\n\t\t\t\t\t\t\ttbl_listarea.fecha');\n\t\t$this->db->from('tbl_listarea');\n\t\t$this->db->join('tareas', 'tareas.id_tarea = tbl_listarea.id_tarea');\n\t\t$this->db->where('tbl_listarea.id_listarea', $id_listarea);\n\t\t$query = $this->db->get();\n\n\t\tif ($query->num_rows()!=0){\n\t\t\t\treturn $query->result_array();\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t }", "function detaTareas($id_listarea){\r\n\r\n\t \t$this->db->select('tbl_listarea.id_listarea,\r\n\t\t\t\t\t\t\ttbl_listarea.id_orden,\r\n\t\t\t\t\t\t\ttareas.duracion_std,\r\n\t\t\t\t\t\t\ttbl_listarea.tareadescrip,\r\n\t\t\t\t\t\t\ttbl_listarea.id_tarea,\r\n\t\t\t\t\t\t\ttbl_listarea.id_usuario,\r\n\t\t\t\t\t\t\ttbl_listarea.estado,\r\n\t\t\t\t\t\t\ttbl_listarea.fecha');\r\n\t \t$this->db->from('tbl_listarea');\r\n\t\t$this->db->join('tareas', 'tareas.id_tarea = tbl_listarea.id_tarea');\r\n\t\t$this->db->where('tbl_listarea.id_listarea', $id_listarea);\r\n\t\t$query = $this->db->get();\r\n\r\n\t\tif ($query->num_rows()!=0){\r\n\t \t\treturn $query->result_array();\r\n\t \t}else{\r\n\t \t\treturn false;\r\n\t \t}\r\n\t}", "public function traerTodo(){\r\n\t\t$this->db->order_by('creacion','asc');\r\n\t\t$tareas = $this->db->get('cattarea')->result();\r\n\r\n\t\tforeach($tareas as $tarea){\r\n\t\t\t$this->parseForeignKeys($tarea);\r\n\t\t}\r\n\r\n\t\treturn $tareas;\t\t\r\n\t}", "public function getListaTipoTarjeta()\r\n\t\t{\r\n\t\t\t$model = self::getTipoTarjeta();\r\n\t\t\treturn $lista = ArrayHelper::map($model, 'tipo_tarjeta', 'descripcion');\r\n\t\t}", "public function tareasEnDesarrollo(){\n\n $listaAsignaciones = $this->asignacion;\n $Tareas = [];\n foreach ($listaAsignaciones as $asignacion) {\n if (strtolower($asignacion->tarea->estado_tarea->Nombre_estado_tarea) != strtolower('Aprobada')) {\n if (strtolower($asignacion->Responsabilidad) == strtolower('Responsable')) {\n $Tareas[] = $asignacion;\n }\n }\n }\n return $Tareas; //Todas las tareas que estan en estado asignada o en desarrollo que fueron asignadas a este personal\n }", "public function listarContato(){}", "function getTareasTutor($mysqli,$tutor){ //Sin comprobar\n // $usuario=getUsuario($mysqli,$tutor);\n\n // $cod_usuario = $usuario['cod_usuario'];\n\n $sql=\"SELECT * FROM TAREA T inner join USUARIO U on (T.realiza=U.cod_usuario) WHERE T.crea='$tutor' ORDER BY T.realizada, T.corregida\";\n \n $res = $mysqli->query($sql);\n\n $resultado = array();\n\n if ($res->num_rows > 0) {\n while($row = $res->fetch_array()) {\n $resultado[] = $row;\n }\n }\n\n return $resultado;\n }", "protected function armaLista($id_carac,$titulo,$lista,$contenido,$ancho) {\r\n\t\t$array=split(';',$lista);\r\n\t\t$campo='l_'.$id_carac;\r\n\t\t$ancho-=20;\r\n\t\tprint \"<td class='cd_celda_texto' width='15%'>$titulo</td>\";\r\n\t\tprint \"<td width='\".$ancho.\"%'>\";\r\n\t\tprint \"<select name='\".$campo.\"' id='\".$campo.\"' class='campos'>\\n\";\r\n\t\tfor ($pos=0;$pos<sizeof($array);$pos++) {\r\n\t\t\tprint \"<option value='\".$array[$pos].\"'\";\r\n\t\t\tif ($array[$pos]==$contenido) {\r\n\t\t\t\tprint \" SELECTED \";\r\n\t\t\t}\r\n\t\t\tprint \">\".$array[$pos].\"</option>\\n\";\r\n\t\t}\r\n\t\tprint \"</select>\\n\";\r\n\t\tprint \"</td>\\n\";\r\n\t}", "function getDatosTarea($nombre){\n\t\t$this->db->where('descripcion',$nombre);\n\t\treturn $this->db->get('tareas')->result_array()[0];\n\t}", "public function mostrarTeatros(){\n /**\n * @var object $objTeatro\n * @var array $colTeatro\n * @var string $strTeatros\n */\n $objTeatro=new Teatro();\n $colTeatro=$objTeatro->listar();\n $strTeatros=\"Teatros: \\n\";\n foreach($colTeatro as $teatro){\n $strTeatros.=\"* \\n\".$teatro;\n }\n return $strTeatros;\n }", "public function listaTipoMovimiento(){\n\t\t\t$sql = self::conectardb()->prepare(\"SELECT * FROM tipomovimiento\");\n\t\t\t$sql->execute();\n\t\t\techo \"<option id='e' value='0'>Seleccionar movimiento</option>\";\n\t\t\tforeach ($sql as $val) \n\t\t\t\techo \"<option value='$val[0]'>$val[1]</option>\";\n\t\t}", "function leer_lista_tipos() {\n\tglobal $modulos, $db;\n\t\n\t$select = procesaSql(\"SELECT * FROM #_tipocaracteristica ORDER BY descripcion\");\n\t$tipos = $modulos->db->query($select);\n\t\n\tcabeceraXML();\n\techo \"<tipos>\\r\\n\";\n\t$error = '';\n\tif (PEAR::isError($tipos)) {\n\t} else {\n\t\tif ($tipos->numRows()) {\n\t\t\twhile ($tipo = $tipos->fetchRow()) {\n\t\t\t\techo \"<tipo id='\".$tipo['id'].\"' descripcion='\".htmlspecialchars($tipo['descripcion'], ENT_QUOTES).\"' />\\r\\n\";\n\t\t\t}\t\n\t\t}\n\t}\n\techo \"</tipos>\\r\\n\";\n}", "function getTareasPlantillas($idPlantilla){\n\t\t\n\t\t$this->db->select('tareas.id_tarea,\n\t\t\t\t\t\t\ttareas.descripcion\n\t\t\t\t\t\t\t');\n\t\t$this->db->from('tbl_listplantilla');\n\t\t$this->db->join('plantilla', 'tbl_listplantilla.id_plantilla = plantilla.id_plantilla');\n\t\t$this->db->join('tareas', 'tbl_listplantilla.id_tarea = tareas.id_tarea');\n\t\t$this->db->where('plantilla.id_plantilla', $idPlantilla);\n\t\t$query = $this->db->get();\n\t\t\n\t\tif($query->num_rows()>0){\n return $query->result_array();\n }\n else{\n return false;\n }\n\t}", "public function getAllTiposRegistro() {\n $data = $this->getDoctrine()\n ->getRepository(tipo_registro::class)\n ->findAll();\n\n $tipo_registro = [];\n foreach ($data as $d) {\n $tipo_registro[] = $d->getDescription();\n }\n\n return $tipo_registro;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test case for createAccount with privateKey
public function testCreateAccountWithPrivateKey() { $response = $this->api->createAccount(null, "302e020100300506032b6570042204202c0ef9b2d169bf52333bf4f4ec00f429515a4ccc555245fe5242e83667c9a5e1"); $this->assertTrue($response->getSuccess()); $this->assertEquals("0x56ac912151f811714b3833c81997d0286fc5c5f7", $response->getResult()); }
[ "public function createWallet($account);", "public function generate_private_key($account_id);", "public function testCreateAccount()\n {\n $account = Account::make(['owner' => 'test']);\n $created = $this->service->create($account);\n $this->assertTrue($created);\n }", "public function exportPrivateKey(PrivateKeyInterface $privateKey, $password = '');", "public function setPrivateKey($privateKey);", "public function testCreateBankAccount()\n {\n }", "public function testCreateKey(): void\n {\n $apiKey = $this->createApiManager(\n [\n 'created_at' => '2019-02-25T23=>36=>48Z',\n 'key' => 'PNYH33ZHKVX3HBAT',\n 'target_user' => [\n 'created_at' => '2019-02-24T23=>34=>11Z',\n 'email' => 'examples@user.test',\n 'id' => 'external-user-ids',\n 'updated_at' => '2019-02-24T23=>34=>11Z',\n ],\n 'updated_at' => '2019-02-25T23=>36=>48Z',\n 'user' => [\n 'created_at' => '2019-02-12T22=>08=>30Z',\n 'email' => 'payments@eoneopay.com',\n 'updated_at' => '2019-02-12T22=>08=>30Z',\n ],\n ],\n 201\n )\n ->create(\n (string)\\getenv('PAYMENTS_API_KEY'),\n new ApiKey(['user' => new User(['id' => 'external-user-id'])])\n );\n\n self::assertIsString(($apiKey instanceof ApiKey) ? $apiKey->getKey() : null);\n self::assertInstanceOf(User::class, ($apiKey instanceof ApiKey) ? $apiKey->getUser() : null);\n }", "public function testApiKeyCanBeCreatedForAccount()\n {\n /** @var \\Pterodactyl\\Models\\User $user */\n $user = User::factory()->create();\n\n // Small sub-test to ensure we're always comparing the number of keys to the\n // specific logged in account, and not just the total number of keys stored in\n // the database.\n ApiKey::factory()->times(10)->create([\n 'user_id' => User::factory()->create()->id,\n 'key_type' => ApiKey::TYPE_ACCOUNT,\n ]);\n\n $response = $this->actingAs($user)->postJson('/api/client/account/api-keys', [\n 'description' => 'Test Description',\n 'allowed_ips' => ['127.0.0.1'],\n ]);\n\n $response->assertOk();\n\n /** @var \\Pterodactyl\\Models\\ApiKey $key */\n $key = ApiKey::query()->where('identifier', $response->json('attributes.identifier'))->firstOrFail();\n\n $response->assertJson([\n 'object' => 'api_key',\n 'attributes' => [\n 'identifier' => $key->identifier,\n 'description' => 'Test Description',\n 'allowed_ips' => ['127.0.0.1'],\n 'last_used_at' => null,\n 'created_at' => $key->created_at->toIso8601String(),\n ],\n 'meta' => [\n 'secret_token' => decrypt($key->token),\n ],\n ]);\n }", "public function testRegisterWithExistingRsaKey():void\n {\n\n // Delete if exists\n if ($user = User::loadUsername('test-with-rsa')) { \n $profiles = $this->cntr->make(UserProfiles::class);\n $profiles->remove($user);\n }\n\n // Set input args\n $inputs = [\n 'test-with-rsa',\n 'test-with-rsa@apexpl.io',\n 'password12345',\n 'password12345',\n '',\n 'CA',\n 'Alberta',\n 'Edmonton',\n 'Test With Key',\n 'Dev Team',\n 'test-with-rsa@apexpl.io',\n true,\n '',\n 'testman',\n true\n ];\n\n // Create user\n $res = $this->apex('account register', $inputs);\n $this->assertStringContainsString('Signing Certificate', $res);\n $this->assertStringContainsString('The following distinguished names have been found:', $res);\n $this->assertStringContainsString('The following private keys have been found:', $res);\n $this->assertStringContainsString('Registration Successful', $res);\n\n // Check account\n $fixture = $this->cntr->make(AccountFixture::class);\n $fixture->checkRegister('test-with-rsa', 'test-with-rsa@apexpl.io');\n }", "public function testClientBankAccountCreate()\n {\n // TODO: implement\n $this->markTestIncomplete('Not implemented');\n }", "public function test_create_an_interest_account()\n {\n $id = UUID::v4();\n $income = 499999.0;\n $interestRate = 1.02;\n $statusAccount = \"ACTIVE\";\n\n $user = $this->subject->execute(new OpenAccountCommand($id));\n\n $this->assertEquals($id, $user[\"user\"][\"id\"]);\n $this->assertEquals($income, $user[\"user\"][\"income\"][\"value\"]);\n $this->assertEquals($id, $user[\"user\"][\"account\"][\"referenceId\"]);\n $this->assertEquals($statusAccount, $user[\"user\"][\"account\"][\"status\"]);\n $this->assertEquals($interestRate, $user[\"user\"][\"account\"][\"interestRate\"][\"annualRate\"]);\n }", "public function createUser($accountName, $password1, $password2);", "public function testUseMerchantPrivateKey()\n {\n // Prepare / Mock\n $key = file_get_contents($this->getPrivateKeyPath());\n\n // Execute\n $result = $this->testObject->useMerchantPrivateKey($key);\n\n // Assert Result\n self::assertTrue($result);\n }", "public function testAccessAccessManagementServiceCreateAccessKey()\n {\n\n }", "public function testRegisterAccountIdentifier1()\n {\n }", "public function testCreateCredential()\n {\n }", "public function testCreatingNewAccount()\n {\n\t\t/** @var NostoAccount $account */\n\t\t/** @var NostoAccountMetaData $meta */\n\t\t$meta = new NostoAccountMetaData();\n\t\t$account = NostoAccount::create($meta);\n\n\t\t$this->specify('account was created', function() use ($account, $meta) {\n\t\t\t$this->assertInstanceOf('NostoAccount', $account);\n\t\t\t$this->assertEquals($meta->getPlatform() . '-' . $meta->getName(), $account->name);\n\t\t});\n\n\t\t$this->specify('account has api token sso', function() use ($account, $meta) {\n\t\t\t$token = $account->getApiToken('sso');\n\t\t\t$this->assertInstanceOf('NostoApiToken', $token);\n\t\t\t$this->assertEquals('sso', $token->name);\n\t\t\t$this->assertNotEmpty($token->value);\n\t\t});\n\n\t\t$this->specify('account has api token products', function() use ($account, $meta) {\n\t\t\t$token = $account->getApiToken('products');\n\t\t\t$this->assertInstanceOf('NostoApiToken', $token);\n\t\t\t$this->assertEquals('products', $token->name);\n\t\t\t$this->assertNotEmpty($token->value);\n\t\t});\n\n\t\t$this->specify('account is connected to nosto', function() use ($account, $meta) {\n\t\t\t$this->assertTrue($account->isConnectedToNosto());\n\t\t});\n }", "public function testGetUserKeyPair()\n {\n }", "public function testRegisterAccountIdentifier()\n {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Disables debug mode for the emitter If deleteLocal is true it will also empty the local cache of stored request codes and the associated payloads. Will then trigger a function in the base emitter class to clean out the physical debug records.
public function turnOffDebug($deleteLocal) { $this->debug = false; if ($deleteLocal) { $this->requests_results = array(); } // Switch Debug off in Base Emitter Class $this->debugSwitch($deleteLocal); }
[ "public function disable_debug() {\n $this->debug = $this->handler->debug = FALSE;\n }", "public function disableDebug();", "function DebugOff() {\n $this->debug = false;\n }", "public function disableDebug() {}", "public function disableDebug() {\n \t$this->debug = false;\n }", "public function disableDebug(){\n if( ! $this->debug ) return;\n $this->debug = NULL;\n }", "public static function setDebugOff() {\r\n self::$debug = false;\r\n }", "public function reset_debug()\n {\n $this->flag_debug = 0;\n }", "function turnOffDebugMode()\n {\n $this->debugmode = false;\n }", "function debugOff()\n\t{\n\t\t$this->bDebug = false;\n\t}", "function debugOff()\r\n\t{\r\n\t\t$this->bDebug = false;\r\n\t}", "public function clearDebugFlag() \n\t{\n\t\t$this->debugFlag = false;\n\t}", "public function disableDebugMode() {\n $this->debug_mode = FALSE;\n }", "function TrOff()\n {\n global $g_pcl_trace_level;\n global $g_pcl_trace_mode;\n global $g_pcl_trace_filename;\n global $g_pcl_trace_name;\n global $g_pcl_trace_index;\n\n // ----- Clean\n $g_pcl_trace_mode = \"memory\";\n unset($g_pcl_trace_entries);\n unset($g_pcl_trace_name);\n unset($g_pcl_trace_index);\n\n // ----- Switch off trace\n $g_pcl_trace_level = 0;\n }", "function resetDebug()\n{\n $this->flag_debug = 0;\n}", "function clearDebug() {\n\t\t// it would be nice to use a memory stream here to use\n\t\t// memory more efficiently\n\t\t$this->debug_str = '';\n\t}", "function stop_debugging(){\n\tglobal $debugging;\n\tglobal $log_ref;\n\tif($debugging){\n\t\tfclose($log_ref);\n\t}\n}", "function clearDebugBuffer() {\n $this->_debugBuffer = '';\n }", "public function devTwigDebugDisable() {\n $this->devConfigWriteable();\n $this->taskReplaceInFile($this->services_yml)\n ->from('debug: true')\n ->to('debug: false')\n ->run();\n $this->taskReplaceInFile($this->services_yml)\n ->from('auto_reload: true')\n ->to('auto_reload: null')\n ->run();\n $this->taskReplaceInFile($this->services_yml)\n ->from('c: false')\n ->to('cache: true')\n ->run();\n $this->devConfigReadOnly();\n $this->say('Clearing Drupal cache...');\n $this->devCacheRebuild();\n $this->say('Done. Twig debugging has been disabled');\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
function to get assesment param Ctegory from id
function GetCatNameId($connection,$id){ $query= $connection->query("SELECT * FROM assessment_params_category WHERE aspcat_id ='$id'") ; while ($row = $query->fetch()) { $name = $row['aspcat_name']; return("$name"); } }
[ "function get_use_category_on_tpl($section_id, $cate_id) {\n\n $itg_query = db_select('itg_layout_tpl', 'layout_tpl');\n $itg_query->fields('layout_manager', array('filter_url'));\n $itg_query->join('itg_layout_manager', 'layout_manager', 'layout_tpl.id = layout_manager.layout_id');\n $itg_query->condition('layout_tpl.section_name', $section_id);\n $itg_query->condition('layout_manager.filter_url', $cate_id);\n $itg_query->orderBy('layout_tpl.id', 'DESC');\n $itg_query->range(0, 1);\n $id = $itg_query->execute()->fetchField();\n\n\n// $query = db_select('itg_layout_manager', 'layout');\n// $query->fields('layout', array('id')); \n// $query->condition('layout_id', $layout_id)\n// ->condition('block_name', $block_name); \n// $id = $query->execute()->fetchField();\n// \n return $id;\n}", "function GetIdCatByIdArt($id){\n $q = \"select * from \".TblModDepartment.\" where 1 and `id`='\".$id.\"'\";\n $res = $this->db->db_Query( $q );\n $rows = $this->db->db_GetNumRows();\n //echo \"<br> q=\".$q.\" res=\".$res.\" rows=\".$rows;\n $row = $this->db->db_FetchAssoc(); \n return $row['category']; \n }", "function get_idC($id){\n $this->DB->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);\n $sql = \"SELECT * FROM carreras where id = ?\";\n $q = $this->DB->prepare($sql);\n $q->execute(array($id));\n $data = $q->fetch(PDO::FETCH_ASSOC);\n return $data;\n }", "public function viewCatagoryById($id){\n $sql=\"SELECT * FROM catagories WHERE cat_id='$id'\";\n $result = $this->conn->query($sql);\n if($result->num_rows > 0)\n {\n \n return $result;\n }\n else\n {\n \n return null;\n }\n }", "public function getCategory($param){\n $query = \"SELECT `id`, `name` FROM `category` WHERE `parentId` = ?\";\n $res = $this->plQuery($query, $param);\n return $res;\n }", "private function getActive(){\n if( isset( $_GET['category_id'] ) ){\n return $_GET['category_id'];\n }\n else{\n return null;\n }\n }", "function getKategoriPerId($id) {\r\n $query = \"SELECT * FROM kategori WHERE id_kategori='$id'\";\r\n return result($query);\r\n}", "function getCompetitionDetailsByCategoryId($comp_id)\n {\n global $db;\n $q = \"SELECT * FROM `competitions` co INNER JOIN `categories` ca \n ON co.category_ID = ca.category_ID\n LEFT JOIN `competition_details` cd ON co.competition_ID = cd.competition_ID WHERE co.competition_ID = :catid AND co.competition_deleted='F'\";\n $s = $db->prepare($q);\n $s->execute(['catid'=>$comp_id]);\n return $s->fetch();\n }", "function getTreeParam($section, $parent_id =0, $price_id, $count, $i_param = 0, $setblock = true) { \n // * Если $parent_id = 0, значит в базе его значение = null\n // Берем только первый тип параметра из данного уровня дерева\n // (а должен быть и так только один, если пользователь корректно задавал параметры)\n $sellist = '';\n $spp = new seTable('shop_price_param', 'spp');\n $spp->select('spp.param_id, sp.nameparam'); \n $spp->innerjoin('shop_param sp', 'spp.param_id = sp.id');\n $spp->where(\"price_id = '?'\", $price_id);\n \n if ($parent_id == 0) {\n $spp->andwhere('spp.parent_id IS NULL');\n } else {\n $spp->andwhere(\"spp.parent_id = '?'\", $parent_id);\n }\n $spp->groupby('param_id');\n $sel_id = 1;\n $paramline = $spp->getlist();\n if (!empty($paramline)) {\n if (($parent_id == 0) && ($i_param == 0)) {\n unset($_SESSION['SHOP_VITRINE']['paramcount'][$price_id]);\n if ($setblock) {\n $sellist .= '<div id=\"prm_' . $section->id . '_' . $price_id . '\">';\n }\n }\n foreach ($paramline as $line) {\n $param_id = $line['param_id']; \n $nameparam = $line['nameparam']; \n if ($parent_id == 0) { \n $sellist .= '<div class=\"paramsLineBlock\">';\n }\n // Список значений для заданного уровня иерархии\n $spp = new seTable('shop_price_param', 'spp');\n $spp->select('id, value, (SELECT COUNT(id) \n FROM `shop_price_param` \n WHERE \n `parent_id` = spp.id) AS `cnt`'); \n $spp->where(\"price_id = '?'\", $price_id);\n if ($parent_id == 0) {\n $spp->andwhere('parent_id IS NULL');\n } else {\n $spp->andwhere(\"parent_id = '?'\", $parent_id);\n }\n $spp->andwhere(\"param_id = '?'\", $param_id);\n $spp->orderby('value');\n $spplist = $spp->getList();\n if (!empty($spplist)) {\n $_SESSION['SHOP_VITRINE']['paramcount'][$price_id][$sel_id]++;\n if ((intval($parent_id) == 0) && ($i_param == 0)) {\n $ni_param = $sel_id * 100;\n } else {\n $ni_param = $i_param;\n $sel_id = floor($ni_param / 100);\n } \n $prm = new plugin_shopparams40(0);\n $selected = ($_SESSION['SHOP_VITRINE']['selected'][$price_id][$sel_id]); // выбранный в предыдущий раз пункт данного селекта\n $selected = $prm->getPreviousParamId($selected, $ni_param - ($sel_id * 100));\n $first_next = false;\n if (count($spplist) > 1) {\n foreach ($spplist as $item) {\n if (($item['cnt'] > 0) && ($selected == $item['id'])) {\n $first_next = true;\n }\n }\n $nameid = ($first_next) ? 'p' . $i_param . '_' . $price_id : 'addcartparam[]';\n $sellist .= '<span class=\"goodsParam\"><span class=\"goodsParamTitle\">' . $nameparam . '</span>\n <select class=\"goodsParamSelect\" name=\"' . $nameid . '\" id=\"p' . $ni_param . '_' . $price_id . '\"';\n $sellist .= ' onChange=\"loadParam(\\'' . $section->id . '\\',' . ($ni_param + 1) . ',' . $price_id . ',this.value);';\n $sellist .= '\">';\n foreach ($spplist as $item) {\n if ($selected == '') { // Если не выбран никакой,\n $selected = $item['id']; // тогда выбираем первый \n }\n if ($selected != $item['id']) {\n $sellist .= '<option value=\"' . $item['id'] . '\">' . trim($item['value']) . '</option>';\n } else {\n $sellist .= '<option selected value=\"' . $item['id'] . '\">' . trim($item['value']) . '</option>';\n if (!$first_next) {\n $_SESSION['SHOP_VITRINE']['selected'][$price_id][$sel_id] = $item['id'];\n }\n } \n }\n $sellist .= '</select><span id=\"p' . $ni_param . '_' . $price_id . 'dots\" style=\"display: none\">\n <img src=\"[module_url]preloader_foto.gif\" width=\"14\" height=\"14\"></span></span>';\n list($sel) = getTreeParam($section, $selected, $price_id, $count, $ni_param + 1); \n // Субселект на первый выбор селекта\n $sellist .= $sel;\n } else {\n $sellist .= '<span class=\"goodsParam\"><span class=\"goodsParamTitle\">' . $nameparam . '</span>';\n foreach ($spplist as $item) {\n $sellist .= '<span class=\"goodsParamValue\"> ' . trim($item['value']) . '</span>';\n $sellist .= '<input type=\"hidden\" name=\"addcartparam[]\" value=\"' . $item['id'] . '\">';\n //$selected = $_SESSION['SHOP_VITRINE']['selected'][$price_id][$sel_id] = $item['id']; \n $selected = $item['id'];\n break;\n }\n $sellist .='</span>';\n list($sel) = getTreeParam($section, $selected, $price_id, $count, $ni_param + 1); \n $sellist .= $sel;\n } \n unset($spp);\n }\n $sel_id++;\n if ($parent_id == 0) { \n $sellist .= '</div>';\n }\n } \n if (($parent_id == 0) && ($i_param == 0) && $setblock) {\n $sellist .= '</div>';\n }\n }\n if ((intval($parent_id) == 0) && !empty($_SESSION['SHOP_VITRINE']['selected'][$price_id])) {\n $paramlist = 'param:' . join(',', $_SESSION['SHOP_VITRINE']['selected'][$price_id]);\n $prm = new plugin_shopparams40($paramlist);\n list($price, $count) = $prm->getRootPrice();\n } \n return array($sellist, $price, $count); \n }", "function getGroupData($params)\n { \n $res = $this->getFlows($params); \n return $res[$params[\"id\"]];\n }", "public function findWithCategoryName($id){\n\n $query = $this->getEntityManager()->createQueryBuilder();\n $query->select('\n e.id,\n e.name,\n e.display_screen,\n e.cat_id,\n f.name as cat_name,\n e.image,\n e.image_position,\n e.banner_type,\n e.description,\n e.sorting,\n e.price_min,\n e.price_max,\n e.disabled,\n e.created_at'\n )\n ->from('LoveThatFitAdminBundle:Banner', 'e')\n ->Join('LoveThatFitAdminBundle:Categories','f')\n ->where('e.cat_id = f.id')\n ->andWhere('e.id = :id')\n ->setParameter('id', $id);\n\n\n try {\n\n return $query->getQuery()->setMaxResults(1)->getResult();//$query->getSingleResult();\n } catch (\\Doctrine\\ORM\\NoResultException $e) {\n return null;\n }\n\n }", "function get_category_by_id($id){\n $q = $this->db->query(\"select * from \".$this->table_name.\" where id = '\".$id.\"'\");\n return $q->row();\n }", "function get_crm_stage($stage,$institute) {\n\n $CI = & get_instance();\n $CI->load->model('model_crm_settings');\n $crm_stage = $CI->model_crm_settings->get_crm_stage_by_category($institute,$stage);\n return $crm_stage['id'];\n\n}", "public function Catagory($id) {\n\t\t$catagory = new Catagory_();\n\t\t$sql = \"SELECT * FROM catagories;\";\n\t\t$result = $GLOBALS['DB_Conn']->query($sql);\n\n\t\tif ($result->num_rows > 0) {\n\t\t\t$row = $result->fetch_assoc()\n\t\t\t$catagory->id = $row[\"id\"];\n\t\t\t$catagories->name = $row[\"name\"];\n\t\t\t$cata->parrent_id = $row[\"parrent_id\"];\n\t\t}\n\t\t\n\t\treturn $catagory;\n\t}", "function getCategoryByContentId($params)\r\n\t\t{\r\n\t\t\t$sql = \"select * from content where id=?\";\r\n\t\t\t$types = array('integer');\r\n\t\t\t$res = $this->execute_query($sql, $params, $types);\r\n\t\t\treturn $res[0] ;\r\n\t\t}", "function getbyIDens($id){\n\t\t\n\t\t$data['parcours'] = $query = $this->db->query(\"select * from Apprenant a inner join session s on a.id=s.id_apprenant inner join parcours p on p.id_apprenant=a.id and p.id_session=s.id inner join action act on act.id=p.id_action where a.id=\".$id)->result();\n\t\t\n\t\t $this->page_construct('enseignant/parcours',$data);\n\t\t\n\t}", "private function getItemIdParameter()\n {\n // Reference: https://stackoverflow.com/questions/6768793/get-the-full-url-in-php\n $url = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? \"https\" : \"http\") . \"://$_SERVER[HTTP_HOST]$_SERVER[REQUEST_URI]\";\n // Reference: https://www.geeksforgeeks.org/how-to-get-parameters-from-a-url-string-in-php/\n $url_components = parse_url($url);\n // string passed via URL \n parse_str($url_components['query'], $params);\n return $params['item'];\n }", "function get_categoryid() {\n \tglobal $conn;\n \n $sql = \"SELECT id FROM itemcategory\";\n $result = $conn->Execute($sql);\n $catpk = $result->fields[0];\n\t//print_r($result);\n\n//\tif (!$catpk) $catpk = 1;\n return $catpk;\n }", "function get_tax_param($id,$param){\n\t global ${md5('arr_taxes')};\n\t $arr_param = array();\n\t if(is_array($id)){\n\t\t foreach($id as $get_id){\n\t\t\t $arr_param[] = ${md5('arr_taxes')}[$get_id][$param]; \n\t\t }\n\t }else{\n\t\tif($id != '' && $param != '')\n\t\t $arr_param = ${md5('arr_taxes')}[$id][$param];\n\t\telse\n\t\t$arr_param = '';\n\t }\n\t return $arr_param;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set $index to $value. ensures the value is within cube range.
public function set($index, $value) { $value = $this->cube($value); parent::set($index, $value); }
[ "public function set($index, $value);", "abstract public function set(int $index, $value);", "public function setItemIndex($value)\n\t{\n\t\t$this->_itemIndex=TPropertyValue::ensureInteger($value);\n\t}", "public function update($x, $y, $z, $value){\n\n\t\tif(!$this->is_valid_coordinate($x, $y, $z)){\n\t\t\tthrow new \\Exception(sprintf(\"x, y and z should be in range between 1 and %d\", count($this->cube)), 2);\n\t\t\t\n\t\t}\n\t\tif(!$this->is_valid_value($value)){\n\t\t\tthrow new \\Exception(sprintf(\"The value should be in range between %d and %d\", self::MIN_VALUE, self::MAX_VALUE));\n\t\t}\n\n\t\t// The first block is defined by the coordinate (1,1,1) \n\t\t$x = $this->calcule_offset($x);\n\t\t$y = $this->calcule_offset($y);\n\t\t$z = $this->calcule_offset($z);\n\t\t\n\t\t$this->cube[$x][$y][$z] = $value;\n\t\treturn $this;\n\t}", "public function setXfIndex($pValue) {\n\t\t$this->xfIndex = $pValue;\n\t}", "function replace(int $index, $value): void\n {\n if (!key_exists($index, $this->values)) {\n throw new \\OutOfBoundsException(sprintf(\n 'Cannot replace value at index %d because it does not exist (%s)',\n $index,\n $this->isEmpty()\n ? 'the collection is empty'\n : sprintf('valid indexes are 0 to %d', $this->count() - 1)\n ));\n }\n\n $this->values[$index] = $value;\n }", "public function setSingleValueIndex($key, $value);", "public function __set($idx, $value)\r\n\t{\r\n\t\t$this->members[$idx] = $value;\r\n\t}", "#[ReturnTypeWillChange]\n\tpublic function offsetSet( $index, $value ) {\n\t\tif ( is_null( $index ) ) {\n\t\t\t$this->blocks[] = $value;\n\t\t} else {\n\t\t\t$this->blocks[ $index ] = $value;\n\t\t}\n\t}", "public function setColorIndex($value = 0)\n {\n $this->colorIndex = $value;\n }", "public function setWaveIndex($value)\n {\n return $this->set(self::_WAVE_INDEX, $value);\n }", "public function setHashIndex($value)\r\n {\r\n $this->hashIndex = $value;\r\n }", "public function setHashIndex($value)\n {\n $this->hashIndex = $value;\n }", "public function setHashIndex($value) {\n\t\t$this->_hashIndex = $value;\n\t}", "public function set($index, $value) {\r\n \r\n if($index < 0 or $index >= $this->count()) \r\n {\r\n throw new ArgumentOutOfRangeException(\"index is less than zero. -or- index is greater than or equal to the number of elements in the System.Collections.BitArray.\");\r\n }\r\n \r\n if(is_bool($value)) \r\n {\r\n $this->values[$index] = $value;\r\n }\r\n }", "public function set(int $index, BoardItem $value): bool {\n\n $cell = $this->cells[$index];\n if ((int) $index <= $this->cellsCount -1 && ($cell == null || $cell->isAccessible())) {\n return $this->cells[$index]->addItem($value);\n }\n return false;\n }", "function writeItemIndex($value) { $this->_itemindex = $value; }", "public function set($index, $element);", "public function offsetSet ($index, $newval) {}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Read 10 projects info with student info $pin should be 0 for the first page, which return most recent 10 projects then $pin should be 1...2...3..4.... to get rest projects please use project_id and student_id as refer to project id and student id
public function readTenProjects($pin) { $readQuery = 'SELECT *, projects.Id AS "project_id", students.Id AS "student_id" FROM projects JOIN students ON projects.StudentId = students.Id ORDER BY projects.Id DESC LIMIT :start, 10'; $readStmt = $this->db->prepare($readQuery); $readStmt->bindValue(':start', $pin * 10, PDO::PARAM_INT); $readStmt->execute(); return $readStmt->fetchall(PDO::FETCH_ASSOC); }
[ "function list_project_student_wise_get()\n {\n $post_data=json_decode(file_get_contents(\"php://input\"));\n $headers=$this->input->request_headers();\n $token=!empty($headers) ? $headers['Authorization']: '';\n try\n {\n $student_info=authorization::validateToken($token);\n if ($student_info===FALSE) \n {\n $this->response(array(\n 'status'=>0,\n 'message'=>'Unauthorized Access!'\n ), parent::HTTP_UNAUTHORIZED);\n }\n else\n {\n $student_id=$student_info->data[0]->student_id;\n $semester_data=$this->semester_model->get_student_all_projects($student_id);\n if (!empty($semester_data)) \n {\n $this->response(array(\n 'status' =>1,\n 'message'=>'Project Deleted Successfully!',\n 'data'=>$semester_data\n ), parent::HTTP_OK);\n }\n else\n {\n $this->response(array(\n 'status' =>0,\n 'message'=>'No Records Found!'\n ), parent::HTTP_NOT_FOUND);\n } \n \n }\n }\n catch(Exception $exep)\n {\n $this->response(array(\n 'status'=>0,\n 'message'=>$exep->getMessage()\n ), parent::HTTP_INTERNAL_SERVER_ERROR);\n }\n }", "public function read_projects($id)\n {\n if ($this->session->userdata('logged_in'))\n {\n $session_data = $this->session->userdata('logged_in');\n $person = $this->person_model->read($id);\n $data['projects'] = $this->person_model->read_person_projects($id);\n $data['main_content'] = 'person/person_projects_view';\n $data['error_message'] = $this->session->flashdata('$error_message');\n $data['heading'] = $this->lang->line('title_permission');\n \n if (isset($person[0]))\n {\n $data['pagetitle'] = \n $person[0]->surname . ' ' . $person[0]->firstname . ': ' .\n $this->lang->line('title_persons_project');\n }\n else\n {\n $data['pagetitle'] = \n $this->lang->line('title_persons_project'); \n }\n $data['login_user_id'] = $session_data['user_id'];\n $data['login_id'] = $session_data['id'];\n $this->load->view('template', $data);\n }\n else\n {\n redirect('login');\n }\n }", "function list(int $page=1): Response{\n return $this->method([\n 'path' => 'projects/?page='.$page,\n 'method' => 'GET'\n ]);\n }", "function get_projects_by_page($curr_page, $per_page, $user = null)\n {\n\t\tif($_SESSION['auth'] == 1) {\n\t\t\t$where = ($_SESSION['auth_id'] != 0)\n\t\t\t\t\t? \"admin_id = '\" . $_SESSION['auth_id'] .\"'\" : null;\n\t\t}\n\t\telse {\t\t\n\t\t\t$where = ($user['group_id'] != 0)\n\t\t\t\t\t? \"client_id = '\" . $user['id'] . \"'\" : null;\n\t\t}\n\t\t\n $projects = $this->paginate($curr_page, 10, $where);\n\n\n if (is_array($projects['page']))\n {\n foreach ($projects['page'] as & $project)\n {\n $id = $project['client_id'];\n $name = $this->query(\"SELECT name FROM clients WHERE id = '$id'\");\n\n $project['client_name'] = (isset($name[0]['name'])) ? $name[0]['name'] : '';\n\n $duration = $project['duration'] * 604800; //convert to seconds\n $project['duration'] = $project['created'] + $duration;\n }\n }\n return $projects;\n }", "function Projects($limit=2) {\n\t\t$set = ProjectsPage::get()->limit($limit);\n\t\treturn $set;\n\t}", "function ViewAll_Standard_projects()\n\t{\n\t\tglobal $db;\n\t\n\t\t$sql=\" SELECT * FROM \".project_MASTER.\" AS PM \"\n\t\t .\" LEFT JOIN \".MEMBER_MASTER.\" AS MM ON PM.auth_id_of_post_by = MM.user_auth_id \"\n\t\t\t .\" WHERE PM.premium_project = 0 AND (PM.project_status =1 OR PM.project_status =2)\"\n\t\t .\" ORDER BY PM.project_posted_date DESC,MM.membership_id DESC LIMIT 0,50\";\n\t\t$db->query($sql);\n\t}", "public function students_get( $perPage = null )\n\t{\n\t\t//initialize array second\n\t\t$dataPerPage = array();\n\t\t//initialize array main\n\t\t$data = array();\n\t\t// I question if the variable have the word all\n\t\tif ( $perPage === 'all') {\n\t\t\t// Show all data\n\t\t\t$data['students'] = $this->Student_model->get_students();\n\t\t\t\n\t\t\t\n\t\t}elseif($perPage==null){\n\t\t\t// if not show per page\n\t\t\t$perPage = 3; //count of register perpage\n\t\t\t$cantReg = $this->Student_model->get_students_count(); //find the count of register\n\t\t\t$cantPag = ceil($cantReg / $perPage); //Rounding count pages\n\t\t\t$dats \t= array();\n\t\t\t$page \t= 1; //page initial\n\t\t\t$start \t= 0; //initial of search\n\n\t\t\tfor ($a=0; $a < $cantPag; $a++) {\n\t\t\t\t//I make a personalized pagination\n\t\t\t\t$dataPerPage['page_'.$page] = $this->Student_model->get_students_limit( $start, $perPage );\n\t\t\t\t$start \t= $start+$perPage;\n\t\t\t\t$page++;\n\n\t\t\t}\n\t\t\t//add data at array main\n\t\t\t$data['students'] = $dataPerPage;\n\n\t\t}else{\n\n\t\t\t//find the data of database\n\t\t\t$resp = $this->Student_model->get_students_where($perPage);\n\n\t\t\tif ($resp) {\n\t\t\t\t//add data at array main I add students array\n\t\t\t\t$data['students'] = $resp;\n\t\t\t}else{\n\t\t\t\t// if not show state 404\n\t\t\t\t$data['students'] = $this->show_404();\n\n\t\t\t}\n\n\t\t}\n\t\t// show data main\n\t\t$this->response($data);\n\t\t\n\t}", "public function getclientDisputedProjects($perPage=5){\n $user=Auth::user();\n return Project::where('user_id',$user->id)->where('status', config('constants.project_status.DISPUTE'))->orderBy('id','desc')->paginate($perPage);\n }", "function ViewAll_Premium_projects_1()\n\t{\n\t\tglobal $db;\n\t\t$sql=\"SELECT count(*) as cnt FROM \".project_MASTER.\" AS PM \"\n\t\t .\" LEFT JOIN \".MEMBER_MASTER.\" AS MM ON PM.auth_id_of_post_by = MM.user_auth_id \"\n\t\t\t .\" WHERE PM.premium_project = 1\";\n\n\t\t$db->query($sql);\n\t\t$db->next_record();\n\t\t$_SESSION['total_record'] = $db->f(\"cnt\") ;\n\t\t$db->free();\n\n\t\t# Reset the start record if required\n\t\tif($_SESSION['user_page_size'] >= $_SESSION['total_record'])\n\t\t{\n\t\t\t$_SESSION['start_record'] = 0;\n\t\t}\n\n\t\t$sql= \" SELECT * FROM \".project_MASTER.\" AS PM \"\n\t\t .\" LEFT JOIN \".MEMBER_MASTER.\" AS MM ON PM.auth_id_of_post_by = MM.user_auth_id \"\n\t\t\t .\" WHERE PM.premium_project = 1 \"\n\t\t\t .\" ORDER BY PM.premium_project DESC,PM.project_posted_date DESC \"\n\t\t\t .\" LIMIT \". $_SESSION['start_record']. \", \". $_SESSION['user_page_size'];\n\t\t$db->query($sql);\n\t}", "function list(string $project_id, int $page=1): Response{\n return $this->method([\n 'path' => 'projects/'.$project_id.'/urls?page='.$page,\n 'method' => 'GET'\n ]);\n }", "public function searchPin($pin)\n {\n $validator = Validator::make(array($pin), [$pin => 'bail | integer | between:99999,1000000']);\n\n if ($validator->fails())\n {\n return response()->json(\"Invalid Pincode\", 404);\n }\n\n $pincodes = new Pincode();\n $res = $pincodes->findPin($pin);\n if ($res === null | $res->isNotEmpty())\n {\n return response()->json($res->groupBy(config('database.tables.pincode.pincode')), 200);\n }\n else\n {\n return response()->json(\"Pincode not found\", 404);\n }\n }", "public function getProjects($userId, $page) {\n\t\t$offset = ($page-1)*50;\n\t\t// Get total of projects\n\t\t$projectCount = $this->db->query('SELECT count(id) FROM projects WHERE user_id=?', array($userId));\n\t\t$projectCount = ($projectCount->result())[0]->count;\n\n\t\t$projectsSql = 'SELECT project_name, project_description, project_identifier, created_at, updated_at FROM projects WHERE user_id=? ORDER BY updated_at DESC LIMIT 50 OFFSET ?';\n\t\t$query = $this->db->query($projectsSql, array($userId, $offset));\n\t\treturn [\n\t\t\t'total' => $projectCount,\n\t\t\t'result' => $query->result(),\n\t\t\t'itemsPerPage' => 50\n\t\t];\n\t}", "public function fetchProjectBasedReport(Request $request)\n {\n\n $inputs = $request->all();\n $search = $inputs['report_project_search'];\n $start = $inputs['report_start_date'];\n $end = $inputs['report_end_date'];\n\n $page = (isset($inputs['page']))?$inputs['page']:0;\n $take = 5;\n $skip = ($page*$take);\n\n $query = Project::select('*');\n\n if($search!='') {\n $query->where(\n function ($qry) use ($search) {\n $qry->where(\"name\", \"LIKE\", \"%{$search}%\")\n ->orWhere(\"project_code\", \"LIKE\", \"%{$search}%\");\n }\n );\n }\n\n if($start != '' && $end !='') {\n $start = \"'\".$start.\"'\";\n $end = \"'\".$end.\"'\";\n $query->where(\"start_date\", \"<>\", \"\")\n ->where(\"end_date\", \"<>\", \"\")\n ->whereRaw(\"DATE(start_date) <= $end\")\n ->whereRaw(\"DATE(end_date) >= $start\");\n //->whereRaw(\"DATE(end_date) <> $start\")\n //->whereRaw(\"DATE(end_date) <> $end\");\n }\n\n $query->skip($skip)\n ->take($take)\n ->orderBy('id', 'DESC');\n\n $projects= $query->get();\n\n $html = view('reports.partials.project-based-report-card', ['projects'=>$projects])->render();\n\n $loadmore = (isset($inputs['loadmore']))?$inputs['loadmore']:0;\n if($loadmore !=1 && count($projects)==0) {\n $html = '<p>No results found</p>';\n }\n\n return response()->json(\n [\n 'status' => 'success',\n 'html' => $html,\n 'data' => [\n 'next_page' => (count($projects)>0)?(intval($page)+1):'end'\n ]\n ]\n );\n }", "function GetProjectList()\n\t{\n\t\t$qry=$this->db->query(\"select DISTINCT rp_projects.projectKey,rp_projects.projectID,rp_projects.projectAddedDate,rp_projects.projectStatus,rp_user_plan_details.planTitle,rp_projects.projectKey,rp_project_details.projectName,rp_users.userEmail,rp_user_details.userFirstName,rp_user_types.userTypeStatus,rp_user_type_details.userTypeName from rp_dbho_user_plans_subdetail,rp_dbho_plan_mapping,rp_projects,rp_project_details,rp_users,rp_user_plan_details,rp_user_details,rp_user_to_type,rp_user_types,rp_user_type_details where rp_projects.projectID=rp_project_details.projectID and rp_projects.projectID=rp_dbho_plan_mapping.objectID and rp_dbho_plan_mapping.objectType='project' and rp_dbho_plan_mapping.planID=rp_dbho_user_plans_subdetail.planID and rp_dbho_user_plans_subdetail.listingType='Project' and rp_user_plan_details.planID=rp_dbho_plan_mapping.planID and rp_projects.userID=rp_users.userID and rp_users.userID=rp_user_details.userID and rp_projects.userID=rp_user_to_type.userID and rp_user_to_type.userTypeID =rp_user_types.userTypeID and rp_user_types.userTypeStatus='Active' and rp_user_types.userTypeID=rp_user_type_details.userTypeID and rp_projects.projectStatus!='Deleted' and rp_user_type_details.languageID=1 and rp_project_details.languageID=1 and rp_project_details.versionID=0 and rp_user_details.languageID=1 ORDER BY rp_projects.projectID DESC \"); \n\t\treturn $qry->result(); \n\t}", "public function readOneProject($projectId) {\n $readQuery = 'SELECT *, projects.Id AS \"project_id\", students.Id AS \"student_id\"\n FROM projects JOIN students ON projects.StudentId = students.Id \n WHERE projects.Id = :id';\n $readStmt = $this->db->prepare($readQuery);\n $readStmt->bindValue(':id', $projectId, PDO::PARAM_INT);\n $readStmt->execute();\n return $readStmt->fetch(PDO::FETCH_ASSOC);\n }", "public function get_all_projects($offset, $limit){\n $this->db->select('project_id, project_name');\n $query = $this->db->get(\"project\", $offset, $limit);\n return $query->result();\n }", "public function index()\n\t{\n\t\t// Load Projects model\n\t\t$this->load->model('Projects_model', 'projects');\n\n\t\t// Get the url parameters to $uri array\n\t\t$uri = $this->uri->segment_array();\n\t\t// Order projects by date\n\t\t$vars['filter_type'] = 'latest';\n\t\t// Declare array to be passed to the model\n\t\t$vars['searchSql'] = array();\n\t\t// Declare array to send the result as JSON\n\t\t$projects = array();\n\t\t\n\t\t// Loop through url segments to take the search options\n\t\tforeach($uri as $segment)\n\t\t{\n\t\t\t// If search by keyword - used to search for keyword in project title, about, outcome and slug\n\t\t\tif(strstr($segment, 'keyword'))\n\t\t\t{\n\t\t\t\t// Take the keyword from the segment\n\t\t\t\t$vars['searchSql']['keywords'] = str_replace('keyword:', '', $segment);\n\t\t\t\t// Escape and decode\n\t\t\t\t$vars['searchSql']['keywords'] = mysql_real_escape_string(h(st(urldecode($vars['searchSql']['keywords']))));\n\t\t\t}\n\t\t\t// If search by category\t\t\t\n\t\t\tif(strstr($segment, 'category'))\n\t\t\t{\n\t\t\t\t// Take the category from the segment\t\t\t\t\n\t\t\t\t$vars['searchSql']['category'] = urldecode(str_replace('category:', '', $segment));\n\t\t\t\t// Escape and decode\t\t\t\t\n\t\t\t\t$vars['searchSql']['category'] = mysql_real_escape_string(h(st(urldecode($vars['searchSql']['category']))));\n\t\t\t}\n\t\t\t// If search by string\t\t\t\n\t\t\tif(strstr($segment, 'string'))\n\t\t\t{\n\t\t\t\t// Take the search string from the segment\t\t\t\t\n\t\t\t\t$vars['searchSql']['string'] = urldecode(str_replace('string:', '', $segment));\n\t\t\t\t// Escape and decode\t\t\t\t\n\t\t\t\t$vars['searchSql']['string'] = mysql_real_escape_string(h(st(urldecode($vars['searchSql']['string']))));\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Check if there are search conditions and if so get the projets \n\t\tif(isset($vars['searchSql']))\n\t\t\t$projects = $this->projects->public_search($vars['filter_type'], $vars['searchSql'], 0);\n\t\t\n\t\t// Print the searched projects as JSON - to be used by maps.js\n\t\techo json_encode($projects);\n\t}", "public function getIndividualNumbers(Request $request, Project $project)\n {\n $this->logInfo(__METHOD__);\n if ($this->authorize('browse', [ SkeletalElement::class ])) {\n $this->logInfo(__METHOD__, Controller::$log_msg_auth_success);\n try {\n if ($request->query('list')) {\n $list = DB::table('skeletal_elements')->where('project_id', $project->id)\n ->select('individual_number')->groupBy(['individual_number'])\n ->whereNotNull('individual_number')\n ->orderBy('individual_number')\n ->pluck('individual_number');\n return response()->json([ \"data\" => $list, \"meta\" => [\"count\" => $list->count()] ], 200);\n } else {\n $list = SkeletalElement::withoutGlobalScopes([ProjectScope::class])\n ->where('project_id', $project->id)\n ->whereNotNull('individual_number')\n ->orderBy('individual_number')\n ->paginate($this::$pagination_length_large);\n return new CoraResourceCollection($list);\n }\n } catch (QueryException $ex) {\n $this->logQueryException(__METHOD__, $request, $ex);\n return response()->json([ 'data' => trans('messages.model_index_view_unsuccessful', ['model'=>'Project Individual Numbers']) ], 422);\n }\n } else {\n return response()->json([ \"data\" => \"Not authorized to view all resources\" ], 403);\n }\n }", "private function all_users_projects()\n {\n if(request()->has('search')) {\n return Project::search(request('search'))\n ->paginate(14);\n }\n\n if(request()->has('tag')) {\n return Project::ofTag(request('tag'))->paginate(14);\n }\n\n return Project::paginate(14);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Updates an InsightTypeConfig change. This will create a new revision of the config.
public function UpdateInsightTypeConfig(\Google\Cloud\Recommender\V1\UpdateInsightTypeConfigRequest $argument, $metadata = [], $options = []) { return $this->_simpleRequest('/google.cloud.recommender.v1.Recommender/UpdateInsightTypeConfig', $argument, ['\Google\Cloud\Recommender\V1\InsightTypeConfig', 'decode'], $metadata, $options); }
[ "public function updateConfig($name, GoogleCloudRecommenderV1InsightTypeConfig $postBody, $optParams = [])\n {\n $params = ['name' => $name, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('updateConfig', [$params], GoogleCloudRecommenderV1InsightTypeConfig::class);\n }", "public function testUpdateConfiguration()\n {\n }", "public function testUpdateConfiguration2()\n {\n }", "public function updateType($old_type, $new_type);", "private static function _update_version($version, $name, $type)\n\t{\n\t\t// if migrations config doesn't exist in app/config\n\t\tif ( ! file_exists($path = APPPATH.'config'.DS.'migrations.php'))\n\t\t{\n\t\t\t// make sure it exists in core/config and copy to app/config\n\t\t\tif (file_exists($core_path = COREPATH.'config'.DS.'migrations.php'))\n\t\t\t{\n\t\t\t\t$contents = file_get_contents($core_path);\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t\\Cli::write('Config file core/config/migrations.php is missing.');\n\t\t\t\texit;\n\t\t\t}\n\n\t\t\t// create the file in app/config folder\n\t\t\tfile_put_contents($path, $contents);\n\t\t}\n\n\t\t// set config version\n\t\t\\Config::set('migrations.version.'.$type.'.'.$name, (int) $version);\n\n\t\t// save the config;\n\t\t\\Config::save('migrations', 'migrations');\n\t}", "public function testUpdateEventlogConfig()\n {\n }", "public function updated(Type $type)\n {\n //\n }", "function saveConfig()\n\t{\n\t\t$change = isset($this->post['change']) ? $this->post['change'] : '';\n\t\t\n\t\tswitch($change)\n\t\t{\n\t\t\tcase 'paths': $this->changePaths(); break;\n\t\t\tcase 'users': $this->changeUsers(); break;\n\t\t\tcase 'misc': $this->changeMisc(); break;\n\t\t\tcase 'ui': $this->changeUi(); break;\n\t\t\tcase 'mailing': $this->changeMailing(); break;\n\t\t\tcase 'namespaces': $this->changeNamespaces(); break;\n\t\t\tcase 'uploads': $this->changeUploads(); break;\n\t\t\tcase 'urlrewrite': $this->changeUrlRewrite(); break;\n\t\t\tcase 'parser': $this->changeParser(); break;\n\t\t}\n\t}", "public function update_config($new_config_array) {\n // Write the new file\n try {\n global $wp_filesystem; // WordPress's own filesystem class.\n $wp_filesystem->put_contents(VISUALBUDGET_CONFIG_PATH,\n json_encode($new_config_array, JSON_PRETTY_PRINT));\n } catch (Exception $e) {\n // FIXME: What to do with this error?\n }\n }", "public function updateProbe($index, $enabled, $probeType)\n {\n if ($index < 0 || $index > 7) {\n throw new \\InvalidArgumentException('Invalid probe index given. Valid values are 0 to 7.');\n }\n\n if (!$this->isValidProbeType($probeType)) {\n throw new \\InvalidArgumentException('Probe type ' . $probeType . ' not found.');\n }\n\n $this->readConfig();\n $this->config['Sensoren']['ch' . (int)$index] = (int)$probeType;\n $this->config['Logging']['ch' . (int)$index] = $enabled ? 'True' : 'False';\n $this->saveConfig();\n }", "public function testUpdateConfiguration3()\n {\n }", "public function onConfigUpdate() {}", "public function onConfigUpdate() {\n\n // this is just for being on the safe side\n if ($this->getID() > 0) {\n Log::debug(self::$TAG, \"reloading bot configuration, type: \" . $this->getType() . \", name: \" .\n $this->getName() . \", id: \" . $this->getID());\n\n $this->initialize($this->getID());\n }\n else {\n Log::warning(self::$TAG, \"the bot was not loaded before, cannot handle its config update!\");\n }\n }", "public function onConfigUpdate() {\n\n // this is just for being on the safe side\n if ($this->getID() > 0) {\n Log::debug(self::$TAG, \"reloading bot configuration, type: \" . $this->getType() . \", name: \" .\n $this->getName() . \", id: \" . $this->getID());\n\n $this->loadData($this->getID());\n $this->initialize();\n }\n else {\n Log::warning(self::$TAG, \"the bot was not loaded before, cannot handle its config update!\");\n }\n }", "public function handleChangedCompanyType(ConfigEvent $event)\n {\n $companyTypeUid = $event->tokenMatches[0];\n $data = $event->newValue;\n $shouldResaveCompanies = false;\n\n // Make sure fields and sites are processed\n ProjectConfigHelper::ensureAllSitesProcessed();\n ProjectConfigHelper::ensureAllFieldsProcessed();\n\n $db = Craft::$app->getDb();\n $transaction = $db->beginTransaction();\n\n try {\n $siteData = $data['siteSettings'];\n\n // Basic data\n $companyTypeRecord = $this->_getCompanyTypeRecord($companyTypeUid);\n $isNewCompanyType = $companyTypeRecord->getIsNewRecord();\n $fieldsService = Craft::$app->getFields();\n\n $companyTypeRecord->uid = $companyTypeUid;\n $companyTypeRecord->name = $data['name'];\n $companyTypeRecord->handle = $data['handle'];\n\n $companyTypeRecord->titleFormat = $data['titleFormat'] ?? '{company.title}';\n $companyTypeRecord->hasTitleField = $data['hasTitleField'];\n\n// if (!empty($data['companyFieldLayouts']) && !empty($config = reset($data['companyFieldLayouts']))) {\n// // Save the main field layout\n// $layout = FieldLayout::createFromConfig($config);\n// $layout->id = $companyTypeRecord->fieldLayoutId;\n// $layout->type = \\percipiolondon\\companymanagement\\elements\\Company::class;\n// $layout->uid = key($data['companyFieldLayouts']);\n// $fieldsService->saveLayout($layout);\n// $companyTypeRecord->fieldLayoutId = $layout->id;\n// } else if ($companyTypeRecord->fieldLayoutId) {\n// // Delete the main field layout\n// $fieldsService->deleteLayoutById($companyTypeRecord->fieldLayoutId);\n// $companyTypeRecord->fieldLayoutId = null;\n// }\n\n $companyTypeRecord->fieldLayoutId = $data['fieldLayoutId'];\n\n // Install default fields for the layout\n // -----------------------------------------------------------------\n $this->_installCompanyFields($companyTypeRecord->fieldLayoutId);\n\n $companyTypeRecord->save(false);\n\n // Update the site settings\n // -----------------------------------------------------------------\n\n $sitesNowWithoutUrls = [];\n $sitesWithNewUriFormats = [];\n $allOldSiteSettingsRecords = [];\n\n if (!$isNewCompanyType) {\n // Get the old product type site settings\n $allOldSiteSettingsRecords = CompanyTypeSiteRecord::find()\n ->where(['companyTypeId' => $companyTypeRecord->id])\n ->indexBy('siteId')\n ->all();\n }\n\n $siteIdMap = Db::idsByUids('{{%sites}}', array_keys($siteData));\n\n /** @var CompanyTypeSite $siteSettings */\n foreach ($siteData as $siteUid => $siteSettings) {\n $siteId = $siteIdMap[$siteUid];\n\n // Was this already selected?\n if (!$isNewCompanyType && isset($allOldSiteSettingsRecords[$siteId])) {\n $siteSettingsRecord = $allOldSiteSettingsRecords[$siteId];\n } else {\n $siteSettingsRecord = new CompanyTypeSiteRecord();\n $siteSettingsRecord->companyTypeId = $companyTypeRecord->id;\n $siteSettingsRecord->siteId = $siteId;\n }\n\n if ($siteSettingsRecord->hasUrls = $siteSettings['hasUrls']) {\n $siteSettingsRecord->uriFormat = $siteSettings['uriFormat'];\n $siteSettingsRecord->template = $siteSettings['template'];\n } else {\n $siteSettingsRecord->uriFormat = null;\n $siteSettingsRecord->template = null;\n }\n\n if (!$siteSettingsRecord->getIsNewRecord()) {\n // Did it used to have URLs, but not anymore?\n if ($siteSettingsRecord->isAttributeChanged('hasUrls', false) && !$siteSettings['hasUrls']) {\n $sitesNowWithoutUrls[] = $siteId;\n }\n\n // Does it have URLs, and has its URI format changed?\n if ($siteSettings['hasUrls'] && $siteSettingsRecord->isAttributeChanged('uriFormat', false)) {\n $sitesWithNewUriFormats[] = $siteId;\n }\n }\n\n $siteSettingsRecord->save(false);\n }\n\n if (!$isNewCompanyType) {\n // Drop any site settings that are no longer being used, as well as the associated product/element\n // site rows\n $affectedSiteUids = array_keys($siteData);\n\n /** @noinspection PhpUndefinedVariableInspection */\n foreach ($allOldSiteSettingsRecords as $siteId => $siteSettingsRecord) {\n $siteUid = array_search($siteId, $siteIdMap, false);\n if (!in_array($siteUid, $affectedSiteUids, false)) {\n $siteSettingsRecord->delete();\n }\n }\n }\n\n // Finally, deal with the existing companies...\n // -----------------------------------------------------------------\n\n if (!$isNewCompanyType) {\n $companyIds = Company::find()\n ->typeId($companyTypeRecord->id)\n ->anyStatus()\n ->limit(null)\n ->ids();\n\n // Are there any sites left?\n if (!empty($siteData)) {\n // Drop the old company URIs for any site settings that don't have URLs\n if (!empty($sitesNowWithoutUrls)) {\n $db->createCommand()\n ->update(\n '{{%elements_sites}}',\n ['uri' => null],\n [\n 'elementId' => $companyIds,\n 'siteId' => $sitesNowWithoutUrls,\n ])\n ->execute();\n } else if (!empty($sitesWithNewUriFormats)) {\n foreach ($companyIds as $companyId) {\n App::maxPowerCaptain();\n\n // Loop through each of the changed sites and update all of the companies’ slugs and\n // URIs\n foreach ($sitesWithNewUriFormats as $siteId) {\n $company = Company::find()\n ->id($companyId)\n ->siteId($siteId)\n ->anyStatus()\n ->one();\n\n if ($company) {\n Craft::$app->getElements()->updateElementSlugAndUri($company, false, false);\n }\n }\n }\n }\n }\n }\n\n $transaction->commit();\n\n if ($shouldResaveCompanies) {\n Craft::$app->getQueue()->push(new ResaveElements([\n 'elementType' => Company::class,\n 'criteria' => [\n 'siteId' => '*',\n 'status' => null,\n 'typeId' => $companyTypeRecord->id,\n 'enabledForSite' => false\n ]\n ]));\n }\n } catch (\\Throwable $e) {\n $transaction->rollBack();\n throw $e;\n }\n\n // Clear caches\n $this->_allCompanyTypeIds = null;\n $this->_editableCompanyTypeIds = null;\n $this->_fetchedAllCompanyTypes = false;\n unset(\n $this->_companyTypesById[$companyTypeRecord->id],\n $this->_companyTypesByHandle[$companyTypeRecord->handle],\n $this->_siteSettingsByCompanyId[$companyTypeRecord->id]\n );\n\n // Fire an 'afterSaveCompanyType' event\n if ($this->hasEventHandlers(self::EVENT_AFTER_SAVE_COMPANYTYPE)) {\n $this->trigger(self::EVENT_AFTER_SAVE_COMPANYTYPE, new CompanyTypeEvent([\n 'companyType' => $this->getCompanyTypeById($companyTypeRecord->id),\n 'isNew' => empty($this->_savingProductTypes[$companyTypeUid]),\n ]));\n }\n }", "public function updateConfig()\r\n {\r\n // Change old config paths (ver < 1.19.0)\r\n $pathLike = 'mageworx_sales/orderspro/%';\r\n /** @var Mage_Core_Model_Resource_Config_Data_Collection $configCollection */\r\n $configCollection = Mage::getModel('core/config_data')->getCollection();\r\n $configCollection->getSelect()->where('path like ?', $pathLike);\r\n\r\n /** @var array $fields */\r\n $fields = $this->getModuleConfigFields();\r\n /** @var Mage_Core_Model_Config_Data $conf */\r\n foreach ($configCollection as $conf) {\r\n $realPath = $conf->getPath();\r\n $path = explode('/', $realPath);\r\n $lastElement = array_pop($path);\r\n\r\n if (in_array($lastElement, $fields)) {\r\n $this->updatePathFor18verAndOlder($conf, $realPath);\r\n }\r\n }\r\n\r\n // Change old config paths (ver >= 1.19.0)\r\n $pathLike = 'mageworx_orderspro/general/%';\r\n /** @var Mage_Core_Model_Resource_Config_Data_Collection $configCollection */\r\n $configCollection = Mage::getModel('core/config_data')->getCollection();\r\n $configCollection->getSelect()->where('path like ?', $pathLike);\r\n\r\n /** @var array $fields */\r\n $fields = $this->getModuleConfigFields();\r\n /** @var Mage_Core_Model_Config_Data $conf */\r\n foreach ($configCollection as $conf) {\r\n $realPath = $conf->getPath();\r\n $path = explode('/', $realPath);\r\n $lastElement = array_pop($path);\r\n\r\n if (in_array($lastElement, $fields)) {\r\n $this->updatePathFor19ver($conf, $realPath);\r\n }\r\n }\r\n }", "private function updateExerciseConfigs()\n {\n $pipelinesIds = $this->getEntryPointsRelevantPipelinesIds();\n $configsResult = $this->connection->executeQuery(\"SELECT * FROM exercise_config\");\n foreach ($configsResult as $exerciseConfig) {\n $config = Yaml::parse($exerciseConfig[\"config\"]);\n\n $changed = false;\n foreach ($config[\"tests\"] as &$test) {\n foreach ($test[\"environments\"] as $envName => &$env) {\n foreach ($env[\"pipelines\"] as &$pipeline) {\n if (!in_array($pipeline[\"name\"], $pipelinesIds)) {\n continue;\n }\n\n $changed = true;\n $pipeline[\"variables\"][] = [\n \"name\" => self::$ENTRY_POINT_PORT,\n \"type\" => self::$FILE_TYPE,\n \"value\" => self::$ENTRY_POINT_REF\n ];\n }\n }\n }\n\n if ($changed) {\n $this->connection->executeQuery(\n \"UPDATE exercise_config SET config = :config WHERE id = :id\",\n [\"id\" => $exerciseConfig[\"id\"], \"config\" => Yaml::dump($config)]\n );\n }\n }\n }", "protected function update(/**\n * Fires when the WP_Customize_Setting::update() method is called for settings\n * not handled as theme_mods or options.\n *\n * The dynamic portion of the hook name, `$this->type`, refers to the type of setting.\n *\n * @since 3.4.0\n *\n * @param mixed $value Value of the setting.\n * @param WP_Customize_Setting $this WP_Customize_Setting instance.\n */\n$value) {}", "public function testUpdateAppStoreConfigSettingValues()\n {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation teamBuilderConfigsIdProductGroupsRelFkHeadWithHttpInfo Check the existence of productGroups relation to an item by id.
public function teamBuilderConfigsIdProductGroupsRelFkHeadWithHttpInfo($id, $fk) { // verify the required parameter 'id' is set if ($id === null) { throw new \InvalidArgumentException('Missing the required parameter $id when calling teamBuilderConfigsIdProductGroupsRelFkHead'); } // verify the required parameter 'fk' is set if ($fk === null) { throw new \InvalidArgumentException('Missing the required parameter $fk when calling teamBuilderConfigsIdProductGroupsRelFkHead'); } // parse inputs $resourcePath = "/TeamBuilderConfigs/{id}/productGroups/rel/{fk}"; $httpBody = ''; $queryParams = array(); $headerParams = array(); $formParams = array(); $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript')); if (!is_null($_header_accept)) { $headerParams['Accept'] = $_header_accept; } $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml')); // path params if ($id !== null) { $resourcePath = str_replace( "{" . "id" . "}", $this->apiClient->getSerializer()->toPathValue($id), $resourcePath ); } // path params if ($fk !== null) { $resourcePath = str_replace( "{" . "fk" . "}", $this->apiClient->getSerializer()->toPathValue($fk), $resourcePath ); } // default format to json $resourcePath = str_replace("{format}", "json", $resourcePath); // for model (json/xml) if (isset($_tempBody)) { $httpBody = $_tempBody; // $_tempBody is the method argument, if present } elseif (count($formParams) > 0) { $httpBody = $formParams; // for HTTP post (form) } // this endpoint requires API key authentication $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token'); if (strlen($apiKey) !== 0) { $queryParams['access_token'] = $apiKey; } // make the API Call try { list($response, $statusCode, $httpHeader) = $this->apiClient->callApi( $resourcePath, 'HEAD', $queryParams, $httpBody, $headerParams, 'bool', '/TeamBuilderConfigs/{id}/productGroups/rel/{fk}' ); return array($this->apiClient->getSerializer()->deserialize($response, 'bool', $httpHeader), $statusCode, $httpHeader); } catch (ApiException $e) { switch ($e->getCode()) { case 200: $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'bool', $e->getResponseHeaders()); $e->setResponseObject($data); break; } throw $e; } }
[ "public function teamBuilderConfigsIdProductGroupsRelFkHead($id, $fk)\n {\n list($response) = $this->teamBuilderConfigsIdProductGroupsRelFkHeadWithHttpInfo($id, $fk);\n return $response;\n }", "public function teamBuilderConfigsIdProductSizesRelFkHeadWithHttpInfo($id, $fk)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling teamBuilderConfigsIdProductSizesRelFkHead');\n }\n // verify the required parameter 'fk' is set\n if ($fk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $fk when calling teamBuilderConfigsIdProductSizesRelFkHead');\n }\n // parse inputs\n $resourcePath = \"/TeamBuilderConfigs/{id}/productSizes/rel/{fk}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($fk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"fk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($fk),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'HEAD',\n $queryParams,\n $httpBody,\n $headerParams,\n 'bool',\n '/TeamBuilderConfigs/{id}/productSizes/rel/{fk}'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, 'bool', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'bool', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "public function teamBuilderConfigsIdProductSizeMaterialsRelFkHeadWithHttpInfo($id, $fk)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling teamBuilderConfigsIdProductSizeMaterialsRelFkHead');\n }\n // verify the required parameter 'fk' is set\n if ($fk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $fk when calling teamBuilderConfigsIdProductSizeMaterialsRelFkHead');\n }\n // parse inputs\n $resourcePath = \"/TeamBuilderConfigs/{id}/productSizeMaterials/rel/{fk}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($fk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"fk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($fk),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'HEAD',\n $queryParams,\n $httpBody,\n $headerParams,\n 'bool',\n '/TeamBuilderConfigs/{id}/productSizeMaterials/rel/{fk}'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, 'bool', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'bool', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "public function teamBuilderConfigsIdProductGroupsRelFkPutWithHttpInfo($id, $fk, $data = null)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling teamBuilderConfigsIdProductGroupsRelFkPut');\n }\n // verify the required parameter 'fk' is set\n if ($fk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $fk when calling teamBuilderConfigsIdProductGroupsRelFkPut');\n }\n // parse inputs\n $resourcePath = \"/TeamBuilderConfigs/{id}/productGroups/rel/{fk}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($fk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"fk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($fk),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($data)) {\n $_tempBody = $data;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'PUT',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\TeamBuilderConfigProductGroup',\n '/TeamBuilderConfigs/{id}/productGroups/rel/{fk}'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\TeamBuilderConfigProductGroup', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\TeamBuilderConfigProductGroup', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "public function teamBuilderConfigsIdProductGroupsFkGetWithHttpInfo($id, $fk)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling teamBuilderConfigsIdProductGroupsFkGet');\n }\n // verify the required parameter 'fk' is set\n if ($fk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $fk when calling teamBuilderConfigsIdProductGroupsFkGet');\n }\n // parse inputs\n $resourcePath = \"/TeamBuilderConfigs/{id}/productGroups/{fk}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($fk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"fk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($fk),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\ProductGroup',\n '/TeamBuilderConfigs/{id}/productGroups/{fk}'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\ProductGroup', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\ProductGroup', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "public function teamMembersIdImageFoldersRelFkHeadWithHttpInfo($id, $fk)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling teamMembersIdImageFoldersRelFkHead');\n }\n // verify the required parameter 'fk' is set\n if ($fk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $fk when calling teamMembersIdImageFoldersRelFkHead');\n }\n // parse inputs\n $resourcePath = \"/TeamMembers/{id}/imageFolders/rel/{fk}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($fk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"fk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($fk),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'HEAD',\n $queryParams,\n $httpBody,\n $headerParams,\n 'bool',\n '/TeamMembers/{id}/imageFolders/rel/{fk}'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, 'bool', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'bool', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "public function teamBuilderConfigsIdProductGroupsFkPutWithHttpInfo($id, $fk, $data = null)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling teamBuilderConfigsIdProductGroupsFkPut');\n }\n // verify the required parameter 'fk' is set\n if ($fk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $fk when calling teamBuilderConfigsIdProductGroupsFkPut');\n }\n // parse inputs\n $resourcePath = \"/TeamBuilderConfigs/{id}/productGroups/{fk}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($fk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"fk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($fk),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($data)) {\n $_tempBody = $data;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'PUT',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\ProductGroup',\n '/TeamBuilderConfigs/{id}/productGroups/{fk}'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\ProductGroup', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\ProductGroup', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "public function portalsIdImageFoldersRelFkHeadWithHttpInfo($id, $fk)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling portalsIdImageFoldersRelFkHead');\n }\n // verify the required parameter 'fk' is set\n if ($fk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $fk when calling portalsIdImageFoldersRelFkHead');\n }\n // parse inputs\n $resourcePath = \"/Portals/{id}/imageFolders/rel/{fk}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($fk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"fk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($fk),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'HEAD',\n $queryParams,\n $httpBody,\n $headerParams,\n 'bool',\n '/Portals/{id}/imageFolders/rel/{fk}'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, 'bool', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'bool', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "public function teamBuilderConfigsIdProductGroupsRelFkDeleteWithHttpInfo($id, $fk)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling teamBuilderConfigsIdProductGroupsRelFkDelete');\n }\n // verify the required parameter 'fk' is set\n if ($fk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $fk when calling teamBuilderConfigsIdProductGroupsRelFkDelete');\n }\n // parse inputs\n $resourcePath = \"/TeamBuilderConfigs/{id}/productGroups/rel/{fk}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($fk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"fk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($fk),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'DELETE',\n $queryParams,\n $httpBody,\n $headerParams,\n null,\n '/TeamBuilderConfigs/{id}/productGroups/rel/{fk}'\n );\n\n return array(null, $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n }\n\n throw $e;\n }\n }", "public function groupExistsHeadGroupsidWithHttpInfo($id)\n {\n \n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling groupExistsHeadGroupsid');\n }\n \n // parse inputs\n $resourcePath = \"/Groups/{id}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = ApiClient::selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = ApiClient::selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n \n \n \n // path params\n \n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n \n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n \n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath, 'HEAD',\n $queryParams, $httpBody,\n $headerParams, 'object'\n );\n \n if (!$response) {\n return array(null, $statusCode, $httpHeader);\n }\n\n return array(\\DBCDK\\CommunityServices\\ObjectSerializer::deserialize($response, 'object', $httpHeader), $statusCode, $httpHeader);\n \n } catch (ApiException $e) {\n switch ($e->getCode()) { \n case 200:\n $data = \\DBCDK\\CommunityServices\\ObjectSerializer::deserialize($e->getResponseBody(), 'object', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n \n throw $e;\n }\n }", "public function portalsIdDesignsNkMembersRelFkHeadWithHttpInfo($id, $nk, $fk)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling portalsIdDesignsNkMembersRelFkHead');\n }\n // verify the required parameter 'nk' is set\n if ($nk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $nk when calling portalsIdDesignsNkMembersRelFkHead');\n }\n // verify the required parameter 'fk' is set\n if ($fk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $fk when calling portalsIdDesignsNkMembersRelFkHead');\n }\n // parse inputs\n $resourcePath = \"/Portals/{id}/designs/{nk}/members/rel/{fk}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($nk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"nk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($nk),\n $resourcePath\n );\n }\n // path params\n if ($fk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"fk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($fk),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'HEAD',\n $queryParams,\n $httpBody,\n $headerParams,\n 'bool',\n '/Portals/{id}/designs/{nk}/members/rel/{fk}'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, 'bool', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'bool', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "public function teamBuilderConfigsIdProductSizeMaterialsRelFkHead($id, $fk)\n {\n list($response) = $this->teamBuilderConfigsIdProductSizeMaterialsRelFkHeadWithHttpInfo($id, $fk);\n return $response;\n }", "public function teamBuilderConfigProductTypesIdHeadWithHttpInfo($id)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling teamBuilderConfigProductTypesIdHead');\n }\n // parse inputs\n $resourcePath = \"/TeamBuilderConfigProductTypes/{id}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'HEAD',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\InlineResponse2002',\n '/TeamBuilderConfigProductTypes/{id}'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\InlineResponse2002', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\InlineResponse2002', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "public function portalsIdMembersRelFkHeadWithHttpInfo($id, $fk)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling portalsIdMembersRelFkHead');\n }\n // verify the required parameter 'fk' is set\n if ($fk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $fk when calling portalsIdMembersRelFkHead');\n }\n // parse inputs\n $resourcePath = \"/Portals/{id}/members/rel/{fk}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($fk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"fk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($fk),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'HEAD',\n $queryParams,\n $httpBody,\n $headerParams,\n 'bool',\n '/Portals/{id}/members/rel/{fk}'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, 'bool', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'bool', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "public function teamBuilderConfigsIdProductGroupsNkTypesFkGetWithHttpInfo($id, $nk, $fk)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling teamBuilderConfigsIdProductGroupsNkTypesFkGet');\n }\n // verify the required parameter 'nk' is set\n if ($nk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $nk when calling teamBuilderConfigsIdProductGroupsNkTypesFkGet');\n }\n // verify the required parameter 'fk' is set\n if ($fk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $fk when calling teamBuilderConfigsIdProductGroupsNkTypesFkGet');\n }\n // parse inputs\n $resourcePath = \"/TeamBuilderConfigs/{id}/productGroups/{nk}/types/{fk}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($nk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"nk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($nk),\n $resourcePath\n );\n }\n // path params\n if ($fk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"fk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($fk),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'GET',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\ProductType',\n '/TeamBuilderConfigs/{id}/productGroups/{nk}/types/{fk}'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\ProductType', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\ProductType', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "public function templatesIdTagsRelFkHeadWithHttpInfo($id, $fk)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling templatesIdTagsRelFkHead');\n }\n // verify the required parameter 'fk' is set\n if ($fk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $fk when calling templatesIdTagsRelFkHead');\n }\n // parse inputs\n $resourcePath = \"/Templates/{id}/tags/rel/{fk}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($fk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"fk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($fk),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'HEAD',\n $queryParams,\n $httpBody,\n $headerParams,\n 'bool',\n '/Templates/{id}/tags/rel/{fk}'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, 'bool', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'bool', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "public function designsIdTagsRelFkHeadWithHttpInfo($id, $fk)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling designsIdTagsRelFkHead');\n }\n // verify the required parameter 'fk' is set\n if ($fk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $fk when calling designsIdTagsRelFkHead');\n }\n // parse inputs\n $resourcePath = \"/Designs/{id}/tags/rel/{fk}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($fk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"fk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($fk),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'HEAD',\n $queryParams,\n $httpBody,\n $headerParams,\n 'bool',\n '/Designs/{id}/tags/rel/{fk}'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, 'bool', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'bool', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "public function teamBuilderConfigsIdProductSizeMaterialsRelFkPutWithHttpInfo($id, $fk, $data = null)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling teamBuilderConfigsIdProductSizeMaterialsRelFkPut');\n }\n // verify the required parameter 'fk' is set\n if ($fk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $fk when calling teamBuilderConfigsIdProductSizeMaterialsRelFkPut');\n }\n // parse inputs\n $resourcePath = \"/TeamBuilderConfigs/{id}/productSizeMaterials/rel/{fk}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($fk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"fk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($fk),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n // body params\n $_tempBody = null;\n if (isset($data)) {\n $_tempBody = $data;\n }\n\n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'PUT',\n $queryParams,\n $httpBody,\n $headerParams,\n '\\Swagger\\Client\\Model\\TeamBuilderConfigProductSizeMaterial',\n '/TeamBuilderConfigs/{id}/productSizeMaterials/rel/{fk}'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, '\\Swagger\\Client\\Model\\TeamBuilderConfigProductSizeMaterial', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), '\\Swagger\\Client\\Model\\TeamBuilderConfigProductSizeMaterial', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }", "public function templatesIdMembersRelFkHeadWithHttpInfo($id, $fk)\n {\n // verify the required parameter 'id' is set\n if ($id === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $id when calling templatesIdMembersRelFkHead');\n }\n // verify the required parameter 'fk' is set\n if ($fk === null) {\n throw new \\InvalidArgumentException('Missing the required parameter $fk when calling templatesIdMembersRelFkHead');\n }\n // parse inputs\n $resourcePath = \"/Templates/{id}/members/rel/{fk}\";\n $httpBody = '';\n $queryParams = array();\n $headerParams = array();\n $formParams = array();\n $_header_accept = $this->apiClient->selectHeaderAccept(array('application/json', 'application/xml', 'text/xml', 'application/javascript', 'text/javascript'));\n if (!is_null($_header_accept)) {\n $headerParams['Accept'] = $_header_accept;\n }\n $headerParams['Content-Type'] = $this->apiClient->selectHeaderContentType(array('application/json','application/x-www-form-urlencoded','application/xml','text/xml'));\n\n // path params\n if ($id !== null) {\n $resourcePath = str_replace(\n \"{\" . \"id\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($id),\n $resourcePath\n );\n }\n // path params\n if ($fk !== null) {\n $resourcePath = str_replace(\n \"{\" . \"fk\" . \"}\",\n $this->apiClient->getSerializer()->toPathValue($fk),\n $resourcePath\n );\n }\n // default format to json\n $resourcePath = str_replace(\"{format}\", \"json\", $resourcePath);\n\n \n // for model (json/xml)\n if (isset($_tempBody)) {\n $httpBody = $_tempBody; // $_tempBody is the method argument, if present\n } elseif (count($formParams) > 0) {\n $httpBody = $formParams; // for HTTP post (form)\n }\n // this endpoint requires API key authentication\n $apiKey = $this->apiClient->getApiKeyWithPrefix('access_token');\n if (strlen($apiKey) !== 0) {\n $queryParams['access_token'] = $apiKey;\n }\n // make the API Call\n try {\n list($response, $statusCode, $httpHeader) = $this->apiClient->callApi(\n $resourcePath,\n 'HEAD',\n $queryParams,\n $httpBody,\n $headerParams,\n 'bool',\n '/Templates/{id}/members/rel/{fk}'\n );\n\n return array($this->apiClient->getSerializer()->deserialize($response, 'bool', $httpHeader), $statusCode, $httpHeader);\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = $this->apiClient->getSerializer()->deserialize($e->getResponseBody(), 'bool', $e->getResponseHeaders());\n $e->setResponseObject($data);\n break;\n }\n\n throw $e;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Get support contacts from active support
public function GetSupportContacts($options = array()){ if($this->support){ return $this->support->GetContacts($options); } return false; }
[ "public function getContacts();", "public function getContacts(){\n\t\n\t\t$db\t\t= $this->getDbo();\n\t\t\n\t\t$query\t= $db->getQuery( true );\n\t\t$query->select( '*' );\n\t\t$query->from( '#__zbrochure_providers_contacts as c' );\n\t\t$query->join( 'LEFT','#__zbrochure_providers as p on p.provider_id = c.provider_id' );\n\t\t\n\t\t$db->setQuery( $query );\n\t\t$contacts = $db->loadObjectList();\n\t\t\n\t\treturn $contacts;\n\t}", "public function getMyContacts() {\n return $this -> plugin -> getMyContacts();\n }", "function getUserContacts()\n\t{ \n\t\t// refresh tokens if needed \n\t\t$this->refreshToken(); \n\n\t\tif( ! isset( $this->config['contacts_param'] ) ){\n\t\t\t$this->config['contacts_param'] = array( \"max-results\" => 500 );\n\t\t}\n\n\t\t$response = $this->api->api( \"https://www.google.com/m8/feeds/contacts/default/full?\" \n\t\t\t\t\t\t\t. http_build_query( array_merge( array('alt' => 'json'), $this->config['contacts_param'] ) ) ); \n\n\t\tif( ! $response ){\n\t\t\treturn ARRAY();\n\t\t}\n \n\t\t$contacts = ARRAY(); \n\n\t\tforeach( $response->feed->entry as $idx => $entry ){\n\t\t\t$uc = new Hybrid_User_Contact();\n\n\t\t\t$uc->email = isset($entry->{'gd$email'}[0]->address) ? (string) $entry->{'gd$email'}[0]->address : ''; \n\t\t\t$uc->displayName = isset($entry->title->{'$t'}) ? (string) $entry->title->{'$t'} : ''; \n\t\t\t$uc->identifier = $uc->email;\n\n\t\t\t$contacts[] = $uc;\n\t\t} \n\n\t\treturn $contacts;\n \t}", "function getUserContacts()\r\n\t{\r\n\t}", "public function contactsGetContacts()\n {\n $endpoint = '/contacts';\n $data = ['access_token' => $this->config['access_token']];\n\n // Make API Call\n $result = samsara::callAPI(null, $this->config['base_url'] . $endpoint, $data);\n\n return $result;\n }", "public function getContacts()\n {\n $l_sql = 'SELECT *, isys_catg_mail_addresses_list__title AS isys_cats_person_list__mail_address\n\t\t\tFROM isys_cats_person_nagios_list\n\t\t\tINNER JOIN isys_cats_person_list ON isys_cats_person_list__isys_obj__id = isys_cats_person_nagios_list__isys_obj__id\n\t\t\tINNER JOIN isys_obj ON isys_obj__id = isys_cats_person_list__isys_obj__id\n\t\t\tLEFT JOIN isys_catg_mail_addresses_list ON (isys_obj__id = isys_catg_mail_addresses_list__isys_obj__id AND isys_catg_mail_addresses_list__primary = 1)\n\t\t\tWHERE isys_obj__status = ' . $this->convert_sql_int(C__RECORD_STATUS__NORMAL) . ';';\n\n return $this->retrieve($l_sql . ';');\n }", "private function getContacts()\n {\n $url = $this->sendhuburl . 'contacts/'; // . $this->sendhubcredential;\n \n $output = Yii::app()->curl->get($url, $this->sendhubcredential); \n $contacts = CJSON::decode($output);\n \n array_shift($contacts);\n \n return $contacts;\n \n }", "public function getContacts()\n {\n return $this->members()->where('type', 'contact')->get();\n }", "function getUserContacts() {\n // refresh tokens if needed \n $this->refreshToken();\n\n $contacts = array();\n $key_temp = 0;\n if (!isset($this->config['contacts_param'])) {\n $this->config['contacts_param'] = array(\"max-results\" => 500);\n }\n\n // Google Gmail and Android contacts\n if (strpos($this->scope, '/m8/feeds/') !== false) {\n\n $response = $this->api->api(\"https://www.google.com/m8/feeds/contacts/default/full?\"\n . http_build_query(array_merge(array('alt' => 'json', 'v' => '3.0'), $this->config['contacts_param'])));\n\n if (!$response) {\n return ARRAY();\n }\n\n if (isset($response->feed->entry)) {\n foreach ($response->feed->entry as $idx => $entry) {\n if (isset($entry->{'gd$email'}[0]->address) && !empty($entry->{'gd$email'}[0]->address)) {\n $contacts[$key_temp]['email'] = isset($entry->{'gd$email'}[0]->address) ? (string) $entry->{'gd$email'}[0]->address : '';\n $contacts[$key_temp]['name'] = isset($entry->title->{'$t'}) && !empty($entry->title->{'$t'}) ? (string) $entry->title->{'$t'} : $contacts[$key_temp]['email'];\n $contacts[$key_temp]['identifier'] = ($contacts[$key_temp]['email'] != '') ? $contacts[$key_temp]['email'] : '';\n $contacts[$key_temp]['description'] = '';\n if (property_exists($entry, 'link')) {\n /**\n * sign links with access_token\n */\n if (is_array($entry->link)) {\n foreach ($entry->link as $l) {\n if (property_exists($l, 'gd$etag') && $l->type == \"image/*\") {\n $contacts[$key_temp]['picture'] = $this->addUrlParam($l->href, array('access_token' => $this->api->access_token));\n } else if ($l->type == \"self\") {\n $contacts[$key_temp]['profileURL'] = $this->addUrlParam($l->href, array('access_token' => $this->api->access_token));\n }\n }\n }\n } else {\n $contacts[$key_temp]['profileURL'] = '';\n }\n if (property_exists($response, 'website')) {\n if (is_array($response->website)) {\n foreach ($response->website as $w) {\n if ($w->primary == true)\n $contacts[$key_temp]['webSiteURL'] = $w->value;\n }\n } else {\n $contacts[$key_temp]['webSiteURL'] = $response->website->value;\n }\n } else {\n $contacts[$key_temp]['webSiteURL'] = '';\n }\n\n $key_temp++;\n }\n }\n }\n }\n\n // Google social contacts\n /*\n if (strpos($this->scope, '/auth/plus.login') !== false) {\n\n $response = $this->api->api(\"https://www.googleapis.com/plus/v1/people/me/people/visible?\"\n . http_build_query($this->config['contacts_param']));\n\n if (!$response) {\n return ARRAY();\n }\n\n foreach ($response->items as $idx => $item) {\n $contacts[$key_temp]['email'] = (property_exists($item, 'email')) ? $item->email : '';\n $contacts[$key_temp]['displayName'] = (property_exists($item, 'displayName')) ? $item->displayName : '';\n $contacts[$key_temp]['identifier'] = (property_exists($item, 'id')) ? $item->id : '';\n\n $contacts[$key_temp]['description'] = (property_exists($item, 'objectType')) ? $item->objectType : '';\n $contacts[$key_temp]['photoURL'] = (property_exists($item, 'image')) ? ((property_exists($item->image, 'url')) ? $item->image->url : '') : '';\n $contacts[$key_temp]['profileURL'] = (property_exists($item, 'url')) ? $item->url : '';\n $contacts[$key_temp]['webSiteURL'] = '';\n\n $key_temp++;\n }\n }\n * \n */\n\n return $contacts;\n }", "public function getFoundationcontacts()\n\t{\n\t\treturn $this->foundationcontacts;\n\t}", "function invit0r_get_contacts($from, $to)\r\n{\r\n\tglobal $invit0r_user;\r\n\r\n\treturn $invit0r_user -> getContacts($from, $to);\r\n}", "function get_contacts()\r\n\t{\r\n\t\trequire_once('modules/Contacts/Contact.php');\r\n\t\t$this->load_relationship('contacts');\r\n\t\t$query_array=$this->contacts->getQuery(true);\r\n\t\t\r\n\t\t//update the select clause in the retruned query.\r\n\t\t$query_array['select']=\"SELECT contacts.id, contacts.first_name, contacts.last_name, contacts.title, contacts.email1, contacts.phone_work, opportunities_contacts.contact_role as opportunity_role, opportunities_contacts.id as opportunity_rel_id \";\r\n\t\r\n\t\t$query='';\r\n\t\tforeach ($query_array as $qstring) {\r\n\t\t\t$query.=' '.$qstring;\r\n\t\t}\t\r\n\t $temp = Array('id', 'first_name', 'last_name', 'title', 'email1', 'phone_work', 'opportunity_role', 'opportunity_rel_id');\r\n\t\treturn $this->build_related_list2($query, new Contact(), $temp);\r\n\t}", "public static function getSimpleContacts()\r\n {\r\n $contactObj = self::listPeopleConnections();\r\n\r\n // Parser\r\n $contacts = [];\r\n \r\n if (count($contactObj->getConnections()) != 0) {\r\n \r\n foreach ($contactObj->getConnections() as $person) {\r\n\r\n // var_dump($person);exit;\r\n $data = [];\r\n // Resource name\r\n $data['id'] = $person->getResourceName();\r\n $data['name'] = isset($person->getNames()[0]) \r\n ? $person->getNames()[0]->getDisplayName() \r\n : null;\r\n $data['email'] = isset($person->getEmailAddresses()[0]) \r\n ? $person->getEmailAddresses()[0]->getValue() \r\n : null;\r\n $data['phone'] = isset($person->getPhoneNumbers()[0]) \r\n ? $person->getPhoneNumbers()[0]->getValue() \r\n : null;\r\n\r\n $contacts[] = $data;\r\n }\r\n }\r\n \r\n return $contacts;\r\n }", "public function getContactInformation();", "public function getAllContacts(){\n \n return $this->contacts;\n \n }", "public function getContactList()\n {\n return $this->contactList;\n }", "function get_contacts()\n\t{\n\t\t// First, get the list of IDs.\n\t\t$query = \"SELECT c.id, c.first_name, c.last_name, c.title, c.email1, c.phone_work, o_c.contact_role as opportunity_role, o_c.id as opportunity_rel_id \".\n\t\t\t\t \"from $this->rel_contact_table o_c, contacts c \".\n\t\t\t\t \"where o_c.opportunity_id = '$this->id' and o_c.deleted=0 and c.id = o_c.contact_id AND c.deleted=0 order by c.last_name\";\n\n\t $temp = Array('id', 'first_name', 'last_name', 'title', 'email1', 'phone_work', 'opportunity_role', 'opportunity_rel_id');\n\t\treturn $this->build_related_list2($query, new Contact(), $temp);\n\t}", "public function getAllContacts()\n\t{\n\t\t$accessToken = Redis::get('hubspot:accesstoken');\n\t\t$client = new Client();\n\t $response = $client->request('GET', $this->hubspotUrl.'/contacts/v1/lists/all/contacts/all', [\n\t \t'headers' => [\n\t \t'Authorization' => 'Bearer '.$accessToken\n\t ]\n\t ]);\n\t $response = json_decode($response->getBody());\n\t return $response;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ function of free coupon list//... like as pizza or other
function free_coupon_list() { $data['free_coupon_list'] = $this->login_model->get_record_join_two_table('free_coupon_category', 'free_coupon_list', 'free_coupon_category_id', 'fee_coupon_category_id','*',''); $this->load->view('newadmin/menu'); $this->load->view('newadmin/header'); $this->load->view('newadmin/listing/free_coupon_list_view', $data); $this->load->view('newadmin/footer'); }
[ "function coupon_do_list_shortcode() {\n\t\n\t$coupons = wp_coupon_get_coupons();\n\tif ( $coupons && is_array( $coupons ) && count( $coupons ) > 0 ) {\n\t\t\n\t\t$r = \"<ul class=\\\"couponlist\\\">\\n\";\n\t\t\n\t\tforeach( $coupons as $coupon ) {\n\t\t\n\t\t\t$r .= '<li><a href=\"' . wp_coupon_link( $coupon->guid ) . '\">' . htmlspecialchars( $coupon->name ) . '</a></li>';\n\t\t\n\t\t}\n\t\t\n\t\t$r .= '</ul>';\n\t\t\n\t\treturn $r;\n\t}\n\t\n}", "function getCouponList($coupon)\n {\n $str = $numstr = '';\n if (isset($coupon->keyword)) {\n $str = '\\'%' . $coupon->keyword . '%\\'';\n $numstr = '\\'' . $coupon->keyword . '\\'';\n }\n if ($coupon->keyword == null && $coupon->sort == null)\n return $this->selectDB(\"SELECT Coupon.*, CouponType.CouponTypeName FROM Coupon, CouponType WHERE CouponType.CouponTypeID = Coupon.CouponTypeID order by CouponID\");\n else if ($coupon->keyword == null)\n return $this->selectDB(\"SELECT Coupon.*, CouponType.CouponTypeName FROM Coupon, CouponType WHERE CouponType.CouponTypeID = Coupon.CouponTypeID\" . $coupon->sort);\n else if ($coupon->sort == null)\n return $this->selectDB(\"SELECT Coupon.*, CouponType.CouponTypeName FROM Coupon, CouponType WHERE \n CouponType.CouponTypeID = Coupon.CouponTypeID and (Coupon.CouponName like \" . $str .\n \" or Coupon.CouponCode like \" . $str . \" or Coupon.Quantity like \" . $numstr . \" or Coupon.Price like \" . $numstr .\n \" or Coupon.PriceCondition like \" . $numstr . \" or Coupon.StartDate like \" . $str . \" or Coupon.EndDate like \" . $str . \" or Coupon.ExpEndDate like \" . $str . \")\");\n else\n return $this->selectDB(\"SELECT Coupon.*, CouponType.CouponTypeName FROM Coupon, CouponType WHERE \n CouponType.CouponTypeID = Coupon.CouponTypeID and (Coupon.CouponName like \" . $str .\n \" or Coupon.CouponCode like \" . $str . \" or Coupon.Quantity like \" . $numstr . \" or Coupon.Price like \" . $numstr .\n \" or Coupon.PriceCondition like \" . $numstr . \" or Coupon.StartDate like \" . $str . \" or Coupon.EndDate like \" . $str . \" or Coupon.ExpEndDate like \" . $str . \")\" . $coupon->sort);\n }", "public function show_available_coupons( $available_coupons_heading = '', $page = 'checkout' ) {\n\n\t\t\t\t$coupons = $this->sc_get_available_coupons_list( array() );\n\n\t\t\t\tif ( empty( $coupons ) ) return false;\n\n\t\t\t\t?>\n\t\t\t\t<div id='coupons_list'><h2><?php _e( stripslashes( $available_coupons_heading ), self::$text_domain ) ?></h2><div id=\"all_coupon_container\">\n\t\t\t\t\t<?php\n\n\t\t\t\t\tif( function_exists( 'get_product' ) ){\n\t\t\t\t\t\t$coupons_applied = $this->global_wc()->cart->get_applied_coupons();\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$coupons_applied = $_SESSION['coupons'];\n\t\t\t\t\t}\n\n\t\t\t\t\tforeach ( $coupons as $code ) {\n\n\t\t\t\t\t\tif ( in_array( $code->post_title, $coupons_applied ) ) continue;\n\n\t\t\t\t\t\t$coupon = new WC_Coupon( $code->post_title );\n\n\t\t\t\t\t\tif ( ! $coupon->is_valid() ) {\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif( ( empty( $coupon->amount ) || $coupon->amount == 0 ) && $coupon->free_shipping == \"no\" && ! empty( $coupon->discount_type ) && $coupon->discount_type != 'free_gift' )\n\t\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t\tif ( empty( $coupon->discount_type ) || ( ! empty( $coupon->expiry_date ) && current_time( 'timestamp' ) > $coupon->expiry_date ) )\n\t\t\t\t\t\t\tcontinue;\n\n\t\t\t\t\t\t$coupon_post = get_post( $coupon->id );\n\n\t\t\t\t\t\t$coupon_data = $this->get_coupon_meta_data( $coupon );\n\n\t\t\t\t\t\techo '<div class=\"coupon-container apply_coupons_credits blue medium\" name=\"'.$coupon->code.'\" style=\"cursor: pointer\">\n\t\t\t\t\t\t\t<div class=\"coupon-content blue dashed small\" name=\"'.$coupon->code.'\">\n\t\t\t\t\t\t\t\t<div class=\"discount-info\" >';\n\n\t\t\t\t\t\tif ( ! empty( $coupon_data['coupon_amount'] ) && $coupon->amount != 0 ) {\n\t\t\t\t\t\t\techo $coupon_data['coupon_amount'] . ' ' . $coupon_data['coupon_type'];\n\t\t\t\t\t\t\tif ( $coupon->free_shipping == \"yes\" ) {\n\t\t\t\t\t\t\t\techo __( ' &amp; ', self::$text_domain );\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif ( $coupon->free_shipping == \"yes\" ) {\n\t\t\t\t\t\t\techo __( 'Free Shipping', self::$text_domain );\n\t\t\t\t\t\t}\n\t\t\t\t\t\techo '</div>';\n\n\t\t\t\t\t\techo '<div class=\"code\">'. $coupon->code .'</div>';\n\n\t\t\t\t\t\t$show_coupon_description = get_option( 'smart_coupons_show_coupon_description', 'no' );\n\t\t\t\t\t\tif ( ! empty( $coupon_post->post_excerpt ) && $show_coupon_description == 'yes' ) {\n\t\t\t\t\t\t\techo '<div class=\"discount-description\">' . $coupon_post->post_excerpt . '</div>';\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tif( !empty( $coupon->expiry_date ) ) {\n\n\t\t\t\t\t\t\t$expiry_date = $this->get_expiration_format( $coupon->expiry_date );\n\n\t\t\t\t\t\t\techo '<div class=\"coupon-expire\">'. $expiry_date .'</div>';\n\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\techo '<div class=\"coupon-expire\">'. __( 'Never Expires', self::$text_domain ) . '</div>';\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\techo '</div>\n\t\t\t\t\t\t\t</div>';\n\n\t\t\t\t\t}\n\n\t\t\t\t\tif ( did_action( 'wc_smart_coupons_frontend_styles_and_scripts' ) <= 0 || ! defined( 'DOING_AJAX' ) || DOING_AJAX !== true ) {\n\t\t\t\t\t\t$this->frontend_styles_and_scripts( array( 'page' => $page ) );\n\t\t\t\t\t}\n\t\t\t\t\t?>\n\t\t\t\t</div></div>\n\t\t\t\t<?php\n\n\t\t\t}", "function getCouponCategoryList()\n\t\t{\n\t\t\t$coupons = $this->manageContent->getValue(\"coupon_category\",\"*\");\n\t\t\tforeach($coupons as $coupon)\n\t\t\t{\n\t\t\t\tif($coupon['status'] == 1)\n\t\t\t\t{\n\t\t\t\t\t$status = 'Yes';\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$status = 'No';\n\t\t\t\t}\n\t\t\t\techo '<tr>\n\t\t\t\t\t <td>'.$coupon['category'].'</td>\n\t\t\t\t\t <td>'.$this->changeDateFormat($coupon['date']).'</td>\n\t\t\t\t\t <td>'.$status.'</td>\n\t\t\t\t\t <td><a href=\"editCouponCategory.php?c_id='.$coupon['id'].'\">\n\t\t\t\t\t <button class=\"btn btn-warning\" type=\"button\">\n\t\t\t\t\t\t\t<span class=\"icon-pencil\"></span>&nbsp;&nbsp;EDIT</button></a>\n\t\t\t\t\t</td>\n\t\t\t\t\t<td><a href=\"v-includes/functions/function.deleteCouponCategory.php?c_id='.$coupon['id'].'\">\n\t\t\t\t\t<button class=\" btn btn-danger\" type=\"button\">\n\t\t\t\t\t\t<span class=\" icon-trash\"></span>&nbsp;&nbsp;DELETE</button></a>\n\t\t\t\t\t</td></tr/>';\n\t\t\t\t\n\t\t\t}\n\t\t}", "protected function get_coupons_from_cart()\n {\n }", "function add_new_gift_coupons()\n {\n $this->db->select('*');\n $this->db->order_by('rand()');\n $query = $this->db->get('tbl_coupon_temp');\n $results = $query->result();\n foreach($results as $result)\n {\n echo $result->coupon_code.\"<br>\";\n }\n }", "function woocommerce_checkout_coupon_form() {\n}", "function data_coupon($debut, $fin)\n{\n $data = [];\n\n /* Format dates */\n $debut = date('Y-m-d H:i:s', strtotime(str_replace('/', '-', $debut)));\n $fin = date('Y-m-d H:i:s', strtotime('-1 second', strtotime('+1 day', strtotime(str_replace('/', '-', $fin)))));\n\n $orders = Mage::getModel('sales/order')->getCollection()\n ->addFieldToFilter('status', array('nin' => $GLOBALS['ORDER_STATUS_NODISPLAY']))\n ->addAttributeToFilter('created_at', array('from' => $debut, 'to' => $fin))\n ->addAttributeToFilter('status', array('eq' => Mage_Sales_Model_Order::STATE_COMPLETE))\n ->addAttributeToSort('increment_id', 'DESC');\n\n //Get info on delivery date\n // $orders->getSelect()->joinLeft('mwddate_store', 'main_table.entity_id=mwddate_store.sales_order_id', array('mwddate_store.ddate_id'));\n // $orders->getSelect()->joinLeft('mwddate', 'mwddate_store.ddate_id=mwddate.ddate_id', array('ddate' => 'mwddate.ddate'));\n\n foreach ($orders as $order) {\n array_push($data, [\n 'increment_id' => $order->getIncrementId(),\n 'quartier' => $order->getStoreName(),\n 'Coupon Code' => $order->getCouponCode(),\n ]);\n\n arsort($data);\n }\n\n $data_conso = [];\n foreach ($data as $row) {\n if ($row['Coupon Code']) {\n $data_conso[$row['Coupon Code']][] = $row['increment_id'].' - '.$row['quartier'];\n }\n }\n\n return $data_conso;\n}", "public static function remove_coupon()\n {\n }", "public static function remove_order_coupon()\n {\n }", "function get_coupons_discount_info( $summ , $form , $bktype ){\n\n $original_summ = $summ; // Original cost for booking\n\n $coupons = $this->get_coupons_for_this_resource($bktype);\n\n if ( count($coupons) <= 0) return false; // No coupons so return as it is\n\n $booking_form_show = get_form_content ($form, $bktype);\n\n if (isset($booking_form_show['coupon']))\n if (! empty($booking_form_show['coupon'])) {\n\n $entered_code =$booking_form_show['coupon'];\n foreach ($coupons as $coupon) {\n\n if ($entered_code == $coupon->coupon_code)\n if ( ( $summ >= $coupon->coupon_min_sum ) && ( ! empty($coupon->coupon_active) ) ) { //FixIn: 5.4.2 \n if ($coupon->coupon_type == 'fixed') { // Fixed discount\n if ($coupon->coupon_value < $summ) {\n $currency = apply_bk_filter('get_currency_info', 'paypal');\n return (array($original_summ, $coupon->coupon_value, $coupon->coupon_code , $currency . $coupon->coupon_value ));\n }\n }\n if ($coupon->coupon_type == '%') { // Procent of\n if ($coupon->coupon_value < 100) {\n return (array($original_summ , $coupon->coupon_value * $original_summ / 100, $coupon->coupon_code, round($coupon->coupon_value,0) . '%' ));\n }\n }\n }\n\n }\n\n }\n\n return false ;\n }", "function orderProductCoupon($orderProductHC){\n \n }", "private function redeemCoupon()\n {\n }", "function capweb_woocommerce_coupon_links(){\n\n\t// Bail if WooCommerce or sessions aren't available.\n\n\tif (!function_exists('WC') || !WC()->session) {\n\t\treturn;\n\t}\n\n\t/**\n\t * Filter the coupon code query variable name.\n\t *\n\t * @since 1.0.0\n\t *\n\t * @param string $query_var Query variable name.\n\t */\n\t$query_var = apply_filters('woocommerce_coupon_links_query_var', 'coupon_code');\n\n\t// Bail if a coupon code isn't in the query string.\n\n\tif (empty($_GET[$query_var])) {\n\t\treturn;\n\t}\n\n\t// Set a session cookie to persist the coupon in case the cart is empty.\n\n\tWC()->session->set_customer_session_cookie(true);\n\n\t// Apply the coupon to the cart if necessary.\n\n\tif (!WC()->cart->has_discount($_GET[$query_var])) {\n\n\t\t// WC_Cart::add_discount() sanitizes the coupon code.\n\n\t\tWC()->cart->add_discount($_GET[$query_var]);\n\t}\n}", "public function coupon(){\n $coupons = null;\n return view('user.coupon', ['coupons' => $coupons]);\n }", "function show_coupons_list($coupons,$instance,$unsortedurl,$currentsort){\n\t\n\t\tif(!$coupons){\n\t\t\treturn $this->output->heading(get_string('nocoupons','enrol_coupon'), 3, 'main');\n\t\t}\n\t\n\t\t$table = new html_table();\n\t\t$table->id = ENROL_COUPON_FRANKY . '_cpanel';\n\t\t$table->head = array(\n\t\t\thtml_writer::link(new moodle_url($unsortedurl,array('sort'=>$currentsort =='iddsc' ? 'idasc' : 'iddsc')),get_string('id', 'enrol_coupon')),\n\t\t\thtml_writer::link(new moodle_url($unsortedurl,array('sort'=>$currentsort =='namedsc' ? 'nameasc' : 'namedsc')),get_string('couponname', 'enrol_coupon')),\n\t\t\thtml_writer::link(new moodle_url($unsortedurl,array('sort'=>$currentsort =='typedsc' ? 'typeasc' : 'typedsc')),get_string('coupontype', 'enrol_coupon')),\n\t\t\thtml_writer::link(new moodle_url($unsortedurl,array('sort'=>$currentsort =='couponcodedsc' ? 'couponcodeasc' : 'couponcodedsc')),get_string('couponcode', 'enrol_coupon')),\n\t\t\thtml_writer::link(new moodle_url($unsortedurl,array('sort'=>$currentsort =='maxusesdsc' ? 'maxusesasc' : 'maxusesdsc')),get_string('maxuses', 'enrol_coupon')),\n\t\t\tget_string('actions', 'enrol_coupon')\n\t\t);\n\t\t$table->headspan = array(1,1,1,1,1,3);\n\t\t$table->colclasses = array(\n\t\t\t'couponid','couponname','coupontype', 'couponcode','actions'\n\t\t);\n\n\t\t//sort by start date\n\t\t//core_collator::asort_objects_by_property($coupons,'timecreated',core_collator::SORT_NUMERIC);\n\n\t\t//loop through the homoworks and add to table\n\t\tforeach ($coupons as $coupon) {\n\t\t\t$row = new html_table_row();\n\t\t\n\t\t\t$couponidcell = new html_table_cell($coupon->id);\t\n\t\t\t$couponnamecell = new html_table_cell($coupon->name);\t\n\t\t\tswitch($coupon->type){\n\t\t\t\tcase ENROL_COUPON_TYPE_STANDARD:\n\t\t\t\t\t//actuallystandard should not enter results here, just in case\n\t\t\t\t\t$coupontype = get_string('standard',ENROL_COUPON_FRANKY);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ENROL_COUPON_TYPE_BULK:\n\t\t\t\t\t$coupontype = get_string('bulk',ENROL_COUPON_FRANKY);\n\t\t\t\t\tbreak;\n\t\t\t\tcase ENROL_COUPON_TYPE_RANDOMBULK:\n\t\t\t\t\t$coupontype = get_string('randombulk',ENROL_COUPON_FRANKY);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$coupontype = get_string('unknown',ENROL_COUPON_FRANKY);\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\t$coupontypecell = new html_table_cell($coupontype);\n\t\t\t\n\t\t\t$couponcodecell = new html_table_cell($coupon->couponcode);\n\t\t\t\n\t\t\t$maxusescell = new html_table_cell($coupon->maxuses);\n\t\t\n\t\t\t$actionurl = '/enrol/coupon/managecoupons.php';\n\t\t\t$editurl = new moodle_url($actionurl, array('id'=>$instance->id,'couponid'=>$coupon->id));\n\t\t\t$editlink = html_writer::link($editurl, get_string('editcoupon', 'enrol_coupon'));\n\t\t\t$editcell = new html_table_cell($editlink);\n\n\t\t\t$reporturl = new moodle_url('/enrol/coupon/reports.php',array('itemid'=>$coupon->id, 'id'=>$instance->id, 'report'=>'coupondetails'));\n\t\t\t$reportlink = html_writer::link($reporturl, get_string('details', 'enrol_coupon'));\n\t\t\t$reportcell = new html_table_cell($reportlink);\n\t\t\n\t\t\t$deleteurl = new moodle_url($actionurl, array('id'=>$instance->id,'couponid'=>$coupon->id,'action'=>'confirmdelete'));\n\t\t\t$deletelink = html_writer::link($deleteurl, get_string('deletecoupon', 'enrol_coupon'));\n\t\t\t$deletecell = new html_table_cell($deletelink);\n\n\t\t\t$row->cells = array(\n\t\t\t\t$couponidcell, $couponnamecell, $coupontypecell, $couponcodecell, $maxusescell,$reportcell, $editcell, $deletecell\n\t\t\t);\n\t\t\t$table->data[] = $row;\n\t\t}\n\n\t\treturn html_writer::table($table);\n\n\t}", "public function testCreateCouponItem()\n {\n }", "public function couponAction()\n {\n $this->checkCoupon();\n }", "public function applyFakeCoupons()\n {\n global $woocommerce;\n\n // 'newyear' is a temporary coupon for validation.\n $coupon_code = apply_filters('woocommerce_coupon_code', $this->coupon_code);\n\n // Getting New Instance with the Coupon Code.\n $the_coupon = FlycartWoocommerceCoupon::wc_get_coupon($coupon_code);\n if($the_coupon->is_valid()){\n self::setAppliedCoupon($coupon_code);\n }\n // Validating the Coupon as Valid and discount status.\n if ($the_coupon->is_valid() && !$woocommerce->cart->has_discount($coupon_code)) {\n\n // Do not apply coupon with individual use coupon already applied\n if ($woocommerce->cart->applied_coupons) {\n foreach ($woocommerce->cart->applied_coupons as $code) {\n $coupon = FlycartWoocommerceCoupon::wc_get_coupon($code);\n if (FlycartWoocommerceCoupon::get_individual_use($coupon) == true) {\n return false;\n }\n }\n }\n\n // Add coupon\n $woocommerce->cart->applied_coupons[] = $coupon_code;\n $trigger_applied_coupon_before_load_cart = apply_filters('woo_discount_rules_trigger_applied_coupon_before_load_cart', false);\n if($trigger_applied_coupon_before_load_cart){\n add_action('woocommerce_before_cart', array($this, 'trigger_event_woocommerce_applied_coupon'));\n add_action('woocommerce_review_order_before_cart_contents', array($this, 'trigger_event_woocommerce_applied_coupon'));\n } else {\n remove_action('woocommerce_after_calculate_totals', array($this, 'applyFakeCoupons'));\n do_action('woocommerce_applied_coupon', $coupon_code);\n add_action('woocommerce_after_calculate_totals', array($this, 'applyFakeCoupons'));\n }\n\n return true;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes indexes from an array if they are zero length after trimming
public function removeEmptyIndexes($array) { $length = count($array); for ($i=$length-1; $i >= 0; $i--) { if(trim($array[$i]) == ''){ unset($array[$i]); } } sort($array); return $array; }
[ "function scoutnet_remove_empty_elements($array)\t{\t\t\n\t\treturn array_values(array_filter($array));\t\t\n\t}", "public static function removeEmptyIndexes($array)\n {\n\n $length = count($array);\n\n for ($i = $length - 1; $i >= 0; $i--) {\n if (trim($array[$i]) == '') {\n unset($array[$i]);\n }\n }\n\n sort($array);\n return $array;\n }", "function arrayTrim($array) {\n\t\tforeach ($array as $element) {\n\t\t\t$element = trim($element);\n\t\t}\n\n\t\t//Adding this element keeps array_search from returning 0:\n\t\t//0 is the first key, which may be correct, but 0 is interpreted as false.\n\t\t//Adding this element makes all the keys be positive integers.\n\t\tarray_unshift($array, \"\");\n\t\treturn $array;\n\t}", "function array_filter_empty_only($input_array){\n $return_array = array_values(array_filter($input_array, 'query_trim', ARRAY_FILTER_USE_BOTH)) ;\n return $return_array;\n }", "public function delBlankEmptyValues(array $a){\n $a = array_map('trim', $a); //suppress blanks at begining and at end of values in array\n return array_values(array_filter($a));\n }", "function ArrayStripEmpty(Array & $array)\n{\n foreach ($array as $key => $value)\n if (is_array($array[$key]))\n ArrayStripEmpty($array[$key]);\n else if (empty($value))\n unset($array[$key]);\n}", "function arrayclean ($array) {\n\t \tforeach ($array as $v)\n\t \t\tif (trim($v)!=\"\")\n\t \t\t\t$newarray[]=$v;\n\t \treturn $newarray;\n\t }", "function _filterArrayEmpty($input)\n{\n return array_filter($input, '_notEmpty');\n}", "function remove_empty2(&$str_arr){\r\n foreach($str_arr as $index => $word){\r\n if(!$word)\r\n unset($str_arr[$index]);\r\n }\r\n}", "function wpp_remove_empty_elements( $array ) {\n\t\tforeach ( (array) $array as $key => $value ) {\n\t\t\tif ( is_array( $value ) ) {\n\t\t\t\tif ( empty( $value ) ) {\n\t\t\t\t\tunset( $array[ $key ] );\n\t\t\t\t} else {\n\t\t\t\t\t$array[ $key ] = wpp_remove_empty_elements( $value );\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tif ( empty( $value ) ) {\n\t\t\t\t\tunset( $array[ $key ] );\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\treturn $array;\n\t}", "function trim_array($arr) {\n array_walk_recursive($arr, function (&$trma) {\n $trma = trim($trma);\n });\n return $arr;\n }", "function trim_array(array $data)\n {\n return array_map('trim_if_string', $data);\n }", "static function removeEmptyValues($array){\n \n $newArray=array();\n $i=0;\n \n \n foreach($array as $key=>$value):\n \n if(trim($value)):\n $newArray[]=$value;\n $i++;\n endif;\n \n endforeach;\n \n return $newArray;\n \n }", "public static function noBlanks($array){\n $out = array();\n foreach ($array as $a) {\n if ($a) $out[] = $a;\n }\n return $out;\n }", "function array_remove_empty($arr) {\n\t$narr = array();\n\twhile ( list ($key, $val) = each($arr) ) {\n\t\tif (is_array($val)) {\n\t\t\t$val = array_remove_empty($val);\n\t\t\t// does the result array contain anything?\n\t\t\tif (count($val) != 0) {\n\t\t\t\t// yes :-)\n\t\t\t\t$narr[$key] = $val;\n\t\t\t}\n\t\t} else {\n\t\t\tif (! isEmptyString($val)) {\n\t\t\t\t$narr[$key] = $val;\n\t\t\t}\n\t\t}\n\t}\n\tunset($arr);\n\treturn $narr;\n\n}", "function remove_empty_elements(&$ary)\n\t{\n\t\tforeach ($ary as $key => $val)\n\t\t{\n\t\t\tif ( ($val == \" \") || empty($val) )\n\t\t\t{\n\t\t\t\t# Remove array key\n\t\t\t\tunset($ary[$key]);\n\t\t\t}\n\t\t}\n\t}", "function arr_trim(array $array)\n {\n $arr_trim = array_map('trim', $array);\n return $arr_trim;\n }", "protected function removeEmpty()\n {\n $ret_arr = array();\n foreach ($this->rows as $row) {\n $line = trim(join('', $row));\n if (!empty($line)) {\n $ret_arr[] = $row;\n }\n }\n $this->rows = $ret_arr;\n }", "public function arr_trim($arr) \n\t\t{\n\t\t\t$ret = array();\n\t\t\n\t\t\tforeach($arr as $k => $v)\n\t\t\t{\n\t\t\t\t$ret[$k] = $this->test_input($v);\n\t\t\t}\n\t\t\treturn $ret;\n\t\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the lesson validator
public function getValidator() { return new LessonValidator($this); }
[ "function & getValidator()\n {\n $validator = $this->calendar->getValidator();\n return $validator;\n }", "public function getValidatorInstance();", "public function getValidator(){\n\t\treturn $this->_validator;\n\t}", "public static function getValidator() {\n\t\treturn static::$validator;\n\t}", "public function getValidRuleHelper() {\n\t\t$rules = $this->validRuleProvider();\n\t\treturn $rules[0][0];\n\n\t}", "public function getValidator()\n {\n return $this->validator;\n }", "protected function getValidator()\n {\n return $this->_context['index']->getValidator($this->_context['validator']);\n }", "abstract protected function getValidatorInstance();", "protected static function validator() {\n\t\tif (empty(self::$validate)) {\n\t\t\tself::$validate = new MpoValidator();\n\t\t}\n\t\treturn self::$validate;\n\t}", "function GetValidator()\n\t\t{\n\t\t\tif (empty($this->validator))\n\t\t\t{\n\t\t\t\tif (strcasecmp(get_parent_class($this), \"Object\") == 0) $object_name = get_class($this);\n\t\t\t\telse $object_name = get_parent_class($this);\n\t\t\t\t$object_name = ucwords($object_name) . \"Validator\";\n\t\t\t\t\n\t\t\t\t$this->validator = new $object_name();\n\t\t\t}\n\t\t\treturn $this->validator;\n\t\t}", "public function getValidator()\n {//-------------------->> getVAlidator()\n\n $fullClassName = split( '_', get_class( $this ) );\n return DAO_Factory::getInstance()->getDAOModelValidator( $fullClassName[ count( $fullClassName ) - 1 ] );\n\n }", "public function getRule(): Validator\n {\n return $this\n ->validationRules\n ->get('text')\n ->length(\n $this->config->wordMinLength(),\n $this->config->wordMaxLength()\n )\n ->wordIsValid();\n }", "public function getValidator()\n {\n $className = Mage::getStoreConfig(self::CONFIG_XML_PATH_VALIDATOR);\n return Mage::getModel($className);\n }", "public function getValidator() {\n if (!$this->_validator) {\n $this->setValidator(Validator::makeFromShorthand([], $this->validate));\n }\n\n return $this->_validator;\n }", "protected function getValidatorInstance()\n {\n return $this->validator();\n }", "public function createValidator();", "public function validator()\n {\n return StudentValidator::class;\n }", "public function getDefaultValidator(){\n return $this->_defaultValidator;\n }", "public function validator()\n {\n return \"Kerozn\\\\Modules\\\\Contact\\\\Validator\\\\ContactValidator\";\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fungsi ini digunakan untuk mengambil daftar document berdasarkan id_document. This function use to get list of document base on id_document. $id_document = integer $lang = WEB_LANG_ID
public function getDocById($id_document, $lang) { $document = $this->core->podb->from('document') ->select(array('document_description.title')) ->leftJoin('document_description ON document_description.id_document = document.id_document') ->where('document.id_document', $id_document) ->where('document_description.id_language', $lang) ->where('document.active', 'Y') ->limit(1) ->fetch(); return $document; }
[ "function referentiel_get_liens_documents($activite_id, $userid, $context){\r\n// Cadre d'affichage des liens vers les documents\r\n $links_documents='';\r\n $s='';\r\n\t// Recuperer les documents associes à l'activite\r\n\t$records_document = referentiel_get_documents($activite_id);\r\n\tif ($records_document){\r\n // afficher\r\n\t\t// DEBUG\r\n\t\t// echo \"<br/>DEBUG<br />\\n\";\r\n\t\t// print_r($records_document);\r\n $nbressource=count($records_document);\r\n $s='<p><span class=\"bold\">'.\"\\n\";\r\n\t\tif ($nbressource>1){\r\n $s.=get_string('ressources_associees','referentiel',$nbressource);\r\n }\r\n else{\r\n $s.=get_string('ressource_associee','referentiel',$nbressource);\r\n }\r\n\r\n\r\n\t\t$compteur_document=0;\r\n\t\tforeach ($records_document as $record_d){\r\n if ($compteur_document%2==0)\r\n $bgcolor=\"#afefee\";\r\n else\r\n $bgcolor=\"#faefee\";\r\n\t\t\t$compteur_document++;\r\n \t$document_id=$record_d->id;\r\n\t\t\t$type_document = stripslashes($record_d->type_document);\r\n\t\t\t$description_document = stripslashes($record_d->description_document);\r\n\t\t\t$url_document = stripslashes($record_d->url_document);\r\n\t\t\t$ref_activite = $record_d->ref_activite;\r\n\t\t\t$cible_document = $record_d->cible_document; // fenêtre cible\r\n\t\t\t$etiquette_document = $record_d->etiquette_document; // etiquette\r\n\t\t\t// affichage de l'url\r\n\t\t\tif (preg_match('/moddata\\/referentiel/',$url_document)){\r\n\t\t\t // l'URL doit être transformée\r\n $data_r=new Object();\r\n\t\t\t\t$data_r->id = $document_id;\r\n\t\t\t\t$data_r->userid = $userid;\r\n\t\t\t\t$data_r->author = referentiel_get_user_info($userid);\r\n\t\t\t\t$data_r->url = $url_document;\r\n\t\t\t\t$data_r->filearea = 'document';\r\n \t\t$url_document = referentiel_m19_to_m2_file($data_r, $context, false, true);\r\n\t\t\t}\r\n\r\n\t\t\t$link=referentiel_affiche_url($url_document, $etiquette_document, $cible_document);\r\n\t\t\t$links_documents.='<li>'.$link.'</li>'.\"\\n\";\r\n }\r\n if ($links_documents){\r\n $s.= '<ul>'.$links_documents.'</ul>'.\"\\n\";\r\n }\r\n }\r\n $s.= '</p>'.\"\\n\";\r\n return $s;\r\n}", "function getAllDetailsByID($document_id = 0);", "public function cargar_datos_mov_doc($id_doc){\n\n try{\n \n \n $pdo = AccesoDB::getCon();\n \n \n $sql = 'select a.fec_reg_mov,a.monto_mov,concat(c.nom_usu,\" \",c.apepat_usu,\" \",c.apemat_usu) usu,a.obs_mov, b.desc_item est\n from mov_documento a, tab_param b, usuarios c\n where \n a.est_doc_mov = b.cod_item\n and b.cod_grupo = 2\n and a.usu_reg_mov = c.id_usu\n and a.id_doc_mov = :id_doc\n order by fec_reg_mov ';\n \n \n \n $stmt = $pdo->prepare($sql);\n $stmt->bindParam(\":id_doc\", $id_doc, PDO::PARAM_INT);\n $stmt->execute();\n $response = $stmt->fetchAll();\n return $response;\n } catch (Exception $e) {\n echo\"-1\";\n //echo\"<script type=\\\"text/javascript\\\">alert('Error, comuniquese con el administrador\". $e->getMessage().\" '); window.location='../../index.html';</script>\";\n }\n }", "function origine_document($id_doc) {\r\n\t$tab_ido=array(\r\n\t\t'article'=>'articles', \r\n\t\t'rubrique'=>'rubriques', \r\n\t\t'breve'=>'breves');\r\n\t\t#'syndic'=>'syndic');\r\n\t\r\n\twhile (list($k,$v) = each($tab_ido)) {\r\n\t\t$requete=spip_query(\"SELECT id_\".$k.\" FROM spip_documents_\".$v.\" WHERE id_document = $id_doc\");\r\n\t\tif(spip_num_rows($requete)) {\r\n\t\t\t$lg=spip_fetch_array($requete);\r\n\t\t\t$iddoctype=$lg['id_'.$k];\r\n\t\t\t$doctype=$k;\r\n\t\t\tbreak;\r\n\t\t}\r\n\t}\r\n\tif(isset($doctype)) {\t\r\n\t\t$query=spip_query(\"SELECT statut, titre FROM spip_\".$doctype.\"s WHERE id_\".$doctype.\" = $iddoctype\");\r\n\t\t$row=spip_fetch_array($query);\r\n\t\t$statut=($row['statut']==\"publie\") ? '1' : '0';\r\n\t\t$titre=$row['titre'];\r\n\t}\r\n\treturn $origine_doc=array($doctype,$iddoctype,$titre,$statut);\r\n}", "function wholesalerDocumentList($wid) {\n $arrClms = array('pkDocumentID,DocumentName,FileName');\n $argWhere = \" fkWholesalerID = '$wid' AND DocumentType='1'\";\n $varOrderBy = \" pkDocumentID DESC\";\n $arrRes = $this->select(TABLE_WHOLESALER_DOCUMENTS, $arrClms, $argWhere);\n // pre($arrRes);\n return $arrRes;\n }", "function afficher_case_document($id_document, $id, $script, $type, $deplier=false) {\n\tglobal $spip_lang_right;\n\n\t$document = sql_fetsel(\"docs.id_document, docs.id_vignette,docs.extension,docs.titre,docs.descriptif,docs.fichier,docs.largeur,docs.hauteur,docs.taille,docs.mode,docs.distant, docs.date, L.vu\", \"spip_documents AS docs INNER JOIN spip_documents_liens AS L ON L.id_document=docs.id_document\", \"L.id_objet=\".intval($id).\" AND objet=\".sql_quote($type).\" AND L.id_document=\".sql_quote($id_document));\n\n\tif (!$document) return \"\";\n\n\t$id_vignette = $document['id_vignette'];\n\t$extension = $document['extension'];\n\t$titre = $document['titre'];\n\t$descriptif = $document['descriptif'];\n\t$url = generer_url_entite($id_document, 'document');\n\t$fichier = $document['fichier'];\n\t$largeur = $document['largeur'];\n\t$hauteur = $document['hauteur'];\n\t$taille = $document['taille'];\n\t$mode = $document['mode'];\n\t$distant = $document['distant'];\n\n\t// le doc est-il appele dans le texte ?\n\t$doublon = est_inclus($id_document);\n\n\t$cadre = strlen($titre) ? $titre : basename($fichier);\n\n\t$letype = sql_fetsel(\"titre,inclus\", \"spip_types_documents\", \"extension=\".sql_quote($extension));\n\tif ($letype) {\n\t\t$type_inclus = $letype['inclus'];\n\t\t$type_titre = $letype['titre'];\n\t}\n\t//\n\t// Afficher un document\n\t//\n\t$ret = \"\";\n\tif ($mode == 'document') {\n\n\t\t$ret .= debut_cadre_enfonce(\"doc-24.gif\", true, \"\", lignes_longues(typo($cadre),20), \"document$id_document\");\n\t\t$ret .= \"<a name='document$id_document'></a>\\n\";\n\n\t\tif ($distant == 'oui') {\n\t\t\t$dist = \"\\n<div class='verdana1' style='float: $spip_lang_right; text-align: $spip_lang_right;'>\";\n\n\t\t\t// Signaler les documents distants par une icone de trombone\n\t\t\t$dist .= \"\\n<img src='\" . chemin_image('attachment.gif') . \"'\\n\\talt=\\\"$fichier\\\"\\n\\ttitle=\\\"$fichier\\\" />\\n\";\n\t\t\t// Bouton permettant de copier en local le fichier\n\t\t\tinclude_spip('inc/tourner');\n\t\t\t$dist .= bouton_copier_local($document, $type, $id, $id_document, $script);\n\n\t\t\t$dist .=\"</div>\\n\";\n\t\t} else {\n\t\t\t$dist = '';\n\t\t}\n\n\t\t//\n\t\t// Affichage de la vignette\n\t\t//\n\t\t$ret .= \"\\n<div style='text-align: center'>\"\n\t\t. $dist\n\t\t. document_et_vignette($document, $url, true)\n\t\t. '</div>'\n\t\t. \"\\n<div class='verdana1' style='text-align: center; color: black;'>\\n\"\n\t\t. ($type_titre ? $type_titre :\n\t\t ( _T('info_document').' '.majuscules($extension)))\n\t\t. \"</div>\";\n\n\t\t// Affichage du raccourci <doc...> correspondant\n\t\t$raccourci = '';\n\t\tif ($doublon)\n\t\t\t$raccourci .= affiche_raccourci_doc('doc', $id_document, '');\n\t\telse {\n\t\t\tif (($type_inclus == \"embed\" OR $type_inclus == \"image\") AND $largeur > 0 AND $hauteur > 0) {\n\t\t\t\t$raccourci .= \"<b>\"._T('info_inclusion_vignette').\"</b><br />\";\n\t\t\t}\n\t\t\t$raccourci .= \"<div style='color: 333333'>\"\n\t\t\t. affiche_raccourci_doc('doc', $id_document, 'left')\n\t\t\t. affiche_raccourci_doc('doc', $id_document, 'center')\n\t\t\t. affiche_raccourci_doc('doc', $id_document, 'right')\n\t\t\t. \"</div>\\n\";\n\n\t\t\tif (($type_inclus == \"embed\" OR $type_inclus == \"image\") AND $largeur > 0 AND $hauteur > 0) {\n\t\t\t\t$raccourci .= \"<div style='padding:2px; ' class='arial1 spip_xx-small'>\";\n\t\t\t\t$raccourci .= \"<b>\"._T('info_inclusion_directe').\"</b><br />\";\n\t\t\t\t$raccourci .= \"<div style='color: 333333'>\"\n\t\t\t\t. affiche_raccourci_doc('doc|emb', $id_document, 'left')\n\t\t\t\t. affiche_raccourci_doc('doc|emb', $id_document, 'center')\n\t\t\t\t. affiche_raccourci_doc('doc|emb', $id_document, 'right')\n\t\t\t\t. \"</div>\\n\";\n\t\t\t\t$raccourci .= \"</div>\";\n\t\t\t}\n\t\t}\n\n\t\t$ret .= \"\\n<div style='padding:2px; ' class='arial1 spip_xx-small'>\"\n\t\t\t. $raccourci.\"</div>\\n\";\n\n\t\t$legender = charger_fonction('legender', 'inc');\n\t\t$ret .= $legender($id_document, $document, $script, $type, $id, \"document$id_document\", $deplier);\n\n\t\t$ret .= fin_cadre_enfonce(true);\n\n\t} else if ($mode == 'image') {\n\n\t//\n\t// Afficher une image inserable dans l'article\n\t//\n\n\t $ret .= debut_cadre_relief(\"image-24.gif\", true, \"\", lignes_longues(typo($cadre),20), \"document$id_document\");\n\n\t\t//\n\t\t// Afficher un apercu (pour les images)\n\t\t//\n\t\tif ($type_inclus == 'image') {\n\t\t\t$ret .= \"<div style='text-align: center; padding: 2px;'>\\n\";\n\t\t\t$ret .= document_et_vignette($document, $url, true);\n\t\t\t$ret .= \"</div>\\n\";\n\t\t}\n\n\t\t//\n\t\t// Preparer le raccourci a afficher sous la vignette ou sous l'apercu\n\t\t//\n\t\t$raccourci = \"\";\n\t\tif (strlen($descriptif) > 0 OR strlen($titre) > 0)\n\t\t\t$doc = 'doc';\n\t\telse\n\t\t\t$doc = 'doc|img';\n\n\t\tif ($doublon)\n\t\t\t$raccourci .= affiche_raccourci_doc($doc, $id_document, '');\n\t\telse {\n\t\t\t$raccourci .=\n\t\t\t\taffiche_raccourci_doc($doc, $id_document, 'left')\n\t\t\t\t. affiche_raccourci_doc($doc, $id_document, 'center')\n\t\t\t\t. affiche_raccourci_doc($doc, $id_document, 'right');\n\t\t}\n\n\t\t$ret .= \"\\n<div style='padding:2px; ' class='arial1 spip_xx-small'>\"\n\t\t\t. $raccourci.\"</div>\\n\";\n\n\n\t\t$legender = charger_fonction('legender', 'inc');\n\t\t$ret .= $legender($id_document, $document, $script, $type, $id, \"document$id_document\", $deplier);\n\n\t\t$ret .= fin_cadre_relief(true);\n\t}\n\treturn \"<div>$ret</div>\"; // on encapsule chaque document dans un container pour permettre son remplacement en ajax\n}", "public function listdocumentAction()\n {\n\n\t\t$sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t\t//$this->_helper->layout->disableLayout();\n \t\t$this->_helper->layout()->setLayout('layoutpublic');\n\t\t\n\tif (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');}\nif($sessionutilisateur->confirmation != \"\"){$this->_redirect('/administration/confirmation');}\n\n $document = new Application_Model_EuDocumentMapper();\n $this->view->entries = $document->fetchAll50($sessionutilisateur->code_source_create, $sessionutilisateur->code_monde_create, $sessionutilisateur->code_zone_create, $sessionutilisateur->id_pays, $sessionutilisateur->id_region, $sessionutilisateur->code_secteur_create, $sessionutilisateur->code_agence_create);\n\n $this->view->tabletri = 1;\n\n }", "public function listdocumentAction()\n {\n\n\t\t$sessionutilisateur = new Zend_Session_Namespace('utilisateur');\n\t\t//$this->_helper->layout->disableLayout();\n \t\t$this->_helper->layout()->setLayout('layoutpublicesmcadmin');\n\t\t\n\tif (!isset($sessionutilisateur->login)) {$this->_redirect('/administration/login');}\nif($sessionutilisateur->confirmation != \"\"){$this->_redirect('/administration/confirmation');}\n\n $document = new Application_Model_EuDocumentMapper();\n $this->view->entries = $document->fetchAll50($sessionutilisateur->code_source_create, $sessionutilisateur->code_monde_create, $sessionutilisateur->code_zone_create, $sessionutilisateur->id_pays, $sessionutilisateur->id_region, $sessionutilisateur->code_secteur_create, $sessionutilisateur->code_agence_create);\n\n $this->view->tabletri = 1;\n\n }", "public function get_document_list() {\n $returnArr['status'] = '0';\n $returnArr['response'] = '';\n try {\n\t\t\t$documentsArr = array();\n\t\t\t$getDocuments = $this->app_model->get_all_details(DOCUMENTS,array('status' =>\"Active\"));\n\t\t\tif($getDocuments->num_rows()>0){\n\t\t\t\tforeach($getDocuments->result() as $doc){\n\t\t\t\t\t$documentsArr[] = array(\"id\"=>(string)$doc->_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"name\"=>(string)$doc->name,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"category\"=>(string)$doc->category,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"is_req\"=>(string)$doc->hasReq,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"is_exp\"=>(string)$doc->hasExp\n\t\t\t\t\t\t\t\t\t\t\t\t\t);\n\t\t\t\t}\n\t\t\t}\n\t\t\t$returnArr['status'] = '1';\n\t\t\t$returnArr['response'] = array(\"documents\"=>$documentsArr);\n } catch (MongoException $ex) {\n $returnArr['response'] = $this->format_string(\"Error in connection\", \"error_in_connection\");\n }\n $json_encode = json_encode($returnArr, JSON_PRETTY_PRINT);\n echo $this->cleanString($json_encode);\n }", "public function getDocuments($folderid)\r\n\t{\r\n\t}", "function get_documents($cust_id){\n global $connection;\n $query = \"SELECT id FROM documents WHERE FK_cust_id = $cust_id\";\n $result = mysqli_query($connection, $query);\n confirmQResult($result);\n $list = array();\n while($row = mysqli_fetch_assoc($result)){\n $doc_id = $row['id'];\n $doc = get_document($doc_id);\n array_push($list, $doc);\n }\n return $list;\n }", "public function readDocumentsIdE($id)\n {\n $query = \"SELECT * FROM documentos_equipo WHERE idequipo=$id\";\n $stm = Conection::DBconection()->prepare($query);\n if ($stm->execute()) {\n return printf(json_encode($stm->fetchAll(PDO::FETCH_ASSOC)));\n } else {\n return printf(json_encode(array('action' => \"error\")));\n }\n }", "function getDocument($id) {\n \treturn $this->connection->get($id);\n }", "function listarCuentaDocDetalle(){\n\t\t//Definicion de variables para ejecucion del procedimientp\n\t\t$this->procedimiento='cd.ft_cuenta_doc_sel';\n\t\t$this->transaccion='CD_CDOCDETAL_SEL';\n\t\t$this->tipo_procedimiento='SEL';//tipo de transaccion\n\n\t\t$this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n\t\t$this->setParametro('tipo_interfaz','tipo_interfaz','varchar');\n\t\t$this->setParametro('historico','historico','varchar');\n\t\t$this->setParametro('estado','estado','varchar');\n\n\n\t\t$this->captura('id_cuenta_doc','INTEGER');\n\t\t$this->captura('dias_para_rendir','INTEGER');\n\n\t\t$this->captura('id_tipo_cuenta_doc','INTEGER');\n\t\t$this->captura('id_proceso_wf','INTEGER');\n\t\t$this->captura('id_caja','INTEGER');\n\t\t$this->captura('nombre_cheque','VARCHAR');\n\t\t$this->captura('id_uo','INTEGER');\n\t\t$this->captura('id_funcionario','INTEGER');\n\t\t$this->captura('tipo_pago','VARCHAR');\n\t\t$this->captura('id_depto','INTEGER');\n\t\t$this->captura('id_cuenta_doc_fk','INTEGER');\n\t\t$this->captura('nro_tramite','VARCHAR');\n\t\t$this->captura('motivo','VARCHAR');\n\t\t$this->captura('fecha','DATE');\n\t\t$this->captura('fecha_entrega','DATE');\n\t\t$this->captura('id_moneda','INTEGER');\n\t\t$this->captura('estado','VARCHAR');\n\t\t$this->captura('estado_reg','VARCHAR');\n\t\t$this->captura('id_estado_wf','INTEGER');\n\t\t$this->captura('id_usuario_ai','INTEGER');\n\t\t$this->captura('usuario_ai','VARCHAR');\n\t\t$this->captura('fecha_reg','TIMESTAMP');\n\t\t$this->captura('id_usuario_reg','INTEGER');\n\t\t$this->captura('fecha_mod','TIMESTAMP');\n\t\t$this->captura('id_usuario_mod','INTEGER');\n\t\t$this->captura('usr_reg','VARCHAR');\n\t\t$this->captura('usr_mod','VARCHAR');\n\t\t$this->captura('desc_moneda','VARCHAR');\n\t\t$this->captura('desc_depto','VARCHAR');\n\t\t$this->captura('obs','TEXT');\n\t\t$this->captura('desc_funcionario','TEXT');\n\t\t$this->captura('importe','numeric');\n\t\t$this->captura('desc_funcionario_cuenta_bancaria','varchar');\n\t\t$this->captura('id_funcionario_cuenta_bancaria','integer');\n\t\t$this->captura('id_depto_lb','integer');\n\t\t$this->captura('id_depto_conta','integer');\n\t\t$this->captura('importe_documentos','numeric');\n\t\t$this->captura('importe_retenciones','numeric');\n\t\t$this->captura('importe_depositos','numeric');\n\t\t$this->captura('importe_reposiciones','numeric');\n\t\t$this->captura('tipo_cuenta_doc','VARCHAR');\n\t\t$this->captura('sw_solicitud','VARCHAR');\n\t\t$this->captura('sw_max_doc_rend','VARCHAR');\n\t\t$this->captura('num_rendicion','VARCHAR');\n\t\t$this->captura('importe_total_rendido','numeric');\n\t\t$this->captura('id_gestion','INTEGER');\n\n\t\t$this->captura('tipo_rendicion','VARCHAR');\n\n\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function action_documents()\n\t{\n\t\tif (HTTP_Request::GET == $this->request->method()) { \n $objToArr = function($obj) {\n return $obj->as_array();\n };\n\n\t\t\t$docs = array_map(\n $objToArr,\n\t\t\t\tORM::factory('File')->get_files_by_type('application/pdf')->as_array()\t\t\n\t\t\t);\n\n\t\t\tfor ($i = 0; $i < count($docs); $i++)\n\t\t\t{\n\t\t\t\t$docs[$i]['link'] = UPLOADDIR.'/'.UPLOADPDFDIR.'/'.$docs[$i]['filename'];\n\t\t\t}\n\t\t\t\n\t\t\t$this->template->result = $docs;\n\t\t}\n\t}", "function ciar_acces_document($id_document) {\n\t$return = 'libre';\n\t$auteur = (isset($GLOBALS['visiteur_session']['id_auteur']) && $GLOBALS['visiteur_session']['id_auteur']);\n\t$id_document = intval($id_document);\n\t\n\t\t\n\t// Le document est-il dans une rubrique protegee ?\n\t$rubriques_protegees = ciar_tableau_rub_ar_et_ec();\n\n\t// Le document est-il dans une rubrique sur laquelle on a des droits d'acces ?\n\tif ($auteur)\n\t\t$rubriques_exclues = ciar_accessrubec();\n\n\t\t\n\t// A noter qu'un document peut etre attache a plusieurs articles\n\t$nb_liens = 0;\n\t$result = sql_select('*', 'spip_documents_liens', 'id_document='.$id_document);\n\twhile ($row_lien = sql_fetch($result))\t{\n\t\t$nb_liens++;\n\t\t// si document ou image dans plus de 9 articles, utiliser les requetes complexes\n\t\tif ($nb_liens>9)\n\t\t\t\tbreak;\n\t\t\n\t\t$objet = $row_lien['objet'];\n\t\t$id_objet = $row_lien['id_objet'];\n\t\t$id_rubrique = ciar_quete_rubrique($objet,$id_objet);\n\t\t\n\t\tif ($id_rubrique) {\t\n\t\t\tif (in_array($id_rubrique,$rubriques_protegees)){\n\t\t\t\t$return = 'interdit';\n\t\t\t\tif ($auteur) {\n\t\t\t\t\tif (!in_array($id_rubrique,$rubriques_exclues)){\n\t\t\t\t\t\t$return = 'autorise';\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\t\t\n\n\t}\n\n\tif ($nb_liens>9){\n\t\t// faire 4 requetes complexes plutot que N requetes simples\n\t\t// pour le cas ou la meme image figure dans plus de 9 articles \t\n\t\tif (sql_countsel(\"spip_documents_liens AS lien LEFT JOIN spip_articles AS articles ON lien.id_objet=articles.id_article\",\n\t\t\t\"lien.objet='article' AND lien.id_document=\".$id_document.\" AND \".sql_in('articles.id_rubrique', $rubriques_protegees)) \n\t\t\tOR\t\n\t\t\tsql_countsel(\"spip_documents_liens\",\"objet='rubrique' AND id_document=\".$id_document.\" AND \".sql_in('id_objet', $rubriques_protegees)))\n\t\t\t$return = 'interdit';\n\t\t\n\t\tif (!sql_countsel(\"spip_documents_liens AS lien LEFT JOIN spip_articles AS articles ON lien.id_objet=articles.id_article\",\n\t\t\t\"lien.objet='article' AND lien.id_document=\".$id_document.\" AND \".sql_in('articles.id_rubrique', $rubriques_exclues))\n\t\t\tAND \n\t\t\t!sql_countsel(\"spip_documents_liens\",\n\t\t\t\"objet='rubrique' AND id_document=\".$id_document.\" AND \".sql_in('id_objet', $rubriques_exclues)))\n\t\t\t$return = 'autorise';\n\t}\t\n\t\n\treturn $return;\t\n}", "public function documents()\r\n\t{\r\n\t\ttry{\r\n\t\t\t$data[\"utilisateur\"] = $this->profil_model->recuperer_mes_donnees();\r\n\t\t\t$data[\"projets\"] = $this->profil_model->recuperer_mes_projets();\r\n\t\t\t$data[\"documents\"] = $this->profil_model->recuperer_mes_documents();\r\n\t\t\t$data[\"t_title\"] = \"Documents de \".$data[\"utilisateur\"]->nom.\" \".$data[\"utilisateur\"]->prenom;\r\n\t\t\t$data[\"t_sub\"] \t = \"documents\";\r\n\t\t} catch (Exception $e) {\r\n\t\t\tif($e->getCode() == 700) {\r\n\t\t\t\t$this->session->set_flashdata(\"Veuillez vous connecter.\");\r\n\t\t\t\tredirect(\"session/deconnexion\");\r\n\t\t\t} \r\n\t\t}\r\n\t\t$this->template->render(\"membre/mes_documents\",$data);\r\n\t}", "public function listar_documentos()\n\t{\n\t\t$this->db->where('status', false);\n\t\t$this->db->order_by('fechaCarg','asc'); //ordena de manera ascente los elementos\n\t\treturn $this->db->get('documentose4')->result();\n\t}", "function listarCuentaDocDetalle(){\n $this->objParam->defecto('ordenacion','id_cuenta_doc');\n $this->objParam->defecto('dir_ordenacion','asc');\n\n if(strtolower($this->objParam->getParametro('estado'))=='borrador'){\n $this->objParam->addFiltro(\"(cdoc.estado in (''borrador''))\");\n }\n if(strtolower($this->objParam->getParametro('estado'))=='validacion'){\n $this->objParam->addFiltro(\"(cdoc.estado not in (''borrador'',''contabilizado'',''finalizado'',''anulado''))\");\n }\n if(strtolower($this->objParam->getParametro('estado'))=='entregados'){\n $this->objParam->addFiltro(\"(cdoc.estado in (''contabilizado''))\");\n }\n if(strtolower($this->objParam->getParametro('estado'))=='finalizados'){\n $this->objParam->addFiltro(\"(cdoc.estado in (''finalizado'',''anulado''))\");\n }\n\n if($this->objParam->getParametro('id_gestion')!=''){\n $this->objParam->addFiltro(\"cdoc.id_gestion = \".$this->objParam->getParametro('id_gestion'));\n }\n\n $this->objParam->addParametro('id_funcionario_usu',$_SESSION[\"ss_id_funcionario\"]);\n if($this->objParam->getParametro('tipoReporte')=='excel_grid' || $this->objParam->getParametro('tipoReporte')=='pdf_grid'){\n $this->objReporte = new Reporte($this->objParam,$this);\n $this->res = $this->objReporte->generarReporteListado('MODCuentaDoc','listarCuentaDocDetalle');\n } else{\n $this->objFunc=$this->create('MODCuentaDoc');\n\n $this->res=$this->objFunc->listarCuentaDocDetalle($this->objParam);\n }\n\n\n $this->res->imprimirRespuesta($this->res->generarJson());\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the 5 newest recordings.
public function getLastFiveRecordingsAttribute(): Collection { return $this->recordings()->orderBy('created_at', 'DESC')->limit(5)->get(); }
[ "public function getFiveLatestRecords();", "function get_recent()\n {\n $this->db->limit(5);\n $this->db->order_by('game_id','desc');\n return $this->db->get($this->table)->result();\n }", "public function scopeLastFive()\n {\n return Media::orderBy('media_id', 'desc')\n ->take(5);\n }", "public function getFiveLastReports(){\r\n $request = $this->db->prepare('SELECT * FROM comments WHERE report=1 AND moderate=0 ORDER BY id DESC LIMIT 0,5');\r\n $results = $request->execute();\r\n return $request->fetchAll(PDO::FETCH_CLASS, 'App\\Model\\Comment');\r\n }", "public function getTop5AllTime()\n {\n \t//Returns the updated results page\n \treturn View::make('results');\n }", "public function lastFiveUsers(){\r\n\r\n return $this->db->select('username')\r\n ->from('Users')\r\n ->order_by('id','DESC')\r\n ->limit(5)\r\n ->get()\r\n ->result_array();\r\n }", "function query_most_watched_movies( $number = 5 ) {\n\tglobal $wpdb;\n\n\t$movies = get_transient( 'movie_log_most_watched_imdb_ids' );\n\tif ( false === $movies ) {\n\t\t$query = \"SELECT meta_value, MAX( post_id ) AS latest_post_id, COUNT( * ) AS watch_count FROM {$wpdb->postmeta} WHERE meta_key = 'imdb_id' GROUP BY meta_value ORDER BY watch_count DESC, latest_post_id DESC LIMIT 20\";\n\n\t\t$results = (array) $wpdb->get_results( $query );\n\n\t\t$movies = array();\n\t\tforeach ( $results as $result ) {\n\t\t\t$movies[] = (object) array(\n\t\t\t\t'imdb_id' => $result->meta_value,\n\t\t\t\t'latest_post_id' => (int) $result->latest_post_id,\n\t\t\t\t'watch_count' => (int) $result->watch_count,\n\t\t\t);\n\t\t}\n\n\t\tset_transient( 'movie_log_most_watched_imdb_ids', $movies, 2 * WEEK_IN_SECONDS );\n\t}\n\n\tif ( $number < count( $movies ) ) {\n\t\treturn array_slice( $movies, 0, $number );\n\t}\n\n\treturn $movies;\n}", "public function fiveLastAlbums(){\n $fiveLast = new \\TYPO3\\CMS\\Extbase\\Persistence\\ObjectStorage();\n $count = 1;\n foreach($this->albums as $album) {\n $fiveLast->attach($album);\n $count++;\n if($count == 6){\n break;\n }\n }\n return $fiveLast;\n }", "function fetchLatestFiveArticles() {\n\t\treturn $this->fetchAllArticles ( \"latest_articles_view\" );\n\t}", "public function getLastFiveMatches()\n\t\t{\n\t\t\t$this->db->order_by('id', 'desc');\n\t\t\t$this->db->limit(5);\n\t\t\t$query = $this->db->get('results');\n\n\t\t\tif($query->num_rows() > 0)\n\t\t\t{\n\t\t\t\treturn $query->result();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "public function scopeLastFive()\n {\n return Tag::orderBy('tag_id', 'desc')\n ->take(5);\n }", "public function getLast5Answers() {\n return DB::table('answers')\n ->select('answers.name')\n ->join('questions', 'questions.id', '=', 'answers.question_id')\n ->join('question_types', 'question_types.id', '=', 'questions.question_type_id')\n ->where('question_types.name', '=', 'textarea')\n ->where('questions.created_at', '>=', date('Y-m-d H:i:s', strtotime(\"-48 hours\")))\n ->orderBy('answers.created_at', 'DESC')\n ->take(5)\n ->get();\n }", "function getNewsLatest() {\n $this->db->select('*');\n $this->db->from('berita');\n $this->db->order_by(\"id_berita\", \"desc\");\n $this->db->limit(5);\n\n return $this->db->get();\n }", "public function getLimit5(){\n\n \n \n // $users = $this->allUsers;\n echo '<br/>';\n echo '<br/>';\n $this->collection = $this->collection->take(5);\n // $this->FirstFiveUsers= $this->allUsers->take(5);\n // echo $this->FirstFiveUsers;\n return $this;\n \n \n }", "private function getNewest($count = 5) {\n return Posts::where('status', 'public')->orderBy('id', 'desc')->take($count)->get();\n }", "public function getTop5Today()\n {\n \t//Returns the updated results page\n \treturn View::make('results');\n }", "public function getTopFiveBets(){\n return $this->find()\n ->orderBy('total_points DESC')\n ->limit(5)\n ->all();\n }", "public function get_last_ten_entries()\r\n\t{\r\n\t\t$query = $this->db->get(\"email_workflow\", 10);\r\n\r\n\t\treturn $query->result();\r\n\t}", "function get_last_5_ventas(){\n $sql='SELECT productos_de_la_venta.venta_id, CONCAT(usuarios.nombre, \" \", usuarios.apellido_paterno, \" \", usuarios.apellido_materno) AS vendedor, Sum(productos_de_la_venta.precio_venta) AS total_venta, ventas.created_at FROM ventas INNER JOIN usuarios ON usuarios.id = ventas.usuario_id INNER JOIN productos_de_la_venta ON ventas.id = productos_de_la_venta.venta_id GROUP BY productos_de_la_venta.venta_id LIMIT 5';\n return get_items($sql);\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Process one deposit. Fetch the data and write it to the file system. Updates the deposit status.
protected function processDeposit(Deposit $deposit) { $this->logger->notice("harvest - {$deposit->getDepositUuid()}"); if($deposit->getHarvestAttempts() > $this->maxAttempts) { $this->logger->notice("skipping - {$deposit->getDepositUuid()} - too many failed harvests."); return; } $deposit->setHarvestAttempts($deposit->getHarvestAttempts() + 1); $this->checkSize($deposit); $response = $this->fetchDeposit($deposit->getUrl(), $deposit->getSize()); $deposit->setFileType($response->getHeader('Content-Type')); $filePath = $this->filePaths->getHarvestFile($deposit); return $this->writeDeposit($filePath, $response); }
[ "abstract protected function processDeposit(Deposit $deposit);", "function deposit()\n\t\t{\n\t\t\n\t\t\t$status = $this->input->post('payment_status');\n\t\t\t$custom = $this->encrypt->decode(base64_decode($this->input->post(\"custom\")));\n\t\t\t$transaction_id = $this->input->post(\"txn_id\");\n\t\t\t$fund_amount = $this->input->post('mc_gross');\n\t\t\t$currency = $this->input->post('mc_currency');\n\t\t\t$item_name = $this->input->post('item_name');\n\t\t\t\n\t\t\tif($status=='Completed')\n\t\t\t{\n\t\t\t\n\t\t\t\tlist($memberid, $packageid)=explode(\"*\", $custom);\n\n\t\t\t\t// Set member id\n\t\t\t\t$this->member->set_member_id($memberid);\n\n if(is_numeric($packageid))\n {\n $package = $this->site->get_package($packageid);\n // Fund account\n $this->member_funds->fund_account($package['type'], 'regular', $package['value']);\n if($package['freebies']>0) $this->member_funds->fund_account($package['type'], 'half', $package['freebies']);\n\n\t\t\t\t\t// log transaction\n $readerid = $memberid;\n $this->member->data['id'] = $readerid;\n $this->member_funds->insert_transaction('payment', $fund_amount, 'US', \"PayPal payment\",\"PayPal\",$currency);\n \n\t\t\t\t\t// log deposit\n $readerid = $memberid;\n $this->member->data['id'] = $readerid;\n $this->member_funds->insert_deposit($fund_amount, 'PayPal:'.$transaction_id, $item_name, $currency);\n\n }\n else\n {\n\t\t\t\t\t// log transaction\n $readerid = $memberid;\n $this->member->data['id'] = $readerid;\n $this->member_funds->insert_transaction('payment', $fund_amount, 'US', \"PayPal payment\",\"PayPal\",$currency);\n }\n\t\t\t\n\t\t\t\t// Get member info\t\n\t\t\t\t$member = $this->member->data;\n\t\t\t\t$member['transaction_id'] = $transaction_id;\n\t\t\t\t$member['amount'] = \"$\".number_format($fund_amount, 2);\n\n $member['type'] = 'email';\n\t\t\t\t$this->system_vars->m_omail($member['id'],'paypal_purchase', $member);\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}", "public function save()\n {\n // If deposit is new, will get assigned database ID.\n $this->dbID = $this->db->saveDeposit($this);\n }", "private function deposit($deposit_amt) {\n\t\t$deposit_amt = $deposit_amt + (($deposit_amt / 100) * 10);\n\t\t$this->balance = $deposit_amt;\n\t}", "private function deposit($deposit_amt) {\n\t\t$deposit_amt = $deposit_amt + (($deposit_amt / 100) * 5);\n\t\t$this->balance = $deposit_amt;\n\t}", "function updateDepositdetails()\n {\n global $db;\n $requete = $db->prepare('UPDATE deposit_details SET `designation`, `unit`, `amount`, `unitprice`, \n `totaluwt`, `percentage`, `equivalent` WHERE idDd = ?');\n $requete->execute(array(\n $this->designation,\n $this->unit,\n $this->amount,\n $this->unitprice,\n $this->totaluwt,\n $this->percentage,\n $this->idDd\n ));\n }", "protected function persist() {\n file_put_contents($this->file, json_encode($this->progress));\n }", "function OJSSwordDeposit(&$article) {\n\t\t// Create a directory for deposit contents\n\t\t$this->outPath = tempnam('/tmp', 'sword');\n\t\tunlink($this->outPath);\n\t\tmkdir($this->outPath);\n\t\tmkdir($this->outPath . '/files');\n\n\t\t// Create a package\n\t\t$this->package = new PackagerMetsSwap(\n\t\t\t$this->outPath,\n\t\t\t'files',\n\t\t\t$this->outPath,\n\t\t\t'deposit.zip'\n\t\t);\n\n\t\t$journalDao =& DAORegistry::getDAO('JournalDAO');\n\t\t$this->journal =& $journalDao->getById($article->getJournalId());\n\n\t\t$sectionDao =& DAORegistry::getDAO('SectionDAO');\n\t\t$this->section =& $sectionDao->getSection($article->getSectionId());\n\n\t\t$publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');\n\t\t$publishedArticle = $publishedArticleDao->getPublishedArticleByArticleId($article->getId());\n\n\t\t$issueDao =& DAORegistry::getDAO('IssueDAO');\n\t\tif ($publishedArticle) $this->issue =& $issueDao->getIssueById($publishedArticle->getIssueId());\n\n\t\t$this->article =& $article;\n\t}", "function OJSSwordDeposit(&$article) {\n\t\t// Create a directory for deposit contents\n\t\t$this->outPath = tempnam('/tmp', 'sword');\n\t\tunlink($this->outPath);\n\t\tmkdir($this->outPath);\n\t\tmkdir($this->outPath . '/files');\n\n\t\t// Create a package\n\t\t$this->package = new PackagerMetsSwap(\n\t\t\t$this->outPath,\n\t\t\t'files',\n\t\t\t$this->outPath,\n\t\t\t'deposit.zip'\n\t\t);\n\n\t\t$journalDao =& DAORegistry::getDAO('JournalDAO');\n\t\t$this->journal =& $journalDao->getJournal($article->getJournalId());\n\t\t/** issue fix**/\n\t\t$issueDao = & DAORegistry::getDAO('IssueDAO'); \n\t\t$this->issue = &$issueDao->getIssueById($article->getIssueId()); \n\t\t/**end fix*/\n\n\t\t$sectionDao =& DAORegistry::getDAO('SectionDAO');\n\t\t$this->section =& $sectionDao->getSection($article->getSectionId());\n\n\t\t$publishedArticleDao =& DAORegistry::getDAO('PublishedArticleDAO');\n\t\t$publishedArticle = $publishedArticleDao->getPublishedArticleByArticleId($article->getId());\n\n\t\t$issueDao =& DAORegistry::getDAO('IssueDAO');\n\t\tif ($publishedArticle) $this->issue =& $issueDao->getIssueById($publishedArticle->getIssueId());\n\n\t\t$this->article =& $article;\n\t}", "public function deposit($amount) {\n $this->cashTransaction($amount, 'DEPOSIT');\n }", "function deposit_form()\n\t{\n\t\tif ( !$this->ipsclass->vars['points_bank'] )\n\t\t{\n\t\t\t$this->ipsclass->Error(array(LEVEL => 1, MSG => 'error_bank_offline'));\n\t\t}\n\t\t\n\t\tif ( !$this->ipsclass->member['points'] )\n\t\t{\n\t\t\t$this->ipsclass->Error(array(LEVEL => 1, MSG => 'error_no_points'));\n\t\t}\n\t\t\n\t\t$data['points'] = $this->ipsclass->do_number_format($this->ipsclass->member['points']);\n\t\t$data['bank'] = $this->ipsclass->do_number_format($this->ipsclass->member['deposited_points']);\n\t\t\n\t\t$this->output .= $this->ipsclass->compiled_templates['skin_points']->bank_depo( $data );\n\t\t\n\t\t$this->page_title = $this->ipsclass->lang['bank'];\n\t\t$this->nav[] = $this->ipsclass->lang['bank'];\n\t}", "function xdce_deposit_process1()\n {\n try {\n $admin = SiteSettings::where('id', 1)->first();\n $last_block = $admin->xdce_block;\n $last_block = $last_block + 1;\n $latest_xdc_block_number = get_last_block('78.129.229.18', 8545);\n\n if ($latest_xdc_block_number > 0) {\n for ($i = $last_block; $i <= $latest_xdc_block_number; $i++) {\n\n\n $block_number = $i;\n\n $eurl = 'http://xinfin.info/api/blocknumber/' . $block_number . '_0_0';\n\n $cObj = curl_init();\n curl_setopt($cObj, CURLOPT_URL, $eurl);\n curl_setopt($cObj, CURLOPT_SSL_VERIFYHOST, 0);\n curl_setopt($cObj, CURLOPT_SSL_VERIFYPEER, 0);\n curl_setopt($cObj, CURLOPT_RETURNTRANSFER, TRUE);\n $output = curl_exec($cObj);\n $curlinfos = curl_getinfo($cObj);\n\n $result = json_decode($output);\n\n if ($result && $result->status == 'SUCCESS') {\n $transactionList = $result->message;\n\n } else {\n $transactionList = '';\n }\n\n //iterating transaction lists\n foreach ($transactionList as $transaction) {\n $to_address = $transaction->args->_to;\n $user = Users::where('XDC_addr', '=', $to_address)->first();\n if ($user != null && $to_address != null) {\n $dep_id = $transaction->transactionHash;\n $ether_balance = $transaction->args->_value;\n $dep_already = $this->eth_checkdepositalready($user->id, $dep_id);\n if ($dep_already === TRUE && (float)$ether_balance > 0) {\n\n\n $email = get_usermail($user->id);\n //$pass = Session::get('xinfinpass');\n $pass = get_user_details($user->id, 'xinpass');\n login_xdc_fun($email, owndecrypt($pass));\n\n\n $adminethaddr = decrypt(get_config('xdc_address'));\n $res = transfer_xdctoken($to_address, $ether_balance, $adminethaddr, $user->id, owndecrypt($pass));\n $userid = $user->id;\n if ($res->status == 'SUCCESS') {\n $fetchbalance = get_userbalance($userid, 'XDC');\n $uptbal = $fetchbalance + $ether_balance;\n $upt = Balance::where('user_id', $userid)->first();\n $upt->XDC = $uptbal;\n $upt->save();\n\n $transid = 'TXD' . $userid . time();\n $today = date('Y-m-d H:i:s');\n $ip = \\Request::ip();\n $ins = new Transaction;\n $ins->user_id = $userid;\n $ins->payment_method = 'Cryptocurrency Account';\n $ins->transaction_id = $transid;\n $ins->currency_name = 'XDC';\n $ins->type = 'Deposit';\n $ins->transaction_type = '1';\n $ins->amount = $ether_balance;\n $ins->updated_at = $today;\n $ins->crypto_address = $to_address;\n $ins->transfer_amount = '0';\n $ins->fee = '0';\n $ins->tax = '0';\n $ins->verifycode = '1';\n $ins->order_id = '0';\n $ins->status = 'Completed';\n $ins->cointype = '2';\n $ins->payment_status = 'Paid';\n $ins->paid_amount = '0';\n $ins->wallet_txid = $dep_id;\n $ins->ip_address = $ip;\n $ins->verify = '1';\n $ins->blocknumber = $transaction->blockNumber;\n $ins->save();\n }\n }\n }\n\n\n }\n if ($last_block < $i) {\n $admin->mined_block = $i;\n $admin->save();\n }\n }\n }\n\n } catch (\\Exception $e) {\n \\Log::error([$e->getMessage(), $e->getLine(), $e->getFile()]);\n return view('errors.404');\n }\n }", "private function writeSummary()\n {\n if ($this->lastData == null) {\n return;\n }\n\n $this->setupDBConnection();\n\n $arr = array($this->wikiState, $this->vcsState,\n $this->issueState, $this->downloadState);\n if (\n in_array(\"cannot_get_data\", $arr) or\n in_array(\"can_not_resolve\", $arr) or\n in_array(\"proxy_error\", $arr)\n ) {\n $status = \"fail\";\n } elseif (in_array(\"success_update\", $arr)) {\n $status = \"success_update\";\n } else {\n $status = \"no_change\";\n }\n\n if ($this->proxy != \"127.0.0.1\") {\n $ip = ParseUtility::resolveHost($this->proxy);\n } else {\n $ip = $this->proxy;\n }\n\n $this->connection->query(\n \"INSERT INTO `crawl_status`\n (`project_id`, `status`, `wiki`, `vcs`, `issue`,\n `download`, `proxy_ip`, `starttime`, `endtime`)\n VALUES('$this->projectId', '$status', '$this->wikiState', '$this->vcsState',\n '$this->issueState', '$this->downloadState', '$ip',\n '$this->startTime', '$this->endTime')\"\n );\n\n $result = \"success\";\n if ($status === \"fail\") {\n $result = \"fail\";\n }\n\n $this->connection->query(\n \"UPDATE `project`\n SET `status` = '$result',\n `success` = `$result` + 1,\n `proxy_ip` = '$ip'\n WHERE `project_id` = '$this->projectId'\"\n );\n }", "public function depositar($valor) {\n if ($this->status == true) { // poderia ter escrito if (getStatus == true) ou if (getStatus)\n $this->saldo = $this->saldo + $valor; // ou $this->setSaldo(getSaldo() + $valor); \n }\n else {\n print(\"Impossivel fazer o deposito\");\n }\n }", "public function setDeposit($deposit) {\n\t\t$this->deposit = $deposit;\n\t}", "public function debit_put()\n {\n $id=$this->get('id');\n $update_data=array(\n 'd_balance'=>$this->put('d_balance')\n );\n $result=$this->Debit_model->update_debit($id, $update_data);\n\n if($result)\n {\n $message = [\n 'da_id'=>$id,\n 'd_balance'=>$this->put('d_balance'),\n 'message' => 'Updated a resource'\n ];\n\n $this->set_response($message, REST_Controller::HTTP_CREATED); // CREATED (201) being the HTTP response code\n }\n else \n {\n // Set the response and exit\n $this->response([\n 'status' => FALSE,\n 'message' => 'Can not update data',\n 'id' => $id,\n 'd_balance' => $this->put('d_balance')\n ], REST_Controller::HTTP_CONFLICT); // CAN NOT CREATE (409) being the HTTP response code\n }\n }", "function writedata(){\n\t\ttry{\n\t\t\t$this->getData();\n\t\t\tWriteLog::writeDebugLog(\"Start writing the DBF file at location \" . $this->filename);\n\t\t\tif($this->memodata){\n\t\t\t\t$this->write($this->filename, $this->schema, $this->result, $this->memodata, $this->memodata);\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->write($this->filename, $this->schema, $this->result);\n\t\t\t}\n\t\t\t\n\t\t\tWriteLog::writeDebugLog(\"Completed writing the DBF file at location \" . $this->filename);\n\t\t}catch(Exception $exp){\n\t\t\tWriteLog::writeErrorLog(\"Error when writing the DBF file \" . $exp->getTraceAsString ());\n\t\t}\n\t}", "function update2_deposit($deposit_id, $memaccount_id, $amount, $receipt_no, $cheque_no,$date, $bank_account, $depositor){\r\n\t$resp = new xajaxResponse();\r\n\t$former_res = mysql_query(\"select * from deposit where id='\".$deposit_id.\"'\");\r\n\t$former = mysql_fetch_array($former_res);\r\n\tstart_trans();\r\n\tif(!mysql_query(\"update deposit set memaccount_id='\".$memaccount_id.\"', trans_date = (select now()),amount='\".$amount.\"', receipt_no='\".$receipt_no.\"', cheque_no='\".$cheque_no.\"', flat_value='\".$deposit_flat.\"', percent_value='\".$percent_value.\"', date='\".$date.\"', bank_account='\".$bank_account.\"', depositor='\".$depositor.\"' where id='\".$deposit_id.\"'\")){\r\n\t\t$resp->alert(\"ERROR: Could not update the deposit! \\n Contact FLT\");\r\n\t\trollback();\r\n\t\treturn $resp;\r\n\t}\r\n\tif(! mysql_query(\"update bank_account set account_balance=account_balance -\".$former['amount'].\" + \".$amount.\" where id=\".$bank_account.\"\")){\r\n\t\t$resp->alert(\"ERROR: Could not update the bank balance! \\n Contact FLT\");\r\n\t\trollback();\r\n\t\treturn $resp;\r\n\t}\r\n\t///////////////////////////\r\n\t$accno =mysql_fetch_assoc(mysql_query(\"select m.first_name,m.last_name,m.mem_no from member m join mem_accounts ma on m.id=ma.mem_id where ma.id=\".$memaccount_id));\r\n\t$action = \"update deposit set memaccount_id='\".$memaccount_id.\"', amount='\".$amount.\"', receipt_no='\".$receipt_no.\"', flat_value='\".$deposit_flat.\"', percent_value='\".$percent_value.\"', date='\".$date.\"', bank_account='\".$bank_account.\"' where id='\".$deposit_id.\"'\";\r\n\t$msg = \"Edited a deposit from:\".number_format($former['amount'],2).\" to:\".number_format($amount,2).\" for member: \".$accno['first_name'].\" \".$accno['last_name'].\" - \".$accno['mem_no'];\r\n\tlog_action($_SESSION['user_id'],$action,$msg);\r\n\t//////////////////////\r\n\tcommit();\r\n\t$resp->assign(\"status\", \"innerHTML\", \"<font color=red>Deposit registered!</center>\");\r\n\treturn $resp;\r\n}", "function humcore_get_current_deposit() {\n\tglobal $deposits_results;\n\n\treturn apply_filters( 'humcore_get_current_deposit', $deposits_results->deposit );\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Operation postPageStampAnnotationsAsync Add document page stamp annotations.
public function postPageStampAnnotationsAsync($name, $page_number, $annotations, $storage = null, $folder = null) { return $this->postPageStampAnnotationsAsyncWithHttpInfo($name, $page_number, $annotations, $storage, $folder) ->then( function ($response) { return $response[0]; } ); }
[ "public function postPageHighlightAnnotationsAsync($name, $page_number, $annotations, $storage = null, $folder = null)\n {\n return $this->postPageHighlightAnnotationsAsyncWithHttpInfo($name, $page_number, $annotations, $storage, $folder)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function postPageImageStampsAsyncWithHttpInfo($name, $page_number, $stamps, $storage = null, $folder = null)\n {\n $returnType = '\\Aspose\\PDF\\Model\\AsposeResponse';\n $request = $this->postPageImageStampsRequest($name, $page_number, $stamps, $storage, $folder);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function postPagePdfPageStampsAsyncWithHttpInfo($name, $page_number, $stamps, $storage = null, $folder = null)\n {\n $returnType = '\\Aspose\\PDF\\Model\\AsposeResponse';\n $request = $this->postPagePdfPageStampsRequest($name, $page_number, $stamps, $storage, $folder);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function postPageTextAnnotationsAsync($name, $page_number, $annotations, $storage = null, $folder = null)\n {\n return $this->postPageTextAnnotationsAsyncWithHttpInfo($name, $page_number, $annotations, $storage, $folder)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function postPageTextStampsAsyncWithHttpInfo($name, $page_number, $stamps, $storage = null, $folder = null)\n {\n $returnType = '\\Aspose\\PDF\\Model\\AsposeResponse';\n $request = $this->postPageTextStampsRequest($name, $page_number, $stamps, $storage, $folder);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function postPageTextStamps($name, $page_number, $stamps, $storage = null, $folder = null)\n {\n try\n {\n list($response) = $this->postPageTextStampsWithHttpInfo($name, $page_number, $stamps, $storage, $folder);\n return $response;\n }\n catch (ApiException $ex)\n {\n if ($ex->getCode() == 401)\n {\n $this->_requestToken();\n list($response) = $this->postPageTextStampsWithHttpInfo($name, $page_number, $stamps, $storage, $folder);\n return $response;\n }\n else\n {\n throw $ex;\n }\n }\n }", "public function postPageInkAnnotationsAsync($name, $page_number, $annotations, $storage = null, $folder = null)\n {\n return $this->postPageInkAnnotationsAsyncWithHttpInfo($name, $page_number, $annotations, $storage, $folder)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function postAnnotationsAsync(Requests\\postAnnotationsRequest $request) \n {\n return $this->postAnnotationsAsyncWithHttpInfo($request)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function postPageUnderlineAnnotationsAsync($name, $page_number, $annotations, $storage = null, $folder = null)\n {\n return $this->postPageUnderlineAnnotationsAsyncWithHttpInfo($name, $page_number, $annotations, $storage, $folder)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function postPageLinkAnnotationsAsync($name, $page_number, $links, $storage = null, $folder = null)\n {\n return $this->postPageLinkAnnotationsAsyncWithHttpInfo($name, $page_number, $links, $storage, $folder)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function getPageStampAnnotationsAsyncWithHttpInfo($name, $page_number, $storage = null, $folder = null)\n {\n $returnType = '\\Aspose\\PDF\\Model\\StampAnnotationsResponse';\n $request = $this->getPageStampAnnotationsRequest($name, $page_number, $storage, $folder);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function insert(Books_Annotation $postBody, $optParams = array())\n {\n $params = array('postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('insert', array($params), \"Books_Annotation\");\n }", "public function getPageStampAnnotations($name, $page_number, $storage = null, $folder = null)\n {\n try\n {\n list($response) = $this->getPageStampAnnotationsWithHttpInfo($name, $page_number, $storage, $folder);\n return $response;\n }\n catch (ApiException $ex)\n {\n if ($ex->getCode() == 401)\n {\n $this->_requestToken();\n list($response) = $this->getPageStampAnnotationsWithHttpInfo($name, $page_number, $storage, $folder);\n return $response;\n }\n else\n {\n throw $ex;\n }\n }\n }", "public function insert(Google_Service_Books_Annotation $postBody, $optParams = array())\n {\n $params = array('postBody' => $postBody);\n $params = array_merge($params, $optParams);\n return $this->call('insert', array($params), \"Google_Service_Books_Annotation\");\n }", "public function postPagePdfPageStampsWithHttpInfo($name, $page_number, $stamps, $storage = null, $folder = null)\n {\n $returnType = '\\Aspose\\PDF\\Model\\AsposeResponse';\n $request = $this->postPagePdfPageStampsRequest($name, $page_number, $stamps, $storage, $folder);\n\n try {\n $options = $this->createHttpClientOption();\n try {\n $response = $this->client->send($request, $options);\n } catch (RequestException $e) {\n throw new ApiException(\n \"[{$e->getCode()}] {$e->getMessage()}\",\n $e->getCode(),\n $e->getResponse() ? $e->getResponse()->getHeaders() : null,\n $e->getResponse() ? $e->getResponse()->getBody()->getContents() : null\n );\n }\n\n $statusCode = $response->getStatusCode();\n\n if ($statusCode < 200 || $statusCode > 299) {\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $request->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n\n } catch (ApiException $e) {\n switch ($e->getCode()) {\n case 200:\n $data = ObjectSerializer::deserialize(\n $e->getResponseBody(),\n '\\Aspose\\PDF\\Model\\AsposeResponse',\n $e->getResponseHeaders()\n );\n $e->setResponseObject($data);\n break;\n }\n throw $e;\n }\n }", "public function postPageSoundAnnotationsAsyncWithHttpInfo($name, $page_number, $annotations, $storage = null, $folder = null)\n {\n $returnType = '\\Aspose\\PDF\\Model\\AsposeResponse';\n $request = $this->postPageSoundAnnotationsRequest($name, $page_number, $annotations, $storage, $folder);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function postPageMovieAnnotationsAsyncWithHttpInfo($name, $page_number, $annotations, $storage = null, $folder = null)\n {\n $returnType = '\\Aspose\\PDF\\Model\\AsposeResponse';\n $request = $this->postPageMovieAnnotationsRequest($name, $page_number, $annotations, $storage, $folder);\n\n return $this->client\n ->sendAsync($request, $this->createHttpClientOption())\n ->then(\n function ($response) use ($returnType) {\n $responseBody = $response->getBody();\n if ($returnType === '\\SplFileObject') {\n $content = $responseBody; //stream goes to serializer\n } else {\n $content = $responseBody->getContents();\n if ($returnType !== 'string') {\n $content = json_decode($content);\n }\n }\n\n return [\n ObjectSerializer::deserialize($content, $returnType, []),\n $response->getStatusCode(),\n $response->getHeaders()\n ];\n },\n function ($exception) {\n $response = $exception->getResponse();\n $statusCode = $response->getStatusCode();\n throw new ApiException(\n sprintf(\n '[%d] Error connecting to the API (%s)',\n $statusCode,\n $exception->getRequest()->getUri()\n ),\n $statusCode,\n $response->getHeaders(),\n $response->getBody()\n );\n }\n );\n }", "public function putPageAddStampAsync($name, $page_number, $stamp, $storage = null, $folder = null)\n {\n return $this->putPageAddStampAsyncWithHttpInfo($name, $page_number, $stamp, $storage, $folder)\n ->then(\n function ($response) {\n return $response[0];\n }\n );\n }", "public function insert(Annotation $postBody, $optParams = [])\n {\n $params = ['postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('insert', [$params], Annotation::class);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Registers the link repository.
protected function registerLinkRepository() { $this->app['sentinel.addons.social.repository'] = $this->app->share(function ($app) { $model = $app['config']->get('cartalyst.sentinel-addons.social.link'); $users = $app['config']->get('cartalyst.sentinel.users.model'); if (class_exists($model) and method_exists($model, 'setUsersModel')) { forward_static_call_array([$model, 'setUsersModel'], [$users]); } return new LinkRepository($model); }); }
[ "protected function registerRepository()\n {\n $this->app['snowman.repository'] = $this->app->share(function ($app) {\n $generator = $app->make('Yhbyun\\Snowman\\Generator');\n\n return new RepositoryGeneratorCommand($generator);\n });\n\n $this->commands('snowman.repository');\n }", "protected function registerRepository()\n\t{\n\t\t$this->app->singleton('oauth.clients', function ($app) {\n\t\t\treturn new ClientRepository($app['events']);\n\t\t});\n\t}", "private function registerRepositoryInterface()\n {\n foreach (self::$repositoryInterfaces as $interface => $implementation) {\n $this->app->bind($interface, $implementation);\n }\n }", "protected function registerRepository()\n {\n $app = $this->app;\n\n $app->bind('geonames.repository', function($app)\n {\n $connection = $app['db']->connection();\n\n return new DatabaseRepository($connection);\n });\n\n $app->bind('Ipalaus\\Geonames\\RepositoryInterface', function($app)\n {\n return $app['geonames.repository'];\n });\n }", "protected function registerRepository()\r\n\t{\r\n\t\t$this->app->bindShared('migration.repository', function($app)\r\n\t\t{\r\n\t\t\t$table = $app['config']['database.migrations'];\r\n $db = $app->make(\"ConnectionResolverInterface\");\r\n\r\n\t\t\treturn new DatabaseMigrationRepository($db, $table);\r\n\t\t});\r\n\t}", "protected function registerConfigRepository()\n {\n $config = new Config;\n $this->instance('config', $config);\n $this->loadConfigurationFiles($config);\n }", "private function registerRepository()\n {\n $this->app->singleton('migration.repository', function ($app) {\n $table = $app['config']['database.migrations'];\n\n return new DatabaseMigrationRepository($app['db'], $table);\n });\n }", "public function getLinkTypeRepository();", "protected function registerRepository()\n {\n $this->app->singleton('migration.repository', function ($app) {\n $table = $app['config']['database.migrations'];\n\n return new DatabaseMigrationRepository($app['db'], $table);\n });\n }", "protected function registerRepository()\n {\n $this->app->singleton('patch.repository', function ($app) {\n $table = $app['config']['patch.table'];\n\n return new Patch($app['db'], $table);\n });\n\n $this->app->singleton(Patch::class, function ($app) {\n return $app['patch.repository'];\n });\n }", "protected function registerRepo() {\n\t\t$this->app['snowman.repo'] = $this->app->share(function($app) {\n\t\t\t$generator = $this->app->make('Yhbyun\\Snowman\\Generator');\n\n\t\t\treturn new RepoGeneratorCommand($generator);\n\t\t});\n\n\t\t$this->commands('snowman.repo');\n\t}", "protected function registerRepository()\n {\n $this->app->singleton('migrator.repository', function ($app) {\n $table = $app['config']['database.migrations'];\n\n return new DatabaseMigrationRepository($app['db'], $table);\n });\n }", "private function registerRepository()\n {\n $this->app->bind('App\\Repository\\Contracts\\UserInterface', 'App\\Repository\\Eloquent\\UserRepository');\n }", "public function registerRepositories(): void\n {\n // $this->app->bind(\n // Contracts\\PermissionRepository::class,\n // Repositories\\PermissionRepository::class\n // );\n\n // $this->app->bind(\n // Contracts\\RoleRepository::class,\n // Repositories\\RoleRepository::class\n // );\n }", "protected function registerRepositories()\n {\n collect($this->repositoryBindings)->each(\n function ($concrete, $contract) {\n $this->app->singleton($contract, $concrete);\n }\n );\n }", "public function getLinkTypeRepository()\n {\n return $this->linkTypeRepository;\n }", "function setReferenceRepository(ReferenceRepository $referenceRepository);", "protected function registerProductRepository()\n {\n $this->app->bind('App\\Repositories\\ProductRepositoryInterface',\n 'App\\Repositories\\ProductRepository');\n }", "public function getRepositoryLink(string $repository);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the alternate images for the product
protected function amendAlternateImages(Product $product) { $images = $product->getImages((int)NostoHelperContext::getLanguageId()); foreach ($images as $image) { $url = NostoHelperLink::getImageLink($product->link_rewrite, $image['id_image']); if ($url) { $this->addAlternateImageUrls($url); } } }
[ "function setProduct_image($product_image) { $this->product_image = $product_image; }", "private function updateAttributeUseProductImageFlag(): void\n {\n $this->configurableAttribute->setData('use_product_image_for_swatch', 1);\n $this->configurableAttribute = $this->productAttributeRepository->save($this->configurableAttribute);\n }", "public function setImage($replace) {\n\t}", "public function alternative_images_meta_box() {\n\n\t\tglobal $post;\n\n\t\t$image_ids = get_post_meta( $post->ID, '_image_ids', true );\n\n\t\t?>\n\t\t<?php\n\n\t\techo '<ul id=\"voucher_alternative_images\">';\n\t\tif ( is_array( $image_ids ) ) {\n\t\t\tfor ( $i = 1, $ix = count( $image_ids ); $i < $ix; $i++ ) {\n\n\t\t\t\t$image_src = wp_get_attachment_url( $image_ids[ $i ] );\n\t\t\t\t?>\n\t\t\t\t<li class=\"alternative_image\"><a href=\"#\" class=\"remove-alternative-voucher-image\"><img style=\"max-width:100px;max-height:100px;\" src=\"<?php echo $image_src ?>\" /><input type=\"hidden\" name=\"upload_image_id[<?php echo $i ?>]\" class=\"upload_image_id\" value=\"<?php echo $image_ids[ $i ] ?>\" /><span class=\"overlay\"></span></a></li>\n\t\t\t\t<?php\n\t\t\t}\n\t\t}\n\t\techo '</ul>';\n\n\t\t?>\n\t\t<p style=\"clear:left;\">\n\t\t\t<a title=\"<?php esc_attr_e( 'Add an alternative voucher image', WC_PDF_Product_Vouchers::TEXT_DOMAIN ) ?>\" href=\"#\" id=\"add-alternative-voucher-image\"><?php _e( 'Add an alternative voucher image', WC_PDF_Product_Vouchers::TEXT_DOMAIN ) ?></a>\n\t\t</p>\n\t\t<?php\n\t}", "protected function setOverrideImages($overrideImages)\n {\n $this->overrideImages = $overrideImages;\n }", "private function updateImgThumbnail(): void\n {\n //====================================================================//\n // Load Object Images List\n $allImages = Image::getImages(\n SLM::getDefaultLangId(),\n $this->ProductId,\n null,\n Shop::getContextShopID(true)\n );\n //====================================================================//\n // Walk on Object Images List\n foreach ($allImages as $image) {\n $imageObj = new Image($image['id_image']);\n $imagePath = _PS_PROD_IMG_DIR_.$imageObj->getExistingImgPath();\n if (!file_exists($imagePath.'.jpg')) {\n continue;\n }\n foreach (ImageType::getImagesTypes(\"products\") as $imageType) {\n $imgThumb = _PS_PROD_IMG_DIR_.$imageObj->getExistingImgPath();\n $imgThumb .= '-'.Tools::stripslashes($imageType['name']).'.jpg';\n if (!file_exists($imgThumb)) {\n ImageManager::resize(\n $imagePath.'.jpg',\n $imgThumb,\n (int)($imageType['width']),\n (int)($imageType['height'])\n );\n }\n }\n }\n }", "protected function setImageAttributes()\n {\n $image = $this->data['image'];\n\n $this->src = $image['src'];\n $this->alt = $image['alt'];\n $this->width = $this->width ?? $image['width'];\n $this->height = $this->height ?? $image['height'];\n }", "function setImages(DynamicValue $p_images):void\n {\n $this->images=$p_images;\n }", "function quick_view_product_images_markup() {\n\n\t\tinclude CARTFLOWS_PRO_CHECKOUT_DIR . 'templates/quick-view/quick-view-product-image.php';\n\t}", "function BH_shop_single_product_images() {\r\n\r\n\tget_template_part( 'views/woocommerce/single-product/single-product-section1', 'images' );\r\n\r\n}", "public function withImagesExtended(): static\n {\n return $this->addExtensionsFromPresets([static::PRESET_IMAGES ,static::PRESET_IMAGES_OTHER]);\n }", "public function update_images_dimension() {\n\t\tglobal $pagenow;\n\n\t\tif ( ! isset( $_GET['activated'] ) || $pagenow != 'themes.php' ) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t$catalog = array(\n\t\t\t'width' => '400',\t// px\n\t\t\t'height' => '400',\t// px\n\t\t\t'crop' => 1 \t\t// true\n\t\t);\n\n\t\t$single = array(\n\t\t\t'width' => '600',\t// px\n\t\t\t'height' => '600',\t// px\n\t\t\t'crop' => 1 \t\t// true\n\t\t);\n\n\t\t$thumbnail = array(\n\t\t\t'width' => '120',\t// px\n\t\t\t'height' => '120',\t// px\n\t\t\t'crop' => 0 \t\t// false\n\t\t);\n\t\t\n\t\t// Image sizes\n\t\tupdate_option( 'shop_catalog_image_size', $catalog ); \t\t// Product category thumbs\n\t\tupdate_option( 'shop_single_image_size', $single ); \t\t// Single product image\n\t\tupdate_option( 'shop_thumbnail_image_size', $thumbnail );\n\t}", "public function setImageAltText($altText);", "function setImages($p_images):void\n {\n $this->images=$p_images;\n }", "function do_dynamic_images()\n\t{\n\t\t//-----------------------------------------\n\t\t// Update the setting...\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->update_setting( 'allow_dynamic_img', $this->ipsclass->vars['allow_dynamic_img'] ? 0 : 1 );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Done..\n\t\t//-----------------------------------------\n\t\t\n\t\t$lang = $this->ipsclass->vars['allow_dynamic_img'] == 0 ? 'disabled' : 'enabled';\n\t\t\n\t\t$this->ipsclass->main_msg = \"Dynamic images {$lang}\";\n\t\t$this->security_overview();\n\t}", "function set_image() {\n\t\t$this->image = empty( $this->postmeta['image'] ) ? false : $this->postmeta['image'];\n\t}", "protected function _fixImages()\r\n {\r\n $updatedProductIds = $this->getUpdatedProductIds();\r\n $productAction = $this->getProductAction();\r\n $collection = $this->getProductCollection();\r\n $this->_splitCollection();\r\n\r\n foreach ($collection as $product) {\r\n Mage::helper('progos_catalog')->resetDefaultMediaGalleryImage($product, $productAction);\r\n\r\n $updatedProductIds[] = $product->getId();\r\n $this->_showProgress(count(array_diff($updatedProductIds, $this->_updatedProductIds)));\r\n\r\n $product->clearInstance();\r\n }\r\n\r\n $this->saveUpdatedProductIds($updatedProductIds);\r\n }", "public function getAlternateImageUrls();", "public function setImages($array)\n\t{\n\t\t$this->images = $array;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set value of created_on field
function setCreatedOn($value) { return $this->setFieldValue('created_on', $value); }
[ "function setCreatedOn($value) {\n $this->created_on = $value;\n }", "public function setCreatedAt($value)\n {\n $this->created_on = $value;\n }", "public function setCreatedOn($value) {\n $this->{static::CREATED_ON} = $value;\n\n return $this;\n }", "public function _setCreatedOn($created_on)\n {\n $this->created_on = $created_on;\n }", "public function setCreated($value);", "public function setCreatedAt($value);", "public function setCreatedValue()\n {\n $this->created = new \\DateTime();\n }", "public function setDateCreated() {\n\t\t\tif($this->_safeCreate) {\n\t\t\t\t$fieldName = array_search('_safeCreate', $this->_specialFields);\n\t\t\t\t$this->_setFieldToNow($fieldName);\n\t\t\t}\n\t\t}", "public function setCreatedAtValue()\n {\n $this->created = new \\DateTime;\n }", "public function _setCreatedOn($createdOn) {\n\t\t$this->_createdOn = $createdOn;\n\t}", "function getCreatedOn() {\n return $this->created_on;\n }", "public function getCreatedOn()\n {\n return $this->created_on;\n }", "public function getCreatedOn(){\n return $this->CreatedOn;\n }", "public function setCreatedAt($value)\n {\n $this->{static::CREATED_AT} = $value;\n }", "public function setAddedonAttribute($value)\n {\n $this->attributes['addedon'] = !empty($value) ? date($this->getDateFormat(), strtotime($value)) : null;\n }", "public function setCreatedAtAttribute($value)\n {\n $this->attributes['created_at'] = $value;\n }", "function setCreatedDate($created) {\n $this->created = $created;\n }", "public function setCreatedOn($createdOn) {\n\t\t$this->createdOn = $createdOn;\n\t}", "public function getCreatedOn() {\n\t\treturn $this->createdOn;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
LEER SUBSECCIONES QUE PERTENEZCAN A UNA DETERMINADA SECCION
function leerSubsecConSeccion($subSec_seccion_id){ $query = "SELECT * FROM sub_secciones WHERE subsec_seccion_id = '$subSec_seccion_id' ORDER BY subsec_orden"; $result = mysql_query($query); return $result; }
[ "public function lucesTechoPresidenciaSubir( ) {\n\n self::$luz->subirIntensidad(LuzTecho::$PRESIDENCIA);\n\n }", "public function obtenerModulosSuperiores();", "public function sincronizadorSubastas(){\n $residencias= PDOResidencia::getInstance()->listarTodas();\n foreach ($residencias as $key => $residencia){\n AuctionsController::getInstance()->sincronizador($residencia->getIdResidencia());\n\n }\n SistemaController::getInstance()->vistaPanel();\n\n\n }", "private function _subsubfamilias() \n\t{\n\t\t$consulta_subsub = new Mysql;\n\t\tforeach($this->_buscar as $subsubfamilia) {\n\t\t\t$sql_subsubfamilia = \"SELECT idsubsubfamilia FROM subsubfamilias WHERE eliminado = 0 AND subsubfamilia LIKE '%\" . $subfamilia . \"%';\";\n\t\t\t$consulta_subsub->ejecutar_consulta($sql_subsubfamilia);\n\t\t\tif($consulta_subsub->numero_registros==1) {\n\t\t\t\t$this->_subsubfamilias[] = 'idsubsubfamilia = ' . $consulta_subsub->registros[0]->idsubsubfamilia;\n\t\t\t} else {\n\t\t\t\t$palabras[]=$subsubfamilia;\n\t\t\t}\n\t\t}\n\t\t$consulta_subsub->__destruct;\n\t\t$this->_asignar_buscar($palabras);\n\t}", "function pre_descuento_articulos(&$Sesion) {\n\t//Para saber de ke cliente estamos tratando\n\n\t$id_cliente=$Sesion->fetchVar('id_cliente','GET');\n\t//variables del formilario\n\t$descuentos_articulo_modificar_descuento=$Sesion->fetchVar('descuentos_articulo_modificar_descuento','POST');\n\t$descuentos_articulo_modificar_monto=$Sesion->fetchVar('descuentos_articulo_modificar_monto','POST');\n\t$descuentos_articulo_borrar=$Sesion->fetchVar('descuentos_articulo_borrar','POST');\n\t$accion_ejecutar=$Sesion->fetchVar('accion_ejecutar','POST');\n\t$cliente_articulos=$Sesion->fetchVar('cliente_articulos','POST');\n\n\t$id_cliente = id_entidad($Sesion,'id_cliente',$id_cliente);\n\n\t//debug(\"glob $id_cliente\");\n\t//debug(\"ses $id_cliente_sesion\");\n\n\tif(isset($id_cliente) AND $id_cliente_sesion != $id_cliente)\n\t\t$Sesion->set_var(\"id_cliente_promocion\",$id_cliente);\n\telse {\n\t\t$id_cliente = $Sesion->get_var(\"id_cliente_promocion\");\n\t\tif(!isset($id_cliente)){\n\t\t\t// debug(\"no hay cliente\");\n\t\t\treturn;\n\t\t}\n\t}\n\n\t//$id_cliente = $Sesion->get_var(\"id_cliente_promocion\");\n\t$oDb = $Sesion->get_db('data');\n\t$usuario = identifica_usuarios($Sesion);\n\t$id_empresa = $usuario['id'];\n\n\tswitch($accion_ejecutar) {\n\t\tcase \"Modificar\" :\n\t\t\tif(isset($descuentos_articulo_modificar_monto) or isset($descuentos_articulo_modificar_descuento)){\n\t\t\t\tforeach($descuentos_articulo_modificar_monto as $clave => $valor){\n\t\t\t\t\t$aTmp['monto'] = ( (is_numeric($descuentos_articulo_modificar_monto[$clave])) ? $descuentos_articulo_modificar_monto[$clave] : 'null') ;\n\t\t\t\t\t$aTmp['descuento'] = ( (is_numeric($descuentos_articulo_modificar_descuento[$clave])) ? $descuentos_articulo_modificar_descuento[$clave] : 'null');\n\t\t\t\t\t$aTmp['id_cliente'] = $id_cliente;\n\t\t\t\t\t$aTmp['id_empresa'] = $id_empresa;\n\t\t\t\t\t$aTmp['id_articulo'] = $clave;\n\t\t\t\t\t$oDb->tb_update('Cliente_articulos',$aTmp);\n\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\n\t\tcase \"Borrar\" :\n\t\t\tif(isset($descuentos_articulo_borrar)){\n\t\t\t\tforeach($descuentos_articulo_borrar as $clave => $valor)\n\t\t\t\t\tif($valor == 1 ){\n\t\t\t\t\t\t$consulta=\"delete from Cliente_articulos\n\t\t\t\t\t\t\twhere id_articulo = $clave AND\n\t\t\t\t\t\t\tCliente_articulos.id_cliente = $id_cliente AND\n\t\t\t\t\t\t\tCliente_articulos.id_empresa = $usuario[id]\";\n\t\t\t\t\t\t$oDb->query($consulta);\n\t\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\n\t\tcase \"Anyadir\" :\n\t\t\tif (is_numeric($id_cliente) AND is_array($cliente_articulos) AND sizeof($cliente_articulos)) {\n\t\t\t\tforeach ($cliente_articulos as $id => $aArt)\n\t\t\t\t\tif (is_numeric($aArt['id_articulo']) AND $id == $aArt['id_articulo']) {\n\t\t\t\t\t\t$aArt['id_cliente'] = $id_cliente;\n\t\t\t\t\t\t$aArt['id_empresa'] = $id_empresa;\n\t\t\t\t\t\t$aArt['monto'] = ( (is_numeric($aArt['monto'])) ? $aArt['monto'] : 'null') ;\n\t\t\t\t\t\t$aArt['descuento'] = ( (is_numeric($aArt['descuento'])) ? $aArt['descuento'] : 'null') ;\n\t\t\t\t\t\t$oDb->tb_replace('Cliente_articulos',$aArt);\n\t\t\t\t\t}\n\t\t\t}\n\t\tbreak;\n\n\t}\n\n}", "function listeStagiaireTuteurEnseignant() {\n\t\t\t$bd = new bd();\n\t\t\t$co = $bd->connexion();\n\n\t\t\t// On recupère l'id du tuteur Enseignant\n\t\t\t$utilisateurs = new utilisateurs($co, $_SESSION['identifiant']);\n\t\t\t$id_tuteurEnseignant = $utilisateurs->getId();\n\n\t\t\t// On recupere le tableau des id des stagiaires du tuteur Enseignant\n\t\t\t$ficheLocalisationStage = new ficheLocalisationStage($co);\n\t\t\t$tableau_id_etudiant = $ficheLocalisationStage->rechercheStagiaireTuteurEnseignant($id_tuteurEnseignant);\n\n\t\t\t// On retourne le resultat\n\t\t\tforeach ($tableau_id_etudiant as $value) {\n\t\t\t\t$nom_stagiaire = $utilisateurs->nomEtudiant($value);\n\t\t\t\t$prenom_stagiaire = $utilisateurs->prenomEtudiant($value);\n\t\t\t\t$nomPrenom = $nom_stagiaire;\n\t\t\t\t$nomPrenom .= ' ';\n\t\t\t\t$nomPrenom .= $prenom_stagiaire;\n\n\t\t\t\techo'<option value=\"'.$value.'\">'.$nomPrenom.'</option>';\n\t\t\t}\n\n\t\t$bd->deconnexion();\n\t}", "public function obtenerViajesplus();", "private function _subfamilias() \n\t{\n\t\t$consulta_sub = new Mysql;\n\t\tforeach($this->_buscar as $subfamilia) {\n\t\t\t$sql_subfamilia = \"SELECT idsubfamilia FROM subfamilias WHERE eliminado = 0 AND subfamilia LIKE '%\" . $subfamilia . \"%';\";\n\t\t\t$consulta_sub->ejecutar_consulta($sql_subfamilia);\n\t\t\tif($consulta_sub->numero_registros==1) {\n\t\t\t\t$this->_idsubsubfamilias($consulta_sub->registros[0]->idsubfamilia);\n\t\t\t} else {\n\t\t\t\t$palabras[]=$subfamilia;\n\t\t\t}\n\t\t}\n\t\t$consulta_sub->__destruct;\n\t\t$this->_asignar_buscar($palabras);\n\t}", "public function conten_secciones(){\n \n $contenido = \"\"; \n \n $cant_sec = $this->model->contar_secciones(); \n \n //print_r($cant_sec);\n \n foreach($cant_sec as $clave){ \n \n $datos = $this->model->traer_advs_seccion($clave['id']); // trae los advs de una seccion \n $advs = $this->vista->refactory_advs_seccion($datos); // refactoriza los adv de una seccion y retorna el html de los resultados \n $seccion = $this->vista->refactory_seccion($clave['id'], $clave['descripcion'], $advs); // retorna el html de la seccio\n $contenido .=$seccion; //concatena todas las secciones \n }\n \n return $contenido;\n \n }", "function _restreindre_extras_objet_sur_cible($objet, $id_objet, $opt, $ids, $_id_cible) {\n\n $id_cible = intval($opt['contexte'][$_id_cible]);\n\n if (!$id_cible) {\n\t\t// on tente de le trouver dans la table de l'objet\n\t\t$table = table_objet_sql($objet);\n\t\t$id_table = id_table_objet($table);\n\t\t$trouver_table = charger_fonction('trouver_table', 'base');\n\t\t$desc = $trouver_table( table_objet($table) );\n\t\tif (isset($desc['field'][$_id_cible])) {\n\t\t\t$id_cible = sql_getfetsel($_id_cible, $table, \"$id_table=\".sql_quote($id_objet));\n\t\t}\n }\n\n\tif (!$id_cible) {\n\t\t// on essaie aussi dans le contexte d'appel de la page\n\t\t$id_cible = _request($_id_cible);\n\t\t\n\t\t// on tente en cas de id_secteur de s'appuyer sur un eventuel id_rubrique\n\t\tif (!$id_cible and $_id_cible == 'id_secteur') {\n\t\t\tif ($i = _request('id_rubrique')) {\n\t\t\t\t$id_cible = sql_getfetsel('id_secteur', 'spip_rubriques', 'id_rubrique='.sql_quote($i));\n\t\t\t}\n\t\t}\n\t}\n\n\tif (!$id_cible) {\n\t\treturn array($id_cible, false);\n\t}\n\n if (in_array($id_cible, $ids)) {\n\t\treturn array($id_cible, true);\n }\n\n return array($id_cible, false);\n}", "function selectSedes()\n {\n try {\n $idcliente = $_SESSION[\"idcliente\"];\n $sql = \"SELECT * FROM sede WHERE sed_id <> 4 AND sed_id <> 17 AND sed_id <> 8 AND sed_id <> 15 AND clien_id = ? ORDER BY sed_nombre ASC\";\n $query = $this->pdo->prepare($sql);\n $const = $query->execute(array($idcliente));\n $const = $query->fetchALL(PDO::FETCH_BOTH);\n return $const;\n } catch (\\Exception $e) {\n die($e->getMessage());\n }\n }", "function listado_subtemas_completo() {\n\n\t\t$query = \"SELECT * FROM subtemas ORDER BY subtema\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\t\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n}", "public function incluir($valores) {\n\t\trequire_once('conexao.php');\n\t\t$conexao = new conexao();\n\t\t\n\t\t$sql = \"insert into ouv_subitem (subitem, id_entidade, id_assunto) \n\t\t\t\tvalues ('\".$valores['descricao'].\"','\".$_SESSION['entidade'].\"',\".$valores['assunto'].\")\";\n\t\t$resultado = $conexao -> query($sql);\n\t\t\n\t\t/*if ($resultado) {\n\t\t\tsession_start();\n\t\t\t//ultim subitem inserido\n\t\t\t$ultimo = mysql_insert_id();\n\t\t\t//numero de registros no array de assuntos\n\t\t\t$max = count($valores['assunto']);\n\t\t\t\n\t\t\tif ($max > 0) {\n\t\t\t\t//assuntos do subitem para uma entidade\n\t\t\t\t$sql = \"insert into ouv_assunto_subitem (id_assunto, id_subitem, ativo)\n\t\t\t\t\t\tvalues \";\n\t\t\t\tfor ($i=0;$i<$max;$i++) {\n\t\t\t\t\tif ($i < $max-1) {\n\t\t\t\t\t\t$sql .= \"(\".$valores['assunto'][$i].\", \".$ultimo.\", 1),\";\n\t\t\t\t\t}\n\t\t\t\t\telse {\n\t\t\t\t\t\t$sql .= \"(\".$valores['assunto'][$i].\", \".$ultimo.\", 1)\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$resultado = $conexao -> query($sql);\n\t\t\t}\n\t\t}*/\n\t}", "public function finalizados(){\r\n\t\t\t$sql=\"SELECT * FROM PARTIDOS WHERE id IN (SELECT id_partido FROM GOLESPARTIDO)\";\r\n\t\t\t$ret=$this->db->prepare($sql);\r\n\t\t\t$ret->execute();\r\n\t\t\t$ret->bind_result($id, $f);\r\n\t\t\t$res=array();\r\n\t\t\t$s=new Seleccion();\r\n\t\t\twhile($ret->fetch()){\r\n\t\t\t\t$p=new Partido();\r\n\t\t\t\t$p->id=$id;\r\n\t\t\t\t$p->fecha=$f;\r\n\t\t\t\t$res[]=$p;\r\n\t\t\t}\r\n\t\t\tforeach ($res as $key => $p) {\r\n\t\t\t\t$aux = $p->participantes();\r\n\t\t\t\t$p->setSeleccionA($aux[0]);\r\n\t\t\t\t$p->setSeleccionB($aux[1]);\r\n\t\t\t}\r\n\t\t\treturn $res;\r\n\t\t}", "public function traerSubasta ($idResidenciaSemana){\n $answer = $this->queryList(\"SELECT s.idSubasta,rs.borrada as rsborrada,s.borrada,s.base, s.idResidenciaSemana,rs.idResidencia,s.borrada, s.activa,rs.idSemana, sem.fecha_inicio, sem.fecha_fin, rs.estado FROM residencia_semana rs INNER JOIN subasta s ON (rs.idResidenciaSemana=s.idResidenciaSemana) INNER JOIN semana sem ON (sem.idSemana= rs.idSemana) WHERE rs.idResidenciaSemana = :idResidenciaSemana AND rs.borrada = 0 AND s.borrada = 0\",array(':idResidenciaSemana' => $idResidenciaSemana));\n\n $final_answer = [];\n foreach ($answer as &$element) {\n $final_answer[] = array(new ResidenciaSemana ($element[\"idResidenciaSemana\"],$element[\"idResidencia\"], $element[\"idSemana\"],$element[\"fecha_inicio\"],$element[\"fecha_fin\"],$element[\"estado\"],$element['rsborrada']),new Subasta ($element[\"idSubasta\"],$element[\"idResidenciaSemana\"], $element[\"base\"],$element[\"activa\"],$element[\"fecha_inicio\"],$element[\"fecha_fin\"],$element[\"borrada\"]));\n }\n\n return $final_answer;\n\n }", "public function subirSonidoGeneral() {\n\n self::$mesaMezclas->subirVolumen(MesaMezclas::$CANAL2,\"master\");\n\n }", "public function participantes(){\r\n\t\t\t$ret=$this->db->prepare(\"SELECT id_s FROM entre WHERE id_p=?\");\r\n\t\t\t$ret->bind_param(\"i\", $this->id);\r\n\t\t\t$ret->execute();\r\n\t\t\t$ret->bind_result($id);\r\n\t\t\t$res=array();\r\n\t\t\t$sel=new Seleccion();\r\n\t\t\twhile($ret->fetch()){\r\n\t\t\t\t$sel=$sel->obtenerPorId($id);\r\n\t\t\t\t$res[]=$sel;\r\n\t\t\t}\r\n\t\t\treturn $res;\r\n\t\t\t\r\n\t\t}", "function listado_subtemas_completo_tmp() {\n\n\t\t$query = \"SELECT * FROM subtemas_tmp ORDER BY subtema\";\n\n\t\t$connection = mysql_connect($this->HOST, $this->USERNAME, $this->PASSWORD);\n\n\t\t$SelectedDB = mysql_select_db($this->DBNAME);\n\t\t$result = mysql_query($query); \n\t\t\n\t\t$numrows = mysql_num_rows($result);\n\t\tmysql_close($connection);\t\n\t\t// COMPROBAMOS QUE HAYA RESULTADOS\n\t\t// SI EL NUMERO DE RESULTADOS ES 0 SIGNIFICA QUE NO HAY REGISTROS CON ESOS DATOS\n\t\tif ($numrows == 0) {\n\t\t\treturn 0;\n\t\t}\n\t\telse {\n\t\t\treturn $result;\n\t\t}\n}", "function i2_societes_post_edition($flux) {\n\tif ($flux['args']['table'] == 'spip_auteurs') {\n\t\t$id_auteur = $flux['args']['id_objet'];\n\t\t$societes = sql_select('id_objet', 'spip_auteurs_liens', \"id_auteur=$id_auteur AND objet='societe'\");\n\t\t$societes_voulues = _request('id_societe');\n\t\tif (lire_config('inscription2/id_societe') == 'on') {\n\t\t\tif (lire_config('i2_societes/forme') == 'multiple') {\n\t\t\t\t$societe_existantes = array();\n\t\t\t\twhile ($societe=sql_fetch($societes)) {\n\t\t\t\t\tif (!in_array($societe['id_objet'], $societes_voulues)) {\n\t\t\t\t\t\tsql_delete('spip_auteurs_liens', \"id_auteur=$id_auteur AND objet='societe' AND id_objet=\".$societe['id_objet']);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$societe_existantes[] = $societe['id_objet'];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tforeach ($societes_voulues as $societe_voulue) {\n\t\t\t\t\tif (!in_array($societe_voulue, $societe_existantes)) {\n\t\t\t\t\t\tsql_insertq('spip_auteurs_liens', array('id_auteur' => $id_auteur, 'objet' => 'societe', 'id_objet' => $societe_voulue));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\twhile ($societe = sql_fetch($societes)) {\n\t\t\t\t\tif ($societe != $societes_voulues) {\n\t\t\t\t\t\tsql_delete('spip_auteurs_liens', \"id_auteur=$id_auteur AND objet='societe' AND id_objet=\".$societe['id_objet']);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$societe_existe = true;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif (!$societe_existe) {\n\t\t\t\t\tsql_insertq('spip_auteurs_liens', array('id_auteur' => $id_auteur, 'objet' => 'societe', 'id_objet' => $societes_voulues));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}\n\treturn $flux;\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ $id : submitted user id $pw : submitted user password $success_callback : it's callback function. if login success, this function called. $failed_callback : it's callback function. if login failed, this function called.
public function login( $id, $pw, $success_callback, $failed_callback ) { $this->config_validation(); $table = & $this->config['table']; $id_column = & $this->config['id_column']; $pw_column = & $this->config['pw_column']; $res = array(); // ID Check $this->db->where($id_column, $id); $idCheck = $this->db->count_all_results($table); if( $idCheck === 0 ) { $res['result'] = false; $res['code'] = '01'; $res['message'] = $this->config['message_no_id']; // 아이디 없음 > 실패 콜백함수로 전달 call_user_func( $failed_callback, $res ); return false; } $this->db->select($pw_column); $this->db->where($id_column, $id); $hashed_pass = $this->db->get($table)->result_array()[0][$pw_column]; $pw_check = $this->pw_verify( $pw, $hashed_pass ); // Password Check if( !$pw_check ) { $res['result'] = false; $res['code'] = '02'; $res['message'] = $this->config['message_no_pw']; // Password 틀림 > 실패 콜백함수에 전달 call_user_func( $failed_callback, $res ); return false; } // 패스워드 성공 > 성공 콜백 함수에 전달 $res['result'] = true; $res['code'] = '00'; $res['message'] = $this->config['message_success']; call_user_func( $success_callback, $res ); return true; }
[ "function login(&$user_info) \r\n{\r\n\tif (($user_info['username'] == NULL) || ($user_info['password'] == NULL))\r\n\t{\r\n\t\treturn \"noentry\";\r\n\t}\r\n\t\r\n\t$in_username = $user_info['username'];\r\n\t$in_password = $user_info['password'];\r\n\t\r\n\t$in_username = trim($in_username);\r\n\t$in_password = trim($in_password);\r\n\t\r\n#\techo(\"<p class='error'>user name = $in_username </p>\");\r\n#\techo(\"<p class='error'>password = $in_password </p>\");\r\n\t\r\n\t# set up query for username password combination\r\n\t$myQuery = \"SELECT username, password, firstname, lastname \";\r\n\t$myQuery = $myQuery . \"FROM customer \";\r\n\t$myQuery = $myQuery . \"where username= ? \";\r\n\t\r\n $namepassexists = false; \r\n \r\n # if query is successful, display the data in a table \r\n $result = query($myQuery, $in_username);\r\n \r\n # count the number of rows returned...should more than zero messages in there...\r\n if (!($result === false))\r\n {\r\n $rows = count($result);\r\n \r\n if ($rows == 1)\r\n {\r\n $row = $result[0];\r\n // compare hash of user's input against hash that's in database\r\n # if (crypt($_POST[\"password\"], $row[\"hash\"]) == $row[\"hash\"])\r\n\t\t if (($in_username == $row[\"username\"]) && (crypt($in_password, $row[\"password\"]) == $row[\"password\"]))\r\n\t\t\t{\r\n\t\t\t\t $namepassexists = true;\r\n\t\t\t\t $user_info['lastname'] = $row[\"lastname\"];\r\n\t\t\t\t $user_info['firstname'] = $row[\"firstname\"];\r\n\t\t\t}\r\n \t\t\t\r\n \t\t}\r\n \t\t\r\n\t\tif ($namepassexists == true)\r\n\t\t{\r\n\t\t\treturn 'userfnd';\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t \t\treturn 'userntfnd';\r\n \t\t}\t\r\n }\r\n else\r\n {\r\n\t\treturn 'userntfnd';\r\n }\r\n}", "private function userWithPw(){\n\t\tif ($this->_user_exists[0][2]==md5($this->_pw)){\n\t\t\t$_SESSION['etchat_'.$this->_prefix.'user_id'] = $this->_user_exists[0][0];\n\t\t\t$_SESSION['etchat_'.$this->_prefix.'username'] = $this->_user_exists[0][1];\n\t\t\t$_SESSION['etchat_'.$this->_prefix.'user_priv'] = $this->_user_exists[0][3];\n\t\t\tif ($_SESSION['etchat_'.$this->_prefix.'user_priv']=='admin' ||\n\t\t\t\t$_SESSION['etchat_'.$this->_prefix.'user_priv']=='mod') setcookie(\"cookie_anzahl_logins_in_XX_sek\",1);\n\t\t\t$this->status=1;\n\t\t}\n\t\telse $this->status = $this->_lang->pw_falsch[0]->tagData;\n\t\t\n\t}", "public function login(){\n $postData = $this->request->getData();\n if (!$this->validateForm( ['username', 'password'], $postData)){\n $this->jsonError(\"Information missing\");\n return;\n }\n $user = $this->Users->find('all')\n ->where(['username'=>$postData['username'], 'deleted' => 0])\n ->first();\n\n if (empty($user) || !password_verify($postData['password'], $user['password'])){\n $this->jsonError(\"Could not verify\");\n return;\n }\n $session = $this->getRequest()->getSession();\n $session->write('user_id', $user['id'] );\n $this->jsonSuccess(\"Logged in\", ['username'=> $user['username']]);\n }", "abstract protected function _PerformLogin();", "function authenticate_user()\n\t{\n\t\tif ($this->ipsclass->input['f_password'] == \"\")\n\t\t{\n\t\t\t$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'pass_blank' ) );\n\t\t}\n\t\t\n\t\tif ( $this->ipsclass->input['f_password'] != $this->forum['password'] )\n\t\t{\n\t\t\t$this->ipsclass->Error( array( 'LEVEL' => 1, 'MSG' => 'wrong_pass' ) );\n\t\t}\n\t\t\n\t\t$this->ipsclass->my_setcookie( \"ipbforumpass_\".$this->forum['id'], md5($this->ipsclass->input['f_password']) );\n\t\t\n\t\t$this->ipsclass->print->redirect_screen( $this->ipsclass->lang['logged_in'] , \"showforum=\".$this->forum['id'] );\n\t}", "public function post_login() {\n\t\t\n\t\t//check for logged\n\t\tif (Auth::check()) {\n\t\t\t\n\t\t\treturn $this->response(\n\t\t\t\tarray(\n\t\t\t\t\t'meta' => array(\n\t\t\t\t\t\t'code' => USER_LOGGED_CODE,\n\t\t\t\t\t\t'description' => USER_LOGGED_DESC,\n\t\t\t\t\t\t'messages' => USER_LOGGED_MSG,\t\n\t\t\t\t\t),\n\t\t\t\t\t'data' => null,\n\t\t\t\t)\t\t \t\n\t\t\t);\n\t\t\t\n\t\t} else {\n\t\t\t//set up data to login\n\t\t\t$username = Security::clean(Input::post('username'), $this->filters);\n\t\t\t$password = Security::clean(Input::post('password'), $this->filters);\n\t\t\t$rs = User::login($username, $password);\n\t\t\t\n\t\t\tif (false != $rs) {\n\t\t\t\t\n\t\t\t\t//return code SUSSCESS_CODE and message\n\t\t\t\treturn $this->response(array(\n\t\t\t\t\t\t'meta' => array(\n\t\t\t\t\t\t\t'code' => SUSSCESS_CODE,\n\t\t\t\t\t\t\t'messages' => 'Login success !',\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'data' => $rs ,\n\t\t\t\t));\n\t\t\t} else {\n\t\t\t\t//set code for login failed\n\t\t\t\t\t\t\t\t\t\n\t\t\t\treturn $this->response(array(\n\t\t\t\t\t\t'meta' => array(\n\t\t\t\t\t\t\t\t'code' => USER_LOGIN_ERROR,\n\t\t\t\t\t\t\t\t'description' => USER_LOGIN_ERROR_DESC,\n\t\t\t\t\t\t\t\t'message' => USER_LOGIN_ERROR_MSG,\n\t\t\t\t\t\t),\n\t\t\t\t\t\t'data' => null,\n\t\t\t\t));\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public function log_in()\n\t{\n\t\tif( isset( $_POST['user_login'] ) && wp_verify_nonce( $_POST['login_nonce'], 'login-nonce') ) \n\t\t{\n\t\t\t/** Error when no password enter */\n\t\t\tif( ! isset( $_POST['user_pass']) || $_POST['user_pass'] == '') {\n\t\t\t\t$this->system_message['error'][] = __('Please enter a password');\n\t\t\t\treturn false;\n\t\t\t}\n\t \t\t\n\t\t\t// this returns the user ID and other info from the user name\n\t\t\t$user = get_user_by('login', $_POST['user_login'] );\n \n\t\t\tif( ! $user ) \n\t\t\t{\t\t\t\t\n\t\t\t\t$this->system_message['error'][] = __('Invalid ID or password');\n\t\t\t\treturn false;\n\t\t\t}\n\t \n\t\t\t// check the user's login with their password\n\t\t\tif( ! wp_check_password( $_POST['user_pass'], $user->user_pass, $user->ID) ) {\n\t\t\t\t// if the password is incorrect for the specified user\n\t\t\t\t$this->system_message['error'][] = __('Invalid ID or password');\n\t\t\t}\n\t \n\t\t\t// only log the user in if there are no errors\n\t\t\tif( empty( $this->system_message['error'] )) \n\t\t\t{\n\t\t\t\twp_set_auth_cookie( $user->ID, false, true );\n\t\t\t\twp_set_current_user( $user->ID );\t\n\t\t\t\tdo_action('wp_login', $_POST['user_login']);\n\t \n\t\t\t\twp_redirect( home_url() ); exit;\n\t\t\t}\n\t\t}\n\t}", "function doLogin($userid, $password){\n\t$goodUserid=\"clara\";\n\t$goodPassword=\"12345\";\n\n\tif($userid == $goodUserid){\n\t\tif($password == $goodPassword){\n\t\t\treturn true;\n\t\t}\n\t}\n\t\n\treturn false;\n}", "function login()\r\n\t{\r\n\t\tif(validate_user_name($_POST[\"uname\"]))\r\n\t\t\t{\r\n\t\t\t$uname=$_POST[\"uname\"];\r\n\t\t\t}\r\n\t\telse{ \r\n\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t\t\r\n\t\tif(validate_pass1($_POST[\"passwd\"]))\r\n\t\t\t{\r\n\t\t\t$hash_passwd=md5($_POST[\"passwd\"]);\r\n\t\t\t}\r\n\t\telse\r\n\t\t\t{\r\n\t\t\t\treturn FALSE;\r\n\t\t\t}\r\n\t\t$sql = \"SELECT username, Password FROM USERS where username = '\".$uname.\"' AND Password='\".$hash_passwd.\"'\"; \r\n\t\t$result = \texecuteQuary($sql); \r\n\t\tif ($myRecord = mysql_fetch_array($result)) \r\n\t\t\t{ \r\n\t\t\tif($uname == $myRecord['username'] && $hash_passwd == $myRecord['Password']) \r\n\t\t\t\t{ \r\n\t\t\t\t$this->setUname($uname);\r\n\t\t\t\t$tmpPassArr[1]=$_POST[\"passwd\"];$tmpPassArr[2]=$_POST[\"passwd\"];\r\n\t\t\t\t$this->setPasswd($tmpPassArr);\r\n\t\t\t\t$this->getUserDetails();\r\n\t\t\t\treturn true; \r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\t{return false;} \r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\t{return false;} \r\n\t\t}", "public function validate_login() {\n\t\t$userid=$_POST['user_id'];\n\t\t$password=$_POST['password'];\n\t\t$compid=$_POST['company_id'];\n\t\t\n\n\t\t$sql=\"SELECT u.id, u.user_name FROM users u, hmz_cust_info ci where ci.id=u.cust_id\n\t\t\tand u.user_id='$userid' and u.password='$password' and ci.cust_id='$compid';\";\n\t\t$result=$this->runQuery(\"getAll\",$sql);\n\t\tif(count($result)>0) {\n\t\t\t$_SESSION['user_id']=$result[0];\n\t\t\t$_SESSION['user_name']=$result[1];\n\t\t\theader('location: ?a=P&b=dashboard');\n\t\t}\n\t\telse\n\t\t\theader('location: ?a=login&b=f');\n\n\t}", "abstract protected function respondLoginSuccess();", "function login_verification_user()\r\n {\r\n global $connection;\r\n $username=strip_tags($_POST['username']);\r\n $password=strip_tags($_POST['password']);\r\n $password=encrypt($password);\r\n $user_data=bool_login_verification($username,$password,'user');\r\n if ( $user_data[0] >0 )//user_id\r\n {\r\n set_user_session_id($user_data[0]);\r\n set_user_session_name($user_data[1]);\r\n //print_r($_SESSION);\r\n redirect(\"user_notification.php\"); \r\n }\r\n else\r\n {\r\n show_error_message(\"Incorrect Username or Password\");\r\n } \r\n }", "public function login() {\n if (($this->username != null) && ($this->password != null)) {\n //test\n $this->userid = -1;\n }\n }", "public function login($login, $passw, $challenge, $bSave = true) {\t\t\n\t\t$this->logs->addLog(\"login() called\");\n\t\t$logged = false;\n\t\t\n\t\t$login = (get_magic_quotes_gpc() ? $login : addslashes($login));\n\t\t\n\t\t$row = cDb::select(\"core_users\", '*', array('login','=',$login), null, 1);\n\t\t/// login doesn't exist ///\n\t\tif(!is_array($row) || count($row) == 0){\n\t\t\t$this->aErrors[] = getString(\"User doesn't exist!\",'core');\n\t\t\treturn false;\n\t\t} else {\n\t\t\t$row = $row[0];\n\t\t}\n\t\t/// user is not active ///\n\t\tif(!(int)$row['active']){\n\t\t\t$this->aErrors[] = getString(\"Your account has been deactivated!\",'core');\n\t\t\treturn false;\n\t\t}\n\t\t/// $passw is sent in hmac/sha1 form ///\n\t\tif ($bSave) {\n \t\t$valid = (self::hmac_sha1($row[\"password\"], $challenge) == $passw);\n\t\t} else {\n\t\t\t$valid = ($row[\"password\"] == self::cyphrePassword($passw));\n\t\t}\n\t\t$this->logs->addLog($passw,'password');\n\t\t$this->logs->addLog(self::hmac_sha1($row[\"password\"],$challenge),'password1');\n\t\t/// user doesn't match sent password ///\n\t\tif (!$valid) {\n \t\t$this->aErrors[] = getString(\"User with this password doesn't exist!\",'core');\n \t\treturn false;\n\t\t}\n\t\t\n\t\ttry{\n\t\t\t$where = array(\tarray('id','=',intval($challenge)),'AND',array('session','=',session_id()) );\n\t\t\t/// chalenge wasn't inserted from the same session ///\n\t\t\tif(!cDb::delete(\"core_challenges\", $where)) {\n\t \t\tthrow new cException(getString(\"You are trying to login without authorization or after long time the page was generated!\",'core'));\n\t \t}\n\t \t$this->logs->addLog(cDb::getAffectedRows(),\"deleted:\");\n\t\t\ttry{\n\t\t\t\tif(!self::insert($row)){\n\t\t\t\t\tthrow new cException(getString(\"Some error during login process!\",'core'));\n\t\t\t\t}\n\t\t\t\tif(REDIRECT_AFTER_LOGIN){\n\t\t \t\theader('Location:'.cBuildIndex::getActionUrl(cCfg::$sPageAfterLofin));\t\n\t\t \t}\n\t\t\t\treturn true;\n\t\t\t}catch(cException $e) {\n\t\t\t\t$this->aErrors[] = $e->getMessage();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t} catch (cException $e) {\n\t\t\t$this->logs->addLog(cDb::getAffectedRows(),\"deleted:\");\n \t\t$this->aErrors[] = $e->getMessage();\n\t\t\treturn false;\n\t\t} \n\t}", "function authenticate($ucid, $pass) {\n\t\tglobal $db;\n\n\t\t$sql = \"SELECT * \n\t\t\t\t\tFROM users \n\t\t\t\t\tWHERE ucid='$ucid'\";\t\n\t\t( $t = mysqli_query($db, $sql) ) or die( mysqli_error($db) );\n\t\t\n\t\t$r = mysqli_fetch_array($t, MYSQLI_ASSOC);\n\t\t$hash = $r['hash'];\n\t\t\n\t\tif (password_verify($pass, $hash)){\n\t\t\t$_SESSION[\"logged\"] = true;\n\t\t\t$_SESSION[\"ucid\"] = $ucid;\n\t\t\treturn true;\n\t\t} else { return false; }\n\t}", "function login_backend($user,$psw)\n{\n\tglobal $db,$ros;\n\t\n\t//$psw = md5($psw);\n\t\n\t$sql = 'SELECT admin_id,uname,pwd '.\n\t\t\t'FROM '. $ros->table('admin').\n\t\t\t'WHERE uname = \"'.$user.'\" '.\n\t\t\t'AND pwd = \"'.$psw.'\"'\n\t\t\t;\n\t$info = $db->getOne($sql);\t\t\t\n\treturn $info;\n\t$db->free_result($res);\n}", "function check_auth_id($id, $password) {\n $user = get($id);\n if (!$user){\n return null;\n }\n else{ \n if ($password==$user->password){\n return $user;\n }\n else {\n return null;\n }\n } \n}", "function login_complete()\n\t{\n\t\t//-----------------------------------------\n\t\t// INIT\n\t\t//-----------------------------------------\n\t\t\n\t\t$username = str_replace( '|', '&#124;', $this->ipsclass->input['username'] );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Check\n\t\t//-----------------------------------------\n\t\t\n\t\tif ( empty($this->ipsclass->input['username']) )\n\t\t{\n\t\t\t$this->login_form(\"You must enter a username before proceeding\");\n\t\t}\n\t\t\n\t\tif ( empty($this->ipsclass->input['password']) )\n\t\t{\n\t\t\t$this->login_form(\"You must enter a password before proceeding\");\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n \t// Load handler...\n \t//-----------------------------------------\n \t\n \trequire_once( ROOT_PATH.'sources/handlers/han_login.php' );\n \t$this->han_login = new han_login();\n \t$this->han_login->ipsclass =& $this->ipsclass;\n\t\t$this->han_login->is_admin_auth = 1;\n \t$this->han_login->init();\n\t\t\n\t\t//-----------------------------------------\n\t\t// Check auth\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->han_login->login_authenticate( $username, $this->ipsclass->input['password'] );\n\t\t\n\t\t//-----------------------------------------\n\t\t// Check return code...\n\t\t//-----------------------------------------\n\t\t\n\t\t$mem = $this->han_login->member;\n\n\t\t$username_incorrect = \"Username or password incorrect\";\n\t\t\n\t\tif( $this->ipsclass->vars['ipbli_usertype'] != 'username' )\n\t\t{\n\t\t\t$username_incorrect = \"Email address or password incorrect\";\n\t\t}\n\t\t\n\t\tif ( ( ! $mem['id'] ) or ( $this->han_login->return_code == 'NO_USER' ) )\n\t\t{\n\t\t\t$this->write_to_log( $this->ipsclass->input['username'], 'fail' );\n\t\t\t$this->login_form( $username_incorrect );\n\t\t}\n\t\t\n\t\tif ( $this->han_login->return_code != 'SUCCESS' )\n\t\t{\n\t\t\tif ( $this->han_login->return_code == 'ACCOUNT_LOCKED' )\n\t\t\t{\n\t\t\t\t$this->write_to_log( $this->ipsclass->input['username'], 'fail' );\n\t\t\t\t$this->login_form( \"Your account has been locked due to the number of failed login attempts made\" );\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$this->write_to_log( $this->ipsclass->input['username'], 'fail' );\n\t\t\t\t$this->login_form( $username_incorrect );\n\t\t\t}\n\t\t}\n\t\t\n\t\t//-----------------------------------------\n\t\t// Get perms\n\t\t//-----------------------------------------\n\t\t\n\t\t$this->ipsclass->sess->member = $mem;\n\t\t$this->ipsclass->sess->build_group_permissions();\n\t\t$mem = $this->ipsclass->sess->member;\n\t\t\n\t\tif ( $mem['g_access_cp'] != 1 )\n\t\t{\n\t\t\t$this->write_to_log( $this->ipsclass->input['username'], 'fail' );\n\t\t\t$this->login_form(\"You do not have access to the administrative CP\");\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Fix up query string...\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$extra_query = \"\";\n\t\t\t\n\t\t\tif ( $_POST['qstring'] )\n\t\t\t{\n\t\t\t\t$extra_query = urldecode( $_POST['qstring'] );\n\t\t\t\t$extra_query = str_replace( \"{$this->ipsclass->vars['board_url']}\" , \"\" , $extra_query );\n\t\t\t\t$extra_query = preg_replace( \"!/?admin\\.{$this->ipsclass->vars['php_ext']}!i\", \"\" , $extra_query );\n\t\t\t\t$extra_query = preg_replace( \"!^\\?!\" , \"\" , $extra_query );\n\t\t\t\t$extra_query = preg_replace( \"!adsess=(\\w){32}!\" , \"\" , $extra_query );\n\t\t\t\t$extra_query = preg_replace( \"!s=(\\w){32}!\" , \"\" , $extra_query );\n\t\t\t\t$extra_query = preg_replace( \"!act=login!\" , \"\" , $extra_query );\n\t\t\t\t$extra_query = preg_replace( \"!code=template-edit-bit!\" , \"\" , $extra_query );\n\t\t\t\t$extra_query = preg_replace( \"!code=template-bits-list!\" , \"\" , $extra_query );\n\t\t\t\t$extra_query = preg_replace( \"!bitname=(\\w)!\" \t\t , \"\" , $extra_query );\n\t\t\t\t$extra_query = $this->ipsclass->parse_clean_value( $extra_query );\n\t\t\t}\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Delete old sessions..\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$this->ipsclass->DB->do_delete( 'admin_sessions', 'session_member_id='.$mem['id'] );\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// All is good, rejoice as we set a\n\t\t\t// session for this user\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$sess_id = md5( uniqid( microtime() ) );\n\t\t\t\n\t\t\t$this->ipsclass->DB->do_insert( 'admin_sessions', array (\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'session_id' => $sess_id,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'session_ip_address' => $this->ipsclass->ip_address,\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'session_member_name' => $mem['name'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'session_member_id' => $mem['id'],\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'session_member_login_key' => md5( $mem['joined'] . $mem['ip_address'] ),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'session_location' => 'index',\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'session_log_in_time' => time(),\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t 'session_running_time' => time(),\n\t\t\t\t\t\t\t\t\t\t\t)\t\t\t\t\t\t);\n\t\t\n\t\t\t$this->ipsclass->input['adsess'] = $sess_id;\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Set a session ID cookie\n\t\t\t//-----------------------------------------\n\t\t \n\t\t\t// Don't want it used for XSS...\n\t\t\t//$this->ipsclass->my_setcookie(\"ipb_admin_session_id\", $sess_id, 0);\n\t\t\t\n\t\t\t$this->write_to_log( $this->ipsclass->input['username'], 'ok' );\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Lets add some data in here for the access logs...\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$extra_query .= \"&member_id=\".$mem['id'].'&password=ok';\n\t\t\t\n\t\t\t//-----------------------------------------\n\t\t\t// Redirect...\n\t\t\t//-----------------------------------------\n\t\t\t\n\t\t\t$this->ipsclass->admin->redirect( $this->ipsclass->vars['board_url'].'/'.IPB_ACP_DIRECTORY.\"/index.\".$this->ipsclass->vars['php_ext'].\"?adsess=\".$this->ipsclass->input['adsess'].\"&\".$extra_query, 'Log In Successful' );\n\t\n\t\t\texit();\n\t\t}\n\t}", "public function login($service,$id){\n\t\t// Also pull the necessary variables from DB\n\t\t// like Cloudclient ID\n\t\tswitch($service){\n\t\t\tcase 'cloudclient':\n\t\t\t\t// Our standard login system\n\t\t\t\t$usid = $id;\n\t\t\t\tbreak;\n\t\t\tcase 'dropbox':\n\t\t\t\t// Dropbox login\n\t\t\t\t// Fetch user id, if there is any. If not, create a new one.\n\t\t\t\t$db = $this->db();\n\t\t\t\t$usid = $db->preparedQuery('SELECT id FROM users WHERE dropbox = ? LIMIT 1',array($id));\n\t\t\t\t$usid = $db->fetchNext($usid);\n\t\t\t\tif($usid && $usid>0){\n\t\t\t\t\t// User already existed\n\t\t\t\t}else{\n\t\t\t\t\t// Users doesn't exist, insert new\n\t\t\t\t\t$usid = $db->preparedInsert('users',array('dropbox'=>$id,'jtime'=>time()));\t\n\t\t\t\t}\n\t\t\t\t// We now have the usid, create session vars\n\t\t\t\t$this->logged = $_SESSION['user']['logged'] = true;\n\t\t\t\t$_SESSION['user']['id'] = $usid;\n\t\t\t\tbreak;\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove binding to another exchange. Remove a routing key binding on an another exchange from the given exchange.
public function unbind(string $exchangeName, string $routingKey = '', array $arguments = []): void;
[ "public function unbind($exchange_name, $routing_key) {}", "public function unbind($exchange, $routingKey = \"\")\n\t{\n $queueName = $this->getName();\n\t\treturn $this->getAdapter()->queueUnBind($queueName, $exchange, $routingKey, $this->_options['arguments'], $this->_options['ticket']);\n\t}", "public function unbind(Exchange $source, $routingKey = '')\n {\n if ($source->type()->requiresRoutingKey() && '' === $routingKey) {\n return reject(\n new InvalidArgumentException(\n sprintf(\n 'Bindings on a %s exchange (%s) require a routing key.',\n $source->type(),\n $source->name()\n )\n )\n );\n }\n\n return $this\n ->serverApi\n ->openChannel()\n ->then(\n function ($channelId) use ($source, $routingKey) {\n $this->serverApi->send(\n QueueUnbindFrame::create(\n $channelId,\n null, // reserved\n $this->name,\n $source->name(),\n $routingKey\n )\n );\n\n return $this->serverApi->wait(QueueUnbindOkFrame::class, $channelId);\n }\n )\n ->then(\n function ($frame) {\n $this->serverApi->closeChannel($frame->frameChannelId);\n }\n );\n }", "public function removeExchange(ExchangeInterface $exchange);", "public function queueUnBind(\n $queue,\n $exchange,\n $routingKey = \"*\",\n $arguments = null,\n $ticket = null\n ) {\n\t\treturn $this->_channel->queue_unbind($queue, $exchange, $routingKey, $arguments, $ticket);\n\t}", "public function removeRootBinding(Uuid $uuid);", "public function unbind($exchangeName, $routingKey = null, array $arguments = [])\n {\n $this->resource->unbind($exchangeName, $routingKey, $arguments);\n\n return $this;\n }", "public static function unbindExchange(string $exchange)\n {\n return self::getChannel()->exchange_unbind(\n config('amqp.log_queue'),\n $exchange\n );\n }", "public function unbind() {\n\t\tif (!ldap_unbind($this->link)) {\n\t\t\tthrow new LdapBindException($this->link);\n\t\t}\n\t}", "function unbind($bindLocalProperty);", "public function removeExchangeItemByKey($key);", "public function bind(string $exchangeName, string $routingKey = '', array $arguments = []): void;", "public function unbind($placeholder)\n\t{\n\t\tif (isset($this->placeholders['/'.$placeholder]))\n\t\t{\n\t\t\tunset($this->placeholders['/'.$placeholder]);\n\t\t}\n\t}", "private function removeBindingsByPath($path)\n {\n if (!isset($this->pathIndex[$path])) {\n return;\n }\n\n foreach ($this->pathIndex[$path] as $id => $true) {\n $binding = $this->bindings[$id];\n\n unset($this->bindings[$id]);\n unset($this->typeIndex[$binding->getType()->getName()][$id]);\n\n foreach ($binding->getResources() as $resource) {\n unset($this->resourcePathIndex[$resource->getPath()][$id]);\n }\n }\n\n unset($this->pathIndex[$path]);\n }", "public function unbind(string $name): void\n {\n if ($this->has($name)) {\n unset($this->resolvedEntries[$name]);\n }\n }", "public function unsubscribe($queue, $endpoint);", "public function clearBindings($key = null)\n {\n if (!$key) {\n static::$container['bindings'] = [];\n } else {\n unset(static::$container['bindings'][$key]);\n }\n }", "public function unbind()\n {\n @ldap_unbind($this->resource);\n }", "function removeLookup($table_uri, $column_name, $config = [])\n\t{\n\t\t$this->zoho_action = 'REMOVELOOKUP';\n\t\t$config['ZOHO_COLUMNNAME'] = $column_name;\n\t\t$request_url = $this->getUrl($table_uri, 'JSON');\n\t\t$this->sendRequest($request_url, $config, false);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The constructor. Sets up the data storage engine and connects to the handler.
public function __construct() { require_once ISC_BASE_PATH.'/lib/class.datastore.disk.php'; $this->handler = new ISC_DATA_STORE_DISK; $this->handler->Connect(); }
[ "public function __construct()\n {\n\n $this->dataHandler = new dataHandler();\n }", "public function __construct(){\n if( DBCollection::exists( 'Default' ) ){\n $connection = DBCollection::get( 'Default' );\n }else{\n throw new RuntimeException( 'Define a default connection in Configs class' );\n }\n \n $this->storage = new PDOStorage( $connection->getConnection(), $connection->getDriver() );\n $this->entity = new EntityStorage( $this->storage );\n }", "public function __construct() {\n\t\t$this->dbHandler = new DatabaseHandler();\t\t\n\t}", "protected function connect() {\n\t\t$this->client = new \\TYPO3\\CouchDB\\Client($this->dataSourceName, array('logSlowQueries' => $this->logSlowQueries, 'slowQueryThreshold' => $this->slowQueryThreshold));\n\t\tif ($this->databaseName !== NULL) {\n\t\t\t$this->client->setDatabaseName($this->databaseName);\n\t\t}\n\t\t$this->flow3Design = new Flow3Design($this->client);\n\t}", "public function __construct()\n {\n $this->model = XenForo_Model::create('ThreemaGateway_Model_Keystore');\n $this->dataWriter = XenForo_DataWriter::create('ThreemaGateway_DataWriter_Keystore');\n }", "private function __construct() {\n $this->config = new Configuration();\n $this->statisticStorage = new StatisticStorageJson($this->config);\n }", "private function __construct() {\n\t\t$this->data_container = new DataContainer();\n\t}", "protected function __construct()\n\t\t{\n\t\t\t$this->connect( MEMCACHED_HOST, MEMCACHED_PORT );\n\t\t}", "private function __construct()\n\t{\n\t\tself::openConnection();\n\t}", "public function __construct()\n {\n $conn = Mage::getResourceSingleton('sales/order')->getReadConnection();\n $this->setConnection($conn);\n }", "public function __construct()\r\n {\r\n $this->quoteStore = new QuoteStore;\r\n }", "private function __construct()\n {\n $this->host = Config::getConfigEntry('magnetometer_hostname');\n $this->username = Config::getConfigEntry('magnetometer_username');\n $this->password = Config::getConfigEntry('magnetometer_password');\n $this->shareName = Config::getConfigEntry('magnetometer_share');\n $this->lastRetrieval = Config::getConfigEntry('magnetometer_latest');\n\n // This is not a poltergeist class! The Retriever handles most of the interaction with the Server object.\n $this->server = new Server($this->host, $this->username, $this->password);\n $this->share = $this->server->getShare($this->shareName);\n }", "public function __construct()\n {\n $this->dataPath = dirname(dirname(dirname(dirname(__FILE__))));\n $this->dataFilename = 'data.json';\n }", "private function __construct()\n {\n $this->config = Config::getConfig();\n $this->currentLanguage = Locale::getLanguage();\n $this->locale = Locale::getLocale();\n $this->database = Connector::getInstance();\n\n $this->renderer = new Renderer();\n $this->retriever = Retriever::getInstance();\n\n $this->start();\n }", "protected function _initStorage() {\n\t\tif(empty($this->storage)) {\n\t\t\t$this->storage = new FeedAggregatorPdoStorage($this->config);\n\t\t}\n\t}", "public function __construct()\n {\n $this->connection = $this->createConnection();\n }", "public function __construct() {\n\n // object store for connected clients\n $this->clients = new \\SplObjectStorage;\n }", "public function __construct()\n {\n /**\n * Initializing Read and Write connections\n */\n $this->_masterConnectionId = PHP2_Database_ConnectionsPool::getInstance()->getConnection(null, PHP2_Database_ConnectionsPool::CONNECTION_TYPE_WRITE);\n $this->_slaveConnectionId = PHP2_Database_ConnectionsPool::getInstance()->getConnection(null, PHP2_Database_ConnectionsPool::CONNECTION_TYPE_READ, true);\n }", "protected function init() {\n\t\t$this->data = array('data' => array());\n\t\t$this->queue_data = array();\n\t\tif (is_resource($this->fileHandler)) {\n\t\t\tfclose($this->fileHandler);\n\t\t}\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Test that plugin/$plugin_name is only appended to the paths it should be.
public function testPluginPathGeneration() { $this->Controller->plugin = 'TestPlugin'; $this->Controller->name = 'TestPlugin'; $this->Controller->viewPath = 'Tests'; $this->Controller->action = 'index'; $View = new TestView($this->Controller); $paths = $View->paths(); $expected = array_merge(App::path('View'), App::core('View'), App::core('Console/Templates/skel/View')); $this->assertEquals($expected, $paths); $paths = $View->paths('TestPlugin'); $pluginPath = CakePlugin::path('TestPlugin'); $expected = array( CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS . 'Plugin' . DS . 'TestPlugin' . DS, $pluginPath . 'View' . DS, CAKE . 'Test' . DS . 'test_app' . DS . 'View' . DS, CAKE . 'View' . DS, CAKE . 'Console' . DS . 'Templates' . DS . 'skel' . DS . 'View' . DS ); $this->assertEquals($expected, $paths); }
[ "public function testPathWithPlugins(): void\n {\n $basepath = TEST_APP . 'Plugin' . DS;\n $this->loadPlugins(['TestPlugin', 'Company/TestPluginThree']);\n\n $result = App::path('locales', 'TestPlugin');\n $this->assertPathEquals($basepath . 'TestPlugin' . DS . 'resources' . DS . 'locales' . DS, $result[0]);\n\n $result = App::path('locales', 'Company/TestPluginThree');\n $expected = $basepath . 'Company' . DS . 'TestPluginThree' . DS . 'resources' . DS . 'locales' . DS;\n $this->assertPathEquals($expected, $result[0]);\n }", "public function testAddPluginReturnsSamePluginWhenAskedTwice()\n {\n $plugin_name = 'Mock';\n $this->handler->addPath(dirname(__FILE__), 'Phergie_Plugin_');\n\n $plugin1 = $this->handler->addPlugin($plugin_name);\n $plugin2 = $this->handler->addPlugin($plugin_name);\n $this->assertSame($plugin1, $plugin2);\n }", "public function testAddPath()\n {\n $plugin_name = 'Mock';\n try {\n $this->handler->addPlugin($plugin_name);\n } catch(Phergie_Plugin_Exception $e) {\n $this->assertEquals(\n Phergie_Plugin_Exception::ERR_CLASS_NOT_FOUND,\n $e->getCode()\n );\n \n $this->handler->addPath(dirname(__FILE__), 'Phergie_Plugin_');\n\n try {\n $this->handler->addPlugin($plugin_name);\n } catch(Phergie_Plugin_Exception $e) {\n $this->fail(\n 'After adding the directory, the plugin was still '\n . 'not found.'\n );\n }\n \n return;\n }\n\n $this->fail(\n 'Before adding the directory, an expected exception '\n . 'was not raised'\n );\n }", "public function testPathThemedPluginGeneration()\n {\n $viewOptions = ['plugin' => 'TestPlugin',\n 'name' => 'TestPlugin',\n 'viewPath' => 'Tests',\n 'view' => 'index',\n 'theme' => 'TestTheme'\n ];\n\n $View = new TestView(null, null, null, $viewOptions);\n $paths = $View->paths('TestPlugin');\n $pluginPath = Plugin::path('TestPlugin');\n $themePath = Plugin::path('TestTheme');\n $expected = [\n TEST_APP . APP_DIR . DS . 'Template' . DS . 'TestTheme' . DS . 'Plugin' . DS . 'TestPlugin' . DS,\n TEST_APP . APP_DIR . DS . 'Template' . DS . 'TestTheme' . DS,\n $themePath . 'src' . DS . 'Template' . DS . 'Plugin' . DS . 'TestPlugin' . DS,\n $themePath . 'src' . DS . 'Template' . DS,\n TEST_APP . APP_DIR . DS . 'Template' . DS . 'Plugin' . DS . 'TestPlugin' . DS,\n $pluginPath . 'src' . DS . 'Template' . DS,\n TEST_APP . APP_DIR . DS . 'Template' . DS,\n CAKE . 'Template' . DS,\n ];\n\n $this->assertPathEquals($expected, $paths);\n }", "public function test_plugins_url_returns_unchanged_url_if_relative_file_in_known_directory(): void\n {\n $plugins_url = WPMU_PLUGIN_URL . '/' . self::PLUGIN_NAME;\n $plugin_file = WPMU_PLUGIN_DIR . '/' . self::PLUGIN_NAME . '/' . self::PLUGIN_NAME . '.php';\n self::assertEquals($plugins_url, Util\\plugins_url($plugins_url, '', $plugin_file));\n }", "public function testForPluginWithoutWebroot(): void\n {\n $this->loadPlugins(['TestPluginTwo']);\n\n $this->exec('plugin assets symlink');\n $this->assertFileDoesNotExist($this->wwwRoot . 'test_plugin_two');\n }", "function __checkPluginFolder() {\n\t\t$tempHandler = new Folder();\n\t\t$tempPath = trim(TMP);\n\t\t$pluginPath = trim(TMP . 'plugins');\n\n\t\t$tempHandler->cd($tempPath);\n\t\t$temp = $tempHandler->ls();\n\t\tforeach ($temp[0] as $tempFolder) {\n\t\t\tif ($tempFolder !== 'plugins') {\n\t\t\t\t$tempHandler->create($pluginPath);\n\t\t\t}\n\t\t}\n\t}", "public function testAddPluginPathsViaConfiguration()\n {\n $dir = dirname(__FILE__);\n $prefix = 'Phergie_Plugin_';\n $this->settings['plugins.paths'] = array($dir => $prefix);\n\n // Reinitialize the handler so the configuration change takes effect\n // within the constructor\n $this->handler = new Phergie_Plugin_Handler(\n $this->config,\n $this->events\n );\n\n $this->handler->setAutoload(true);\n $this->handler->getPlugin('Mock');\n }", "function new_importer_files($plugin){\n try{\n mkdir($plugin);\n mkdir($plugin.'/repository');\n copy('templates/error.php', $plugin.'/error.php');\n copy('templates/update.php', $plugin.'/update.php');\n return true;\n }catch(Exception $e){\n return false; \n }\n}", "function testPluginParam() {\n\t\tApp::build(array(\n\t\t\t'plugins' => array(TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS)\n\t\t));\n\t\t$this->Shell->params = array(\n\t\t\t'plugin' => 'TestPlugin',\n\t\t\t'connection' => 'test_suite'\n\t\t);\n\t\t$this->Shell->startup();\n\t\t$expected = TEST_CAKE_CORE_INCLUDE_PATH . 'tests' . DS . 'test_app' . DS . 'plugins' . DS . 'test_plugin' . DS . 'config' . DS . 'schema';\n\t\t$this->assertEqual($this->Shell->Schema->path, $expected);\n\t\t\n\t\tApp::build();\n\t}", "public function underPluginDirectory(){\n return Loco_fs_Locations::getPlugins()->check( $this->path );\n }", "public function testPrefixRoutingAndPlugins() {\n\t\tConfigure::write('Routing.prefixes', array('admin'));\n\t\t$paths = App::path('plugins');\n\t\tApp::build(array(\n\t\t\t'plugins' => array(\n\t\t\t\tCAKE . 'Test' . DS . 'test_app' . DS . 'Plugin' . DS\n\t\t\t)\n\t\t), App::RESET);\n\t\tCakePlugin::load(array('TestPlugin'));\n\n\t\tRouter::reload();\n\t\trequire CAKE . 'Config' . DS . 'routes.php';\n\t\t$request = new CakeRequest();\n\t\tRouter::setRequestInfo(\n\t\t\t$request->addParams(array(\n\t\t\t\t'admin' => true, 'controller' => 'controller', 'action' => 'action',\n\t\t\t\t'plugin' => null, 'prefix' => 'admin'\n\t\t\t))->addPaths(array(\n\t\t\t\t'base' => '/',\n\t\t\t\t'here' => '/',\n\t\t\t\t'webroot' => '/base/',\n\t\t\t))\n\t\t);\n\t\tRouter::parse('/');\n\n\t\t$result = Router::url(array('plugin' => 'test_plugin', 'controller' => 'test_plugin', 'action' => 'index'));\n\t\t$expected = '/admin/test_plugin';\n\t\t$this->assertEquals($expected, $result);\n\n\t\tRouter::reload();\n\t\trequire CAKE . 'Config' . DS . 'routes.php';\n\t\t$request = new CakeRequest();\n\t\tRouter::setRequestInfo(\n\t\t\t$request->addParams(array(\n\t\t\t\t'plugin' => 'test_plugin', 'controller' => 'show_tickets', 'action' => 'admin_edit',\n\t\t\t\t'pass' => array('6'), 'prefix' => 'admin', 'admin' => true, 'form' => array(),\n\t\t\t\t'url' => array('url' => 'admin/shows/show_tickets/edit/6')\n\t\t\t))->addPaths(array(\n\t\t\t\t'base' => '/',\n\t\t\t\t'here' => '/admin/shows/show_tickets/edit/6',\n\t\t\t\t'webroot' => '/',\n\t\t\t))\n\t\t);\n\n\t\t$result = Router::url(array(\n\t\t\t'plugin' => 'test_plugin', 'controller' => 'show_tickets', 'action' => 'edit', 6,\n\t\t\t'admin' => true, 'prefix' => 'admin'\n\t\t));\n\t\t$expected = '/admin/test_plugin/show_tickets/edit/6';\n\t\t$this->assertEquals($expected, $result);\n\n\t\t$result = Router::url(array(\n\t\t\t'plugin' => 'test_plugin', 'controller' => 'show_tickets', 'action' => 'index', 'admin' => true\n\t\t));\n\t\t$expected = '/admin/test_plugin/show_tickets';\n\t\t$this->assertEquals($expected, $result);\n\n\t\tApp::build(array('plugins' => $paths));\n\t}", "protected function original_plugin_folder_exists()\n\t\t{\n\t\t\treturn ( is_dir( WP_PLUGIN_DIR . '/LayerSlider' ) || is_dir( WPMU_PLUGIN_DIR . '/LayerSlider') );\n\t\t}", "function is_in_wpmu_plugin_dir( $filename = '' ){\r\n\t\tif ( !defined('WPMU_PLUGIN_DIR') ) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif ( empty($filename) ){\r\n\t\t\t$filename = $this->plugin_file;\r\n\t\t}\r\n\r\n\t\t$normalizedMuPluginDir = realpath(WPMU_PLUGIN_DIR);\r\n\t\t$normalizedFileName = realpath($filename);\r\n\r\n\t\t//If realpath() fails, just normalize the syntax instead.\r\n\t\tif ( empty($normalizedFileName) || empty($normalizedMuPluginDir) ) {\r\n\t\t\t$normalizedMuPluginDir = wp_normalize_path(WPMU_PLUGIN_DIR);\r\n\t\t\t$normalizedFileName = wp_normalize_path($filename);\r\n\t\t}\r\n\t\t//Yet another fallback if the above also fails.\r\n\t\tif ( !is_string($normalizedMuPluginDir) || empty($normalizedMuPluginDir) ) {\r\n\t\t\tif ( is_string(WPMU_PLUGIN_DIR) ) {\r\n\t\t\t\t$normalizedMuPluginDir = WPMU_PLUGIN_DIR;\r\n\t\t\t} else {\r\n\t\t\t\treturn false;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn (strpos( $normalizedFileName, $normalizedMuPluginDir ) !== false);\r\n\t}", "public function testConsidersComposerInstalledPluginsOverLocalInstalledPlugins(): void\n {\n $plugins = (new PluginFinder(new PackageProvider()))->findPlugins(\n __DIR__ . '/_fixture/LocallyInstalledPlugins',\n __DIR__ . '/_fixture/ComposerProject',\n new ExceptionCollection(),\n new NullIO()\n );\n static::assertTrue($plugins['Works\\Works']->getManagedByComposer());\n }", "public function test_with_empty_plugins_folder()\n {\n $this->constants = new TestConstants([\n 'ABSPATH' => codecept_root_dir($this->env('WORDPRESS_ROOT_DIR') . '/'),\n 'WP_HOME' => $this->env('WORDPRESS_URL'),\n 'WP_SITEURL' => $this->env('WORDPRESS_URL'),\n 'DB_HOST' => $this->env('WORDPRESS_DB_HOST'),\n 'DB_NAME' => $this->env('WORDPRESS_DB_NAME'),\n 'DB_PASSWORD' => $this->env('WORDPRESS_DB_PASSWORD'),\n 'DB_USER' => $this->env('WORDPRESS_DB_USER'),\n 'WP_PLUGIN_DIR' => codecept_data_dir('empty')\n ]);\n $GLOBALS['table_prefix'] = 'wp_';\n $sut = $this->make_instance();\n\n $this->assertMatchesJsonSnapshot(json_encode($sut->run(), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));\n }", "public function test_with_empty_mu_plugins_directory()\n {\n $this->constants = new TestConstants([\n 'ABSPATH' => codecept_root_dir($this->env('WORDPRESS_ROOT_DIR') . '/'),\n 'WP_HOME' => $this->env('WORDPRESS_URL'),\n 'WP_SITEURL' => $this->env('WORDPRESS_URL'),\n 'DB_HOST' => $this->env('WORDPRESS_DB_HOST'),\n 'DB_NAME' => $this->env('WORDPRESS_DB_NAME'),\n 'DB_PASSWORD' => $this->env('WORDPRESS_DB_PASSWORD'),\n 'DB_USER' => $this->env('WORDPRESS_DB_USER'),\n 'WP_PLUGIN_DIR' => codecept_data_dir('empty'),\n 'WPMU_PLUGIN_DIR' => codecept_data_dir('empty')\n ]);\n $GLOBALS['table_prefix'] = 'wp_';\n $sut = $this->make_instance();\n\n $this->assertMatchesJsonSnapshot(json_encode($sut->run(), JSON_PRETTY_PRINT | JSON_UNESCAPED_SLASHES));\n }", "public function should_throw_if_wp_plugins_dir_does_not_exist()\n {\n if (!extension_loaded('uopz')) {\n $this->markTestSkipped('This test cannot run without the uopz extension');\n }\n\n if (PHP_VERSION_ID <= 70000) {\n $this->markTestSkipped('Due to a uopz bug on PHP 5.6.');\n }\n\n uopz_redefine('WP_PLUGIN_DIR', '/foo/bar/baz');\n\n $wpLoader = $this->make_instance();\n\n $this->expectException(ModuleConfigException::class);\n\n $wpLoader->getPluginsFolder();\n }", "public function testPlugin()\n {\n $this->assertInstanceof(Plugin::class, $this->Checkup->Plugin);\n $this->assertEquals(['versions'], get_class_methods($this->Checkup->Plugin));\n $this->assertArrayKeysEqual(['me_cms', 'others'], $this->Checkup->Plugin->versions());\n $this->assertNotEmpty($this->Checkup->Plugin->versions()['me_cms']);\n $this->assertNotEmpty($this->Checkup->Plugin->versions()['others']);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The setDisabled method, setter method for property $disabled.
public function setDisabled($disabled = true) { $this->disabled = $disabled; $this->setAttributes("Disabled"); }
[ "public function setDisabled($disabled = true) {\n\t\tif ($disabled) $this->setAttribute('disabled', 'disabled');\n\t\telse $this->removeAttribute('disabled');\n\t}", "public function setDisabled($value);", "public function setDisabled(): self;", "public function setDisabled() {\n\t\t$this->addAttribute('disabled', 'disabled');\n\t}", "public function disable()\n {\n $this->element->setAttribute('disabled', 'disabled');\n }", "public function setEnabled($enabled);", "function setEnabled($enabled) {\n $this->enabled = $enabled;\n }", "public function disable()\n {\n $this->data['enabled'] = false;\n }", "public function get_disabled() {\n return $this->disabled;\n }", "public function setEnabled($value);", "public function get_disabled()\n {\n return $this->_disabled;\n }", "public function isDisabled();", "public function isDisabled () {}", "public function setEnabled($enabled)\n {\n $this->enabled = (bool)$enabled;\n }", "public function disable()\n {\n $this->switchActive(false, 'disabling', 'disabled');\n }", "public function setDisabledYes()\n\t{\n\t\t$this->setAttribute( \"disabled\");\n\t}", "public function setEnabled($enabled)\n {\n $this->enabled = (int)$enabled;\n }", "public function is_disabled()\n {\n return $this->disabled;\n }", "public function isDisabled()\n {\n return $this->disabled;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the title for the payment edit page.
public function editTitle(PaymentInterface $payment) { return $this->t('Edit payment #!payment_id', array( '!payment_id' => $payment->id(), )); }
[ "public function getTitle()\n {\n try {\n $paymentInfo = $this->getInfoInstance();\n $title = $paymentInfo->getAdditionalInformation(self::PAYMENT_TITLE);\n if ($title) return $title;\n } catch (Exception $e) {\n }\n\n return parent::getTitle();\n }", "public function getTitle()\n {\n $storeId = $this->getStoreId();\n $path = 'payment/' . $this->getCode() . '/';\n return $this->_getHelper()->__(Mage::getStoreConfig($path . 'title', $storeId));\n }", "public function getTitle()\n {\n try {\n $paymentInfo = $this->getInfoInstance();\n $title = $paymentInfo->getAdditionalInformation('title');\n if ($title) return $title;\n } catch (Exception $e) {\n }\n\n return parent::getTitle();\n }", "public function getEditTitle()\n {\n return sprintf($this->_('Edit %s'), $this->getTopic(1));\n }", "private function getPaymentsSettingsTitle(): string\n {\n return $this->app->translator->translate('payments.settings.title');\n }", "public function editPageTitle(StoreInterface $commerce_store) {\n return $this->t('Editing @label', ['@label' => $commerce_store->label()]);\n }", "public function getPaymentTitle(){\n return $this->config->get('everypay_title_' . $this->config->get('config_language_id')) ? $this->config->get('everypay_title_' . $this->config->get('config_language_id')) : $this->language->get('text_title');\n }", "public function get_title() {\n\t\t$title = empty( $this->title ) ? '' : $this->title;\n\t\treturn apply_filters( 'wpsc_payment_gateway_title', $title );\n\t}", "private function getContactsSettingsPageTitle(): string\n {\n return $this->app->translator->translate('contact.settings.title');\n }", "function getTitle() {\n\t\treturn $GLOBALS['page_title'].' - '.$this->module_name;\n\t}", "public function getTitle()\r\n {\r\n if(Mage::app()->getStore()->isAdmin()){\r\n $quote = Mage::getSingleton('adminhtml/session_quote')->getQuote();\r\n }\r\n else{\r\n $quote = Mage::getSingleton('checkout/session')->getQuote();\r\n }\r\n\r\n $title = $this->getHelper()->getRpConfigData($quote, $this->_code, 'title');\r\n $paymentFee = '';\r\n try {\r\n $sku = $this->getHelper()->getRpConfigData($quote, $this->_code, 'payment_fee');\r\n if(!empty($sku)) {\r\n $product = Mage::getModel('catalog/product');\r\n $id = $product->getIdBySku($sku);\r\n if(!empty($id)) {\r\n $product->load($id);\r\n $paymentFee = Mage::helper('core')->currency($paymentFee,true,false);\r\n $paymentFee = ' (+' . $paymentFee . ')';\r\n }\r\n }\r\n } catch (Exception $e) {\r\n Mage::logException($e);\r\n }\r\n return $title . $paymentFee;\r\n }", "function _getTitle(){\n\t\treturn Mage::getStoreConfig('payment/vtbcaklikpay/title');\n\t}", "public function getTitle()\n {\n return Mage::helper('xmlconnect')->__('PayPal MEP');\n }", "protected function getUpdateActionTitle()\n {\n return \"Actualización de \" . $this->getSingularEntityName();\n }", "public function getHeaderText()\n {\n if (Mage::registry('admin_data')->getId()) {\n return Mage::helper('blog')->__(\"Edit Entry '%s'\", $this->escapeHtml(Mage::registry('admin_data')->getTitle()));\n }\n else {\n return Mage::helper('blog')->__('New Entry');\n }\n }", "function getTitle() {\n return __('Rules management');\n }", "public function getTitle()\r\n\t{\r\n\t\treturn $this->_privateConfig->module_title;\r\n\t}", "function getTitle() {\n\t\treturn $this->getResource()->getDataValue('title');\n\t}", "public function getMergePaymentTitle(): string\n {\n return (string)$this->get(self::MERGE_PAYMENT_TITLE);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the PHP MongoGridFSFile instance being wrapped.
public function getMongoGridFSFile() { return $this->mongoGridFSFile; }
[ "public function getMongoGridFSFile()\n {\n return $this->mongoGridFSFile;\n }", "protected function _getFileWrapper()\n {\n return $this->_fileWrapper;\n }", "public function getFileObject() {\n\n return File::getByID($this->fID);\n }", "public function getFileObject()\n\t{\n\t\treturn $this->file_object;\n\t}", "public function getFileModel()\n {\n return $this;\n }", "protected function fileObj()\n\t{\n\t\t$fileObj = new Varien_Io_File();\n\t\treturn $fileObj;\n\t}", "protected function getFile()\n {\n $file = new SplFileObject($this->reflection->getFileName());\n\n $file->seek($this->reflection->getStartLine() - 1);\n\n return $file;\n }", "private function getFileService()\n {\n $service = new FileService();\n\n return $service;\n }", "public function getFileFinder(): FileFinder\n {\n return $this->fileFinder ??= new FileFinder($this->filesystem, []);\n }", "public function getFile()\n {\n if (!$this->getFieldValue()) {\n return null;\n }\n\n if ($this->getIsMultipleUpload()) {\n return $this->getFieldModel()->map(function ($filepond) {\n return $this->createFileObject($filepond);\n })->toArray();\n }\n\n return $this->createFileObject($this->getFieldModel());\n }", "public function fcpoGetUtilsFile() \n {\n if ($this->_fcUseDeprecatedInstantiation()) {\n $mReturn = oxUtilsFile::getInstance();\n } else {\n $mReturn = oxRegistry::get('oxUtilsFile');\n }\n\n return $mReturn;\n }", "public function getFile()\n {\n if (!$this->file instanceof SplFileInfo) {\n throw new \\BadMethodCallException('To use this method please execute the method run() first');\n }\n\n return $this->file;\n }", "public function getFile()\n {\n if (!is_object($this->_file)) {\n $this->_file = Yii::createObject(array_merge([\n 'class' => File::class,\n 'template' => $this->getTemplate(),\n 'goal' => $this,\n 'path' => $this->_path ?: $this->id,\n ], is_string($this->_file)\n ? ['path' => $this->_file]\n : (array) $this->_file\n ));\n }\n\n return $this->_file;\n }", "protected function createFileDriver()\n\t{\n\t\t$path = $this->app['config']['modules::storage_path'];\n\n\t\treturn $this->repository(new FileStore($this->app['files'], $path));\n\t}", "public function getJsonFileField(): JsonFileField\n {\n return $this->jsonFileField;\n }", "public function getFile()\n {\n return $this->File;\n }", "public function getFileResource()\n {\n return $this->file_handler;\n }", "function bf_file_system_instance() {\n\n\t\tglobal $wp_filesystem;\n\n\t\tif ( ! $wp_filesystem instanceof WP_Filesystem_Base ) {\n\n\t\t\tif ( ! function_exists( 'WP_Filesystem' ) ) {\n\t\t\t\trequire_once ABSPATH . '/wp-admin/includes/file.php';\n\t\t\t}\n\n\t\t\t$credentials['hostname'] = defined( 'FTP_HOST' ) ? FTP_HOST : '';\n\t\t\t$credentials['username'] = defined( 'FTP_USER' ) ? FTP_USER : '';\n\t\t\t$credentials['password'] = defined( 'FTP_PASS' ) ? FTP_PASS : '';\n\n\t\t\tWP_Filesystem( $credentials, WP_CONTENT_DIR, false );\n\t\t}\n\n\t\treturn $wp_filesystem;\n\t}", "public function getFileObject()\n {\n $context = stream_context_create(array('horde-combine' => array('data' => $this)));\n return new SplFileObject('horde-combine://' . spl_object_hash($this), 'rb', false, $context);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
is target delivery country allowed from source country
public function isAllowedTargetCountry($shipment){ $config = $this->getConfig($shipment); $countryValidator = new Zend_Validate_InArray(array_keys($config->foreign->countries)); return $countryValidator->isValid($this->getTargetCountry($shipment)); }
[ "public function hasTarget(CountryInterface $target): bool;", "public function canUseForCountry($country)\n {\n }", "function chkIsAllowedCountry()\n\t{\n\t\tglobal $CFG;\n\t\t$country_code = apache_note(\"GEOIP_COUNTRY_CODE\");\n\t\tif(in_array($country_code, $CFG['admin']['geo_country']))\n\t\t\treturn false;\n\t\treturn true;\n\t}", "public function checkAvailableShipCountries(Mage_Shipping_Model_Rate_Request $request)\n {\n // basic check if country origin is available for gls shipping\n $gls = Mage::getModel('synergeticagency_gls/gls');\n if(!$gls->isCountryOriginIdAvailable(Mage::getStoreConfig(Mage_Shipping_Model_Shipping::XML_PATH_STORE_COUNTRY_ID, $request->getStoreId()))) {\n return false;\n }\n\n $speCountriesAllow = $this->getConfigData('sallowspecific');\n $showMethod = $this->getConfigData('showmethod');\n\n //for specific countries, the flag will be 1\n if ($speCountriesAllow && $speCountriesAllow == 1){\n $availableCountries = array();\n if($this->getConfigData('specificcountry')) {\n $availableCountries = explode(',',$this->getConfigData('specificcountry'));\n }\n\n } else {\n $availableCountries = explode(',', (string)Mage::getStoreConfig('general/country/allow'));\n }\n\n if ($availableCountries && in_array($request->getDestCountryId(), $availableCountries)) {\n return $this;\n } elseif ($showMethod && (!$availableCountries || ($availableCountries\n && !in_array($request->getDestCountryId(), $availableCountries)))\n ){\n $error = Mage::getModel('shipping/rate_result_error');\n $error->setCarrier($this->_code);\n $error->setCarrierTitle($this->getConfigData('title'));\n $errorMsg = $this->getConfigData('specificerrmsg');\n $error->setErrorMessage($errorMsg ? $errorMsg : Mage::helper('shipping')->__('The shipping module is not available for selected delivery country.'));\n return $error;\n } else {\n //The admin set not to show the shipping module if the devliery country is not within specific countries\n return false;\n }\n }", "public function isCountryAllowed()\n {\n return $this->getConfig()->isCountryAllowed($this->getStore());\n }", "function uc_order_condition_billing_country($order, $countries) {\n return in_array($order->billing_country, $countries);\n}", "protected function _isInAustralia()\n {\n $origCountry = $this->getConfigData('origin/country');\n return ($origCountry == \"AU\" && $this->_rate_request->getDestCountryId() == \"AU\");\n }", "public function isToEuCountry(): bool\n {\n return in_array(\n $this->getCountry(),\n AbstractConsignment::EURO_COUNTRIES\n );\n }", "function can_item_ship_to_countryid($projectid = 0, $countryid = 0)\r\n{\r\n\tglobal $ilance, $show;\r\n\t\r\n\t$show['itemcanshiptouser'] = false;\r\n\t\r\n\t$result = $ilance->db->query(\"\r\n SELECT p.row, l.location_\" . $_SESSION['ilancedata']['user']['slng'] . \" AS countrytitle, l.region\r\n FROM \" . DB_PREFIX . \"projects_shipping_regions p\r\n LEFT JOIN \" . DB_PREFIX . \"locations l ON (p.countryid = l.locationid)\r\n WHERE p.project_id = '\" . intval($projectid) . \"'\r\n AND p.countryid = '\" . intval($countryid) . \"'\r\n ORDER BY p.row ASC\r\n \", 0, null, __FILE__, __LINE__);\r\n if ($ilance->db->num_rows($result) > 0)\r\n {\r\n\t\t$show['itemcanshiptouser'] = true;\r\n return true;\r\n }\r\n\t\r\n\treturn false;\r\n}", "public function isCountryRequired()\n {\n return $this->getConfig()->isCountryRequired($this->getStore());\n }", "protected function is_eway_payments_supported_country($country_code)\n {\n }", "public function getTargetCountry() {\n $shipment = $this->_getCurrentShipment();\n return Mage::helper('synergeticagency_gls/validate')->getTargetCountry($shipment);\n }", "public function download_country_check() {\n\t\t\t$check_country_on_download = get_option( '_edd_check_country_on_download', false );\n\n\t\t\treturn apply_filters( '_edd_check_country_on_download', $check_country_on_download );\n\t\t}", "function chkCountry($target_ip, &$cidrs) {\n foreach ($cidrs as $key => $val) {\n list($ip, $mask_bit) = explode(\"/\", $key);\n\n // right bit shift\n $ip_long = ip2long($ip) >> (32 - $mask_bit);\n $t_ip_long = ip2long($target_ip) >> (32 - $mask_bit);\n\n if ($t_ip_long === $ip_long) return $val;\n }\n return false;\n}", "abstract function is_agency();", "public function hasCountry(): bool;", "function can_item_ship_to_countryid($projectid = 0, $countryid = 0)\n\t{\n\t\tglobal $ilance, $show;\n\t\t$show['itemcanshiptouser'] = false;\n\t\t$slng = isset($_SESSION['ilancedata']['user']['slng']) ? $_SESSION['ilancedata']['user']['slng'] : 'eng';\n\t\t$result = $ilance->db->query(\"\n\t\t\tSELECT \" . (MYSQL_QUERYCACHE ? \"SQL_CACHE \" : \"\") . \"p.row, l.location_$slng AS countrytitle, r.region_$slng AS region\n\t\t\tFROM \" . DB_PREFIX . \"projects_shipping_regions p\n\t\t\tLEFT JOIN \" . DB_PREFIX . \"locations l ON (p.countryid = l.locationid)\n\t\t\tLEFT JOIN \" . DB_PREFIX . \"locations_regions r ON (r.regionid = l.regionid)\n\t\t\tWHERE p.project_id = '\" . intval($projectid) . \"'\n\t\t\t\tAND p.countryid = '\" . intval($countryid) . \"'\n\t\t\t\tAND l.visible = '1'\n\t\t\tORDER BY p.row ASC\n\t\t\", 0, null, __FILE__, __LINE__);\n\t\tif ($ilance->db->num_rows($result) > 0)\n\t\t{\n\t\t\t$show['itemcanshiptouser'] = true;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function canDeliver()\n {\n $deliverycost = $this->shop->findDeliveryzone($this->customer->getPostcode());\n if ($deliverycost == false) {\n return false;\n } else {\n return $deliverycost;\n }\n }", "public function getShipFromEligibleCountry()\n {\n return $this->shipFromEligibleCountry;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets a new stopPlaceComponentRef Reference to a stop place component
public function setStopPlaceComponentRef($stopPlaceComponentRef) { $this->stopPlaceComponentRef = $stopPlaceComponentRef; return $this; }
[ "public function setStopPlaceRef($stopPlaceRef)\n {\n $this->stopPlaceRef = $stopPlaceRef;\n return $this;\n }", "public function getStopPlaceComponentId()\n {\n return $this->stopPlaceComponentId;\n }", "public function setStopPlaceComponentId($stopPlaceComponentId)\n {\n $this->stopPlaceComponentId = $stopPlaceComponentId;\n return $this;\n }", "public function getStopPlaceRef()\n {\n return $this->stopPlaceRef;\n }", "public function setStopPlaceType($stopPlaceType)\n {\n $this->stopPlaceType = $stopPlaceType;\n return $this;\n }", "public function getStopPlaceType()\n {\n return $this->stopPlaceType;\n }", "function setCourseStop( $value )\n {\n if( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n $this->CourseStop = $value;\n }", "public function setBusStop($value) {\n return $this->set(self::BUS_STOP, $value);\n }", "public function add_stop($stop) {\r\n $stop->sequence_num = $this->current_truck->count() + 1;\r\n $this->current_truck->models[] = $stop;\r\n\r\n }", "public function getStopPointRef()\n {\n return $this->stopPointRef;\n }", "public function addBusStop() {\n\t\tglobal $REQUEST_DATA;\n global $sessionHandler;\n\n\t\treturn SystemDatabaseManager::getInstance()->runAutoInsert('bus_stop', array('stopName','stopAbbr','transportCharges','instituteId','busRouteId','scheduleTime'), \n array($REQUEST_DATA['stopName'],strtoupper($REQUEST_DATA['stopAbbr']),$REQUEST_DATA['transportCharges'],$sessionHandler->getSessionVariable('InstituteId'),\n $REQUEST_DATA['routeCode'],$REQUEST_DATA['scheduleTime']) \n );\n\t}", "function setStopWordColumn( $value )\r\n {\r\n $this->StopWordColumn = $value;\r\n }", "public function editBusStop($id) {\n global $REQUEST_DATA;\n global $sessionHandler;\n \n return SystemDatabaseManager::getInstance()->runAutoUpdate('bus_stop', array('stopName','stopAbbr','transportCharges','instituteId','busRouteId','scheduleTime'), \n array($REQUEST_DATA['stopName'],strtoupper($REQUEST_DATA['stopAbbr']),$REQUEST_DATA['transportCharges'],$sessionHandler->getSessionVariable('InstituteId'),\n $REQUEST_DATA['routeCode'],$REQUEST_DATA['scheduleTime']), \n \"busStopId=$id\" \n );\n }", "public function setPlaceReference($value)\n {\n return $this->set('PlaceReference', $value);\n }", "public function set_place($_place)\n {\n $this->_place = $_place;\n\n return $this;\n }", "public function LeaseCarStop(\\Controle\\LeaseCar\\Stop $parameters) {\n return $this->__soapCall(\n 'LeaseCar_Stop',\n array($parameters),\n array('uri'=>'https://api.nmbrs.nl/soap/v2.1/EmployeeService')\n );\n\t}", "public function setDepartureBusStop(Property\\DepartureBusStopProperty $departureBusStop) {\n\t\t$this->departureBusStop = $departureBusStop;\n\n\t\treturn $this;\n\t}", "public function setStopPointRef($stopPointRef)\n {\n $this->stopPointRef = $stopPointRef;\n return $this;\n }", "public function setPlaceName(?string $placeName = null): self\n {\n // validation for constraint: string\n if (!is_null($placeName) && !is_string($placeName)) {\n throw new InvalidArgumentException(sprintf('Invalid value %s, please provide a string, %s given', var_export($placeName, true), gettype($placeName)), __LINE__);\n }\n if (is_null($placeName) || (is_array($placeName) && empty($placeName))) {\n unset($this->PlaceName);\n } else {\n $this->PlaceName = $placeName;\n }\n \n return $this;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Fetches record values. Column fields that will be read can be specified by passing $fields. ``` $this>_readValues("title"); $this>_readValues(array("title","create_date")); ```
function _readValues($fields = null){ if(!isset($fields)){ $fields = $this->_fieldsToRead(); } $fields = $this->_escapeColumnName4Sql($fields); if(is_array($fields)){ $fields = join(",",$fields); } if(!$row = $this->dbmole->selectFirstRow("SELECT $fields FROM ".$this->dbmole->escapeTableName4Sql($this->getTableName())." WHERE $this->_IdFieldName=:id",array(":id" => $this->_Id))){ return null; } $this->_setRecordValues($row); return $this->_RecordValues; }
[ "function _readValues($fields = null){\n\t\tif(!isset($fields)){ $fields = $this->_fieldsToRead(); }\n\t\tif(is_array($fields))\n\t\t $fields = join(\",\",$fields);\n\t\tif(!$row = $this->_dbmole->selectFirstRow(\"SELECT $fields FROM \".$this->_dbmole->escapeTableName4Sql($this->_TableName).\" WHERE $this->_IdFieldName=:id\",array(\":id\" => $this->_Id))){\n\t\t\treturn null;\n\t\t}\n\t\t$this->_setRecordValues($row);\n\n\t\treturn $this->_RecordValues;\n\t}", "public function read($fields = array())\n {\n foreach($fields as $k => $field)\n {\n if(!in_array($field, $this->fields))\n {\n unset($fields[$k]); \n }\n }\n if(empty($fields))\n {\n $fields = '*';\n } \n $sql = \"SELECT $fields FROM {$this->table} WHERE id={$this->id}\";\n $data = $this->db->query($sql);\n foreach ($data as $k => $v) \n {\n $this->k = $v;\n }\n }", "public function getValues(array $fields);", "public function fetch($fields = Array()){\n\n $ids = $this->primaryKeysWithValidation();\n\n $passed_string = false;\n\n if(is_array($fields) && !count($fields)){\n $fields = $this->getFieldNames();\n } else {\n\n if(is_string($fields)){\n $passed_string = true;\n $fields = Array($fields);\n }//if\n\n $diff = array_diff(array_values($fields), $this->getFieldNames());\n\n if(count($diff)){\n $fields = implode(', ',$diff);\n throw new \\Disco\\exceptions\\RecordValidation(\"Record field(s) `{$fields}` do not exist!\");\n }//if\n \n }//el\n\n $result = \\App::with($this->model)\n ->select($fields)\n ->where($ids)\n ->data();\n\n if($result->rowCount() === 0){\n throw new \\Disco\\exceptions\\RecordNonExistent('Record does not exist : ' . var_export($ids,true));\n } else if($result->rowCount() > 1){\n throw new \\Disco\\exceptions\\Record('Multiple Records returned with ids : ' . var_export($ids,true));\n }//elif\n\n $row = $result->fetch();\n\n $this->cache = array_merge($this->cache,$row);\n\n $this->fields = array_merge($this->fields,$row);\n\n\n //only wanted to fetch single field? return it.\n if($passed_string){\n return $row[$fields[0]];\n }//if\n\n return $row;\n\n }", "function read(){\n\n // If id property is present fetch single record\n if($this->id){\n\t\t\t\t\t\t\n\t\t\t// SQL Query to fetch a single assignment \n $query = \"SELECT a.Id, a.Name FROM {$this->tableName} a WHERE a.id = :id\";\n\n // Prepare query statement\n $stmt = $this->conn->prepare($query);\n \n // Santize and bind property\n $this->id = parent::sanitize($this->id);\n $stmt->bindParam(\":id\", $this->id);\n\n }else{\n \t// SQL query to fetch all assignment records if no id is present \n $query = \"SELECT a.Id, a.Name FROM {$this->tableName} a\";\n\n // Prepare query statement\n $stmt = $this->conn->prepare($query);\n }\n\n // Execute query\n $stmt->execute();\n \n // Creates associative array with keys to contain values from fetched from database \t\t\t\t \n $assignmentProp = array_fill_keys(array(\"name\", \"id\"),\"\");\n // Populate array with values from database\n $dataArr = parent::fetchRows($stmt, $assignmentProp);\n\t\t\t\t\n\t\t// Return associative array \n return $dataArr;\n }", "function LoadRowValues(&$rs) {\n\t\tglobal $conn, $fees_invoice;\n\t\t$fees_invoice->invoiceID->setDbValue($rs->fields('invoiceID'));\n\t\t$fees_invoice->sessionID->setDbValue($rs->fields('sessionID'));\n\t\t$fees_invoice->amount->setDbValue($rs->fields('amount'));\n\t\t$fees_invoice->studentID->setDbValue($rs->fields('studentID'));\n\t\t$fees_invoice->dateGenerated->setDbValue($rs->fields('dateGenerated'));\n\t}", "public function getFieldValues();", "function read($keys,$extra_cols='',$join='')\n\t{\n\t\tif (!parent::read($keys,$extra_cols,$join))\n\t\t{\n\t\t\treturn false;\n\t\t}\n\t\tif (($id = (int)$this->data[$this->db_key_cols[$this->autoinc_id]]) && $this->customfields &&\n\t\t\t($cfs = $this->read_customfields($id)))\n\t\t{\n\t\t\t$this->data = array_merge($this->data,$cfs[$id]);\n\t\t}\n\t\treturn $this->data;\n\t}", "public function loadFieldsData()\n {\n return $this->db_connector_object->loadAllFieldsData();\n }", "public function fetchFields()\n\t{\n\t}", "function LoadRowValues(&$rs) {\r\n\t\tglobal $conn;\r\n\t\tif (!$rs || $rs->EOF) return;\r\n\r\n\t\t// Call Row Selected event\r\n\t\t$row = &$rs->fields;\r\n\t\t$this->Row_Selected($row);\r\n\t\t$this->id->setDbValue($rs->fields('id'));\r\n\t\t$this->datetime->setDbValue($rs->fields('datetime'));\r\n\t\t$this->script->setDbValue($rs->fields('script'));\r\n\t\t$this->user->setDbValue($rs->fields('user'));\r\n\t\t$this->action->setDbValue($rs->fields('action'));\r\n\t\t$this->_table->setDbValue($rs->fields('table'));\r\n\t\t$this->_field->setDbValue($rs->fields('field'));\r\n\t\t$this->keyvalue->setDbValue($rs->fields('keyvalue'));\r\n\t\t$this->oldvalue->setDbValue($rs->fields('oldvalue'));\r\n\t\t$this->newvalue->setDbValue($rs->fields('newvalue'));\r\n\t}", "function LoadRowValues(&$rs) {\n\t\tglobal $conn;\n\t\tif (!$rs || $rs->EOF) return;\n\n\t\t// Call Row Selected event\n\t\t$row = &$rs->fields;\n\t\t$this->Row_Selected($row);\n\t\t$this->id->setDbValue($rs->fields('id'));\n\t\t$this->fbid->setDbValue($rs->fields('fbid'));\n\t\t$this->name->setDbValue($rs->fields('name'));\n\t\t$this->_email->setDbValue($rs->fields('email'));\n\t\t$this->password->setDbValue($rs->fields('password'));\n\t\t$this->validated_mobile->setDbValue($rs->fields('validated_mobile'));\n\t\t$this->role_id->setDbValue($rs->fields('role_id'));\n\t\t$this->image->setDbValue($rs->fields('image'));\n\t\t$this->newsletter->setDbValue($rs->fields('newsletter'));\n\t\t$this->points->setDbValue($rs->fields('points'));\n\t\t$this->last_modified->setDbValue($rs->fields('last_modified'));\n\t\t$this->p2->setDbValue($rs->fields('p2'));\n\t}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->id->DbValue = $row['id'];\n\t\t$this->period_id->DbValue = $row['period_id'];\n\t\t$this->person_id->DbValue = $row['person_id'];\n\t\t$this->tipejurnal_id->DbValue = $row['tipejurnal_id'];\n\t\t$this->nomer->DbValue = $row['nomer'];\n\t\t$this->createon->DbValue = $row['createon'];\n\t\t$this->keterangan->DbValue = $row['keterangan'];\n\t}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF)\n\t\t\treturn;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->row_id->DbValue = $row['row_id'];\n\t\t$this->master_id->DbValue = $row['master_id'];\n\t\t$this->invoice_number->DbValue = $row['invoice_number'];\n\t\t$this->payment_date->DbValue = $row['payment_date'];\n\t\t$this->payment_amount->DbValue = $row['payment_amount'];\n\t\t$this->currency->DbValue = $row['currency'];\n\t\t$this->bank_from->DbValue = $row['bank_from'];\n\t\t$this->bank_account->DbValue = $row['bank_account'];\n\t\t$this->rate->DbValue = $row['rate'];\n\t\t$this->user_id->DbValue = $row['user_id'];\n\t\t$this->slip_file->Upload->DbValue = $row['slip_file'];\n\t\t$this->notes->DbValue = $row['notes'];\n\t\t$this->confirmed->DbValue = $row['confirmed'];\n\t}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->objectID->DbValue = $row['objectID'];\n\t\t$this->objectName->DbValue = $row['objectName'];\n\t\t$this->ownerID->DbValue = $row['ownerID'];\n\t\t$this->ownerName->DbValue = $row['ownerName'];\n\t\t$this->lastName->DbValue = $row['lastName'];\n\t\t$this->mobilePhone->DbValue = $row['mobilePhone'];\n\t\t$this->color->DbValue = $row['color'];\n\t\t$this->status->DbValue = $row['status'];\n\t\t$this->content->DbValue = $row['content'];\n\t\t$this->financialValue->DbValue = $row['financialValue'];\n\t\t$this->registrationUser->DbValue = $row['registrationUser'];\n\t\t$this->registrationDateTime->DbValue = $row['registrationDateTime'];\n\t\t$this->registrationStation->DbValue = $row['registrationStation'];\n\t\t$this->isolatedDateTime->DbValue = $row['isolatedDateTime'];\n\t\t$this->description->DbValue = $row['description'];\n\t}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->id->DbValue = $row['id'];\n\t\t$this->fecha->DbValue = $row['fecha'];\n\t\t$this->hora->DbValue = $row['hora'];\n\t\t$this->temp->DbValue = $row['temp'];\n\t\t$this->hum->DbValue = $row['hum'];\n\t\t$this->co2ppm->DbValue = $row['co2ppm'];\n\t\t$this->higromet->DbValue = $row['higromet'];\n\t\t$this->luz->DbValue = $row['luz'];\n\t\t$this->maqhum->DbValue = $row['maqhum'];\n\t\t$this->maqdesh->DbValue = $row['maqdesh'];\n\t\t$this->maqcale->DbValue = $row['maqcale'];\n\t\t$this->modman->DbValue = $row['modman'];\n\t\t$this->periodo->DbValue = $row['periodo'];\n\t\t$this->horasluz->DbValue = $row['horasluz'];\n\t\t$this->fechaini->DbValue = $row['fechaini'];\n\t}", "function LoadRowValues(&$rs) {\n\t\tglobal $conn, $t_ghichu_lich;\n\t\t$t_ghichu_lich->SB_NOTE_ID->setDbValue($rs->fields('SB_NOTE_ID'));\n\t\t$t_ghichu_lich->FK_CONG_TY->setDbValue($rs->fields('FK_CONGTY'));\n\t\t$t_ghichu_lich->C_YEAR->setDbValue($rs->fields('C_YEAR'));\n\t\t$t_ghichu_lich->C_WEEK->setDbValue($rs->fields('C_WEEK'));\n\t\t$t_ghichu_lich->C_CONTENT->setDbValue($rs->fields('C_CONTENT'));\n\t\t$t_ghichu_lich->C_USER_ADD->setDbValue($rs->fields('C_USER_ADD'));\n\t\t$t_ghichu_lich->C_TIME_ADD->setDbValue($rs->fields('C_TIME_ADD'));\n\t\t$t_ghichu_lich->C_USER_EDIT->setDbValue($rs->fields('C_USER_EDIT'));\n\t\t$t_ghichu_lich->C_TIME_EDIT->setDbValue($rs->fields('C_TIME_EDIT'));\n\t}", "function LoadRowValues(&$rs) {\n\t\tglobal $conn, $lic;\n\t\t$lic->ID->setDbValue($rs->fields('ID'));\n\t\t$lic->Serial->setDbValue($rs->fields('Serial'));\n\t\t$lic->Kode->setDbValue($rs->fields('Kode'));\n\t\t$lic->Status->setDbValue($rs->fields('Status'));\n\t\t$lic->Waktu->setDbValue($rs->fields('Waktu'));\n\t\t$lic->Stamp->setDbValue($rs->fields('Stamp'));\n\t}", "function LoadDbValues(&$rs) {\n\t\tif (!$rs || !is_array($rs) && $rs->EOF) return;\n\t\t$row = is_array($rs) ? $rs : $rs->fields;\n\t\t$this->id->DbValue = $row['id'];\n\t\t$this->datelastorder->DbValue = $row['datelastorder'];\n\t\t$this->dateregister->DbValue = $row['dateregister'];\n\t\t$this->payer_email->DbValue = $row['payer_email'];\n\t\t$this->first_name->DbValue = $row['first_name'];\n\t\t$this->last_name->DbValue = $row['last_name'];\n\t\t$this->address_name->DbValue = $row['address_name'];\n\t\t$this->address_street->DbValue = $row['address_street'];\n\t\t$this->address_city->DbValue = $row['address_city'];\n\t\t$this->address_zip->DbValue = $row['address_zip'];\n\t\t$this->address_state->DbValue = $row['address_state'];\n\t\t$this->address_country->DbValue = $row['address_country'];\n\t\t$this->address_country_code->DbValue = $row['address_country_code'];\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Searches the given node for the given query
public static function search($node, $query = null, $limit = null, $start = 0) { }
[ "public static function search($query,$id)\n {\n// : static::whereMapId($id)->where('node', 'like', '%'.$query.'%');\n }", "public static function search($query);", "public function find($query, \\DOMElement $context = null);", "public function query($query, DOMNode $context = null);", "function nodeSearch($xml, $subquery, $searchstring, $searchexact) {\n\t$r = array();\n\t$xp = new DOMXPath($xml);\n\t$nl = $xp->query('/findaid/work');\n\n\tforeach ($nl as $n) {\n\t\t$searchnl = $xp->query($subquery, $n);\n\t\t$haystack = '';\n\t\tforeach ($searchnl as $searchnode) {\n\t\t\t$haystack = $haystack . $searchnode->nodeValue . ' ';\n\t\t}\n\n\t\t$haystack = replace_accents($haystack);\n\n\t\tif ($searchexact == 'on') {\n\t\t\tif (trim(strtolower($haystack)) == trim(strtolower($searchstring))) {\n\t\t\t\t$r[] = $n;\n\t\t\t}\n\t\t} else {\n\t\t\tif (stripos($haystack, $searchstring) !== false) {\n\t\t\t\t$r[] = $n;\n\t\t\t} \n\t\t}\n\t}\n\t$out = new DOMDocument;\n\t$root = $out->createElement('findaid');\n\t$out->appendChild($root);\n\n\tforeach ($r as $node) {\n\t\t$newNode = $out->importNode($node, true);\n\t\t$root->appendChild($newNode);\n\t}\n\treturn $out;\n}", "public function findNode($query)\n {\n return $this->_findSingleNode($this->findNodes($query));\n }", "public function query ($expression, DOMNode $contextnode = null) {}", "public function searchQueryChecker();", "function searchXML($query, $xml_obj) {\n\t/**\n\t * The command for xpath to be called.\n\t * @var string\n\t */\n\t$select_xpath = \"\";\n\t$from_xpath = \"\";\n\t$where_xpath = \"\";\n\n\t//=====================================\n\t// PROCESSING THE \"FROM\" CLAUSE\n\t//=====================================\n\n\tif($query[\"FROM\"][0] == \"ROOT\") // getting rid of the ROOT literal \n\t\t$query[\"FROM\"][0] = \"\";\n\n\t// element and no attribute (el)\n\tif(($query[\"FROM\"][0]) && !isset($query[\"FROM\"][1]))\n\t\t$from_xpath .= \"//\" . $query[\"FROM\"][0] . \"[1]\"; // [1] => first occurence\n\t// attribute and no element (.attr)\n\telseif(!($query[\"FROM\"][0]) && isset($query[\"FROM\"][1]))\n\t\t$from_xpath .= \"(//@\" . $query[\"FROM\"][1] . \"/..)[1]\"; // [1] => first occurence\n\t// both element and attribute (el.attr)\n\telseif(($query[\"FROM\"][0]) && ($query[\"FROM\"][1]))\n\t\t$from_xpath .= \"//\" . $query[\"FROM\"][0] . \"[@\" . $query[\"FROM\"][1] . \"][1]\"; // [1] => first occurence\n\telse\n\t\t$from_xpath .= \"\";\n\n\t//=====================================\n\t// PROCESSING THE \"SELECT\" CLAUSE\n\t//=====================================\n\n\tif($query[\"SELECT\"] == \"*\" || $query[\"SELECT\"] == \"\")\n\t\t$select_xpath = $from_xpath;\n\telse\n\t\t$select_xpath = \"//\" . $query[\"SELECT\"];\n\n\t//=====================================\n\t// PROCESSING THE \"WHERE\" CLAUSE\n\t//=====================================\n\n\tif(isset($query[\"WHERE\"]))\n\t{\n\t\t// element and no attribute (el)\n\t\tif(($query[\"WHERE\"][0]) && !isset($query[\"WHERE\"][1]))\n\t\t{\n\t\t\t// contains\n\t\t\tif($query[\"WHERE\"][2] == \"CONTAINS\")\n\t\t\t{\n\t\t\t\tif($query[\"WHERE\"][0] == $query[\"SELECT\"]) // to est\n\t\t\t\t\t$where_xpath = \"[contains(text(), '\" . $query[\"WHERE\"][3] . \"')]\";\n\t\t\t\telse\n\t\t\t\t\t$where_xpath = \"[contains(.//\" . $query[\"WHERE\"][0] . \", '\" . $query[\"WHERE\"][3] . \"')]\";\n\t\t\t}\n\t\t\t// relational operator\n\t\t\telse\n\t\t\t\t$where_xpath = \"[\" . $query[\"WHERE\"][0] . $query[\"WHERE\"][2] . \"'\" . $query[\"WHERE\"][3] . \"']\";\n\t\t}\n\t\t// attribute and no element (.attr)\n\t\telseif(!($query[\"WHERE\"][0]) && ($query[\"WHERE\"][1]))\n\t\t{\n\t\t\t// contains\n\t\t\tif($query[\"WHERE\"][2] == \"CONTAINS\")\n\t\t\t\t$where_xpath = \"[contains(@\" . $query[\"WHERE\"][1] . \", '\" . $query[\"WHERE\"][3] . \"')]\";\n\t\t\t// relational operator\n\t\t\telse\n\t\t\t\t$where_xpath = \"[@\" . $query[\"WHERE\"][1] . $query[\"WHERE\"][2] . \"'\" . $query[\"WHERE\"][3] . \"']\";\n\t\t}\n\t\t// both element and attribute (el.attr)\n\t\telseif(($query[\"WHERE\"][0]) && ($query[\"WHERE\"][1]))\n\t\t{\n\t\t\t// contains\n\t\t\tif($query[\"WHERE\"][2] == \"CONTAINS\")\n\t\t\t{\n\t\t\t\tif($query[\"WHERE\"][0] == $query[\"SELECT\"])\n\t\t\t\t\t$where_xpath = \"[.//\" . $query[\"WHERE\"][0] . \"[contains(text(), '\" . $query[\"WHERE\"][3] . \"')]]\";\n\t\t\t\telse\n\t\t\t\t\t$where_xpath = \"[.//\" . $query[\"WHERE\"][0] . \"[contains(@\" . $query[\"WHERE\"][1] . \", '\" . $query[\"WHERE\"][3] . \"')]]\";\n\t\t\t}\n\t\t\t// relational operator\n\t\t\telse\n\t\t\t\t$where_xpath = \"[.//\" . $query[\"WHERE\"][0] . \"[@\" . $query[\"WHERE\"][1] . $query[\"WHERE\"][2] . \"'\" . $query[\"WHERE\"][3] . \"']]\";\n\t\t}\n\t\telse\n\t\t\t$where_xpath = \"\";\n\t}\n\n\t//=====================================\n\t// PROCESSING THE \"WHERE NOT\" CLAUSE\n\t//=====================================\n\n\tif(isset($query[\"WHERE NOT\"]))\n\t{\n\t\t// element and no attribute (el)\n\t\tif(($query[\"WHERE NOT\"][0]) && !($query[\"WHERE NOT\"][1]))\n\t\t{\n\t\t\t// contains\n\t\t\tif($query[\"WHERE NOT\"][2] == \"CONTAINS\")\n\t\t\t{\n\t\t\t\tif($query[\"WHERE NOT\"][0] == $query[\"SELECT\"]) // to est\n\t\t\t\t\t$where_xpath = \"[not(contains(text(), '\" . $query[\"WHERE NOT\"][3] . \"'))]\";\n\t\t\t\telse\n\t\t\t\t\t$where_xpath = \"[not(contains(.//\" . $query[\"WHERE NOT\"][0] . \", '\" . $query[\"WHERE NOT\"][3] . \"'))]\";\n\t\t\t}\n\t\t\t// relational operator\n\t\t\telse\n\t\t\t\t$where_xpath = \"[not(\" . $query[\"WHERE NOT\"][0] . $query[\"WHERE NOT\"][2] . \"'\" . $query[\"WHERE NOT\"][3] . \"')]\";\n\t\t}\n\t\t// attribute and no element (.attr)\n\t\telseif(!($query[\"WHERE NOT\"][0]) && ($query[\"WHERE NOT\"][1]))\n\t\t{\n\t\t\t// contains\n\t\t\tif($query[\"WHERE NOT\"][2] == \"CONTAINS\")\n\t\t\t\t$where_xpath = \"[not(contains(@\" . $query[\"WHERE NOT\"][1] . \", '\" . $query[\"WHERE NOT\"][3] . \"'))]\";\n\t\t\t// relational operator\n\t\t\telse\n\t\t\t\t$where_xpath = \"[not(@\" . $query[\"WHERE NOT\"][1] . $query[\"WHERE NOT\"][2] . \"'\" . $query[\"WHERE NOT\"][3] . \"')]\";\n\t\t}\n\t\t// both element and attribute (el.attr)\n\t\telseif(($query[\"WHERE NOT\"][0]) && ($query[\"WHERE NOT\"][1]))\n\t\t{\n\t\t\t// contains\n\t\t\tif($query[\"WHERE NOT\"][2] == \"CONTAINS\")\n\t\t\t{\n\t\t\t\tif($query[\"WHERE NOT\"][0] == $query[\"SELECT\"])\n\t\t\t\t\t$where_xpath = \"[not(.//\" . $query[\"WHERE NOT\"][0] . \"[contains(text(), '\" . $query[\"WHERE NOT\"][3] . \"')])]\";\n\t\t\t\telse\n\t\t\t\t\t$where_xpath = \"[not(.//\" . $query[\"WHERE NOT\"][0] . \"[contains(@\" . $query[\"WHERE NOT\"][1] . \", '\" . $query[\"WHERE NOT\"][3] . \"')])]\";\n\t\t\t}\n\t\t\t// relational operator\n\t\t\telse\n\t\t\t\t$where_xpath = \"[not(.//\" . $query[\"WHERE NOT\"][0] . \"[@\" . $query[\"WHERE NOT\"][1] . $query[\"WHERE NOT\"][2] . \"'\" . $query[\"WHERE NOT\"][3] . \"'])]\";\n\t\t}\n\t\telse\n\t\t\t$where_xpath = \"\";\n\t}\n\n\t//=====================================\n\t// PUTTING THE RESULTING PATH TOGETHER\n\t//=====================================\n\n\t$final_xpath = $from_xpath . $select_xpath . $where_xpath;\n\t$result_obj = $xml_obj->xpath($final_xpath);\n\n\tif(!$result_obj) // if nothing\n\t\treturn NULL;\n\n\tif(isset($query[\"ORDER BY\"]))\n\t\t$result_obj = orderXML($xml_obj, $result_obj, $query);\n\n\treturn $result_obj; // return the SimpleXML object\n}", "private function search($node) {\n if ($node->type == qtype_preg_node::TYPE_NODE_FINITE_QUANT\n && $node->leftborder === 0 && $node->rightborder === 1) {\n if ($this->check_alternative_node_for_question_quant($node->operands[0])) {\n $this->regex_hint_result->problem_ids[] = $node->id;\n $this->regex_hint_result->problem_type = 'qtype_preg_regex_hint_question_quant_for_alternative_node';\n $this->regex_hint_result->problem_indfirst = $node->position->indfirst;\n $this->regex_hint_result->problem_indlast = $node->position->indlast;\n return true;\n }\n }\n if ($this->is_operator($node)) {\n foreach ($node->operands as $operand) {\n if ($this->search($operand)) {\n return true;\n }\n }\n }\n\n return false;\n }", "private function search($node) {\n if ($node->type == qtype_preg_node::TYPE_NODE_FINITE_QUANT\n && $node->leftborder === 1 && $node->rightborder === 1) {\n $this->regex_hint_result->problem_ids[] = $node->id;\n $this->regex_hint_result->problem_type = 'qtype_preg_regex_hint_quant_node_1_to_1';\n $this->regex_hint_result->problem_indfirst = $node->position->indfirst;\n $this->regex_hint_result->problem_indlast = $node->position->indlast;\n return true;\n }\n if ($this->is_operator($node)) {\n foreach ($node->operands as $operand) {\n if ($this->search($operand)) {\n return true;\n }\n }\n }\n\n return false;\n }", "public function createSearch($query);", "private function search($node) {\n if ($node->type == qtype_preg_node::TYPE_NODE_FINITE_QUANT\n || $node->type == qtype_preg_node::TYPE_NODE_INFINITE_QUANT) {\n\n if ($this->check_other_quant_for_quant($node->operands[0])) {\n $oq = $this->get_other_quant_for_quant($node->operands[0]);\n\n if ($oq != null && $this->check_quants_borders($oq, $node)) {\n $this->regex_hint_result->problem_ids[] = $node->id;\n $this->regex_hint_result->problem_type = 'qtype_preg_regex_hint_consecutive_quant_nodes';\n $this->regex_hint_result->problem_indfirst = $node->position->indfirst;\n $this->regex_hint_result->problem_indlast = $node->position->indlast;\n return true;\n }\n }\n }\n\n if ($this->is_operator($node)) {\n foreach ($node->operands as $operand) {\n if ($this->search($operand)) {\n return true;\n }\n }\n }\n\n return false;\n }", "public function doSearch();", "public function searchOrigin($query);", "function search()\n\t{}", "private function search($node, $quantsui) {\n if ($node->type == qtype_preg_node::TYPE_NODE_FINITE_QUANT\n || $node->type == qtype_preg_node::TYPE_NODE_INFINITE_QUANT) {\n if ($this->is_simple_quant_node($node)) {\n $quantsui->first = $node->userinscription[0]->data;\n $quantsui->second = $this->get_eq_quant_ui($node);\n $this->regex_hint_result->problem_ids[] = $node->id;\n $this->regex_hint_result->problem_type = 'qtype_preg_regex_hint_quant_node';\n $this->regex_hint_result->problem_indfirst = $node->position->indfirst;\n $this->regex_hint_result->problem_indlast = $node->position->indlast;\n return true;\n }\n }\n if ($this->is_operator($node)) {\n foreach ($node->operands as $operand) {\n if ($this->search($operand, $quantsui)) {\n return true;\n }\n }\n }\n\n return false;\n }", "public function search($identifier);", "private function search($node) {\n if ($node->type == qtype_preg_node::TYPE_NODE_ALT) {\n if (!$this->check_empty_node_in_alt($node)) {\n if ($this->get_question_quant_for_node($node) != null) {\n $this->regex_hint_result->problem_ids[] = $node->id;\n $this->regex_hint_result->problem_type = 'qtype_preg_regex_hint_alt_with_question_quant';\n $this->regex_hint_result->problem_indfirst = $node->position->indfirst;\n $this->regex_hint_result->problem_indlast = $node->position->indlast;\n return true;\n }\n }\n }\n\n if ($this->is_operator($node)) {\n foreach ($node->operands as $operand) {\n if ($this->search($operand)) {\n return true;\n }\n }\n }\n\n return false;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the primary index name for this configuration.
public function getPrimaryIndex() { return $this->primaryIndexStrategy->getPrimaryIndex(); }
[ "public function getIndexName()\n {\n return $this->settings['index'];\n }", "protected function getIndexName()\n {\n return config('elasticsearch.default_index');\n }", "public function getIndexName()\n {\n return $this->configuration->get('connections.elasticsearch.index');\n }", "private function getBaseIndexName()\n {\n return $this->indexMapping['index'];\n }", "public function getIndexName() {\n return $this->indexName;\n }", "public function getPrimaryIndexField(){\n\t\treturn $this->_primaryIndexField;\n\t}", "public function getIndexKey()\n {\n $value = $this->get(self::INDEXKEY);\n return $value === null ? (string)$value : $value;\n }", "protected function getBaseIndexName()\n {\n return config('getcandy.search.index_prefix').'_'.$this->type->getHandle();\n }", "public function getDefaultIndexName()\n\t{\n\t\treturn $this->default_index;\n\t}", "public function getSourceIndexName()\n {\n return $this->source_index_name;\n }", "protected function getIndexName()\n {\n return $this->indexName . '-' . $this->indexNamePostfix;\n }", "public function getIndexName() {\n\t\t$indexName = $this->searchClient->getIndexName();\n\t\tif (strlen($this->indexNamePostfix) > 0) {\n\t\t\t$indexName .= '-' . $this->indexNamePostfix;\n\t\t}\n\n\t\treturn $indexName;\n\t}", "public function getEsIndexName()\n {\n return $this->esIndexName ?: $this->getTable();\n }", "public function getIndexName()\n {\n return $this->_name;\n }", "public function _index_id() {\n return $this->index->id();\n }", "protected static function _getIndexKey()\n {\n $indexKey = 'net_bazzline_config';\n\n return $indexKey;\n }", "public function getSphinxIndexParentName()\n {\n return isset($this->sphinxIndexParentName) ? $this->sphinxIndexParentName : 'app_index';\n }", "public function primaryIndex()\n {\n return key($this);\n }", "public function getIndexedFieldName()\n {\n return $this->index_field;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Return Product Thumbail URL
function getThumbUrl() { if(xoops_trim($this->getVar('product_thumb_url')) != '') { return MYSHOP_PICTURES_URL.'/'.$this->getVar('product_thumb_url'); } else { return ''; } }
[ "protected function getThumbnailUrl($product) {\n if (!isset($product['included']['0']['attributes']['uri']['url'])) {\n return NULL;\n }\n $url = $product['included']['0']['attributes']['uri']['url'];\n $url = str_replace('/files/', '/files/styles/thumbnail/public/', $url);\n\n $product_db_url = $this->config('productdb_client.settings')\n ->get('product_db_url');\n return Url::fromUri($product_db_url . '/' . $url);\n }", "public function getProductUrl()\n {\n return $this->product_url;\n }", "public function getThumbnailUrl();", "public function getURL()\n {\n return '/product/'.$this->getIdentifier();\n }", "function getThumbPath()\n\t{\n\t\tif(xoops_trim($this->getVar('product_thumb_url')) != '') {\n\t\t\treturn MYSHOP_PICTURES_PATH.DIRECTORY_SEPARATOR.$this->getVar('product_thumb_url');\n\t\t} else {\n\t\t\treturn '';\n\t\t}\n\t}", "public function thumb() {\n\t\treturn URL::to(Config::get('site.galleries_thumb_public_dir') . \"/\" . $this->name);\n\t}", "public function getUrlImageThumb()\n {\n\n if (!empty($this->imageID)) {\n $urlImage = UniteFunctionsWPRev::getUrlAttachmentImage($this->imageID, UniteFunctionsWPRev::THUMB_MEDIUM);\n } else {\n\n //get from cache\n\n if (!empty($this->imageFilepath)) {\n $urlImage = UniteBaseClassRev::getImageUrl($this->imageFilepath, 200, 100, true);\n } else {\n $urlImage = $this->imageUrl;\n }\n }\n\n\n\n if (empty($urlImage)) {\n $urlImage = $this->imageUrl;\n }\n\n\n\n return($urlImage);\n }", "public function getProductMediaUrl() {\n $objectManager = $this->getStore ();\n return $objectManager->getBaseUrl( \\Magento\\Framework\\UrlInterface::URL_TYPE_MEDIA );\n }", "function woocommerce_template_loop_product_thumbnail() {\n\t\techo esc_url( woocommerce_get_product_thumbnail() );\n\t}", "public function getThumbnailUrl() {\n return $this->thumbnailURL;\n }", "public function getThumbnailUrl()\n {\n return $this->thumbnail_url;\n }", "function productUrl($product_id)\n{\n return \"/product/$product_id\";\n}", "public function getThumbnailLink() {\n\t\treturn Temboo_Results::getSubItemByKey($this->base, \"thumbnailLink\");\n\t}", "public function url() {\n return wp_get_attachment_url($this->id);\n }", "public function getThumbnailUrl()\n {\n return $this->_thumbnailUrl;\n }", "public function getProductUrl()\n {\n if (!is_null($this->_productUrl)) {\n return $this->_productUrl;\n }\n if ($this->getItem()->getRedirectUrl()) {\n return $this->getItem()->getRedirectUrl();\n }\n\n $product = $this->getProduct();\n $option = $this->getItem()->getOptionByCode('product_type');\n if ($option) {\n $product = $option->getProduct();\n }\n\n return $product->getUrlModel()->getUrl($product);\n }", "public function getThumbnailUrl()\n {\n if ('image' == $this->type) {\n return $this->getMediaPath();\n }\n\n return $this->thumbnail->getMediaPath();\n }", "public function getDetailUrl()\n {\n return url_to(['product/detail', 'id' => $this->slug]);\n }", "public function getMediaImageUrl() {\n return $this->objectManager->get ( 'Magento\\Store\\Model\\StoreManagerInterface' )->getStore ()->getBaseUrl ( \\Magento\\Framework\\UrlInterface::URL_TYPE_MEDIA ) . 'catalog/product';\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get all declared layouts.
public function declaredLayouts() { $cid = self::class . '::' . __FUNCTION__; $info = &drupal_static($cid); if (isset($info)) { return $info; } if ($cache = $this->cache->get($cid)) { return $info = $cache->data; } $info = []; foreach ($this->hookThemes() as $theme) { $info = drupal_array_merge_deep($info, $theme->invokeLayoutHook()); } foreach ($info as $name => &$i) { $i += ['name' => $name, 'fields' => []]; foreach ($i['fields'] as $field_name => &$f) { $f += [ 'display' => [], 'variable' => $field_name, ]; } } $this->cache->set($cid, $info); return $info; }
[ "public static function getLayouts() {\n\n\t\t$view_list = [\n\t\t\t'one_column',\n\t\t\t'one_sidebar',\n\t\t\t'two_sidebar',\n\t\t];\n\n\t\treturn elgg_trigger_plugin_hook('layouts', 'anypage', null, $view_list);\n\t}", "abstract public function getLayouts();", "function getLayouts(): array\n {\n return array_keys($this->options['layouts']);\n }", "function get_layouts()\n{\n global $config;\n $layouts = array();\n \n $layoutNodes = $config->xpath('/fizzy/application/layouts/layout');\n foreach($layoutNodes as $node) {\n $layouts[(string) $node['name']] = (string) $node;\n }\n \n return $layouts;\n}", "protected function retrieveLayouts(): array\n {\n return Config::get('layouts.available');\n }", "public static function getAllLayouts()\n\t{\n\t\t$all = (new \\App\\Db\\Query())->select(['name', 'label'])->from('vtiger_layout')->all();\n\t\t$folders = [\n\t\t\t'basic' => Language::translate('LBL_DEFAULT'),\n\t\t];\n\t\tforeach ($all as $row) {\n\t\t\t$folders[$row['name']] = Language::translate($row['label']);\n\t\t}\n\t\treturn $folders;\n\t}", "function get_layout_defs()\n{\n //TODO add global memory cache support here. If there is an in memory cache, leverage it.\n\tglobal $layout_defs;\n\treturn $layout_defs;\n}", "public function get_layouts() {\r\n\t\treturn $this->get_layouts_from_file( THEMIFY_POPUP_DIR . 'sample/layouts.php' );\r\n\t}", "function page_layouts()\n {\n return app(\\Versatile\\Core\\Support\\Registry::class)->get('page_layouts', []);\n }", "function getPageLayouts() {\n\t $this->setData(ilPageLayout::getLayoutsAsArray());\n\t\t$this->all_mods = ilPageLayout::getAvailableModules();\n\t}", "public function getLayouts(): ?array;", "public function get_formatted_available_layouts_for_export() {\n\n return array_map(array($this, 'format_layout_for_export'), $this->layouts);\n\n }", "protected function parseLayouts(): Collection\n {\n $configurations = $this->parseLayoutsConfigurations();\n $layouts = collect();\n foreach ($configurations as $packageName => $configuration) {\n $layouts->put(\n $packageName,\n Layout::fromArray($configuration)\n );\n }\n\n return $layouts;\n }", "public function getLayoutSettings();", "public function getActionLayouts()\n {\n if (!isset($this->getActionController()->{$this->_actionLayoutKey})) {\n return array();\n }\n\n return $this->getActionController()->{$this->_actionLayoutKey};\n }", "function _wpbc_get_flexible_layouts(){\n\t$layouts = array( \n\t\t'ui-box-full-cover',\n\t\t'ui-box-full-cover-html',\n\t\t'ui-subscriptions', \n\t\t'ui-headline', \n\t\t\n\t\t'ui-headline-4-cols', \n\t\t'ui-headline-3-cols', \n\t\t'ui-slider-rows', \n\t\t'ui-free-tour', \n\n\t\t'ui-box-content-2-cols', \n\n\t\t'ui-slider-testimonios', \n\n\t);\n\treturn $layouts;\n}", "public function getAll() {\n return $this->getEntityLayoutStorage()->loadMultiple();\n }", "public static function getList()\n {\n $layouts = collect(Storage::disk('email-layouts')->files())->filter(\n function ($v) {\n return preg_match('`^(.*?)\\.blade\\.php$`', $v) != false;\n }\n )->toArray();\n\n $result = [];\n\n foreach ($layouts as $layout) {\n $lines = file(Storage::disk('email-layouts')->path($layout));\n $layout = preg_replace('`\\.blade\\.php$`', '', $layout);\n\n if (preg_match('`^{{--(.*?)--}}$`', trim($lines[0]), $m)) {\n $layoutName = trim($m[1]);\n } else {\n $layoutName = ucfirst($layout);\n }\n\n $result['email-layouts.'.$layout] = $layoutName;\n }\n\n if (!isset($result['email-template.default'])) {\n $result['boilerplate-email-editor::layout.default'] = 'HTML';\n }\n\n ksort($result);\n\n return $result;\n }", "public static function getAvailableLayouts($theme);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a new Inbox model. If creation is successful, the browser will be redirected to the 'view' page.
public function actionCreate() { $model = new Outbox(); /* $model = new Inbox(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->ID]); } else { return $this->render('create', [ 'model' => $model, ]); } */ }
[ "public function actionCreate()\n {\n $model = new FormInbox;\n\n if ($model->load(Yii::$app->request->post())) {\n if ($model->save()) {\n return $this->redirect([\n 'view',\n 'id' => $model->id\n ]);\n }\n }\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Ingrid();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n\n {\n\n $model = new Blockouts();\n\n\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n\n return $this->redirect('index');\n\n } else {\n\n return $this->render('create', [\n\n 'model' => $model,\n\n ]);\n\n }\n\n }", "public function actionCreate()\n {\n $model = new Inresult();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->Vn]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function store(CreateInboxRequest $request)\n\t{\n\t \n\t\tInbox::create($request->all());\n\n\t\treturn redirect()->route(config('quickadmin.route').'.inbox.index');\n\t}", "public function create()\n {\n \n \n \n\n return view('backend.boxes.create' );\n }", "public function actionCreate()\n {\n $model = new Invitados();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->invitado_codigo]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Invoice();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['index', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new Inpayments();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate() {\n $model = new EdocInsignia();\n $model->scenario = \"insert\";\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new InmailReceived();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate() {\n $model = new Inventory();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Indictment();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }", "public function actionCreate()\n {\n $model = new NoticeArchive();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Contract();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Indikator();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Linenotify();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->ID]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new OutboundModel();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'terminalId' => $model->terminalId, 'storehouseId' => $model->storehouseId]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n if (\\Yii::$app->user->can('createInvoice')){\n $model = new Invoice();\n\n if ($model->load(Yii::$app->request->post())) {\n $model->save(False);\n\n return $this->redirect(['view','id' =>$model->invoice_id ]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }else{\n throw new \\yii\\web\\ForbiddenHttpException;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Make a transfer payment.
public function createTransferPayment(Request $request);
[ "public function makePayment()\n {\n }", "public function makePaymentAction()\n {\n if ($_SESSION['actionAvailable']) {\n try {\n $id = $_SESSION['id'];\n $account = new BankAccountModel(null, $id);\n $toAccountID = $_POST['accountTo'];\n\n\n $fromAccountID = $account->findID($_POST['accountFrom']);\n $transaction = new TransactionModel();\n $transaction->validateTransfer($toAccountID, $fromAccountID);\n $transaction->makeTransfer();\n $transaction->save();\n\n $view = new View('transactionComplete');\n echo $view->render();\n $_SESSION['actionAvailable'] = false;\n } catch (\\UnexpectedValueException $e) {\n $_SESSION['emptyField'] = true;\n $this->redirect('paymentPage');\n } catch (\\LogicException $e) {\n $_SESSION['validTransaction'] = false;\n $this->redirect('paymentPage');\n }\n }\n }", "public function makePayment($params = [])\n\t{\n\t}", "public function payOrder()\n {\n $this->setClient();\n\n $this->checkClient();\n\n try\n {\n $info = $this->getOrderInfo(null, array('orderNumber' => $this->orderId));\n $exists = isset($info['orderStatus']) && $info['orderStatus'] >= OrderStatus::CREATED;\n }\n catch(Exception\\ActionException $e)\n {\n //echo $e->getMessage();\n }\n\n //order already created\n if($exists)\n {\n $orderId = null;\n if(isset($info['attributes']) && is_array($info['attributes']))\n {\n foreach($info['attributes'] as $attribute)\n if($attribute['name'] == 'mdOrder')\n $orderId = $attribute['value'];\n }\n if(isset($orderId))\n {\n $this->order->setField('SBERBANK_ORDER_NUM', $orderId);\n $this->order->save();\n\n //show payment page\n if($info['orderStatus'] == OrderStatus::CREATED)\n {\n $uri = static::$TEST ? Client::API_URI_TEST : Client::API_URI;\n //$user = str_replace('-api', '', $this->username);\n $user = 'sbersafe';\n $this->paymentFormUrl = str_replace('rest/', 'merchants/' . $user . '/payment_ru.html?mdOrder=' . $orderId, $uri);\n }\n }\n }\n else\n {\n if(static::$DEBUG) //set order sum == 0.01\n $result = $this->client->registerOrder($this->orderId, 1, $this->returnUrl, $this->additionalParams);\n else\n $result = $this->client->registerOrder($this->orderId, $this->order->getPrice() * 100, $this->returnUrl, $this->additionalParams);\n\n $this->paymentOrderId = $result['orderId'];\n $this->paymentFormUrl = $result['formUrl'];\n }\n\n if(!empty($this->paymentFormUrl))\n {\n if($this->returnUrlOnly)\n return $this->paymentFormUrl;\n\n header('Location: ' . $this->paymentFormUrl);\n exit;\n }\n\n return array(\n 'payed' => $info['orderStatus'] == OrderStatus::DEPOSITED,\n 'failed' => $info['orderStatus'] != OrderStatus::DEPOSITED,\n 'declined' => $info['orderStatus'] == OrderStatus::DECLINED,\n );\n }", "public function make3DPayPayment()\n {\n }", "public function actionPayment() {\n \n //$this->createCustomerAccount(); //create customer\n //$this->updateCustomerAccount(); //pass id which should be updated and data (two arguments)\n //$this->getCustomerAccount();\n //$this->searchCustomerAccount(); //incomplete\n //$this->createCcaccount();\n //$this->updateCcaccount();\n\n \n //$this->doEscrowTransaction(); \n $this->doTransaction(); \n //$this->doEscrowTransactionFromVault();\n }", "function transfer_money() {\n\t\t$user_id = $_REQUEST['user_id'];\n\t\t$mobile = $_REQUEST['mobile_no'];\n\t\t$amount = $_REQUEST['amount'];\n\t\t$mobile_no = $_REQUEST['mobile_no'];\n\n\t\t//$transaction_id= mt_rand( 10000000, 99999999);\n\t\t$wallet_type_main = 2;\n\t\t// amount debit in user self\n\t\t$wallet_type_frnd = 1;\n\t\t// amount credit in frnd\n\t\t$wallet_category_to = 5;\n\t\t// transfer money to\n\t\t$wallet_category_from = 10;\n\t\t// transfer money from\n\t\t$current_date = date(\"Y-m-d h:i:sa\");\n\t\tif (!empty($mobile)) {\n\t\t\t$user_records = $this -> conn -> get_table_row_byidvalue('user', 'user_id', $user_id);\n\t\t\tif (!empty($user_records)) {\n\t\t\t\t$main_wallet = $user_records['0']['wallet_amount'];\n\t\t\t\t$contact_number_main = $user_records['0']['user_contact_no'];\n\t\t\t\t// main user mobile number\n\t\t\t\tif ($main_wallet >= $amount) {\n\t\t\t\t\t$records = $this -> conn -> get_table_row_byidvalue('user', 'user_contact_no', $mobile);\n\t\t\t\t\tif (!empty($records)) {\n\t\t\t\t\t\t$contact_number_frnd = $records['0']['user_contact_no'];\n\t\t\t\t\t\t// frnd mobile number\n\t\t\t\t\t\t$frnd_wallet = $records['0']['wallet_amount'];\n\t\t\t\t\t\t$frnd_id = $records['0']['user_id'];\n\t\t\t\t\t\tif ($frnd_id != $user_id) {\n\t\t\t\t\t\t\t// amount transfer to another\n\t\t\t\t\t\t\t$transaction_id1 = strtotime(\"now\") . mt_rand(10000000, 99999999);\n\t\t\t\t\t\t\t$w_to_desc = \"Amount transfer to \" . $contact_number_frnd;\n\t\t\t\t\t\t\t$wallet_to_transfer = $this -> conn -> insertnewrecords('wallet_transaction', 'wt_user_id,wt_datetime,wt_type,wt_amount,wt_category,transaction_id,wt_desc,cashbackrecord_id', '\"' . $user_id . '\",\"' . $current_date . '\",\"' . $wallet_type_main . '\",\"' . $amount . '\",\"' . $wallet_category_to . '\",\"' . $transaction_id1 . '\",\"' . $w_to_desc . '\",\"' . $contact_number_frnd . '\"');\n\t\t\t\t\t\t\tif (!empty($wallet_to_transfer)) {\n\t\t\t\t\t\t\t\t//amount recieved by transfer\n\t\t\t\t\t\t\t\t$transaction_id = strtotime(\"now\") . mt_rand(10000000, 99999999);\n\t\t\t\t\t\t\t\t$w_by_desc = \"Amount transfer from \" . $contact_number_main;\n\t\t\t\t\t\t\t\t$wallet_by_transfer = $this -> conn -> insertnewrecords('wallet_transaction', 'wt_user_id,wt_datetime,wt_type,wt_amount,wt_category,transaction_id,wt_desc,cashbackrecord_id', '\"' . $frnd_id . '\",\"' . $current_date . '\",\"' . $wallet_type_main . '\",\"' . $amount . '\",\"' . $wallet_category_from . '\",\"' . $transaction_id . '\",\"' . $w_by_desc . '\",\"' . $contact_number_main . '\"');\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (!empty($wallet_by_transfer)) {\n\t\t\t\t\t\t\t\t$main_wallet_money = $main_wallet - $amount;\n\t\t\t\t\t\t\t\t$frnd_wallet_money = $frnd_wallet + $amount;\n\t\t\t\t\t\t\t\t// update main user wallet\n\t\t\t\t\t\t\t\t$data['wallet_amount'] = $main_wallet_money;\n\t\t\t\t\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('user', 'user_id', $user_id, $data);\n\t\t\t\t\t\t\t\t// update frnd wallet//\n\t\t\t\t\t\t\t\t$data1['wallet_amount'] = $frnd_wallet_money;\n\t\t\t\t\t\t\t\t$update_toekn = $this -> conn -> updatetablebyid('user', 'user_id', $frnd_id, $data1);\n\t\t\t\t\t\t\t\t$post = array('status' => 'true', 'message' => 'Transfer money successfully', 'main_user_id' => $user_id, 'main_wallet' => $main_wallet_money, 'frnd_wallet' => $frnd_wallet_money, 'frnd_id' => $frnd_id, 'transfer_mobile' => $mobile_no, 'transfer_amount' => $amount, 'transaction_id' => $transaction_id1, 'transfer_date' => $current_date);\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$post = array('status' => \"false\", \"message\" => \"Error in transfering amount\");\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$post = array('status' => \"false\", \"message\" => \"Please enter another user number\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$post = array('status' => \"false\", \"message\" => \"This user is not exist of given number\");\n\t\t\t\t\t}\n\n\t\t\t\t} else {\n\t\t\t\t\t$post = array('status' => \"false\", \"message\" => \"Wallet amount is not sufficent to transfer money\");\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t$post = array('status' => \"false\", \"message\" => \"invalid user\", 'user_id' => $user_id);\n\t\t\t}\n\n\t\t} else {\n\t\t\t$post = array('status' => \"false\", \"message\" => \"missing parameter\", 'user_id' => $user_id, 'amount' => $amount, 'mobile' => $moble);\n\t\t}\n\t\techo $this -> json($post);\n\t}", "function sendPayment()\n {\n $ini = eZINI::instance( 'ezauthorize.ini' );\n $ch=curl_init();\n\n if ( $this->test_mode )\n {\n curl_setopt( $ch, CURLOPT_SSL_VERIFYPEER, false );\n }\n\n curl_setopt( $ch, CURLOPT_URL, $this->transact_url );\n\n curl_setopt( $ch, CURLOPT_HEADER, 0 );\n curl_setopt( $ch, CURLOPT_VERBOSE, 0 );\n curl_setopt( $ch, CURLOPT_POST, 1 );\n\n // Fix for curl version > 7.1 with require CA cert by default.\n // For better security implement a cacert bundle\n $file = eZSys::rootDir() . '/' . eZExtension::baseDirectory() . '/ezauthorize/cacert.pem';\n if ( $ini->variable( 'eZAuthorizeSettings', 'SSLVerify' ) == 'true'\n and file_exists( $file ) )\n {\n curl_setopt ($ch, CURLOPT_CAINFO, $file );\n }\n else\n {\n curl_setopt ($ch, CURLOPT_SSL_VERIFYPEER, FALSE);\n }\n $fields = $this->getFieldString();\n eZDebug::writeDebug( $fields , 'Request' );\n curl_setopt( $ch, CURLOPT_RETURNTRANSFER, 1 );\n curl_setopt( $ch, CURLOPT_POSTFIELDS, $fields );\n\n $this->response_string=urldecode( curl_exec( $ch ) );\n eZDebug::writeDebug( $this->response_string , 'Response' );\n if ( curl_errno( $ch ) )\n {\n $this->response['Response Reason Text'] = \"CURL Error: \" . curl_error( $ch );\n $this->response['Response Code'] = 3;\n return 3;\n }\n else\n {\n curl_close( $ch );\n }\n\n $this->_responseToArray();\n return $this->response['Response Code'];\n }", "protected function sendPayRequest()\n\t{\n\t\t$this->newTransaction();\n\n\t\t//remove _token variables from url because bank ignure it\n\t\t$parse = parse_url($this->getCallback());\n\t\tparse_str($parse['query'], $output);\n\t\tunset($output['_token']);\n\t\t$query = http_build_query($output);\n\t\t$baseurl = strtok($this->getCallback(), '?');\n\t\t$callback = $baseurl . '?' . $query;\n\t\t$fields = [\n\t\t\t\"Amount\" => $this->amount,\n\t\t\t\"callbackURL\" => $callback,\n\t\t\t\"invoiceID\" => $this->transactionId(),\n\t\t\t\"terminalID\" => $this->config->get('gateway.saderat.TID')\n\t\t];\n\t\t$response = $this->Post($this->serverTokenUrl, $fields);\n\t\t$response = json_decode($response);\n\n\t\t$this->refId = $response->Accesstoken;\n\t\t$this->transactionSetRefId();\n\t}", "public function compute_send_money_transaction_post(){\r\n $source = $this->post('R1');\r\n $destination = $this->post('R2');\r\n $amount = $this->post('R3');\r\n $transaction_type = $this->post('R4'); // 1 if wallet to wallet and 2 if wallet to store\r\n\r\n $source_info = $this->customer_model->get_customer($source);\r\n $destination_info = $this->customer_model->get_customer($destination);\r\n\r\n \r\n\r\n if(empty($source_info) || empty($destination_info)){\r\n $this->response([\r\n 'status' => FALSE,\r\n 'message' => 'invalid customer reference.',\r\n 'response_code' => REST_Controller::HTTP_NOT_FOUND\r\n ], REST_Controller::HTTP_NOT_FOUND);\r\n }\r\n\r\n if($transaction_type==\"1\"){ // wallet to wallet\r\n\r\n $return_fee = get_akisi_fee($amount);\r\n $fee_array = $return_fee['message'];\r\n if($fee_array['responseCode']==\"00\"){\r\n $total_amount = $amount + $fee_array['feepronet'];\r\n\r\n $data = array(\"amount\"=>$amount,\r\n \"receipient\"=>$destination_info['fname'].\" \".$source_info['lname'],\r\n \"transaction_type\"=>$transaction_type,\r\n \"fee\"=>$fee_array['feepronet'],\r\n \"total\"=>$total_amount\r\n );\r\n if($source_info['balance']<$total_amount){\r\n $this->response([\r\n 'status' => FALSE,\r\n 'message' => 'insufficient balance',\r\n 'response_code' => REST_Controller::HTTP_BAD_REQUEST\r\n ], REST_Controller::HTTP_BAD_REQUEST);\r\n }else{\r\n $this->response($data, REST_Controller::HTTP_OK);\r\n }\r\n\r\n }else{\r\n $this->response([\r\n 'status' => FALSE,\r\n 'message' => 'Cannot retrieve akisi fee',\r\n 'response_code' => REST_Controller::HTTP_BAD_REQUEST\r\n ], REST_Controller::HTTP_BAD_REQUEST);\r\n }\r\n\r\n }else{ // wallet to store\r\n // not yet done ( need to add a fee if meron)\r\n\r\n $return_fee = get_akisi_fee($amount);\r\n $fee_array = $return_fee['message'];\r\n if($fee_array['responseCode']==\"00\"){\r\n $total_amount = $amount + $fee_array['feepronet'];\r\n $data = array(\"amount\"=>$amount,\r\n \"receipient\"=>$destination_info['fname'].\" \".$source_info['lname'],\r\n \"transaction_type\"=>$transaction_type,\r\n \"fee\"=>$fee_array['feepronet'],\r\n \"total\"=>$total_amount\r\n );\r\n $this->response($data, REST_Controller::HTTP_OK);\r\n }else{\r\n $this->response([\r\n 'status' => FALSE,\r\n 'message' => 'Cannot retrieve akisi fee',\r\n 'response_code' => REST_Controller::HTTP_BAD_REQUEST\r\n ], REST_Controller::HTTP_BAD_REQUEST);\r\n }\r\n \r\n \r\n }\r\n }", "protected function makePayment(){\n\t \n $receiver = Input::get('number');\n $amounttosend = Input::get('amount');\n $currency = Input::get('currency');\n $destinationProvider = Input::get('target');\n $charges = new PlatformCharges($amounttosend, $currency, $destinationProvider);\n $desc = $charges->getReceiverType($destinationProvider);\n $user = User::find(Auth::user()->id);\n \n $transaction = [\n 'Customer' => [\n 'FirstName' => Auth::user()->name,\n 'Street1' => 'Level 5',\n 'Country' => 'US',\n 'Mobile' => Auth::user()->number,\n 'Email' => Auth::user()->email\n ],\n 'Items' => [\n [\n 'SKU' => mt_rand(),\n 'Description' => 'Hybrid Transfer from EWAY to '.$desc.' user',\n 'Quantity' => 1,\n 'UnitCost' => $charges->convertCurrency($currency, 'AUD',$charges->getDueAmount('ew', $destinationProvider)),\n 'Tax' => 100, //$1 applied as charge to every transaction irrespective of the amount transfered\n // Total is calculated automatically\n ]\n ],\n 'Options' => [\n [\n 'Value' => $desc,//Receipient's payement system\n ],\n [\n 'Value' => $receiver, //receiver's details to which to make the due transfer\n ],\n [\n 'Value' => 'AUD', // currency used to make the transfer when sending to the receipient\n ],\n [\n 'Value' =>(0.01 * $amounttosend)\n ]\n ],\n 'Payment' => [\n 'TotalAmount' => $charges->convertCurrency($currency, 'AUD',$charges->getDueAmount('ew', $destinationProvider)) * 100, //$amounttosend,\n 'CurrencyCode' => 'AUD'\n ],\n 'Method' => 'ProcessPayment',\n 'RedirectUrl' => URL::route('dashboard').'/ewayconfirm',\n 'CancelUrl' => URL::route('dashboard').'/ewaycancel',\n 'PartnerID' => EwayController::$_EWAY_CUSTOMER_ID,\n 'TransactionType' => \\Eway\\Rapid\\Enum\\TransactionType::PURCHASE, //normally would be PURCHASE. Modes are MOTO, Recurring\n 'Capture' => true,\n 'LogoUrl' => 'https://izepay.iceteck.com/public/images/logo.png',\n 'HeaderText' => 'Izepay Money Transfer',\n 'Language' => 'EN',\n 'CustomView' => 'BootstrapCerulean', //Bootstrap, BootstrapAmelia, BootstrapCerulean, BootstrapCosmo, BootstrapCyborg, BootstrapFlatly, BootstrapJournal, BootstrapReadable, BootstrapSimplex, BootstrapSlate, BootstrapSpacelab, BootstrapUnited\n 'VerifyCustomerEmail' => true,\n 'Capture' => true,\n 'CustomerReadOnly' => false\n ];\n try{\n $response = $this->client->createTransaction(\\Eway\\Rapid\\Enum\\ApiMethod::RESPONSIVE_SHARED, $transaction);\n //var_dump($response);\n// echo $response->SharedPaymentUrl;\n //sleep(20);\n }catch(Exception $ex){\n return Redirect::route('dashboard')\n\t\t\t \t->with('alertError', 'Debug Error: '.$ex->getMessage());\n }\n //manage response\n \n if (!$response->getErrors()) {\n // Redirect to the Responsive Shared Page\n header('Location: '.$response->SharedPaymentUrl);\n //die();\n } else {\n foreach ($response->getErrors() as $error) {\n //echo \"Response Error: \".\\Eway\\Rapid::getMessage($error).\"<br>\";\n return Redirect::route('dashboard')\n\t\t\t \t ->with('alertError', 'Error! '.\\Eway\\Rapid::getMessage($error));\n }\n }\n\t}", "public function debitAction() {\n\n $this->_disableView();\n\n $request = $this->getRequest();\n $transId = $request->getParam('transaction');\n $secret = $request->getParam('secret');\n\n // get the transaction\n $dbTable = new Yourdelivery_Model_DbTable_Heidelpay_Wpf_Transactions();\n $dbRows = $dbTable->find($transId);\n $dbRow = $dbRows->current();\n if (!$dbRow) {\n $this->logger->err('Heidelpay DB: no transaction for transactionId: ' . $transId);\n return $this->_redirect(\"/error/throwpayment\");\n }\n\n $orderId = $dbRow->orderId;\n $response = $dbRow->getResponse();\n $uniqueId = $response['IDENTIFICATION_UNIQUEID'];\n\n // check order id\n if (!$orderId) {\n $this->logger->err('Heidelpay DB: called without order id');\n return $this->_redirect(\"/error/throwpayment\");\n }\n\n // set the default redirect url\n $redirect = \"/order_basis/payment\";\n\n // create order\n try {\n $order = new Yourdelivery_Model_Order($orderId);\n } catch (Yourdelivery_Exception_Database_Inconsistency $e) {\n $this->logger->err('Heidelpay DB: cannot find order #' . $orderId);\n return $this->_redirect(\"/error/throwpayment\");\n }\n\n // secure test\n if ($secret != sha1($order->getNr() . SALT)) {\n $this->logger->err('Heidelpay DB: called with wrong control key for order #' . $orderId);\n return $this->_redirect(\"/error/throwpayment\");\n }\n\n $heidelpay = new Yourdelivery_Payment_Heidelpay_Xml();\n\n $resp = false;\n try {\n $resp = $heidelpay->request($uniqueId, $order, true);\n } catch (Yourdelivery_Payment_Heidelpay_Exception $e) {\n $this->logger->err('Heidelpay DB Error: ' . $e->getMessage());\n return $this->_redirect(\"/error/throwpayment\");\n }\n\n // ack\n if (isset($resp['Result']) && strstr($resp['Result'], \"ACK\") && strstr($resp['Status'], \"NEW\")) {\n $this->logger->info('Heidelpay XML: receive ACK with status NEW for order #' . $orderId);\n\n $order->setStatus(Yourdelivery_Model_Order_Abstract::NOTAFFIRMED, \n new Yourdelivery_Model_Order_StatusMessage(Yourdelivery_Model_Order_StatusMessage::PAYMENT_SUCCESS_CREDIT) \n , true);\n $order->finalizeOrderAfterPayment('credit');\n\n $redirect = \"/order_private/success\";\n if ($order->getKind() == 'comp') {\n $redirect = \"/order_company/success\";\n }\n }\n // case for 3DSecure async redirect \n elseif ($resp['Result'] && strstr($resp['Result'], \"ACK\") && $resp['Status'] == \"WAITING\") {\n $this->logger->info('Heidelpay XML: receive ACK with status WAITING for order #' . $orderId);\n\n // save values in session\n if ($resp['RedirectUrl'] && $resp['RedirectParams']) {\n $this->session->CreditRedirectUrl = $resp['RedirectUrl'];\n $this->session->CreditRedirectParams = $resp['RedirectParams'];\n }\n $redirect = \"/payment_heidelpay/redirect\";\n }\n // fake ?\n elseif (isset($resp['Return']) && Yourdelivery_Payment_Heidelpay::isFake($resp['Return'])) {\n $msg = new Yourdelivery_Model_Order_StatusMessage(Yourdelivery_Model_Order_StatusMessage::PAYMENT_FAKE_CREDIT, $orderId, $resp['Reason'] , $resp['Return']); \n $this->logger->warn($msg->getRawMessage());\n $order->setStatus(Yourdelivery_Model_Order_Abstract::PAYMENT_NOT_AFFIRMED, $msg, true);\n $order->finalizeOrderAfterPayment('credit', true);\n\n $redirect = \"/order_private/success\";\n if ($order->getKind() == 'comp') {\n $redirect = \"/order_company/success\";\n }\n }\n // inform user\n else {\n $redirect .= \"?crediterror=1\";\n $msg = new Yourdelivery_Model_Order_StatusMessage(Yourdelivery_Model_Order_StatusMessage::PAYMENT_ERROR_CREDIT, $orderId, $resp['Reason'] , $resp['Return']); \n $this->logger->err($msg->getRawMessage());\n $order->setStatus(Yourdelivery_Model_Order_Abstract::PAYMENT_NOT_AFFIRMED, $msg);\n }\n\n return $this->_redirect($redirect);\n }", "public function payAmount()\n {\n if ($this->amount >= 500) {\n $payment = new payByCC();\n } else {\n $payment = new payByPayPal();\n }\n\n $payment->pay($this->amount);\n }", "public function doPayment() {\n\t\t$this->client = $this->getPwaClient();\n\n\t\t$this->transaction_response = new PaymentTransactionResponse();\n\t\t$this->ensureUniqueOrderID();\n\n\t\ttry {\n\t\t\tif ( $this->getData_Unstaged_Escaped( 'recurring' ) === '1' ) {\n\t\t\t\t$this->confirmBillingAgreement();\n\t\t\t\t$this->authorizeAndCapturePayment( true );\n\t\t\t} else {\n\t\t\t\t$this->confirmOrderReference();\n\t\t\t\t$this->authorizeAndCapturePayment( false );\n\t\t\t}\n\t\t} catch ( ResponseProcessingException $ex ) {\n\t\t\t$this->handleErrors( $ex, $this->transaction_response );\n\t\t}\n\n\t\t$this->incrementSequenceNumber();\n\n\t\treturn PaymentResult::fromResults(\n\t\t\t$this->transaction_response,\n\t\t\t$this->getFinalStatus()\n\t\t);\n\t}", "protected function createRegularPaymentPOST()\n {\n $IsLive = $this->mode=='TEST'?false:true;\n $paynet = new \\PaynetClient($this->account->secret_key, $IsLive);\n \n $paymentParams \t\t\t\t = new \\PaymentParameters();\n $paymentParams->amount \t = (string) $this->amountFormat($this->order->amount);\n $paymentParams->reference_no \t= (string) $this->order->id;\n $paymentParams->pan \t = $this->card->number;\n $paymentParams->month \t = $this->card->month;\n $paymentParams->year \t = $this->card->year;\n $paymentParams->cvc \t = (string) $this->card->cvv;\n $paymentParams->card_holder_mail= (string) filter_var($this->order->email, FILTER_VALIDATE_EMAIL)?$this->order->email:\"msn@msn.com\";\n $paymentParams->description \t= (string) isset($this->order->description)?$this->order->description:\"\";\n if($this->account->is_installment){\n $paymentParams->instalment \t= (int) $this->order->installment?:0;\n }\n $paymentParams->add_commission \t= $this->account->is_commission?true:false;\n\n if($this->account->ratio_code){\n $paymentParams->ratio_code \t= (string) $this->account->ratio_code;\n }\n if($this->account->agent_id){\n $paymentParams->agent_id \t= (string) $this->account->agent_id;\n }\n $paymentParams->transaction_type= (int) $this->type;\n\n $result \t\t\t= $paynet->PaymentPost($paymentParams);\n $XactId \t\t\t= $result->xact_id;\n $this->data = $result;\n if($result->is_succeed == true and filter_var($this->order->email, FILTER_VALIDATE_EMAIL) and $this->account->is_slip_post==true){\n $SlipParams \t\t\t\t= new \\SlipParameters();\n $SlipParams->xact_id \t \t= (string) $XactId;\n $SlipParams->email \t\t\t= (string) $this->order->email;\n $SlipParams->send_mail\t\t= true;\n $SlipResult\t\t \t\t\t= $paynet->SlipPost($SlipParams);\n }\n return $this;\n }", "public function paymentAction()\n {\n $objAgentCommission = new Nisanth_Model_AgentCommission();\n $ObjTransaction = new Nisanth_Model_Transaction();\n \n $agent_id = $this->_getParam('agent');\n $fromDate = $this->_getParam('from');\n $toDate = $this->_getParam('to');\n \n $commission_data = $objAgentCommission->getAgentCommission($agent_id, $fromDate, $toDate, 'A');\n $form = new Admin_Form_Commission_Pay(array('agent' => $agent_id, 'fromDate'=>$fromDate, 'toDate'=>$toDate, 'commission'=>$commission_data->commission));\n $this->view->form = $form;\n \n if (!$this->_request->isPost()) {\n return $this->render();\n }\n if (!$form->isValid($this->_getAllParams())) {\n return $this->render(); \n } else {\n $request = $this->_getAllParams();\n \n //insert the amount to transaction table\n $transaction = array('payment_option'=>1, 'category'=>2,'amount'=>$request['commission'],'receipt_no'=>$request['Boucher'], 'status'=>1);\n $transaction_id = $ObjTransaction->saveAll($transaction);\n \n //change status to payed in agentcommission table\n $objAgentCommission->changeCommissionStatus($request['agent'], $request['from_date'], $request['to_date'], 'A', 'P'); \n $this->_redirect('/admin/commission');\n }\n }", "protected function sendPayRequest()\n {\n $dateTime = new DateTime();\n\n $this->newTransaction();\n\n $fields = array(\n 'amount' => $this->amount,\n 'merchantId' => $this->config->get('irankish.merchant-id'),\n 'description' => $this->config->get('irankish.description'),\n 'invoiceNo' => $this->transactionId(),\n 'paymentId' => $this->transactionId(),\n 'specialPaymentId' => $this->transactionId(),\n 'revertURL' => $this->buildQuery($this->config->get('irankish.callback-url'), array('transaction_id' => $this->transactionId)),\n );\n\n try {\n $soap = new SoapClient($this->serverUrl, $this->config);\n $response = $soap->MakeToken($fields);\n\n } catch(\\SoapFault $e) {\n $this->transactionFailed();\n $this->newLog('SoapFault', $e->getMessage());\n throw $e;\n }\n\n if ($response->MakeTokenResult->result == false) {\n $this->transactionFailed();\n $this->newLog($response->MakeTokenResult->result, $response->MakeTokenResult->message);\n throw new IranKishException;\n }\n $this->refId = $response->MakeTokenResult->token;\n $this->transactionSetRefId($this->transactionId);\n }", "public static function transfer()\n {\n return new Transaction([\n 'scenario' => self::SCENARIO_TRANSFER,\n ]);\n }", "public function paypalCreatePayment(){\n \n if(!$_REQUEST['Amount']){\n $this->setMessage('warning', \"Invalid amount!\");\n return $this->redirectBack();\n }\n \n $member = Security::getCurrentUser();\n $payment = new \\Payment();\n $payment->Amount = $_REQUEST['Amount'];\n $payment->Gateway = 'Paypal';\n $payment->Status = 'Pending';\n $payment->MemberID = $member->ID;\n $payment->write();\n \n $apiContext = $this->getPaypalApiContext();\n \n $payer = new \\PayPal\\Api\\Payer();\n $payer->setPaymentMethod('paypal');\n \n \n $usd = $this->convertCurrency($_REQUEST['Amount']);\n if(!$usd){\n $this->setMessage('warning', \"Could not process, please try again!\");\n return $this->redirect('/dashboard');\n }\n \n $amount = new \\PayPal\\Api\\Amount();\n $amount->setTotal($usd);\n $amount->setCurrency('USD');\n \n $transaction = new \\PayPal\\Api\\Transaction();\n $transaction->setAmount($amount);\n \n $redirectUrls = new \\PayPal\\Api\\RedirectUrls();\n $redirectUrls->setReturnUrl(Director::absoluteBaseURL().\"dashboard/paypalExecutePayment?pid=\".$payment->ID)\n ->setCancelUrl(Director::absoluteBaseURL().\"dashboard?status=cancel\");\n \n $payment = new \\PayPal\\Api\\Payment();\n $payment->setIntent('sale')\n ->setPayer($payer)\n ->setTransactions(array($transaction))\n ->setRedirectUrls($redirectUrls);\n \n // After Step 3\n try {\n $payment->create($apiContext);\n //echo $payment;\n return $this->redirect($payment->getApprovalLink());\n //echo \"\\n\\nRedirect user to approval_url: \" . $payment->getApprovalLink() . \"\\n\";\n }\n catch (\\PayPal\\Exception\\PayPalConnectionException $ex) {\n // This will print the detailed information on the exception.\n //REALLY HELPFUL FOR DEBUGGING\n //echo $ex->getData();\n }\n $this->setMessage('warning', \"Could not process, please try again!\");\n return $this->redirect('/dashboard');\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Runs all negativetests for the VisibleProperty of the CustomerObject
private function TestVisibleNOK(){ $this->Customer->setVisible("test"); if($this->Customer->isVisible() == "test"){ $this->AddMessageFailed("Customer::Visible can be set to 'test'"); } else { $this->AddMessageSuccess("Customer::Visible can't be set to 'test'"); } }
[ "public function invisible() {\n $collection = clone $this;\n return $collection->filterBy('isInvisible', true);\n }", "public function test_user_can_not_public_is_customer() {\n\n\t\t$user_id = $this->factory->user->create();\n\n\t\t$restriction = new WordPoints_WooCommerce_Entity_Restriction_Order_Nonpublic(\n\t\t\tWC_Helper_Order::create_order( $user_id )->get_id()\n\t\t\t, array( 'test' )\n\t\t);\n\n\t\t$this->assertTrue( $restriction->user_can( $user_id ) );\n\t}", "public function noVisible()\n {\n \treturn self::NO_VISIBLE;\n }", "public function TestVisible(){\r\n\t\t\t$this->TestVisibleOK();\r\n\t\t\t$this->TestVisibleNOK();\r\n\t\t}", "protected function evaluateVisible()\n\t{\n\t\treturn true;\n\t}", "public function testPropertyVisibility()\n\t{\n\t\t$game = new Game();\n\n\t\tforeach ($this->properties as $prop) {\n\t\t\t$property = new ReflectionProperty(get_class($game), $prop);\n\n\t\t\t$this->assertTrue($property->isProtected());\n\t\t}\n\t}", "public function test_hidden_siteidentity_fields_no_access() {\n $this->resetAfterTest();\n $env = $this->setup_hidden_siteidentity();\n $this->setUser($env->student);\n\n $selector = new testable_user_selector('test');\n\n foreach ($selector->find_users('') as $found) {\n foreach ($found as $user) {\n $this->assertObjectNotHasAttribute('idnumber', $user);\n $this->assertObjectNotHasAttribute('country', $user);\n $this->assertObjectNotHasAttribute('city', $user);\n }\n }\n }", "public function testVisibilityUsingHide()\n\t{\n\t\t$this->stub->hide();\n\n\t\t$refl = new \\ReflectionObject($this->stub);\n\t\t$attributes = $refl->getProperty('attributes');\n\t\t$attributes->setAccessible(true);\n\n\t\t$attrib = $attributes->getValue($this->stub);\n\n\t\t$this->assertFalse($attrib['visible']);\n\t}", "public function disableVisibility()\n {\n $this->applyVisibility = false;\n }", "function dontSeeCustomerInList($customer_data)\n {\n $I = $this;\n $I->dontSee($customer_data['CustomerRecord[name]'], '#search_results');\n }", "public function getHideProperties() : array;", "function testSearchByCustomFieldWithNegation() {\n\t\t$this->setUrl('/search/advanced?r=per&q[per_900][op]=IS+NOT&q[per_900][value]=100');\n\t\t$this->app->go();\n\t\t$this->assertFalse(Flash::Instance()->hasErrors());\n\t\t$this->assertPattern('/id=\"qb_per_900\"/', $this->view->output);\n\t\t$this->assertPattern('/<th>Favourite Colour<\\/th>/', $this->view->output);\n\t\t$this->assertPattern('/<td>Blue<\\/td>/', $this->view->output);\n\t\t$collection = $this->view->get('collection');\n\t\t$names = $collection->pluck('name');\n\t\t$this->assertEqual($names, array('David Edwards', 'Greg Jones', 'Bob Smith'));\n\t}", "public function anyVisibleTestcases() {\n /** @var AutogradingTestcase $testcase */\n foreach ($this->testcases as $testcase) {\n if (!$testcase->isHidden()) {\n return true;\n }\n }\n return false;\n }", "public function testGetVisibility()\n {\n $this->assertSame('protected', $this->getPropertyEntity('name')->getVisibility());\n $this->assertSame('public', $this->getPropertyEntity('isCat')->getVisibility());\n }", "public function isDisplayValuesWithoutResults();", "public function testOffersUnhide()\n {\n }", "public function getVisibleProperties();", "public function getMustNots();", "public function onlyNotBusiness()\n {\n return $this->onlyBusiness(false);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Whether the national data archives for the dataset identified by this DIF include the Global Biodiversity Information Facility.
public function hasNationalDataArchiveGBIF() { return $this->nationalDataArchiveGBIF; }
[ "public function hasNationalDataArchiveNCBI()\n {\n return $this->nationalDataArchiveNCBI;\n }", "function isUgandan() {\n \treturn strtoupper($this->getCountry()) == 'UG' ? true : false; \n }", "public function isNational()\n {\n return $this->national;\n }", "public function isUSACitizenAllowed(){\n return (boolean)$this->country1->allow_usa_citizen;\n }", "public function hasCountry()\n {\n return !empty($this->country) ? true : false;\n }", "public function getGoesnationalAttribute() {\n return in_array($this->iso, ['EP', 'WO', 'EM', 'OA']);\n }", "public function hasMunicipality()\n {\n return !empty($this->municipality) ? true : false;\n }", "public function hasOrganisation() : bool;", "function isSubcounty(){\n\t\treturn $this->getLocationType() == 4 ? true : false;\n\t}", "public function isDomestic()\n {\n\n if($this->getShipper()['country_code'] == $this->getRecipient()['country_code'] && $this->getShipper()['country_code'] == \"AE\") {\n return true;\n }\n return false;\n }", "public function IsIndividual() {\n\t\t\tif ($this->CountHouseholdParticipations()) return false;\n\t\t\tif ($this->HouseholdAsHead) return false;\n\t\t\treturn true;\n\t\t}", "public function hasOrganisation(): bool\n {\n return isset($this->organisation);\n }", "private function isIbid()\n {\n $position = Container::getCitationItem()->getPosition();\n $groupPosition = Container::getCitationItem()->getGroupPosition();\n\n if ($groupPosition > 0) {\n if (Container::getCitationItem()->getAtPosition('id', $position, $groupPosition - 1) ==\n Container::getCitationItem()->get('id')\n ) {\n return true;\n }\n } elseif ($position > 0) {\n if (Container::getCitationItem()->getAtPosition('id', $position - 1, 0) ==\n Container::getCitationItem()->get('id')\n && Container::getCitationItem()->getAtPosition('id', $position - 1, 1) == null\n ) {\n return true;\n }\n }\n\n return false;\n }", "public function isBankCodeFieldVisible()\n {\n return array_key_exists('country', $this->previousParams)\n && ('DE' == strtoupper($this->getCountry())\n || 'AT' == strtoupper($this->getCountry()));\n }", "public static function isGermany()\n {\n $strCountry = Isotope\\Isotope::getCart()->getShippingAddress()->country;\n\n return ($strCountry == 'de' || $strCountry == '');\n }", "protected function hasCountry()\n {\n return ! is_null($this->getCountry());\n }", "function IsDisplayYear() {\r\n\treturn $this->year->iShowLabels;\r\n }", "public function hasIata() : bool\n {\n return isset($this->iata);\n }", "public function hasCountry(): bool;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Tests the function set and get InsercaoCnpj in class Pessoa.
public function testInsercaoCnpj() { $cnpj = $this->test->setCnpj("02.449.992/0056-38"); $nomeTeste = $this->test->getCnpj(); $this->assertEquals("02.449.992/0056-38", $nomeTeste); }
[ "public function testFuncionesColectivo() {\n $linea=420;\n\t$empresa=\"muni\";\n\t$numero=69;\n $colectivo = new Colectivo($linea,$empresa,$numero);\n\t$this->assertEquals( $colectivo->numero() , $numero);\n\t$this->assertEquals( $colectivo->empresa() , $empresa);\n }", "public function testSetCicePjMailCliDucsEdi() {\n\n $obj = new ConstantesEntreprise();\n\n $obj->setCicePjMailCliDucsEdi(true);\n $this->assertEquals(true, $obj->getCicePjMailCliDucsEdi());\n }", "public function testSetPjMailCLiDucsEdi() {\n\n $obj = new ConstantesEntreprise();\n\n $obj->setPjMailCLiDucsEdi(true);\n $this->assertEquals(true, $obj->getPjMailCLiDucsEdi());\n }", "public function testSetAnnulationDossierCpta() {\n\n $obj = new Constantes();\n\n $obj->setAnnulationDossierCpta(true);\n $this->assertEquals(true, $obj->getAnnulationDossierCpta());\n }", "public function testSetSaisieAcompte() {\n\n $obj = new SaisiePrepaEntete();\n\n $obj->setSaisieAcompte(true);\n $this->assertEquals(true, $obj->getSaisieAcompte());\n }", "public function testGetICAOcode()\n {\n // @requires this.icao != null\n $this->assertTrue($this->icaoCode != null);\n\n $icaoCode = $this->testAirport->getICAOcode();\n\n // @ensures icaoCode != null\n $this->assertTrue($icaoCode != null);\n }", "public function testSetIndemnCpPlaf() {\n\n $obj = new EmpDadsuParam();\n\n $obj->setIndemnCpPlaf(10.092018);\n $this->assertEquals(10.092018, $obj->getIndemnCpPlaf());\n }", "public function testSetNumeroPj() {\n\n $obj = new DevisCommercialEntetes();\n\n $obj->setNumeroPj(10);\n $this->assertEquals(10, $obj->getNumeroPj());\n }", "public function testSetCodeCaisseCp() {\n\n $obj = new EmpDadsuGene();\n\n $obj->setCodeCaisseCp(\"codeCaisseCp\");\n $this->assertEquals(\"codeCaisseCp\", $obj->getCodeCaisseCp());\n }", "function testeDescobrirCodigoDoPaciente(){\n $oPaciente = new lPaciente();\n $oPaciente->createTablePaciente();\n print_r($oPaciente->insertPacienteCompleto(\"Teste1\", \"1234567\",\"364.964.588-00\", \"Unimed\", \"M\", \"A-\", \"1993-05-31\", \"Rua 7\", \"539879878888\", \"teste@email.com\"));\n print_r(\"\\n\");\n print_r($oPaciente->insertPacienteCompleto(\"Teste2\", \"1234567\",\"364.964.588-77\", \"Plano B\", \"F\", \"A+\", null, null, null, \"teste@email.com\"));\n print_r(\"\\n\\n\");\n\n // Para preencher os atributos de $oPaciente buscando na tabela tPaciente.xml pelo CPF ou por outro valor (ver testeSelect())\n // OBS: o retorno destas funcoes de selecao eh um array, por isso foi informado o indice [0] para pegar o elemento de interesse.\n $oPaciente = $oPaciente->getPacienteByCPF(\"364.964.588-00\")[0];\n\n /* ..:: Para obter o codigo de um Paciente ::.. */\n // OBS: o $oPaciente deve possuir um ou mais atributos preenchidos\n print_r($oPaciente->getCodigoByPaciente($oPaciente));\n}", "public function testSetNumeroPj() {\n\n $obj = new Subventions();\n\n $obj->setNumeroPj(10);\n $this->assertEquals(10, $obj->getNumeroPj());\n }", "public function testSetControleur() {\n\n $obj = new Employes();\n\n $obj->setControleur(true);\n $this->assertEquals(true, $obj->getControleur());\n }", "public function testSetPrenom() {\n\n $obj = new Intervenants();\n\n $obj->setPrenom(\"prenom\");\n $this->assertEquals(\"prenom\", $obj->getPrenom());\n }", "public function testSetNoDossCpta() {\n\n $obj = new Constantes();\n\n $obj->setNoDossCpta(\"noDossCpta\");\n $this->assertEquals(\"noDossCpta\", $obj->getNoDossCpta());\n }", "public function testSetCreationDossierCpta() {\n\n $obj = new Constantes();\n\n $obj->setCreationDossierCpta(true);\n $this->assertEquals(true, $obj->getCreationDossierCpta());\n }", "public function testSetSaisiePvInterdite() {\n\n $obj = new Collaborateurs();\n\n $obj->setSaisiePvInterdite(true);\n $this->assertEquals(true, $obj->getSaisiePvInterdite());\n }", "public function testSetAccesDossierCpta() {\n\n $obj = new Collaborateurs();\n\n $obj->setAccesDossierCpta(\"accesDossierCpta\");\n $this->assertEquals(\"accesDossierCpta\", $obj->getAccesDossierCpta());\n }", "public function testSetCptEntretien() {\n\n $obj = new LocationsFi();\n\n $obj->setCptEntretien(\"cptEntretien\");\n $this->assertEquals(\"cptEntretien\", $obj->getCptEntretien());\n }", "public function testSetNbJrnImprimeesFact() {\n\n $obj = new Compteur();\n\n $obj->setNbJrnImprimeesFact(10);\n $this->assertEquals(10, $obj->getNbJrnImprimeesFact());\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Enqueue UIkit admin assets.
function yourfitness_tt_uikit_enqueue_admin_assets() { if ( !has_action( 'yourfitness_uikit_admin_enqueue_scripts' ) ) return; /** * Fires when admin UIkit scripts and styles are enqueued. * * @since 1.0.0 */ do_action( 'yourfitness_uikit_admin_enqueue_scripts' ); // Compile everything. $uikit = new yourfitness_tt_Uikit; $uikit->compile(); }
[ "function enqueueAdminBundleAssets() {\n wp_enqueue_script(HANDLE_ADMIN_BUNDLE);\n wp_enqueue_style(HANDLE_ADMIN_BUNDLE);\n}", "public function load_admin_assets() {\n\t\t\tglobal $kili_framework;\n\t\t\twp_enqueue_style( 'admin_css', $this->asset_path( 'styles/admin.css' ), false, null );\n\t\t}", "public function addAdminAssets()\n\t{\n\t\tparent::addAdminAssets();\n\t\twp_enqueue_style( 'csframework-repeatable-field' );\n\t\twp_enqueue_script( 'csframework-repeatable-field' );\n\t}", "public function admin_enqueue_scripts() {\n $this->enqueue_scripts_and_styles(base\\Assets::TYPE_ADMIN);\n }", "public function enqueue_admin_assets() {\n\t\twp_enqueue_style(\n\t\t\t'nusa',\n\t\t\tget_template_directory_uri() . '/assets/css/wp-admin.min.css',\n\t\t\t[],\n\t\t\tfilemtime( get_template_directory() . '/assets/css/wp-admin.min.css' )\n\t\t);\n\n\t\twp_enqueue_script(\n\t\t\t'nusa',\n\t\t\tget_template_directory_uri() . '/assets/js/wp-admin.min.js',\n\t\t\t[ 'jquery', 'media-upload' ],\n\t\t\tfilemtime( get_template_directory() . '/assets/js/wp-admin.min.js' ),\n\t\t\ttrue\n\t\t);\n\t}", "public function enqueue_admin_assets() {\n\t\twp_enqueue_style( 'nusa', get_template_directory_uri() . '/assets/css/wp-admin.min.css', [], filemtime( get_template_directory() . '/assets/css/wp-admin.min.css' ) );\n\t\twp_enqueue_script( 'nusa', get_template_directory_uri() . '/assets/js/wp-admin.min.js', [ 'jquery', 'media-upload' ], filemtime( get_template_directory() . '/assets/js/wp-admin.min.js' ), true );\n\t}", "public function admin_assets() {\n\n $screen = get_current_screen();\n\n if ( $screen->base !== 'widgets' && $screen->base !== 'customize' ) {\n return;\n }\n\n // Add styles\n wp_enqueue_style( 'font-awesome', plugin_dir_url( __FILE__ ) . 'includes/font-awesome/css/font-awesome.min.css', [], '4.4.0' );\n wp_enqueue_style( 'select2', plugin_dir_url( __FILE__ ) . 'includes/select2/css/select2.min.css', [], '4.0.0' );\n wp_enqueue_style( 'imacon-admin', plugin_dir_url( __FILE__ ) . 'admin/assets/styles/admin.css', ['font-awesome', 'select2'], '0.2.0' );\n /// Add scripts\n wp_enqueue_media();\n wp_enqueue_script( 'select2', plugin_dir_url( __FILE__ ) . 'includes/select2/js/select2.min.js', ['jquery'], '4.0.0', true );\n wp_enqueue_script( 'imacon-admin', plugin_dir_url( __FILE__ ) . 'admin/assets/scripts/admin.min.js', ['jquery', 'select2'], '0.2.0', true );\n\n }", "private function setAdminEnqueue() {\n add_action('admin_enqueue_scripts', array($this, 'enqueueAdmin'));\n }", "public function enqueue_assets() {\n\t\t$asset_manager = new WPSEO_Admin_Asset_Manager();\n\t\t$asset_manager->enqueue_script( 'network-admin-script' );\n\n\t\t$translations = array(\n\t\t\t/* translators: %s: success message */\n\t\t\t'success_prefix' => __( 'Success: %s', 'wordpress-seo' ),\n\t\t\t/* translators: %s: error message */\n\t\t\t'error_prefix' => __( 'Error: %s', 'wordpress-seo' ),\n\t\t);\n\t\twp_localize_script(\n\t\t\tWPSEO_Admin_Asset_Manager::PREFIX . 'network-admin-script',\n\t\t\t'wpseoNetworkAdminGlobalL10n',\n\t\t\t$translations\n\t\t);\n\t}", "public function admin_enqueue_scripts()\n\t{\n\t\t$this->check_dependencies();\n\n\t\tif ( $this->missing_dependencies )\n\t\t{\n\t\t\treturn;\n\t\t}//end if\n\n\t\t// make sure go-ui has been instantiated and its resources registered\n\t\tgo_ui();\n\t}", "function registerAdminBundleAssets() {\n /* config */\n $handle = HANDLE_ADMIN_BUNDLE;\n $base_path = '../../build/admin';\n\n // styles config\n $css_path = \"$base_path/css/admin.css\";\n $css_deps = [];\n\n // javascript config\n $js_path = \"$base_path/js/admin.js\";\n $js_deps = [PLUGIN_PREFIX . '-' . 'admin-globals'];\n\n // registration procedure\n $js_asset_file = include __DIR__ . \"/$base_path/js/admin.asset.php\";\n array_merge( $js_deps, $js_asset_file['dependencies'] );\n $dir = dirname( __FILE__ );\n\n wp_register_style(\n $handle,\n plugins_url( $css_path, __FILE__ ),\n $css_deps,\n filemtime( \"$dir/$css_path\" )\n );\n\n wp_register_script(\n $handle,\n plugins_url( $js_path, __FILE__ ),\n $js_deps,\n $js_asset_file['version']\n );\n\n}", "function shortcode_ui_enqueue_assets() {\n\tShortcode_UI::get_instance()->enqueue();\n}", "function poo_enqueue_uikit_assets() {\n\tbeans_compiler_add_fragment( 'uikit', array(\n\t\tCHILD_LIB . '/assets/js/theme.js'\n\t), 'js' );\n\n\tbeans_uikit_enqueue_components( array(\n\t\t'cover',\n\t\t'overlay',\n\t) );\n\tbeans_uikit_enqueue_components( array(\n\t\t'grid',\n\t),\n\t\t'add-ons' );\n\n}", "function register_admin_assets()\n{\n}", "public function registerAdminScripts()\n {\n $admin = $this->buildManifest->admin;\n\n wp_enqueue_script('admin-js', get_template_directory_uri() . \"/build/\" . $admin->js);\n wp_enqueue_style('admin-css', get_template_directory_uri() . \"/build/\" . $admin->css);\n add_editor_style( get_template_directory_uri() . \"/build/\" . $admin->css);\n }", "public function admin_enqueue() {\n\t\t// styles.\n\t}", "function load_admin_scripts() {\n foreach($this->admin_css as $css) {\n wp_enqueue_style('bvt-'.$css, $this->css_path.$css.'.css');\n }\n foreach($this->admin_js as $js) {\n wp_enqueue_script($js, $this->js_path.$js.'.js');\n }\n }", "public function admin_scripts() {\n wp_enqueue_style('javaabuthaana_admin_css');\n\n if ( apply_filters('javaabuthaana_enable_admin_jtk', true) ) {\n wp_enqueue_script('jtk'); // Enqueue it!\n wp_enqueue_script('jtk-admin'); // Enqueue it!\n }\n }", "function aniomalia_admin_assets() {\n $plugin_url = plugin_dir_url( __FILE__ );\n wp_enqueue_style( 'aniomalia-admin-style', $plugin_url . 'css/style.css');\n wp_enqueue_script( 'aniomalia-admin-script', $plugin_url . 'js/script.js', array(), '', true);\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Set public key Key needs to be a \phpseclib\Crypt\RSA object
public function setPublicKey($key) { if (!$key instanceof RSA) { return; } $key = $key->getKeyObject(); if ($key instanceof \phpseclib3\Crypt\Common\PublicKey) { if ($key instanceof \phpseclib3\Crypt\RSA) { $key = $key->withPadding(\phpseclib3\Crypt\RSA::SIGNATURE_PKCS1); } $this->x509->setPublicKey($key); } }
[ "public function setPublicKey(CryptKey $key);", "function setPublicKey($key)\n {\n $this->key = $key;\n $this->key->setPublicKey();\n }", "final public static function setPublicKey($public_key)\n\t{\n\t\tif(!is_file($public_key))\n\t\t{\n\t\t\tstatic::$options['publickey'] = $public_key;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tstatic::$options['publickey'] = file_get_contents($public_key);\n\t\t}\n\t}", "public static function setPublicKey($key)\n\t{\n\t\tself::$publicKey = (string) $key;\n\t}", "public function setPublicKeyId(string $publicKeyId): void;", "function set_publickey($publickey, $isFile=0){\n \n if ($isFile)$publickey=$this->readf($publickey);\n \n $this->publickey=openssl_get_publickey($publickey);\n }", "public function setSSHPublicKey($ssh_public_key) {\n $this->ssh_public_key = $ssh_public_key;\n }", "public function setPublicKey()\n {\n try {\n $this->pay->merchant()->pickPublicKeyId();\n } catch (MerchantManagerException $exception) {\n $this->pay->merchant()->sendPublicKey();\n }\n }", "function rsa_encrypt($string, $public_key) {\n //Create an instance of the RSA cypher and load the key into it\n $cipher = new Crypt_RSA();\n $cipher->loadKey($public_key);\n //Set the encryption mode\n $cipher->setEncryptionMode(CRYPT_RSA_ENCRYPTION_PKCS1);\n //Return the encrypted version\n return $cipher->encrypt($string);\n}", "function rsa_encrypt($string, $public_key)\n{\n //Create an instance of the RSA cypher and load the key into it\n $cipher = new Crypt_RSA();\n $cipher->loadKey($public_key);\n //Set the encryption mode\n $cipher->setEncryptionMode(CRYPT_RSA_ENCRYPTION_PKCS1);\n //Return the encrypted version\n return $cipher->encrypt($string);\n}", "function setPublicKey($key = false, $type = false)\n {\n // if a public key has already been loaded return false\n if (!empty($this->publicExponent)) {\n return false;\n }\n\n if ($key === false && !empty($this->modulus)) {\n $this->publicExponent = $this->exponent;\n return true;\n }\n\n if ($type === false) {\n $types = array(\n self::PUBLIC_FORMAT_RAW,\n self::PUBLIC_FORMAT_PKCS1,\n self::PUBLIC_FORMAT_XML,\n self::PUBLIC_FORMAT_OPENSSH\n );\n foreach ($types as $type) {\n $components = $this->_parseKey($key, $type);\n if ($components !== false) {\n break;\n }\n }\n } else {\n $components = $this->_parseKey($key, $type);\n }\n\n if ($components === false) {\n return false;\n }\n\n if (empty($this->modulus) || !$this->modulus->equals($components['modulus'])) {\n $this->modulus = $components['modulus'];\n $this->exponent = $this->publicExponent = $components['publicExponent'];\n return true;\n }\n\n $this->publicExponent = $components['publicExponent'];\n\n return true;\n }", "public function testSettingOnlyThePublicKey()\n {\n $publicKey = '1234';\n $structure = new KeyPair('', $publicKey);\n\n $this->assertNotEmpty($structure);\n $this->assertTrue(is_object($structure));\n $this->assertTrue($structure instanceof KeyPair);\n\n $this->assertEmpty($structure->private);\n $this->assertNotEmpty($structure->public);\n\n $this->assertEquals('', $structure->private);\n $this->assertEquals($publicKey, $structure->public);\n\n $structure->private = strrev($structure->private);\n $structure->public = strrev($structure->public);\n\n $this->assertEquals('', $structure->private);\n $this->assertEquals(strrev($publicKey), $structure->public);\n }", "public function setEncryptionPublicKey($encryptionPublicKey);", "function rsa_encrypt($string, $public_key)\n{\n //Create an instance of the RSA cypher and load the key into it\n $cipher = new Crypt_RSA();\n $cipher->loadKey($public_key);\n //Set the encryption mode\n $cipher->setEncryptionMode(CRYPT_RSA_ENCRYPTION_PKCS1);\n //Return the encrypted version\n return base64_encode($cipher->encrypt($string));\n}", "public function createNewRSA(){\n $res = openssl_pkey_new($this->config);\n\n // Extract the private key from $res to $privKey\n openssl_pkey_export($res, $privKey, null, $this->config);\n\n // Extract the public key from $res to $pubKey\n $pubKey = openssl_pkey_get_details($res);\n $pubKey = $pubKey[\"key\"];\n\n $this->privKey=$privKey;\n $this->pubKey=$pubKey;\n $this->expire=time()+60*10;\n }", "public function set_public_key($user_id, $public_key) {\n\t\n\t\treturn update_user_meta($user_id, self::META_KEY_PUBLIC_KEY, $public_key);\n\t\n\t}", "function setParams($params)\r\n {\r\n if (!is_array($params)) {\r\n $this->pushError('parameters must be passed to function as associative array', CRYPT_RSA_ERROR_WRONG_PARAMS);\r\n return false;\r\n }\r\n\r\n if (isset($params['enc_key'])) {\r\n if (Crypt_RSA_Key::isValid($params['enc_key'])) {\r\n $this->_enc_key = $params['enc_key'];\r\n }\r\n else {\r\n $this->pushError('wrong encryption key. It must be an object of Crypt_RSA_Key class', CRYPT_RSA_ERROR_WRONG_KEY);\r\n return false;\r\n }\r\n }\r\n if (isset($params['dec_key'])) {\r\n if (Crypt_RSA_Key::isValid($params['dec_key'])) {\r\n $this->_dec_key = $params['dec_key'];\r\n }\r\n else {\r\n $this->pushError('wrong decryption key. It must be an object of Crypt_RSA_Key class', CRYPT_RSA_ERROR_WRONG_KEY);\r\n return false;\r\n }\r\n }\r\n if (isset($params['private_key'])) {\r\n if (Crypt_RSA_Key::isValid($params['private_key'])) {\r\n if ($params['private_key']->getKeyType() != 'private') {\r\n $this->pushError('private key must have \"private\" attribute', CRYPT_RSA_ERROR_WRONG_KEY_TYPE);\r\n return false;\r\n }\r\n $this->_private_key = $params['private_key'];\r\n }\r\n else {\r\n $this->pushError('wrong private key. It must be an object of Crypt_RSA_Key class', CRYPT_RSA_ERROR_WRONG_KEY);\r\n return false;\r\n }\r\n }\r\n if (isset($params['public_key'])) {\r\n if (Crypt_RSA_Key::isValid($params['public_key'])) {\r\n if ($params['public_key']->getKeyType() != 'public') {\r\n $this->pushError('public key must have \"public\" attribute', CRYPT_RSA_ERROR_WRONG_KEY_TYPE);\r\n return false;\r\n }\r\n $this->_public_key = $params['public_key'];\r\n }\r\n else {\r\n $this->pushError('wrong public key. It must be an object of Crypt_RSA_Key class', CRYPT_RSA_ERROR_WRONG_KEY);\r\n return false;\r\n }\r\n }\r\n if (isset($params['hash_func'])) {\r\n if (!function_exists($params['hash_func'])) {\r\n $this->pushError('cannot find hash function with name [' . $params['hash_func'] . ']', CRYPT_RSA_ERROR_WRONG_HASH_FUNC);\r\n return false;\r\n }\r\n $this->_hash_func = $params['hash_func'];\r\n }\r\n return true; // all ok\r\n }", "final public function setRecaptchaPublicKey($key)\n {\n if (!is_string($key)) {\n return;\n }\n\n $this->recaptchaPublicKey = $key;\n }", "public function setPublicKey($value)\n {\n return $this->set('PublicKey', $value);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns the url to configure this module in a content container
public function getContentContainerConfigUrl(ContentContainerActiveRecord $container) { return ""; }
[ "public function getConfigurationUrl() {\n return Mage::helper(\"adminhtml\")->getUrl('adminhtml/system_config/edit', array('section' => 'admin'));\n }", "public function get_configuration_url() : \\moodle_url {\n return new \\moodle_url('/course/customfield.php');\n }", "final public function ClientModuleUrl() {\r\n return cms_join_path($this->ClientUrl(), 'modules', $this->GetName());\r\n }", "public function getConfigurationUrl()\n {\n return $this->getUrl($this->systemConfigPath, ['section' => 'btob']);\n }", "private function getModulesUrl() {\n\t\tif($this->contentContainer instanceof User) {\n\t\t\treturn $this->createContainerUrl('//user/account/editModules');\n\t\t}\n\t\telse if($this->contentContainer instanceof Space) {\n\t\t\treturn $this->createContainerUrl('//space/admin/modules');\n\t\t}\n\t}", "protected function getCloudinaryConfigUrl()\n {\n return $this->urlBuilder->getUrl(\n 'adminhtml/system_config/edit',\n [\n 'section' => 'cloudinary'\n ]\n );\n }", "function module_url($module, $file)\n {\n global $config_module_path;\n return \"$config_module_path/$module/$file\";\n }", "public function fcpoGetModuleUrl() \n {\n return $this->getModuleUrl($this->_sModuleFolder);\n }", "public function getOverviewUrl()\n {\n return Mage::helper(\"adminhtml\")->getUrl('adminhtml/mzeis_documentation_module/view', array('module' => $this->getName()));\n }", "public function getAdminConfigSectionUrl()\n {\n $url = Mage::getModel('adminhtml/url');\n return $url->getUrl('adminhtml/system_config/edit', array(\n '_current' => true,\n 'section' => 'newsletter'\n ));\n }", "protected function getModuleBaseUrl()\n {\n return $this->base_module_url;\n }", "protected function getOpenIdConfigUrl()\n {\n return $this->getAdfsServer().$this->config_endpoint;\n }", "public function getConfigureUrl()\n {\n return $this->getUrl(\n 'checkout/cart/configure',\n [\n 'id' => $this->getItem()->getId(),\n 'product_id' => $this->getItem()->getProduct()->getId()\n ]\n );\n }", "public function getContent()\n {\n Tools::redirectAdmin($this->context->link->getAdminLink('AdminMyModuleConfiguration'));\n }", "public function getPageUrl()\n {\n return Yii::app()->createUrl('ext_example_settings/index');\n }", "public function getManageGeneralUrl()\n {\n return $this->urlBuilder->getUrl('adminhtml/system_config/edit/section/store_information');\n }", "public function getUrlManager()\n {\n \treturn $this->getComponent('urlManager');\n }", "public function getConfigureUrl()\n {\n return $this->getUrl(\n 'checkout/cart/configure/',\n [\n 'id' => $this->getItem()->getId(),\n 'product_id' => $this->getItem()->getProduct()->getId(),\n 'is_offer' => true\n ]\n );\n }", "protected function getBaseUrl()\n\t{\n\t\treturn 'index.php?option=' . $this->getComponent() . '&view=' . $this->getInstanceName();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the [passenger_id] column value.
public function getPassengerId() { return $this->passenger_id; }
[ "public function getEngagementIdAttribute()\n {\n return data_get($this->engagement, 'id');\n }", "public function getPassengerNumber()\n {\n return isset($this->PassengerNumber) ? $this->PassengerNumber : null;\n }", "public function get_id(){\n return intval($this->get_info('field_id'));\n }", "public function getBookingId() {\n return $this->get(self::BOOKINGID);\n }", "public function get_id_attribute() {\n\t\n\t\t\treturn $this->id_attribute;\n\t\t}", "public function getID() {\n return $this->getAttribute('id');\n }", "public function getDeliveryId()\n\t{\n\t\t$column = self::COL_DELIVERY_ID;\n\t\t$v = $this->$column;\n\n\t\tif( $v !== null){\n\t\t\t$v = (int)$v;\n\t\t}\n\n\t\treturn $v;\n\t}", "public function getBookingId()\n {\n return $this->iBookingDatabaseId;\n }", "public function get_id( ){\n\t\t\t\n\t\t\treturn $this->gate_id;\n\t\t\t\n\t\t}", "public function getWholesalerId()\n {\n $value = $this->get(self::wholesaler_id);\n return $value === null ? (integer)$value : $value;\n }", "public function getID() {\n\t\treturn $this->getAttribute('id');\n\t}", "public static function getPrimaryKeyColumn() {\n\t\treturn self::getInstance()->cols['id'];\n\t}", "public function getGamerId()\n {\n $value = $this->get(self::GAMER_ID);\n return $value === null ? (integer)$value : $value;\n }", "public function getIDColumn()\n {\n return $this->sIdColumn;\n }", "public function getOriginalPassengerNumber()\n {\n return isset($this->OriginalPassengerNumber) ? $this->OriginalPassengerNumber : null;\n }", "public function get_id_attribute()\n\t{\n\t\treturn $this->id_attribute;\n\t}", "function getPersonID() \n {\n return $this->getValueByFieldName('person_id');\n }", "public function getBookingId() {\n return $this->bookingId;\n }", "public function getLedgerId();" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
List outlet product taxes. Returns a paginated list of outletproducttax records.
public function get( int $page_size = null, int $after = null, int $before = null, bool $deleted = null, string $outlet_id = null ): OutletTaxCollection { return $this->collection(OutletTaxCollection::class, '2.0/outlet_taxes', compact('outlet_id', 'after', 'before', 'page_size', 'deleted')); }
[ "public function getTaxes();", "function list_taxes()\n\t{\n\t\tlog_debug(\"accounts_taxes_manage_soap\", \"Executing list_taxes()\");\n\n\t\tif (user_permissions_get(\"accounts_taxes_view\"))\n\t\t{\n\t\t\t// fetch taxes\n\t\t\t$sql_obj\t\t= New sql_query;\n\t\t\t$sql_obj->string\t= \"SELECT id, name_tax, taxrate, chartid, taxnumber, description FROM account_taxes\";\n\t\t\t$sql_obj->execute();\n\n\t\t\t$return = NULL;\n\t\t\tif ($sql_obj->num_rows())\n\t\t\t{\n\t\t\t\t$sql_obj->fetch_array();\n\n\t\t\t\t// package data into array for passing back to SOAP client\n\t\t\t\tforeach ($sql_obj->data as $data)\n\t\t\t\t{\n\t\t\t\t\t$return_tmp\t\t\t= NULL;\n\t\t\t\t\t$return_tmp[\"id\"]\t\t= $data[\"id\"];\n\t\t\t\t\t$return_tmp[\"name_tax\"]\t\t= $data[\"name_tax\"];\n\t\t\t\t\t$return_tmp[\"taxrate\"]\t\t= $data[\"taxrate\"];\n\t\t\t\t\t$return_tmp[\"chartid\"]\t\t= $data[\"chartid\"];\n\t\t\t\t\t$return_tmp[\"chartid_label\"]\t= sql_get_singlevalue(\"SELECT CONCAT_WS('--', code_chart, description) as value FROM account_charts WHERE id='\". $data[\"chartid\"] .\"'\");\n\t\t\t\t\t$return_tmp[\"taxnumber\"]\t= $data[\"taxnumber\"];\n\t\t\t\t\t$return_tmp[\"description\"]\t= $data[\"description\"];\n\n\t\t\t\t\t$return[] = $return_tmp;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $return;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tthrow new SoapFault(\"Sender\", \"ACCESS_DENIED\");\n\t\t}\n\n\t}", "public function getAllTax()\n {\n return $this->taxService->getAll();\n }", "public static function getListTax() {\t\t\r\n\t\treturn Quick::single('accountant/list_tax')->cache()->getListTax();\r\n\t}", "public function getTaxInvoices() {\n return response()->json(TaxInvoice::all());\n }", "protected function taxesAction() {\n\t\t$this->_view->priceIncTax = $this->_configMapper->getConfigParam('showPriceIncTax');\n\t\t$this->_view->rules = array_map(function ($rule) {\n\t\t\treturn $rule->toArray();\n\t\t}, Models_Mapper_Tax::getInstance()->fetchAll());\n\t\t$this->_view->zones = array_map(function ($zone) {\n\t\t\treturn $zone->toArray();\n\t\t}, Models_Mapper_Zone::getInstance()->fetchAll());\n $this->_view->helpSection = Tools_Misc::SECTION_STORE_TAXES;\n $this->_layout->content = $this->_view->render('taxes.phtml');\n\t\techo $this->_layout->render();\n\t}", "public function getTaxons()\n {\n return $this->taxons;\n }", "function getTaxes()\n {\n // @ tax\n global $application;\n $retval = \"\";\n $this->_Tax_Item = array();\n $this->areIncludedTaxesPresent = false;\n\n if ($this->_form_style == ORDERS_INFO_ADVANCED_FORM)\n {\n foreach ($this->_order[\"Price\"][\"taxes\"] as $key => $value)\n {\n $this->_Tax_Item[\"TaxId\"] = $key;\n $this->_Tax_Item['TaxName'] = prepareHTMLDisplay($value[\"name\"]);\n $this->_Tax_Item['TaxAmount'] = ($value[\"value\"] == PRICE_N_A) ? 0.0000 : $value[\"value\"];\n $this->_Tax_Item[\"is_included\"] = $value[\"is_included\"];\n $retval .= $this->TemplateFiller->fill(\"checkout/\" . $this->template_folder . \"/\", \"order-tax-item.tpl.html\", array());\n\n if ($value[\"is_included\"] == 1)\n $this->areIncludedTaxesPresent = true;\n }\n }\n\n foreach ($this->_order[\"Price\"][\"tax_dops\"] as $key => $value)\n {\n $this->_Tax_Item[\"TaxId\"] = $key;\n $this->_Tax_Item['TaxName'] = prepareHTMLDisplay($value[\"name\"]);\n $this->_Tax_Item['TaxAmount'] = $value[\"value\"];\n\n $formula_array = array();\n $formula = explode(',', $value[\"formula\"]);\n foreach ($formula as $id)\n {\n $formula_array[] = $this->_order[\"Price\"][\"taxes\"][$id][\"name\"];\n }\n $this->_Tax_Item[\"formula\"] = implode(' + ', $formula_array);\n\n $retval .= $this->TemplateFiller->fill(\"checkout/\" . $this->template_folder . \"/\", \"order-tax-dis-op-item.tpl.html\", array());\n }\n\n // - .\n $res = modApiFunc(\"TaxExempts\", \"getOrderFullTaxExempts\", $this->order_id);\n if ($this->_form_style == ORDERS_INFO_SIMPLE_FORM)\n {\n if (sizeof($res) == 1)\n {\n $prices = getKeyIgnoreCase('price', $this->_order);\n $this->_Tax_Item[\"TaxId\"] = \"taxExemption\";\n $this->_Tax_Item['TaxName'] = getMsg('SYS', \"FULL_TAX_EXEMPT_MSG\");\n $this->_Tax_Item['TaxAmount'] = -1 * getKeyIgnoreCase(\"OrderTaxTotal\", $prices);\n $this->_Tax_Item[\"is_included\"] = 0;\n $retval .= $this->TemplateFiller->fill(\"checkout/\" . $this->template_folder . \"/\", \"order-tax-item.tpl.html\", array());\n }\n }\n else if ($this->_form_style == ORDERS_INFO_ADVANCED_FORM\n && count($this->_order[\"Price\"][\"taxes\"]) > 0)\n {\n $taxExemptEnabled = modApiFunc('Settings','getParamValue','TAXES_PARAMS','ALLOW_FULL_TAX_EXEMPTS');\n if (sizeof($res) == 1)\n {\n $this->_Tax_Item[\"TaxId\"] = \"taxExemption\";\n $this->_Tax_Item['TaxName'] = getMsg('SYS',\"FULL_TAX_EXEMPT_MSG\");\n $this->_Tax_Item['TaxAmount'] = \"<input type=checkbox name='taxExemption' checked onFocus='setPricesAsEdited();'>\";\n $this->_Tax_Item[\"is_included\"] = 0;\n $retval .= $this->TemplateFiller->fill(\"checkout/\" . $this->template_folder . \"/\", \"order-tax-item.tpl.html\", array());\n }\n else if ($taxExemptEnabled == \"true\")\n {\n // is ALLOW_FULL_TAX_EXEMPTS enabled?\n $this->_Tax_Item[\"TaxId\"] = \"taxExemption\";\n $this->_Tax_Item['TaxName'] = getMsg('SYS',\"FULL_TAX_EXEMPT_MSG\");\n $this->_Tax_Item['TaxAmount'] = '<input type=\"checkbox\" name=\"taxExemption\" onFocus=\"setPricesAsEdited();\">';\n $this->_Tax_Item[\"is_included\"] = 0;\n $retval .= $this->TemplateFiller->fill(\"checkout/\" . $this->template_folder . \"/\", \"order-tax-item.tpl.html\", array());\n }\n }\n\n // show warning about included taxes\n if ($this->_form_style == ORDERS_INFO_ADVANCED_FORM\n && $this->areIncludedTaxesPresent == true\n && $this->DisplayIncludedTax == true)\n {\n $this->_Tax_Item[\"TaxId\"] = 0;\n $this->_Tax_Item['TaxName'] = getMsg('SYS',\"INCLUDED_TAX_EDIT_MSG\");\n $this->_Tax_Item['TaxAmount'] = '';\n $this->_Tax_Item[\"is_included\"] = 0;\n $retval .= $this->TemplateFiller->fill(\"checkout/\" . $this->template_folder . \"/\", \"order-tax-item.tpl.html\", array());\n }\n\n return $retval;\n }", "public function taxesAction()\n\t{\n\t\t$this->view->headScript()->appendScript(\"\n\t\t$(document).ready(function() {\n\t\t\tvar i = 1;\n\t\t\t$(\\\"a.add-link\\\").click(function() {\n \t\t\t\t$(\\\"#taxes-table tr:last\\\").clone().find(\\\"input\\\").each(function() {\n \t\t\t\t$(this).val('').attr('name', function(_, id) { return id + i });\n \t\t\t\t}).end().appendTo(\\\"#taxes-table\\\");\n \t\t\t\ti++;\n\t\t\t});\n\t\t\t\n\t\t\t$(\\\"a.delete-link\\\").live(\\\"click\\\", function() {\n\t\t\t\t$(this).parent().parent().remove();\n\t\t\t});​\n\t\t});​\");\n\t\t\n\t\t$request = $this->getRequest();\n if ($request->isPost()) {\n \t$taxes = array();\n \t$params = $request->getParams();\n \tfor ($i=0;$i<count($params['description']);$i++) {\n \t\t$taxes[] = array(\n \t\t\t'id'\t\t\t=> $params['tax_id'][$i],\n \t\t\t'description'\t=> $params['description'][$i],\n \t\t\t'amount'\t\t=> $params['amount1'][$i],\n \t\t\t'amount_2'\t\t=> $params['amount2'][$i]\n \t\t);\n \t}\n \t\n \t// ToDo: Save taxes\n }\n \n $taxes_table = new ZendInvoices_Db_table_Taxes();\n $this->view->taxes = $taxes_table->fetchAll();\n\t}", "public function getTaxes()\n {\n return $this->taxes;\n }", "public function getObjectsWhereTaxonIs(){}", "public function getAllSettingTaxes()\n {\n\treturn $this->setRequestData(self::RESOURCE_SETTING_TAXES);\n }", "public function getTaxes() {\n return $this->taxes;\n }", "public function index()\n {\n $input = Request::all();\n $limit = isset($input['limit']) ? $input['limit'] : config('jp.pagination_limit');\n $taxes = $this->repo->getListing($input);\n\n if (!$limit) {\n $taxes = $taxes->get();\n\n return ApiResponse::success($this->response->collection($taxes, new CustomTaxesTransformer));\n }\n $taxes = $taxes->paginate($limit);\n\n return ApiResponse::success($this->response->paginatedCollection($taxes, new CustomTaxesTransformer));\n }", "function get_list_taxonomi()\n\t{\n\t\t$query = $this->db->get('taxonomi');\n\t\treturn $query->result();\n\t}", "public function all()\n {\n return response()->json([\n 'taxes' => $this->taxes->all()\n ], 200);\n }", "public function addProductTaxClassesToResult()\n {\n return $this->_add('tax_class', 'product_tax_class_id', 'class_id', 'class_name', 'product_tax_classes');\n }", "public function indexAction()\n {\n $em = $this->getDoctrine()->getManager();\n\n $taxes = $em->getRepository('AppBundle:Taxe')->findAll();\n\n return $this->render('taxe/index.html.twig', array(\n 'taxes' => $taxes,\n ));\n }", "public function taxes()\n {\n return $this->belongsToMany(\n config('core.acl.tax_model'),\n config('core.acl.invoice_item_taxes_table')\n )->withPivot(\"item_tax\");\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
The merge analysis results for this data set.
public function getMergeAnalyses() { return $this->mergeAnalyses; }
[ "public function getMergeAnalyses() {\n return $this->mergeAnalyses;\n }", "public function merge();", "public function merge()\n\t{\n\t}", "public function testMergeResultsWithAllCases()\n {\n $validationResults = new ValidationResults();\n $validationResults->addGlobalError('err901');\n $validationResults->addFieldError('err911', 'field911');\n $validationResults->addFieldError('err912', 'field911');\n\n $otherValidationResults = new ValidationResults();\n $otherValidationResults->addGlobalError('err902');\n $otherValidationResults->addFieldError('err913', 'field911');\n $otherValidationResults->addGlobalError('err903');\n $otherValidationResults->addFieldError('err921', 'field921');\n\n $validationResults->mergeResults($otherValidationResults);\n\n $expected = [\n 'global' => [ 'err901', 'err902', 'err903' ],\n 'field911' => [ 'err911', 'err912', 'err913' ],\n 'field921' => [ 'err921' ]\n ];\n\n $this->assertEquals($expected, $validationResults->result());\n }", "function mergedata($mergeRS)\r\n {\r\n\t\t//-- now merge data\r\n\t\twhile(!$mergeRS->eof)\r\n\t\t{\r\n\t\t\t$this->recorddata[$this->recordcount++] = $mergeRS->recorddata[$mergeRS->currentrow];\r\n\t\t\t$mergeRS->movenext();\r\n\t\t}\r\n\t\t$this->movefirst();\r\n }", "public function getMerges() {\n return $this->merges;\n }", "function merged_output()\n\t{\n\t\treturn $this->get_conflicts_content();\n\t}", "protected function _merge()\n\t{\n\t\treturn Arr::merge($this->_data, $this->_changed);\n\t}", "public function getMerges()\n {\n return $this->merges;\n }", "public function mergeWith(Result $objects): Result;", "public function combineResults(): array\r\n {\r\n $WorkingResults = [];\r\n\r\n // Combine the results\r\n if($this->DLTC_Results !== null)\r\n {\r\n foreach($this->DLTC_Results as $DLTC_Result)\r\n {\r\n /** @noinspection DuplicatedCode */\r\n if(isset($WorkingResults[$DLTC_Result->Language]) == false)\r\n {\r\n $WorkingResults[$DLTC_Result->Language] = new LanguagePredictions();\r\n $WorkingResults[$DLTC_Result->Language]->Language = $DLTC_Result->Language;\r\n }\r\n\r\n $WorkingResults[$DLTC_Result->Language]->Probabilities[] = $DLTC_Result->Probability;\r\n $WorkingResults[$DLTC_Result->Language]->updateProbability();\r\n }\r\n }\r\n\r\n if($this->CLD_Results !== null)\r\n {\r\n foreach($this->CLD_Results as $CLD_Result)\r\n {\r\n /** @noinspection DuplicatedCode */\r\n if(isset($WorkingResults[$CLD_Result->Language]) == false)\r\n {\r\n $WorkingResults[$CLD_Result->Language] = new LanguagePredictions();\r\n $WorkingResults[$CLD_Result->Language]->Language = $CLD_Result->Language;\r\n }\r\n\r\n $WorkingResults[$CLD_Result->Language]->Probabilities[] = $CLD_Result->Probability;\r\n $WorkingResults[$CLD_Result->Language]->updateProbability();\r\n }\r\n }\r\n\r\n if($this->LD_Results !== null)\r\n {\r\n foreach($this->LD_Results as $LD_Result)\r\n {\r\n /** @noinspection DuplicatedCode */\r\n if(isset($WorkingResults[$LD_Result->Language]) == false)\r\n {\r\n $WorkingResults[$LD_Result->Language] = new LanguagePredictions();\r\n $WorkingResults[$LD_Result->Language]->Language = $LD_Result->Language;\r\n }\r\n\r\n $WorkingResults[$LD_Result->Language]->Probabilities[] = $LD_Result->Probability;\r\n $WorkingResults[$LD_Result->Language]->updateProbability();\r\n }\r\n }\r\n\r\n // Combine \"ZH\" predictions into zh-cn and zh-tw\r\n if(isset($WorkingResults[\"zh\"]))\r\n {\r\n if(isset($WorkingResults[\"zh-cn\"]))\r\n {\r\n foreach($WorkingResults[\"zh\"]->Probabilities as $probability)\r\n {\r\n $WorkingResults[\"zh-cn\"]->Probabilities[] = $probability;\r\n }\r\n }\r\n\r\n if(isset($WorkingResults[\"zh-tw\"]))\r\n {\r\n foreach($WorkingResults[\"zh\"]->Probabilities as $probability)\r\n {\r\n $WorkingResults[\"zh-tw\"]->Probabilities[] = $probability;\r\n }\r\n }\r\n\r\n unset($WorkingResults[\"zh\"]);\r\n }\r\n\r\n // Sort the results\r\n $SortedResults = array();\r\n for ($i = 0; $i < count($WorkingResults); $i++)\r\n {\r\n $LargestProbability = null;\r\n $CurrentSelection = null;\r\n\r\n foreach($WorkingResults as $prediction)\r\n {\r\n if(isset($SortedResults[$prediction->Language]) == false)\r\n {\r\n if($prediction->Probability > $LargestProbability)\r\n {\r\n $LargestProbability = $prediction->Probability;\r\n $CurrentSelection = $prediction;\r\n }\r\n }\r\n }\r\n\r\n if($CurrentSelection !== null)\r\n {\r\n $SortedResults[$CurrentSelection->Language] = $CurrentSelection;\r\n }\r\n }\r\n\r\n // Organize the results into an array\r\n $Results = array();\r\n foreach($SortedResults as $prediction)\r\n {\r\n $Results[] = $prediction;\r\n }\r\n\r\n return $Results;\r\n }", "public function merge()\n\t{\n\t\t$this->_originals = $this->_data;\n\t}", "public function merge() {\n\t\t//lookup for data\n\t\tstatic $sel_np = null;\n\t\tstatic $sel_p = null;\n\t\tstatic $update = null;\n\t\tstatic $sel_exact = null;\n\n\t\t$log = JLogger::getLogger('utils.import.raadsstuk');\n\t\t\n\t\tif (defined('REGION_ACCESS') && !isset($GLOBALS['REGION_ACCESS_LIST'][$this->region->getId()]))\n\t\t\tthrow new RuntimeException('Not allowed to merge documents for region: '.$this->region->getName());\n\n\t\t$parent = $this->submitter->getParentRaadstukId();\n\t\tif($sel_np == null) $sel_np = $this->db->prepare('SELECT r.id, r.result, r.show, r.region FROM rs_raadsstukken r WHERE r.region = :region AND r.title = :title\n\t\t AND r.vote_date = :vote_date AND r.summary = :summary\n\t\t AND r.code = :code AND r.type = :type\n\t\t AND r.submitter = :submitter AND r.site_id = :site_id AND r.parent IS NULL');\n\t\t\n\t\tif($sel_p == null) $sel_p = $this->db->prepare('SELECT r.id, r.result, r.show, r.region FROM rs_raadsstukken r WHERE r.region = :region AND r.title = :title\n\t\t AND r.vote_date = :vote_date AND r.summary = :summary\n\t\t AND r.code = :code AND r.type = :type\n\t\t AND r.submitter = :submitter AND r.site_id = :site_id AND r.parent = :parent');\n\t\t\n\t\tif($sel_exact == null) $sel_exact = $this->db->prepare('SELECT r.id, r.result, r.show, r.region FROM rs_raadsstukken r WHERE id = :id');\n\t\t\n\t\t\n\t\t$sel = $this->localid? $sel_exact: ($parent == null? $sel_np: $sel_p);\n\t\t\n\t\t$data = $this->localid? array(':id' => $this->localid): array(\n\t\t\t':region' => $this->region->getId(),\n\t\t\t':title' => $this->title,\n\t\t\t':vote_date' => $this->vote_date,\n\t\t\t':summary' => $this->summary,\n\t\t\t':code' => $this->code,\n\t\t\t':type' => $this->getSubmitter()->getTypeRef(),\n\t\t\t':submitter' => $this->getSubmitter()->getSubmitterRef(),\n\t\t\t':site_id' => $this->site->getId()\n\t\t);\n\t\tif(empty($this->localid) && $parent != null) $data[':parent'] = $parent;\n\t\t\n\t\t$log->debug(\"Looking for existing raadsstuk \" . ($this->localid? \"id: {$this->localid}\": \"'{$this->title}'\"));\n\t\tif(!$sel->execute($data)) throw new RuntimeException(\"Database error. Can't fetch raadsstuk.\");\n\t\t\n\t\tif(!($rad = $sel->fetch(PDO::FETCH_ASSOC))) {\n\t\t\t$log->debug(\"Raadsstuk not found, creating new one.\");\n\t\t\treturn $this->create(); //create new raadsstuk\n\t\t} else { //merge data\n\t\t\tif (defined('REGION_ACCESS') && !isset($GLOBALS['REGION_ACCESS_LIST'][$rad['region']]))\n\t\t\t\tthrow new RuntimeException(\"Not allowed to merge documents in region: {$rad['region']}\");\n\t\t\t\n\t\t\t$log->debug(\"Found existing raadsstuk: {$rad['id']}. Merging contents.\");\n\t\t\tif($rad['result'] != $this->getVoteBlock()->getResult() || $rad['show'] != $this->show) {\n\t\t\t\t$log->preUpdate(\"Changing result state to: {$this->getVoteBlock()->getResult()} and show state to: \".($this->show? 'yes': 'no'));\n\t\t\t\t\n\t\t\t\tif($update == null) {\n\t\t\t\t\t$update = $this->db->prepare('UPDATE rs_raadsstukken SET result = :result, show = :show WHERE id = :id');\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tif(defined('DRY_RUN')) throw new RuntimeException(\"Before updating raadsstuk: \".$rad['id']);\n\t\t\t\t$update->execute(array(\n\t\t\t\t\t':id' => $rad['id'],\n\t\t\t\t\t':result' => $this->getVoteBlock()->getResult(),\n\t\t\t\t\t':show' => $this->show? 1: 0\n\t\t\t\t));\n\t\t\t\t\n\t\t\t\tif($update->rowCount() != 1) throw new RuntimeException(\"Can't update raadstuk: {$rad['id']}, database error!\");\n\t\t\t\t$log->postUpdate(\"Successfully updated existing raadsstuk: {$rad['id']}\");\n\t\t\t}\n\t\t\t\n\t\t\t//merge categories\n\t\t\t$log->preUpdate(\"Merging categories of raadsstuk: {$rad['id']} with \".sizeof($this->categories).\" categories from import.\");\n\t\t\tstatic $selcats = null;\n\t\t\tif($selcats == null) $selcats = $this->db->prepare('SELECT category FROM '.self::CATEGORIES_TABLE.' WHERE raadsstuk = :radid');\n\t\t\t\n\t\t\t$selcats->execute(array(':radid' => $rad['id']));\n\t\t\t$existing_categories = array();\n\t\t\tforeach ($selcats as $ct) $existing_categories[$ct['category']] = true;\n\t\t\t\n\t\t\tstatic $cats = null;\n\t\t\tif($cats == null) $cats = $this->db->prepare('INSERT INTO '.self::CATEGORIES_TABLE.'(raadsstuk, category) VALUES(:raadsstuk, :category)');\n\n\t\t\t$i = 0;\n\t\t\tforeach ($this->categories as $catid) {\n\t\t\t\tif(!isset($existing_categories[$catid])) {\n\t\t\t\t\tif(defined('DRY_RUN')) throw new RuntimeException(\"Before assigning category {$catid} to raadsstuk: {$rad['id']}\");\n\t\t\t\t\t$cats->execute(array(':raadsstuk' => $rad['id'], ':category' => $catid));\n\t\t\t\t\t$i += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tunset($existing_categories);\n\t\t\t$log->postUpdate($i == 0? \"No new categories were added to raadsstuk: {$rad['id']}\": \"Successfully linked {$i} new categories with raadsstuk id: {$rad['id']}\");\n\t\t\t\n\t\t\t//merge categories\n\t\t\t$log->preUpdate(\"Merging tags of raadsstuk: {$rad['id']} with \".sizeof($this->tags).\" categories from import.\");\n\t\t\tstatic $seltags = null;\n\t\t\tif($seltags == null) $seltags = $this->db->prepare('SELECT tag FROM '.self::TAGS_TABLE .' WHERE raadsstuk = :radid');\n\t\t\t\n\t\t\t$seltags->execute(array(':radid' => $rad['id']));\n\t\t\t$existing_tags = array();\n\t\t\tforeach ($seltags as $tg) $existing_tags[$tg['tag']] = true;\n\t\t\t\n\t\t\tstatic $tags = null;\n\t\t\tif($tags == null) $tags = $this->db->prepare('INSERT INTO '.self::TAGS_TABLE .'(raadsstuk, tag) VALUES(:raadsstuk, :tag)');\n\n\t\t\t$i = 0;\n\t\t\tforeach ($this->tags as $tagid) {\n\t\t\t\tif(!isset($existing_tags[$tagid])) {\n\t\t\t\t\tif(defined('DRY_RUN')) throw new RuntimeException(\"Before assigning tag {$tagid} to raadsstuk: {$rad['id']}\");\n\t\t\t\t\t$tags->execute(array(':raadsstuk' => $rad['id'], ':tag' => $tagid));\n\t\t\t\t\t$i += 1;\n\t\t\t\t}\n\t\t\t}\n\t\t\t$log->postUpdate($i == 0? \"No new tags were added to raadsstuk: {$rad['id']}\": \"Successfully linked {$i} new tags with raadsstuk id: {$rad['id']}\");\n\t\t\n\t\t\t$this->getSubmitter()->merge($rad['id']);\n\t\t\t$this->getVoteBlock()->merge($rad['id']);\n\t\t\t\n\t\t\treturn $rad['id'];\n\t\t}\n\t}", "public function merged()\n {\n return $this->updateRowspan();\n }", "protected function getMergingRelationResults(): Collection\n {\n return $this->with\n ? $this->with->recursive($this->recursive)->get()\n : $this->parent->newCollection();\n }", "private function mergeResultsUsingJoinBy($resultsSetArray, $reportDefinitionObject, $join) {\n $mergedArray = array();\n\n $reportDefinitionObject->resetJoinBy();\n\n $this->validateJoinById($resultsSetArray, $reportDefinitionObject, $join);\n\n $joinByCount = $reportDefinitionObject->getJoinByCount($join);\n\n if ($joinByCount != 1) {\n $joinBy = $reportDefinitionObject->getCurrentJoinBy($join);\n $subReportName = $reportDefinitionObject->getJoinBySubReport($joinBy);\n if (is_null($subReportName) || empty($subReportName)) {\n throw new ReportException(\"Invalid XML Definition!!! ( Join By Attribute 'sub_report' should be defined )\");\n }\n\n $id1 = $reportDefinitionObject->getJoinById($joinBy);\n if (is_null($id1) || empty($id1)) {\n throw new ReportException(\"Invalid XML Definition!!! ( Join By Attribute 'id' should be defined )\");\n }\n\n $mergedArray = $resultsSetArray[$subReportName];\n\n for ($i = 0; $i < ($joinByCount - 1); $i++) {\n $midResult = array();\n $joinBy = $reportDefinitionObject->getNextJoinBy($join);\n $subReportName = $reportDefinitionObject->getJoinBySubReport($joinBy);\n if (is_null($subReportName) || empty($subReportName)){\n throw new ReportException(\"Invalid XML Definition!!! ( Join By Attribute 'sub_report' should be defined )\");\n }\n\n $id2 = $reportDefinitionObject->getJoinById($joinBy);\n if (is_null($id2) || empty($id2)) {\n throw new ReportException(\"Invalid XML Definition!!! ( Join By Attribute 'id' should be defined )\");\n }\n\n $result = $resultsSetArray[$subReportName];\n \n foreach ($mergedArray as $row1) {\n $matchFound = FALSE;\n $keysTake = FALSE;\n $row2Keys = array();\n //If Result set is empty fill with null values \n if(count($result) == 0 ){\n $fieldList = $reportDefinitionObject->getSubReportFields($subReportName);\n $result = array(array_merge(array($id2=>$id1),$fieldList));\n }\n \n \n foreach ($result as $row2) {\n if ($row1[$id1] == $row2[$id2]) {\n $midResult[] = array_merge($row1, $row2);\n $matchFound = TRUE;\n }\n\n if (!$keysTake) {\n $row2Keys = array_keys($row2);\n // remove id key\n if(($idkey = array_search($id2, $row2Keys)) !== false) {\n unset($row2Keys[$idkey]);\n }\n $keysTake = TRUE;\n }\n }\n if (!$matchFound) {\n $midResult[] = array_merge($row1, array_fill_keys($row2Keys, null));\n }\n }\n $mergedArray = $midResult;\n }\n } else if ($joinByCount == 1) {\n $mergedArray = $resultsSetArray;\n }\n//var_dump($mergedArray);\n $reportDefinitionObject->resetJoinBy();\n return $mergedArray;\n }", "public function getCombinedData()\n {\n $whereData = $this->getWhereData();\n return array_merge($this->getData(), $whereData);\n }", "public function merge(array $data);", "public function getResult() {\n return $this->dataToImport;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
just uppercases the http method
public function get_normalized_http_method() { return strtoupper($this->http_method); }
[ "public function get_normalized_http_method() {\n return strtoupper($this->http_method);\n }", "private function requestMethod() {\n\t\treturn strtoupper($this->request_method);\n\t}", "protected function httpMethod()\n {\n }", "public function getNormalizedHttpMethod()\n {\n return strtoupper($this->_httpMethod);\n }", "public function get_normalized_http_method() {\n\t\treturn strtoupper( $_SERVER['REQUEST_METHOD'] );\n\t}", "function http_request_method_name ($method) {}", "private function setHttpMethod() {\r\n $this->httpMethod = $_SERVER['REQUEST_METHOD'];\r\n }", "public function fix_http_method() {\n\t\tif (isset ( $_POST ['_method'] )) {\n\t\t\tif ($_POST ['_method'] === 'PUT') {\n\t\t\t\t$_SERVER ['REQUEST_METHOD'] = 'PUT';\n\t\t\t} else if ($_POST ['_method'] === 'DELETE') {\n\t\t\t\t$_SERVER ['REQUEST_METHOD'] = 'DELETE';\n\t\t\t}\n\t\t}\n\t}", "private function prepare_method() {\n $this->request_settings['method'] = strtoupper($this->request_settings['method']);\n }", "public static function getMethodUpper() {\n if (!isset(self::$methodUpper)) {\n self::setRequestMethods($_SERVER['REQUEST_METHOD']);\n }\n return self::$methodUpper;\n }", "public function getHttpMethod();", "public function getRealMethod() {\n return strtoupper($this->server->get('REQUEST_METHOD', 'GET'));\n }", "public function getRealMethod()\n {\n return strtoupper($this->getServerParam('REQUEST_METHOD', 'GET'));\n }", "public function resolveMethod()\n {\n $value = $this->_value( @$_SERVER['REQUEST_METHOD'], '' );\n $value = $this->_value( @$_SERVER['HTTP_X_HTTP_METHOD'], $value );\n $this->method = strtolower( trim( $value ) );\n }", "public function getRealMethod()\n {\n return strtoupper($this->server->get('REQUEST_METHOD', 'GET'));\n }", "protected function getHttpMethod()\n {\n return 'GET';\n }", "private function _detect_method()\n {\n \t$method = strtolower($this->input->server('REQUEST_METHOD'));\n \tif(in_array($method, array('get', 'delete', 'post', 'put')))\n \t{\n\t \treturn $method;\n \t}\n\n \treturn 'get';\n }", "public function getHTTPVerb(): string\n {\n return $this->HTTPVerb;\n }", "public function getHttpMethods()\n {\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the request body, ensuring it is an array
public function getBodyAsArray(): array { $body = $this->getBody(); if (!is_array($body)) { throw new BadRequestException( 'invalid_body', 'The provided request body was not formed as an object' ); } return $body; }
[ "public function getBody()\n {\n $body = [];\n\n if ($this->method() === 'GET') {\n foreach ($_GET as $key => $value) {\n $body[$key] = filter_var($value);\n }\n }\n\n if ($this->method() === 'POST') {\n foreach ($_POST as $key => $value) {\n $body[$key] = filter_var($value);\n }\n }\n\n return $body;\n }", "protected function retrieveRequestBody()\n {\n // the 'body' param contains a decoded copy of the request body.\n $requestInput = $this->request->getUserParam('body');\n if (!$requestInput) {\n throw new Interspire_Response_BodyNotSupplied();\n }\n return $requestInput;\n }", "public function body()\n {\n if($this->request['body'] === null)\n {\n $this->request['body'] = file_get_contents('php://input');\n }\n \n return $this->request['body'];\n }", "protected function getRequestBody()\n\t{\n\t\treturn $this->request->getContent();\n\t}", "public function getRequestBody() {\n return $this->data['request_body'];\n }", "private function extractArrayFromRequest()\n {\n $content = $this->getRequest()->getContent();\n if (empty($content)) {\n throw new BadRequestHttpException(\"Empty payload!\");\n }\n\n $data = json_decode($content, true);\n if (!is_array($data)) {\n throw new BadRequestHttpException(\"Payload is not parsable!\");\n }\n\n return $data;\n }", "public function getParsedBody()\n {\n return json_decode($this->getBody());\n }", "function getBody() {\n return json_decode(file_get_contents(\"php://input\"),true);\n}", "protected function getRequestBody() {\n\t\t$body = null;\n\t\tif($this->method == 'POST' || $this->method == 'PUT') {\n\t\t\t$body = '';\n\t\t\t$fh = @fopen('php://input', 'r');\n\t\t\tif($fh) {\n\t\t\t\twhile(! feof($fh)) {\n\t\t\t\t\t$chunk = fread($fh, 1024);\n\t\t\t\t\tif(is_string($chunk)) {\n\t\t\t\t\t\t$body .= $chunk;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tfclose($fh);\n\t\t\t}\n\t\t}\n\n\t\treturn $body;\n\t}", "public function getRawBody()\n {\n return file_get_contents('php://input');\n }", "public function get_request_body()\n {\n }", "public function getTrustedBody(): array;", "function request_body() {\n\n $content_type = isset($_SERVER['HTTP_CONTENT_TYPE']) ?\n $_SERVER['HTTP_CONTENT_TYPE'] :\n $_SERVER['CONTENT_TYPE'];\n\n $content = file_get_contents('php://input');\n\n if ($content_type[0] == 'application/json')\n $content = json_decode($content);\n else if ($content_type[0] == 'application/x-www-form-urlencoded')\n parse_str($content, $content);\n\n return $content;\n}", "public function getHTTPBody();", "public function getBody()\n\t{\n // If $rawBody is set then we will return it instead of php://input\n $data = ($this->rawBody) ? $this->rawBody : file_get_contents(\"php://input\");\n\n return $data;\n\t}", "protected function getJsonPayload()\n {\n return (array) json_decode(Request::getContent(), true);\n }", "function getBodyJSON()\r\n\t{\r\n\t\treturn json_decode($this->_body, true);\r\n\t}", "public function getRawBody()\n {\n static $rawBody;\n if ($rawBody === null) {\n $rawBody = file_get_contents('php://input');\n }\n return $rawBody;\n }", "public function testBodyArray()\n {\n $request = new Request();\n $data = [\n 'a' => 'b',\n 'c' => 'd',\n 'e' => ['f', 'g']\n ];\n $request->body($data);\n $this->assertEquals('application/x-www-form-urlencoded', $request->getHeaderLine('content-type'));\n $this->assertEquals(\n 'a=b&c=d&e%5B0%5D=f&e%5B1%5D=g',\n $request->body(),\n 'Body should be serialized'\n );\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the latest Item function v1.0 Functions to Get the latest Item $items : items to count userid, username , $table : the name of table $limit the number of items to show orderby :tarteeb bel [userid]
function getLatest($item , $table ,$order, $limit=5){ global $db ; $getStmt = $db ->prepare("SELECT $item FROM $table ORDER BY $order DESC LIMIT $limit"); $getStmt ->execute(); $rows = $getStmt ->fetchAll(); return $rows; }
[ "public function getLatestItem();", "function latestItems($select, $table, $order, $limit) {\r\n global $con;\r\n $stmt = $con->prepare(\"SELECT $select FROM $table ORDER BY $order DESC LIMIT $limit\");\r\n $stmt->execute();\r\n $rows = $stmt->fetchAll();\r\n return $rows;\r\n }", "function getPageNotifications($userId, $items, $offset){\n global $conn;\n $stmt = $conn->prepare('SELECT *\n FROM notification\n WHERE user_id = ?\n ORDER BY is_new DESC , date DESC\n LIMIT ?\n OFFSET ?');\n $stmt->execute(array($userId, $items, $offset));\n $result = $stmt->fetchAll();\n return $result;\n}", "function get_last_5_ventas(){\n $sql='SELECT productos_de_la_venta.venta_id, CONCAT(usuarios.nombre, \" \", usuarios.apellido_paterno, \" \", usuarios.apellido_materno) AS vendedor, Sum(productos_de_la_venta.precio_venta) AS total_venta, ventas.created_at FROM ventas INNER JOIN usuarios ON usuarios.id = ventas.usuario_id INNER JOIN productos_de_la_venta ON ventas.id = productos_de_la_venta.venta_id GROUP BY productos_de_la_venta.venta_id LIMIT 5';\n return get_items($sql);\n}", "function getLatestTableByItemId($itemId, $fields='app.*') {\n return $this->getApprovalTableItemId($itemId, $fields, ' LIMIT 1');\n }", "public function getRecentItems($limit = 10) {\n \n if (!is_numeric($limit))\n return;\n \n global $db;\n \n $avaiableTime = date('Y-m-d H:i:s', time() - TRADE_ITEM_LIFETIME * 3600 * 24);\n \n $query = sprintf(\"\n SELECT tItem.*, user.firstName, user.lastName \n FROM %s AS tItem \n LEFT JOIN %s AS user ON tItem.userID=user.userID \n WHERE tItem.status=%d AND tItem.createdDate >='%s' ORDER BY tItem.createdDate DESC LIMIT %d \n \n \", TABLE_TRADE_ITEMS, TABLE_USERS, BuckysTradeItem::STATUS_ITEM_ACTIVE, $avaiableTime, $limit);\n\n $result = $db->getResultsArray($query);\n \n return $result;\n }", "public function getRecentItems($user_id = NULL) {\n\t\tif($user_id)\n\t\t{\n\t\t\t$sql = \"SELECT item_id, item_name, item_desc, Items.community_id, item_category_id,\n\t\t\t\t\titem_rent,item_end_date, item_img_name, item_img_ext, item_thumb_name FROM Items,Members\n\t\t\t\t\tWHERE Items.community_id = Members.community_id and Members.member_id = ?\n\t\t\t\t\tORDER BY Items.item_id DESC LIMIT 5\";\n\t\t\t$query = $this->db->query($sql, array($user_id));\n\t\t\t$error = $this->db->error();\n\t\t\tif($error['code'] > 0 OR $query == FALSE) {\n\t\t\t\treturn -1; // error\n\t\t\t}\n\t\t\t$result = $query->result();\n\t\t\treturn $result;\n\t\t}\n\t}", "public function showLatest()\n {\n $this->_pItem = ObjectPool::getInstance()->getObjectWithId(\"latest\");\n $rows = $this->_pItem->runQuery();\n\n $number = 0;\n if ($rows > 0) {\n $calculatePageArray = calculatePage($rows);\n $start = ($calculatePageArray[0] - 1) * $GLOBALS['general']['itemPerPage'];\n $this->_pItem->runQuery($start, $GLOBALS['general']['itemPerPage']);\n $result = $this->_pItem->getResultSet();\n echo '<div class=\"row items-board\">';\n while ($row = $result->fetch_assoc()) {\n $number++;\n $this->_runnerName = $row['field_item_name'];\n $this->_pItem = ObjectPool::getInstance()->getObjectWithId($row['field_item_name']);\n $item_id = $row['id_item'];\n $condition = \"WHERE id = $item_id\";\n $this->_pItem->runQuery($condition);\n $fetchItemRow = $this->_pItem->getResultSet();\n while ($itemRow = $fetchItemRow->fetch_assoc()) {\n $this->_itemNumber = $number;\n $this->showItemWithId($itemRow);\n }\n }\n echo '</div>';\n $get_array = $_GET;\n search_item_pagination($calculatePageArray[0], $calculatePageArray[1], $get_array);\n } else {\n $this->itemNotFound();\n }\n }", "function recentItem($sales_orderid)\n{\n dbConnect();\n $sql = \"SELECT sales_itemid FROM sales_items WHERE sales_orderid='$sales_orderid' ORDER BY sales_itemid DESC LIMIT 1\";\n $result = mysql_fetch_array(mysql_query($sql));\n\n $mostrecentItem = $result[\"sales_itemid\"];\n\n return $mostrecentItem;\n}", "function getLatest($select, $table, $order, $limit = 5){\n \n global $con;\n\n $getStmt = $con->prepare(\"SELECT $select FROM $table ORDER BY $order DESC LIMIT $limit\");\n \n $getStmt->execute();\n \n $rows = $getStmt->fetchAll();\n \n return $rows; \n \n \n }", "Function getLatest($select, $table, $order, $limit = 5){\n\tglobal $con;\n\n\t$stmt = $con->prepare(\"SELECT $select FROM $table ORDER BY $order DESC LIMIT $limit \");\n\n\t$stmt->execute();\n\n\t$rows = $stmt->fetchAll();\n\n\treturn $rows;\n}", "function getLatest($select, $table, $order, $limit = 5){\n\n global $con;\n\n $getStmt = $con->prepare(\"SELECT $select FROM $table ORDER BY $order DESC LIMIT $limit\");\n\n $getStmt->execute();\n\n $rows = $getStmt->fetchAll();\n\n return $rows;\n }", "function getLatest($select , $table , $order , $limit = 5) {\n\t\t\n\t\tglobal $conn ;\n\t\t\n\t\t$stmt = $conn->prepare(\"SELECT $select FROM $table ORDER BY $order DESC LIMIT $limit\") ;\n\t\t$stmt->execute() ;\n\t\t$rows = $stmt->fetchAll();\n\t\t\n\t\treturn $rows ;\n\t}", "function USER_HISTORY_RecentUsedItems( $dbx, $id_biblioteca, $id_usuario, $num_themes = 5 )\r\n{\r\n\tglobal $CFG;\r\n\r\n\trequire_once( \"config_db.inc.php\" );\r\n\trequire_once( \"phps/circulacion.inc.php\" );\r\n\r\n\t$items= Array();\r\n\t\t\r\n\techo \"\\n\\n<!-- ITEMS RECENTLY USED (borrowed or reserved) -->\\n\";\r\n\t$total = 0;\r\n\t\r\n\t//\r\n\t// PRIMERO PRESTAMOS\r\n\t//\r\n\tif( $CFG->db_type == \"mysql\" )\r\n\t{\r\n\t}\r\n\telse if( $CFG->db_type == \"interbase\" )\r\n\t{\r\n\t\t$dbx->sql = \"SELECT FIRST 10 DISTINCT(b.ID_ITEM) \" .\r\n\t\t\t\t \"FROM prestamos_mst a \" .\r\n\t\t\t\t \" LEFT JOIN prestamos_det b ON (b.ID_BIBLIOTECA=a.ID_BIBLIOTECA and b.ID_PRESTAMO=a.ID_PRESTAMO) \" .\r\n\t\t\t\t \"WHERE a.ID_BIBLIOTECA=$id_biblioteca and a.ID_USUARIO=$id_usuario and (b.ID_ITEM is NOT NULL) \" .\r\n\t\t\t\t \"ORDER BY FECHA_PRESTAMO DESC \";\r\n\t}\r\n\t\r\n \t$dbx->Open();\r\n\t\r\n\t$titulos = Array();\r\n\t\r\n\twhile( $dbx->NextRow(1) )\r\n\t{\r\n\t\t$total++;\r\n\t\t\r\n\t\t$item = new TItem_Basic( $id_biblioteca, $dbx->row[\"ID_ITEM\"], 1, $dbx );\r\n\t\t\r\n\t\tif( !in_array( $item->nIDTitulo, $titulos ) ) \r\n\t\t{\t\t\r\n\t\t\t$titulos[] = $item->nIDTitulo;\r\n\t\t\t\r\n\t\t\tif( strlen($item->cTitle_ShortVersion) > 75 ) \r\n\t\t\t{\r\n\t\t\t\t$item->cTitle_ShortVersion = substr( $item->cTitle_ShortVersion, 0, 75 ) . \"...\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$items[] = Array( \"item\" => \"<a href='phps/gral_vertitulo.php?id_titulo=\" . $item->nIDTitulo . \"'><img src='$item->cIcon'>&nbsp;[\" . $item->Material_ShortCode() . \"] \" . $item->cTitle_ShortVersion . \".</a>\",\r\n\t\t\t\t\t\t\t \"id_titulo\" => $item->nIDTitulo );\r\n\r\n\t\t}\r\n\t\t\r\n\t\t$item->destroy();\r\n\t\tunset( $item );\r\n\t\t\r\n\t} \r\n\t\r\n\t$dbx->Close();\r\n\t\r\n\t//\r\n\t// PASO 2 - Reservaciones\r\n\t//\r\n\tif( $CFG->db_type == \"mysql\" )\r\n\t{\r\n\t}\r\n\telse if( $CFG->db_type == \"interbase\" )\r\n\t{\r\n\t\t$dbx->sql = \"SELECT FIRST 10 DISTINCT(b.ID_TITULO) \" .\r\n\t\t\t\t \"FROM reservaciones_mst a \" .\r\n\t\t\t\t \" LEFT JOIN reservaciones_det b ON (b.ID_BIBLIOTECA=a.ID_BIBLIOTECA and b.ID_RESERVACION=a.ID_RESERVACION) \" .\r\n\t\t\t\t \"WHERE a.ID_BIBLIOTECA=$id_biblioteca and a.ID_USUARIO=$id_usuario and b.STATUS_RESERVACION<>'F'\" .\r\n\t\t\t\t \"ORDER BY FECHA_RESERVO DESC \";\r\n\t}\r\n\t\r\n\t//echo $sql;\r\n\r\n \t$dbx->Open();\r\n\t\r\n\twhile( $dbx->NextRow(1) )\r\n\t{\r\n\t\t$total++;\r\n\t\t\r\n\t\t$item = new TItem_Basic( $id_biblioteca, $dbx->row[\"ID_TITULO\"], 0, $dbx );\r\n\t\t\r\n\t\tif( !in_array( $dbx->row[\"ID_TITULO\"], $titulos ) ) \r\n\t\t{\t\t\r\n\t\t\t$titulos[] = $dbx->row[\"ID_TITULO\"];\r\n\r\n\t\t\tif( strlen($item->cTitle_ShortVersion) > 75 ) \r\n\t\t\t{\r\n\t\t\t\t$item->cTitle_ShortVersion = substr( $item->cTitle_ShortVersion, 0, 75 ) . \"...\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\t$items[] = Array( \"item\" => \"<a href='phps/gral_vertitulo.php?id_titulo=\" . $item->nIDTitulo . \"'><img src='$item->cIcon'>&nbsp;[\" . $item->Material_ShortCode() . \"] \" . $item->cTitle_ShortVersion . \".</a>\",\r\n\t\t\t\t\t\t\t \"id_titulo\" => $item->nIDTitulo );\r\n\t\t\t\r\n\t\t\t$item->destroy();\r\n\t\t}\r\n\t\t\r\n\t\tunset( $item );\r\n\t} \r\n\t\r\n\t$dbx->Close();\r\n\t\r\n\t// display the list\r\n\techo \"\t <ul>\\n\";\r\n\t\r\n\t//print_r( $items );\r\n\t\r\n\tfor( $i=0; $i<count($items); $i++ )\r\n\t{\r\n\t\techo \"\t<li>\" . $items[$i][\"item\"] . \"&nbsp;\";\r\n\t\t\r\n\t\t$comment_needed = true;\r\n\t\t$id_titulo = $items[$i][\"id_titulo\"];\r\n\t\t\r\n\t\t$dbx->Open( \"SELECT COUNT(*) AS CUANTOS FROM acervo_titulos_califs WHERE ID_BIBLIOTECA=$id_biblioteca and ID_USUARIO=$id_usuario and ID_TITULO=$id_titulo;\" );\r\n\t\t\r\n\t\tif( $dbx->NextRow() )\r\n\t\t{\r\n\t\t\tif( $dbx->row[\"CUANTOS\"] > 0 )\r\n\t\t\t\t$comment_needed = false;\r\n\t\t}\r\n\t\t\r\n\t\t$dbx->Close();\r\n\t\t\r\n\t\tif( $comment_needed )\r\n\t\t{\r\n\t\t\tglobal $HINT_PLEASE_LEAVE_COMMENT;\r\n\t\t\techo \"<a title='$HINT_PLEASE_LEAVE_COMMENT' href='phps/gral_vertitulo.php?id_titulo=$id_titulo#comentarios'><img src='images/icons/comments.gif'></a>\";\r\n\t\t}\r\n\t\techo \"</li>\";\r\n\t}\r\n\t\r\n\techo \"\t </ul>\\n\";\r\n\t\r\n\tif( $total == 0 )\r\n\t{\r\n\t\tglobal $MSG_NO_LOG_OF_RECENT_ISSUED_ITEMS;\r\n\t\techo \"<br>$MSG_NO_LOG_OF_RECENT_ISSUED_ITEMS\";\r\n\t}\r\n\r\n}", "private function getPopular($itemCount = 5, $from = null, $to = null)\n\t{\n\t\t$db = $this->container->db;\n\n\t\t$query = $db->getQuery(true)\n\t\t\t\t\t->select(array(\n\t\t\t\t\t\t$db->qn('l') . '.' . $db->qn('item_id'),\n\t\t\t\t\t\t'COUNT(*) AS ' . $db->qn('dl')\n\t\t\t\t\t))->from($db->qn('#__ars_log') . ' AS ' . $db->qn('l'))\n\t\t\t\t\t->where($db->qn('l') . '.' . $db->qn('authorized') . ' = ' . $db->q(1))\n\t\t\t\t\t->group($db->qn('item_id'))\n\t\t\t\t\t->order($db->qn('dl') . ' DESC');\n\n\t\t$noTimeLimits = (is_null($from) || is_null($to));\n\n\t\tif (!$noTimeLimits)\n\t\t{\n\t\t\t$query->where($db->qn('l') . '.' . $db->qn('accessed_on') . ' BETWEEN ' . $db->q($from) . ' AND ' . $db->q($to));\n\t\t}\n\n\t\t$db->setQuery($query, 0, $itemCount);\n\t\t$items = $db->loadAssocList('item_id');\n\n\t\tif (empty($items))\n\t\t{\n\t\t\treturn null;\n\t\t}\n\n\t\t$idLimit = implode(',', array_keys($items));\n\n\t\t$query = $db->getQuery(true)\n\t\t\t\t\t->select(array(\n\t\t\t\t\t\t$db->qn('i') . '.' . $db->qn('id') . ' AS ' . $db->qn('item_id'),\n\t\t\t\t\t\t$db->qn('i') . '.' . $db->qn('title'),\n\t\t\t\t\t\t$db->qn('c') . '.' . $db->qn('title') . ' AS ' . $db->qn('category'),\n\t\t\t\t\t\t$db->qn('r') . '.' . $db->qn('version'),\n\t\t\t\t\t\t$db->qn('r') . '.' . $db->qn('maturity'),\n\t\t\t\t\t\t$db->qn('i') . '.' . $db->qn('updatestream'),\n\t\t\t\t\t))->from($db->qn('#__ars_items') . ' AS ' . $db->qn('i'))\n\t\t\t\t\t->join('INNER', $db->qn('#__ars_releases') . ' AS ' . $db->qn('r') . ' ON(' .\n\t\t\t\t\t\t$db->qn('r') . '.' . $db->qn('id') . ' = ' . $db->qn('i') . '.' . $db->qn('release_id') . ')')\n\t\t\t\t\t->join('INNER', $db->qn('#__ars_categories') . ' AS ' . $db->qn('c') . ' ON(' .\n\t\t\t\t\t\t$db->qn('c') . '.' . $db->qn('id') . ' = ' . $db->qn('r') . '.' . $db->qn('category_id') . ')')\n\t\t\t\t\t->where($db->qn('i') . '.' . $db->qn('id') . ' IN(' . $idLimit . ')');\n\t\t$db->setQuery($query);\n\t\t$infoList = $db->loadAssocList('item_id');\n\n\t\t$ret = array();\n\n\t\tforeach ($items as $item)\n\t\t{\n\t\t\t$info = array_key_exists($item['item_id'], $infoList) ? $infoList[$item['item_id']] : null;\n\n\t\t\tif (is_array($info))\n\t\t\t{\n\t\t\t\t$ret[] = (object)array_merge($info, $item);\n\t\t\t}\n\t\t}\n\n\t\treturn $ret;\n\t}", "public function getFiveLatestRecords();", "function get_entries(){\n\t\t $db = $this->db;\n\t\t \n\t\t if(!$this->itemType){\n\t\t\t\t$whereCondition = true;\n\t\t }\n\t\t else{\n\t\t\t\t$whereCondition = \" itemType = '\".$this->itemType.\"' \";\n\t\t }\n\t\t \n\t\t $sql = \"SELECT *\n\t\t\t FROM noid_bindings\n\t\t\t WHERE \".$whereCondition.\"\n\t\t\t ORDER BY ItemUpdated DESC\n\t\t\t LIMIT \".($this->recStart ).\",\".self::entriesPerPage.\"\n\t\t\t \";\n\t\t\t \n\t\t //note: I did check this. Order ItemUpdated by DESC makes the most recently updated item 1st in the feed.\n\t\t \n\t\t $result = $db->fetchAll($sql, 2);\n\t\t\t\t if($result){\n\t\t\t\t$this->feedItems = $result;\n\t\t }\n\t\t else{\n\t\t\t\t$this->feedItems = false;\n\t\t }\n }", "public static function getLastList($table,$param,$count)\n {\n self::setTable('article');\n return self::find()->where($param)->orderBy('id DESC')->limit($count)->all();\n\n }", "function SelectAllLatestLimit($ORDER_VALUE_, $limit, $table, $db)\n{\n /* mysqli_report(MYSQLI_REPORT_ERROR | MYSQLI_REPORT_STRICT); */\n $query =\n \"SELECT * FROM \" .\n $table .\n \" ORDER BY \" .\n $ORDER_VALUE_ .\n \" DESC LIMIT \" .\n $limit .\n \"\";\n\n $stmt = $db->prepare($query);\n $stmt->execute();\n\n return $stmt;\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get current server access data: ip, password, login
function getAccess(){ $voipdata=$this->find('all'); $server=array(); $server['ip']=$voipdata[0]['Voip']['ip']; $server['port']=$voipdata[0]['Voip']['port']; $server['pass']=$voipdata[0]['Voip']['pass']; $server['login']=$voipdata[0]['Voip']['login']; $server['proxy_adress']=$voipdata[0]['Voip']['pr_adress']; $server['proxy_port']=$voipdata[0]['Voip']['pr_port']; return $server; }
[ "function get_connect_info()\n {\n $this->server = $this->service->server($this->lastsvr);\n printf(\"Build completion percentage: \");\n while ($this->server->accessIPv4 == '' || $this->server->accessIPv6 == '') {\n printf(\".%d.\", $this->server->progress);\n sleep(10);\n $this->server = $this->service->server($this->lastsvr);\n }\n printf(\"\\n\");\n printf(\"Connect info for server %s:\\n\", $this->server->id);\n printf(\"IP: %s (IPv4) or %s (IPv6)\\n\", $this->server->accessIPv4, $this->server->accessIPv6);\n printf(\"Admin password: %s\\n\", $this->serverpw[$this->lastsvr]);\n }", "function getLoginData()\n{\n return array(\n \"loc\"=>\"localhost\",\n \"usr\"=>\"moola\",\n \"pw\"=>\"password\",\n \"db\"=>\"moola\");\n}", "public function getServerInfo() {\n\n $func = \"https://$this->cPanelUrl:$this->cPanelPort/execute/ServerInformation/get_information\";\n return $this->exe_cpanel($func);\n\n }", "public function getLoginInfo()\n {\n return $this->login_info;\n }", "function getConnInfo(){\r\n\t\r\n\treturn \"Host:\".$this->dbHost.\r\n\t \"\\nPort:\".$this->dbPort.\r\n\t\t \"\\nDatabase Username:\".$this->DbUser.\r\n\t\t \"\\nDatabase Password:\".$this->DbPass.\r\n\t\t \"\\nDatabase Name:\".$this->dbName;\r\n\t\t \r\n}", "public function getCurrentServer();", "public function accessDetails()\n {\n $info = [];\n\n if (preg_match('#^(.+)@(.+):([0-9]*)\\/?(.+)\\.git$#', $this->repository, $matches)) {\n $info['user'] = $matches[1];\n $info['domain'] = $matches[2];\n $info['port'] = $matches[3];\n $info['reference'] = $matches[4];\n } elseif (preg_match('#^https?#', $this->repository)) {\n $data = parse_url($this->repository);\n\n $info['user'] = isset($data['user']) ? $data['user'] : '';\n $info['domain'] = $data['host'];\n $info['port'] = isset($data['port']) ? $data['port'] : '';\n $info['reference'] = substr($data['path'], 1, -4);\n }\n\n return $info;\n }", "public function connectionInfo()\n {\n return $this->username . '@' . $this->database . ':' . $this->hostname;\n }", "public function userinfo() {\n return $this->http(self::API_SERVER, 'user', 'GET', 'Authorization: Bearer ' . $this->access_token . PHP_EOL);\n }", "public function getStLoginInfo()\n {\n return $this->get(self::STLOGININFO);\n }", "public function getServerInfo() {\n return $this->clientHandle->get_server_info();\n }", "function get_credentials()\n\t{\n\t\treturn \"{$this->username}:{$this->password}\";\n\t}", "public function getCurrentUserAndHost(): array;", "public function getUserInfo()\n {\n $userInfo = $this->username;\n\n if (!empty($this->password)) {\n $userInfo .= ':' . $this->password;\n }\n\n return $userInfo;\n }", "public function getNetloc()\n {\n $this->initialize();\n return ($this->user && $this->pass ? $this->user.($this->pass ? ':'.$this->pass : '').'@' : '').$this->host.($this->port ? ':'.$this->port : '');\n }", "function getUserInfo(){\n\t$platform = \"\";\n\t$browser = \"\";\n\t$ip = \"\";\n\t/*\n\tif(isset($userInfo)){\n\t\t$platform = $userInfo[\"platform\"];\n\t\t$browser = $userInfo[\"browser\"];\n\t}*/\n\tif(isset($_SERVER)){\n\t\t$ip = $_SERVER[\"REMOTE_ADDR\"];\n\t\t$browser = $_SERVER[\"HTTP_USER_AGENT\"];\n\t}\n\t$link = connect();\n\t$insertQuery = \"INSERT INTO visitors (platform, browser, ip) VALUES ('$platform', '$browser', '$ip')\";\n\tdbQuery($insertQuery);\n\tdisconnect($link);\n}", "public function get_connection_data(){\n\n\t\t$data = array(\n\t\t\t'host' => $this->_host,\n\t\t\t'db_name' => $this->_db_name,\n\t\t\t'user' => $this->_user\n\t\t);\n\n\t\treturn $data;\n\t}", "public function getServerData();", "public function getUserInfo()\n {\n return $this->uriUser . ($this->uriPassword ? ':' . $this->uriPassword : '');\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Internal Method to return the ascii value from a code128 integer Table A ASCII CODE128 32 to 95 == 0 to 63 0 to 31 == 64 to 95 128 to 138 == 96 to 106 Table B ASCII CODE128 32 to 138 == 0 to 106 Table C ASCII CODE128 "00" to "99" == 0 to 99 132 to 138 == 100 to 106
protected function chr128($value, $set) { if ($set == 'A') { if ($value < 64) { return chr($value + 32); } elseif ($value < 96) { return chr($value - 64); } elseif ($value > 106) { return -1; } else { return chr($value + 32); } } elseif ($set == 'B') { if ($value > 106) { return -1; } else { return chr($value + 32); } } elseif ($set == 'C') { if (($value >= 0) && ($value <= 9)) { return "0" . (string) $value; } elseif ($value <= 99) { return (string) $value; } elseif ($value <= 106) { return chr($value + 32); } else { return -1; } } else { if ($value <= 106) { return ($value + 32); } else { return -1; } } }
[ "function Code128($x, $y, $code, $w, $h) {\n\t\t$Aguid = \"\"; // Création des guides de choix ABC\n\t\t$Bguid = \"\";\n\t\t$Cguid = \"\";\n\t\tfor ($i=0; $i < strlen($code); $i++) {\n\t\t\t$needle = substr($code,$i,1);\n\t\t\t$Aguid .= ((strpos($this->Aset,$needle)===false) ? \"N\" : \"O\"); \n\t\t\t$Bguid .= ((strpos($this->Bset,$needle)===false) ? \"N\" : \"O\"); \n\t\t\t$Cguid .= ((strpos($this->Cset,$needle)===false) ? \"N\" : \"O\");\n\t\t}\n\n\t\t$SminiC = \"OOOO\";\n\t\t$IminiC = 4;\n\n\t\t$crypt = \"\";\n\t\twhile ($code > \"\") {\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// BOUCLE PRINCIPALE DE CODAGE\n\t\t\t$i = strpos($Cguid,$SminiC); // forçage du jeu C, si possible\n\t\t\tif ($i!==false) {\n\t\t\t\t$Aguid [$i] = \"N\";\n\t\t\t\t$Bguid [$i] = \"N\";\n\t\t\t}\n\n\t\t\tif (substr($Cguid,0,$IminiC) == $SminiC) { // jeu C\n\t\t\t\t$crypt .= chr(($crypt > \"\") ? $this->JSwap[\"C\"] : $this->JStart[\"C\"]); // début Cstart, sinon Cswap\n\t\t\t\t$made = strpos($Cguid,\"N\"); // étendu du set C\n\t\t\t\tif ($made === false) {\n\t\t\t\t\t$made = strlen($Cguid);\n\t\t\t\t}\n\t\t\t\tif (fmod($made,2)==1) {\n\t\t\t\t\t$made--; // seulement un nombre pair\n\t\t\t\t}\n\t\t\t\tfor ($i=0; $i < $made; $i += 2) {\n\t\t\t\t\t$crypt .= chr(strval(substr($code,$i,2))); // conversion 2 par 2\n\t\t\t\t}\n\t\t\t\t$jeu = \"C\";\n\t\t\t} else {\n\t\t\t\t$madeA = strpos($Aguid,\"N\"); // étendu du set A\n\t\t\t\tif ($madeA === false) {\n\t\t\t\t\t$madeA = strlen($Aguid);\n\t\t\t\t}\n\t\t\t\t$madeB = strpos($Bguid,\"N\"); // étendu du set B\n\t\t\t\tif ($madeB === false) {\n\t\t\t\t\t$madeB = strlen($Bguid);\n\t\t\t\t}\n\t\t\t\t$made = (($madeA < $madeB) ? $madeB : $madeA ); // étendu traitée\n\t\t\t\t$jeu = (($madeA < $madeB) ? \"B\" : \"A\" ); // Jeu en cours\n\n\t\t\t\t$crypt .= chr(($crypt > \"\") ? $this->JSwap[$jeu] : $this->JStart[$jeu]); // début start, sinon swap\n\n\t\t\t\t$crypt .= strtr(substr($code, 0,$made), $this->SetFrom[$jeu], $this->SetTo[$jeu]); // conversion selon jeu\n\n\t\t\t}\n\t\t\t$code = substr($code,$made); // raccourcir légende et guides de la zone traitée\n\t\t\t$Aguid = substr($Aguid,$made);\n\t\t\t$Bguid = substr($Bguid,$made);\n\t\t\t$Cguid = substr($Cguid,$made);\n\t\t} // FIN BOUCLE PRINCIPALE\n\n\t\t$check = ord($crypt[0]); // calcul de la somme de contrôle\n\t\tfor ($i=0; $i<strlen($crypt); $i++) {\n\t\t\t$check += (ord($crypt[$i]) * $i);\n\t\t}\n\t\t$check %= 103;\n\n\t\t$crypt .= chr($check) . chr(106) . chr(107); // Chaine Cryptée complète\n\n\t\t$i = (strlen($crypt) * 11) - 8; // calcul de la largeur du module\n\t\t$modul = $w/$i;\n\n\t\tfor ($i=0; $i<strlen($crypt); $i++) { // BOUCLE D'IMPRESSION\n\t\t\t$c = $this->T128[ord($crypt[$i])];\n\t\t\tfor ($j=0; $j<count($c); $j++) {\n\t\t\t\t$this->Rect($x,$y,$c[$j]*$modul,$h,\"F\");\n\t\t\t\t$x += ($c[$j++]+$c[$j])*$modul;\n\t\t\t}\n\t\t}\n\t}", "private static function generateAsciiChars()\n {\n $output = '';\n for ($i = 32; $i < 127; $i++) {\n $output .= mb_convert_encoding(chr($i), 'UTF-8', 'ISO-8859-1');\n }\n for ($i = 128; $i < 255; $i++) {\n $output .= mb_convert_encoding(chr($i), 'UTF-8', 'ISO-8859-1');\n }\n return $output;\n }", "protected function _getBase32LookupTable()\n {\n return array(\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 7\n 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 15\n 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 23\n 'Y', 'Z', '2', '3', '4', '5', '6', '7', // 31\n '=', // padding char\n );\n }", "static function fromCharCode(){\n return array_reduce(func_get_args(),function($a,$b){$a.=chr($b);return $a;});\n }", "protected function _getBase32LookupTable()\n {\n return array(\n 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 7\n 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 15\n 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 23\n 'Y', 'Z', '2', '3', '4', '5', '6', '7', // 31\n '=' // padding char\n );\n }", "public static final function ascii() { }", "function asciiCode($firstString, $secondString)\n{\n $splitFirstString = str_split($firstString);\n $splitSecondString = str_split($secondString);\n $sumFirstString = 0;\n $sumSecondString = 0;\n\n foreach ($splitFirstString as $value) {\n if (($value == is_numeric($value)) || ($value == is_numeric((bool)$value))) {\n $sumFirstString = ord('');\n } else {\n $sumFirstString += ord(strtoupper($value));\n }\n }\n\n foreach ($splitSecondString as $item) {\n if (($item == is_numeric($item)) || ($item == is_numeric((bool)$item))) {\n $sumSecondString = ord('');\n } else {\n $sumSecondString += ord(strtoupper($item));\n }\n }\n\n return ($sumFirstString === $sumSecondString);\n}", "public function Code128($x, $y, $w, $h, $code) {\n\t\t\n\t\trequire_once t3lib_extMgm::extPath('pt_xml2pdf') . 'res/class.tx_ptxml2pdf_barcode_code128.php';\n\t\t\n\t\t$code128 = new tx_ptxml2pdf_barcode_code128();\n\t\t\n\t\t$Aguid = \"\"; // Cr�ation des guides de choix ABC\n\t\t$Bguid = \"\";\n\t\t$Cguid = \"\";\n\t\tfor($i = 0; $i < strlen($code); $i++) {\n\t\t\t$needle = substr($code, $i, 1);\n\t\t\t$Aguid .= ((strpos($code128->Aset, $needle) === FALSE) ? \"N\" : \"O\");\n\t\t\t$Bguid .= ((strpos($code128->Bset, $needle) === FALSE) ? \"N\" : \"O\");\n\t\t\t$Cguid .= ((strpos($code128->Cset, $needle) === FALSE) ? \"N\" : \"O\");\n\t\t}\n\t\t\n\t\t$SminiC = \"OOOO\";\n\t\t$IminiC = 4;\n\t\t\n\t\t$crypt = \"\";\n\t\twhile ( $code > \"\" ) {\n\t\t\t// BOUCLE PRINCIPALE DE CODAGE\n\t\t\t$i = strpos($Cguid, $SminiC); // for�age du jeu C, si possible\n\t\t\tif ($i !== FALSE) {\n\t\t\t\t$Aguid[$i] = \"N\";\n\t\t\t\t$Bguid[$i] = \"N\";\n\t\t\t}\n\t\t\t\n\t\t\tif (substr($Cguid, 0, $IminiC) == $SminiC) { // jeu C\n\t\t\t\t$crypt .= chr(($crypt > \"\") ? $code128->JSwap[\"C\"] : $code128->JStart[\"C\"]); // d�but Cstart, sinon Cswap\n\t\t\t\t$made = strpos($Cguid, \"N\"); // �tendu du set C\n\t\t\t\tif ($made === FALSE) {\n\t\t\t\t\t$made = strlen($Cguid);\n\t\t\t\t}\n\t\t\t\tif (fmod($made, 2) == 1) {\n\t\t\t\t\t$made--; // seulement un nombre pair\n\t\t\t\t}\n\t\t\t\tfor($i = 0; $i < $made; $i += 2) {\n\t\t\t\t\t$crypt .= chr(strval(substr($code, $i, 2))); // conversion 2 par 2\n\t\t\t\t}\n\t\t\t\t$jeu = \"C\";\n\t\t\t} else {\n\t\t\t\t$madeA = strpos($Aguid, \"N\"); // �tendu du set A\n\t\t\t\tif ($madeA === FALSE) {\n\t\t\t\t\t$madeA = strlen($Aguid);\n\t\t\t\t}\n\t\t\t\t$madeB = strpos($Bguid, \"N\"); // �tendu du set B\n\t\t\t\tif ($madeB === FALSE) {\n\t\t\t\t\t$madeB = strlen($Bguid);\n\t\t\t\t}\n\t\t\t\t$made = (($madeA < $madeB) ? $madeB : $madeA); // �tendu trait�e\n\t\t\t\t$jeu = (($madeA < $madeB) ? \"B\" : \"A\"); // Jeu en cours\n\t\t\t\t$jeuguid = $jeu . \"guid\";\n\t\t\t\t\n\t\t\t\t$crypt .= chr(($crypt > \"\") ? $code128->JSwap[\"$jeu\"] : $code128->JStart[\"$jeu\"]); // d�but start, sinon swap\n\t\t\t\t$crypt .= strtr(substr($code, 0, $made), $code128->SetFrom[$jeu], $code128->SetTo[$jeu]); // conversion selon jeu\n\t\t\t}\n\t\t\t$code = substr($code, $made); // raccourcir l�gende et guides de la zone trait�e\n\t\t\t$Aguid = substr($Aguid, $made);\n\t\t\t$Bguid = substr($Bguid, $made);\n\t\t\t$Cguid = substr($Cguid, $made);\n\t\t} // FIN BOUCLE PRINCIPALE\n\t\t\n\t\t$check = ord($crypt[0]); // calcul de la somme de contr�le\n\t\tfor($i = 0; $i < strlen($crypt); $i++) {\n\t\t\t$check += (ord($crypt[$i]) * $i);\n\t\t}\n\t\t$check %= 103;\n\t\t\n\t\t$crypt .= chr($check) . chr(106) . chr(107); // Chaine Crypt�e compl�te\n\n\t\t$i = (strlen($crypt) * 11) - 8; // calcul de la largeur du module\n\t\t$modul = $w / $i;\n\t\t\n\t\tfor($i = 0; $i < strlen($crypt); $i++) { // BOUCLE D'IMPRESSION\n\t\t\t$c = $code128->T128[ord($crypt[$i])];\n\t\t\tfor($j = 0; $j < count($c); $j++) {\n\t\t\t\t$this->Rect($x, $y, $c[$j] * $modul, $h, \"F\");\n\t\t\t\t$x += ($c[$j++] + $c[$j]) * $modul;\n\t\t\t}\n\t\t}\n\t}", "function u_128bis127($id,$b1)\n\t{\n\t$b1 = ord($b1);\n\tif ( $b1 & 128 ){$b1 = ($b1 & 127)-128; echo $b1;}\n\treturn $b1;\n\t}", "public function getCodabar() {\n return $this->getDigit1() . $this->getLibraryID() . $this->sn . $this->checkDigit;\n }", "function getCharCode($c) {\n $retval = $this->code[ord($c) - 32];\n return $retval;\n }", "function fromCharCode($code)\n{\n\treturn chr($code);\n}", "function _c93Encode($barnumber) {\r\n\r\n\t\t// Characters table and binary values\r\n\t\t$encTable\t= array(\"0\" => \"100010100\",\r\n\t\t\t\t\t\t\t\"1\" => \"101001000\",\r\n\t\t\t\t\t\t\t\"2\" => \"101000100\",\r\n\t\t\t\t\t\t\t\"3\" => \"101000010\",\r\n\t\t\t\t\t\t\t\"4\" => \"100101000\",\r\n\t\t\t\t\t\t\t\"5\" => \"100100100\",\r\n\t\t\t\t\t\t\t\"6\" => \"100100010\",\r\n\t\t\t\t\t\t\t\"7\" => \"101010000\",\r\n\t\t\t\t\t\t\t\"8\" => \"100010010\",\r\n\t\t\t\t\t\t\t\"9\" => \"100001010\",\r\n\t\t\t\t\t\t\t\"A\" => \"110101000\",\r\n\t\t\t\t\t\t\t\"B\" => \"110100100\",\r\n\t\t\t\t\t\t\t\"C\" => \"110100010\",\r\n\t\t\t\t\t\t\t\"D\" => \"110010100\",\r\n\t\t\t\t\t\t\t\"E\" => \"110010010\",\r\n\t\t\t\t\t\t\t\"F\" => \"110001010\",\r\n\t\t\t\t\t\t\t\"G\" => \"101101000\",\r\n\t\t\t\t\t\t\t\"H\" => \"101100100\",\r\n\t\t\t\t\t\t\t\"I\" => \"101100010\",\r\n\t\t\t\t\t\t\t\"J\" => \"100110100\",\r\n\t\t\t\t\t\t\t\"K\" => \"100011010\",\r\n\t\t\t\t\t\t\t\"L\" => \"101011000\",\r\n\t\t\t\t\t\t\t\"M\" => \"101001100\",\r\n\t\t\t\t\t\t\t\"N\" => \"101000110\",\r\n\t\t\t\t\t\t\t\"O\" => \"100101100\",\r\n\t\t\t\t\t\t\t\"P\" => \"100010110\",\r\n\t\t\t\t\t\t\t\"Q\" => \"110110100\",\r\n\t\t\t\t\t\t\t\"R\" => \"110110010\",\r\n\t\t\t\t\t\t\t\"S\" => \"110101100\",\r\n\t\t\t\t\t\t\t\"T\" => \"110100110\",\r\n\t\t\t\t\t\t\t\"U\" => \"110010110\",\r\n\t\t\t\t\t\t\t\"V\" => \"110011010\",\r\n\t\t\t\t\t\t\t\"W\" => \"101101100\",\r\n\t\t\t\t\t\t\t\"X\" => \"101100110\",\r\n\t\t\t\t\t\t\t\"Y\" => \"100110110\",\r\n\t\t\t\t\t\t\t\"Z\" => \"100111010\",\r\n\t\t\t\t\t\t\t\"-\" => \"100101110\",\r\n\t\t\t\t\t\t\t\".\" => \"111010100\",\r\n\t\t\t\t\t\t\t\" \" => \"111010010\",\r\n\t\t\t\t\t\t\t\"$\" => \"111001010\",\r\n\t\t\t\t\t\t\t\"/\" => \"101101110\",\r\n\t\t\t\t\t\t\t\"+\" => \"101110110\",\r\n\t\t\t\t\t\t\t\"%\" => \"110101110\",\r\n\t\t\t\t\t\t\t\"$\" => \"100100110\",\r\n\t\t\t\t\t\t\t\"%\" => \"111011010\",\r\n\t\t\t\t\t\t\t\"/\" => \"111010110\",\r\n\t\t\t\t\t\t\t\"+\" => \"100110010\",\r\n\t\t\t\t\t\t\t\"*\" => \"101011110\"\r\n\t\t\t\t\t\t);\r\n\r\n\t\t$mfcStr\t\t= \"\";\r\n\r\n\t\t$arr_key=array_keys($encTable);\r\n\r\n\t\t// Calculating C And K\r\n\t\tfor($j=0; $j<2; $j++) {\r\n\t\t\t$sum = 0;\r\n\t\t\tfor($i=strlen($barnumber); $i>0; $i--) {\r\n\t\t\t\t$num = $barnumber[strlen($barnumber) - $i];\r\n\t\t\t\tif(preg_match(\"/[A-Z]+/\", $num))\r\n\t\t\t\t\t$num = ord($num) - 55;\r\n\t\t\t\telse if($num == '-')\r\n\t\t\t\t\t$num = 36;\r\n\t\t\t\telse if($num == '.')\r\n\t\t\t\t\t$num = 37;\r\n\t\t\t\telse if($num == ' ')\r\n\t\t\t\t\t$num = 38;\r\n\t\t\t\telse if($num == '$')\r\n\t\t\t\t\t$num = 39;\r\n\t\t\t\telse if($num == '/')\r\n\t\t\t\t\t$num = 40;\r\n\t\t\t\telse if($num == '+')\r\n\t\t\t\t\t$num = 41;\r\n\t\t\t\telse if($num == '%')\r\n\t\t\t\t\t$num = 42;\r\n\t\t\t\telse if($num == '*')\r\n\t\t\t\t\t$num = 43;\r\n\r\n\t\t\t\t$sum += $i * $num;\r\n\t\t\t}\r\n\t\t\t$barnumber .= trim($arr_key[(int)($sum % 47)]);\r\n\t\t}\r\n\r\n\t\t// Terminating barcode\r\n\t\t$barnumber = \"*\".$barnumber.\"*\";\r\n\r\n\t\t// Converting to binary\r\n\t\tfor($i=0; $i<strlen($barnumber); $i++) {\r\n\t\t\t$mfcStr .= $encTable[$barnumber[$i]];\r\n\t\t}\r\n\t\t$mfcStr .= '1';\r\n\r\n\t\t// Returns binary barcode\r\n\t\treturn $mfcStr;\r\n\t}", "function uniord($c)\n{\n// $k = mb_convert_encoding($c, 'UCS-2LE', 'UTF-8');\n// $k1 = ord(substr($k, 0, 1));\n// $k2 = ord(substr($k, 1, 1));\n// return $k2 * 256 + $k1;\n \n\t$h = ord($c[0]);\n\tif ($h <= 0x7F) {\n\t\treturn $h;\n\t} else if ($h < 0xC2) {\n\t\treturn false;\n\t} else if ($h <= 0xDF) {\n\t\treturn ($h & 0x1F) << 6 | (ord($c[1]) & 0x3F);\n\t} else if ($h <= 0xEF) {\n\t\treturn ($h & 0x0F) << 12 | (ord($c[1]) & 0x3F) << 6\n\t\t\t\t\t\t\t\t | (ord($c[2]) & 0x3F);\n\t} else if ($h <= 0xF4) {\n\t\treturn ($h & 0x0F) << 18 | (ord($c[1]) & 0x3F) << 12\n\t\t\t\t\t\t\t\t | (ord($c[2]) & 0x3F) << 6\n\t\t\t\t\t\t\t\t | (ord($c[3]) & 0x3F);\n\t} else {\n\t\treturn false;\n\t}\n}", "protected function _getBase32LookupTable(): array\n\t{\n\t\treturn [\n\t\t\t'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', // 7\n\t\t\t'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', // 15\n\t\t\t'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', // 23\n\t\t\t'Y', 'Z', '2', '3', '4', '5', '6', '7', // 31\n\t\t\t'=', // padding char\n\t\t];\n\t}", "public function translateToChars()\n {\n foreach ($this->cells as &$row) {\n for ($c = 0; $c < count($row); $c++) {\n $row[$c] = self::intToChar($row[$c]);\n }\n }\n }", "function generateFixedLengthEncodeCode(){\n $code = array(); // inisialisasi code\n $dic = $this->dictionary;\n $count = strlen($dic);\n $length = strlen(sprintf(\"%d\",decbin($count-1)));\n for($i = 0; $i < $count; $i++){ //melakukan perulangan sebanyak jenis char\n $code[sprintf(\"%0\".$length.\"d\", decbin($i))] = $dic[$i];\n }\n return $code; //mengembalikan nilai code dalam array\n }", "function acucDecodeSubstitutionCipher( $arrayCode )\r\n{\r\n\tglobal $acucCodeChangeTable;\r\n\t\r\n\t$arrayReturnCode = $arrayCode;\r\n\t\r\n\tfor( $idx = 0; $idx < 21; $idx++ )\r\n\t{\r\n\t\t$arrayReturnCode[$idx] = array_search($arrayCode[$idx], $acucCodeChangeTable);\r\n\t}\r\n\t\r\n\treturn $arrayReturnCode;\r\n}", "function UTF2ASCII($code) {\n $UTFchars = array ( //code point UTF8 character name\n '/À/' => 'A', // U+00C0 c3 80 Latin capital letter A with grave\n '/Á/' => 'A', // U+00C1 c3 81 Latin capital letter A with acute\n '/Â/' => 'A', // U+00C2 c3 82 Latin capital letter A with circumflex\n '/Ã/' => 'A', // U+00C3 c3 83 Latin capital letter A with tilde\n '/Ä/' => 'A', // U+00C4 c3 84 Latin capital letter A with diaeresis\n '/Å/' => 'A', // U+00C5 c3 85 Latin capital letter A with ring above\n '/Æ/' => 'AE', // U+00C6 c3 86 Latin capital letter AE\n '/Č/' => 'C', // U+010C c4 8c Latin capital letter C with caron\n '/Ç/' => 'C', // U+00C7 c3 87 Latin capital letter C with cedilla\n '/È/' => 'E', // U+00C8 c3 88 Latin capital letter E with grave\n '/É/' => 'E', // U+00C9 c3 89 Latin capital letter E with acute\n '/Ê/' => 'E', // U+00CA c3 8a Latin capital letter E with circumflex\n '/Ë/' => 'E', // U+00CB c3 8b Latin capital letter E with diaeresis\n '/Ì/' => 'I', // U+00CC c3 8c Latin capital letter I with grave\n '/Í/' => 'I', // U+00CD c3 8d Latin capital letter I with acute\n '/Î/' => 'I', // U+00CE c3 8e Latin capital letter I with circumflex\n '/Ï/' => 'I', // U+00CF c3 8f Latin capital letter I with diaeresis\n '/Ł/' => 'L', // U+0141 c5 81 Latin capital letter L with stroke\n '/Ñ/' => 'N', // U+00D1 c3 91 Latin capital letter N with tilde\n '/Ò/' => 'O', // U+00D2 c3 92 Latin capital letter O with grave\n '/Ó/' => 'O', // U+00D3 c3 93 Latin capital letter O with acute\n '/Ô/' => 'O', // U+00D4 c3 94 Latin capital letter O with circumflex\n '/Õ/' => 'O', // U+00D5 c3 95 Latin capital letter O with tilde\n '/Ö/' => 'O', // U+00D6 c3 96 Latin capital letter O with diaeresis\n '/Ø/' => 'O', // U+00D8 c3 98 Latin capital letter O with stroke\n '/Ù/' => 'U', // U+00D9 c3 99 Latin capital letter U with grave\n '/Ú/' => 'U', // U+00DA c3 9a Latin capital letter U with acute\n '/Û/' => 'U', // U+00DB c3 9b Latin capital letter U with circumflex\n '/Ü/' => 'U', // U+00DC c3 9c Latin capital letter U with diaeresis\n '/Ř/' => 'R', // U+0158 c5 98 Latin capital letter R with caron\n '/Š/' => 'S', // U+0160 c5 a0 Latin capital letter S with caron\n '/Ý/' => 'Y', // U+00DD c3 9d Latin capital letter Y with acute\n '/Ỳ/' => 'Y', // U+1EF2 e1 bb b2 Latin capital letter Y with grave\n '/Ž/' => 'Z', // U+017D c5 bd Latin capital letter Z with caron\n '/Ż/' => 'Z', // U+017B c5 bb Latin capital letter Z with dot above\n '/à/' => 'a', // U+00E0 c3 a0 Latin small letter a with grave\n '/á/' => 'a', // U+00E1 c3 a1 Latin small letter a with acute\n '/â/' => 'a', // U+00E2 c3 a2 Latin small letter a with circumflex\n '/ã/' => 'a', // U+00E3 c3 a3 Latin small letter a with tilde\n '/ä/' => 'a', // U+00E4 c3 a4 Latin small letter a with diaeresis\n '/å/' => 'a', // U+00E5 c3 a5 Latin small letter a with ring above\n '/æ/' => 'ae', // U+00E6 c3 a6 Latin small letter ae\n '/č/' => 'c', // U+010D c4 8d Latin small letter c with caron\n '/ç/' => 'c', // U+00E7 c3 a7 Latin small letter c with cedilla\n '/è/' => 'e', // U+00E8 c3 a8 Latin small letter e with grave\n '/é/' => 'e', // U+00E9 c3 a9 Latin small letter e with acute\n '/ê/' => 'e', // U+00EA c3 aa Latin small letter e with circumflex\n '/ë/' => 'e', // U+00EB c3 ab Latin small letter e with diaeresis\n '/ì/' => 'i', // U+00EC c3 ac Latin small letter i with grave\n '/í/' => 'i', // U+00ED c3 ad Latin small letter i with acute\n '/î/' => 'i', // U+00EE c3 ae Latin small letter i with circumflex\n '/ï/' => 'i', // U+00EF c3 af Latin small letter i with diaeresis\n '/ł/' => 'l', // U+0142 c5 82 Latin small letter l with stroke\n '/ñ/' => 'n', // U+00F1 c3 b1 Latin small letter n with tilde\n '/ò/' => 'o', // U+00F2 c3 b2 Latin small letter o with grave\n '/ó/' => 'o', // U+00F3 c3 b3 Latin small letter o with acute\n '/ô/' => 'o', // U+00F4 c3 b4 Latin small letter o with circumflex\n '/õ/' => 'o', // U+00F5 c3 b5 Latin small letter o with tilde\n '/ö/' => 'o', // U+00F6 c3 b6 Latin small letter o with diaeresis\n '/ø/' => 'o', // U+00F8 c3 b8 Latin small letter O with stroke\n '/ù/' => 'u', // U+00F9 c3 b9 Latin small letter u with grave\n '/ú/' => 'u', // U+00FA c3 ba Latin small letter u with acute\n '/û/' => 'u', // U+00FB c3 bb Latin small letter u with circumflex\n '/ü/' => 'u', // U+00FC c3 bc Latin small letter u with diaeresis\n '/ř/' => 'r', // U+0159 c5 99 Latin small letter r with caron\n '/š/' => 's', // U+0161 c5 a1 latin small letter s with caron\n '/ÿ/' => 'y', // U+00FF c3 bf Latin small letter y with diaeresis\n '/ý/' => 'y', // U+00FD c3 bd Latin small letter y with acute\n '/ỳ/' => 'y', // U+1EF3 e1 bb b3 Latin small letter y with acute\n '/ž/' => 'z', // U+017E c5 be Latin small letter z with caron\n '/ż/' => 'z' // U+017C c5 bc Latin small letter z with dot above\n );\n\n $code = preg_replace(array_keys($UTFchars), array_values($UTFchars), $code);\n return $code;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Sets the configured error handler
private function _setupErrorHandler() { // Get the error handler class name $errorHandlerClassName = $this->_appConf->getErrorHandler(); // If there is no error handler, stops if (empty($errorHandlerClassName)) { return; } // Separate the class name from the method $errorHandlerInfo = explode('::', $errorHandlerClassName); // If the error handler class and method is not correctly defined if (!isset($errorHandlerInfo[1])) { throw new AppException('The error handler you specified with the $app["error-handler"] setting must define a class name and a method, separated by ::'); } // Set the error handler set_error_handler($errorHandlerClassName); }
[ "protected function setErrorHandler() {\n if ($this->override_error_handler) {\n $this->last_error_handler = set_error_handler([$this, 'handleError']);\n }\n }", "protected function set_error_handler()\n {\n $this->last_error = null;\n set_error_handler(array($this, 'error_handler'));\n }", "function _set_error_handler() {\n\t\tset_error_handler( array(\n\t\t\t\t$this,\n\t\t\t\t'_error_handler'\n\t\t\t) );\n\t}", "protected function registerErrorHandler()\n {\n set_error_handler([$this, 'handleError']);\n }", "function set_error_handler($error_handler) {}", "protected function configureErrorHandling()\n {\n $this->crashHandler = new CrashHandler();\n $this->crashHandler->register();\n\n $this->errorHandler = new ErrorHandler();\n $this->errorHandler->register();\n }", "abstract protected function setErrorHandler(): self;", "private static function setupErrorHandler() {\n set_error_handler(array('System', 'errorHandler'));\n }", "protected function registerErrorHandler()\n {\n set_error_handler(array($this, 'handleError'));\n }", "public function setError(callable $errorHandler): void\n {\n $this->error = $errorHandler;\n }", "private function setErrorHandling(){\n\t\t$errorconfig = $this->config->getErrorSettings();\n\t\tself::$debug = Debug::getInstance(\n\t\t\t$errorconfig['stage'],\n\t\t\t$errorconfig['log_exceptions'],\n\t\t\t$errorconfig['log_exceptions_file']\n\t\t);\n\t\tself::$error = Error::getInstance( \n\t\t\tself::$debug,\n\t\t\t$errorconfig\n\t\t);\n\t\tset_error_handler(array( &self::$error, \"errorHandler\" ));\n\t\tset_exception_handler(array( &self::$error, \"exceptionHandler\") );\n\t}", "public static function registerErrorHandler() {\n set_error_handler(array('Octopus_Log', 'errorHandler'));\n }", "protected function registerErrorHandler()\n {\n set_error_handler(array($this,'handlePhpError'));\n }", "public function registerErrorHandler()\n {\n set_error_handler(array(static::class, 'handleError'));\n }", "protected function registerErrorHandler()\n\t{\n\t\tset_error_handler(array($this, 'handleError'));\n\t}", "public function setErrHandler(){\n\t\tset_error_handler([$this, 'handler'], E_ALL);\n\n\t\tregister_shutdown_function([$this, 'fatalErrorHandler']);\n\n\t\t// ob_start();\n\t}", "public static function add_error_handler()\n {\n $error_handler = ['boxwise_error_handler_class', 'boxwise_error_handler'];\n $previous = set_error_handler($error_handler, error_reporting());\n // avoid dead loops\n if ($previous !== $error_handler) {\n self::$previous_error_handler = $previous;\n }\n }", "abstract protected function registerErrorHandlers();", "public function __construct()\n {\n set_error_handler([$this, 'handleError']);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Removes text printable variant from PrintableVariants
public function removeTextPrintableVariant(PrintableVariant $printableVariant) { $this->removePrintableVariant($printableVariant); }
[ "public function getPrintableVariants()\n\t{\n\t\treturn $this->printableVariants;\n\t}", "public function removeDesignPrintableVariant(PrintableVariant $printableVariant)\n\t{\n\t\t$this->removePrintableVariant($printableVariant);\n\t}", "public function addTextPrintableVariant(PrintableVariant $printableVariant)\n\t{\n\t\t$this->addPrintableVariant($printableVariant);\n\t}", "function wc_remove_variation_stock_display( $data ) {\n unset( $data['availability_html'] );\n return $data;\n}", "public function isPrintableText() {\n $nonPrintableWords = array(\n 'aftncn','aftnsep','aftnsepc','annotation','atnauthor','atndate','atnicn','atnid',\n 'atnparent','atnref','atntime','atrfend','atrfstart','author','background',\n 'bkmkend','bkmkstart','blipuid','buptim','category','colorschememapping',\n 'colortbl','comment','company','creatim','datafield','datastore','defchp','defpap',\n 'do','doccomm','docvar','dptxbxtext','ebcend','ebcstart','factoidname','falt',\n 'fchars','ffdeftext','ffentrymcr','ffexitmcr','ffformat','ffhelptext','ffl',\n 'ffname','ffstattext','field','file','filetbl','fldinst','fldrslt','fldtype',\n 'fname','fontemb','fontfile','fonttbl','footer','footerf','footerl','footerr',\n 'footnote','formfield','ftncn','ftnsep','ftnsepc','g','generator','gridtbl',\n 'header','headerf','headerl','headerr','hl','hlfr','hlinkbase','hlloc','hlsrc',\n 'hsv','htmltag','info','keycode','keywords','latentstyles','lchars','levelnumbers',\n 'leveltext','lfolevel','linkval','list','listlevel','listname','listoverride',\n 'listoverridetable','listpicture','liststylename','listtable','listtext',\n 'lsdlockedexcept','macc','maccPr','mailmerge','maln','malnScr','manager','margPr',\n 'mbar','mbarPr','mbaseJc','mbegChr','mborderBox','mborderBoxPr','mbox','mboxPr',\n 'mchr','mcount','mctrlPr','md','mdeg','mdegHide','mden','mdiff','mdPr','me',\n 'mendChr','meqArr','meqArrPr','mf','mfName','mfPr','mfunc','mfuncPr','mgroupChr',\n 'mgroupChrPr','mgrow','mhideBot','mhideLeft','mhideRight','mhideTop','mhtmltag',\n 'mlim','mlimloc','mlimlow','mlimlowPr','mlimupp','mlimuppPr','mm','mmaddfieldname',\n 'mmath','mmathPict','mmathPr','mmaxdist','mmc','mmcJc','mmconnectstr',\n 'mmconnectstrdata','mmcPr','mmcs','mmdatasource','mmheadersource','mmmailsubject',\n 'mmodso','mmodsofilter','mmodsofldmpdata','mmodsomappedname','mmodsoname',\n 'mmodsorecipdata','mmodsosort','mmodsosrc','mmodsotable','mmodsoudl',\n 'mmodsoudldata','mmodsouniquetag','mmPr','mmquery','mmr','mnary','mnaryPr',\n 'mnoBreak','mnum','mobjDist','moMath','moMathPara','moMathParaPr','mopEmu',\n 'mphant','mphantPr','mplcHide','mpos','mr','mrad','mradPr','mrPr','msepChr',\n 'mshow','mshp','msPre','msPrePr','msSub','msSubPr','msSubSup','msSubSupPr','msSup',\n 'msSupPr','mstrikeBLTR','mstrikeH','mstrikeTLBR','mstrikeV','msub','msubHide',\n 'msup','msupHide','mtransp','mtype','mvertJc','mvfmf','mvfml','mvtof','mvtol',\n 'mzeroAsc','mzeroDesc','mzeroWid','nesttableprops','nextfile','nonesttables',\n 'objalias','objclass','objdata','object','objname','objsect','objtime','oldcprops',\n 'oldpprops','oldsprops','oldtprops','oleclsid','operator','panose','password',\n 'passwordhash','pgp','pgptbl','picprop','pict','pn','pnseclvl','pntext','pntxta',\n 'pntxtb','printim','private','propname','protend','protstart','protusertbl','pxe',\n 'result','revtbl','revtim','rsidtbl','rxe','shp','shpgrp','shpinst',\n 'shppict','shprslt','shptxt','sn','sp','staticval','stylesheet','subject','sv',\n 'svb','tc','template','themedata','title','txe','ud','upr','userprops',\n 'wgrffmtfilter','windowcaption','writereservation','writereservhash','xe','xform',\n 'xmlattrname','xmlattrvalue','xmlclose','xmlname','xmlnstbl',\n 'xmlopen');\n\n $controlWords = array_map(function($obj) {\n return $obj->getName();\n }, $this->controls);\n\n $dest = array_intersect($nonPrintableWords, $controlWords);\n return count($dest) == 0;\n }", "public function printNonPrintable() {\n echo '<input type=\"' . $this->inputType . '\" class=\"hidden\" name=\"nonPrintables[]\" value=\"' . $this->name . '\">';\n }", "function filterVariantCode($variant) {\r\n $variant = str_replace($this->config->item('google_showad_js'), '', $variant);\r\n return $variant;\r\n }", "public function clearPrintArea() {\n\t}", "public function clearLocalizationVariants()\n {\n $this->collLocalizationVariants = null; // important to set this to NULL since that means it is uninitialized\n }", "function clean_print_r($text_to_clean)\n{\n return substr($text_to_clean, 8, strlen($text_to_clean) - 11) . \"\\n\";\n}", "function replace_non_display_chars( $text ) {\n\t// replace non-display characters\n\t// EXCEPT NEW LINES! \\x0A\n\t$text = preg_replace( '/[\\x00-\\x09\\x0B\\x1F\\x7F]/u', '', $text );\n\treturn $text;\n}", "public function print_font_variants() {\n\t\t$styles = '';\n\t\t$media_query_grouped = [];\n\t\t$font_variants_and_sizes_var = \"typolab_font_variants_and_sizes_output_{$this->checksum}\";\n\n\t\t// Serve cached output\n\t\tif ( $this->cache_output && $font_variants_output = get_theme_mod( $font_variants_and_sizes_var, '' ) ) {\n\t\t\techo $font_variants_output;\n\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $this->font_variants_selectors as $selector ) {\n\t\t\t$media = isset( $selector['media'] ) ? $selector['media'] : '';\n\n\t\t\tif ( ! isset( $media_query_grouped[ $media ] ) ) {\n\t\t\t\t$media_query_grouped[ $media ] = [];\n\t\t\t}\n\n\t\t\t$media_query_grouped[ $media ][] = $selector;\n\t\t}\n\n\t\tforeach ( $media_query_grouped as $media => $selectors ) {\n\n\t\t\t// Media Selector Container\n\t\t\tif ( $media ) {\n\t\t\t\t$styles .= $media . ' {' . PHP_EOL;\n\t\t\t}\n\n\t\t\tforeach ( $selectors as $selector ) {\n\t\t\t\t$styles .= $selector['path'] . ' {' . $selector['properties'] . '}';\n\t\t\t\t$styles .= PHP_EOL;\n\t\t\t}\n\n\t\t\t// Media Selector End\n\t\t\tif ( $media ) {\n\t\t\t\t$styles .= '}' . PHP_EOL;\n\t\t\t}\n\t\t}\n\n\t\tif ( apply_filters( 'typolab_font_variants_compress_output', true ) ) {\n\t\t\t$styles = $this->compress_css( $styles );\n\t\t}\n\n\t\t$output = \"<style id=\\\"typolab-font-variants\\\">{$styles}</style>\";\n\n\t\t// Save generated style output for caching\n\t\tset_theme_mod( $font_variants_and_sizes_var, $output );\n\n\t\techo $output;\n\t}", "function remove_versao_wp() { return ''; }", "function strip_symbols( $text )\n{\n $plus = '\\+\\x{FE62}\\x{FF0B}\\x{208A}\\x{207A}';\n $minus = '\\x{2012}\\x{208B}\\x{207B}';\n \n $units = '\\\\x{00B0}\\x{2103}\\x{2109}\\\\x{23CD}';\n $units .= '\\\\x{32CC}-\\\\x{32CE}';\n $units .= '\\\\x{3300}-\\\\x{3357}';\n $units .= '\\\\x{3371}-\\\\x{33DF}';\n $units .= '\\\\x{33FF}';\n \n $ideo = '\\\\x{2E80}-\\\\x{2EF3}';\n $ideo .= '\\\\x{2F00}-\\\\x{2FD5}';\n $ideo .= '\\\\x{2FF0}-\\\\x{2FFB}';\n $ideo .= '\\\\x{3037}-\\\\x{303F}';\n $ideo .= '\\\\x{3190}-\\\\x{319F}';\n $ideo .= '\\\\x{31C0}-\\\\x{31CF}';\n $ideo .= '\\\\x{32C0}-\\\\x{32CB}';\n $ideo .= '\\\\x{3358}-\\\\x{3370}';\n $ideo .= '\\\\x{33E0}-\\\\x{33FE}';\n $ideo .= '\\\\x{A490}-\\\\x{A4C6}';\n \n return preg_replace(\n array(\n // Remove modifier and private use symbols.\n '/[\\p{Sk}\\p{Co}]/u',\n // Remove mathematics symbols except + - = ~ and fraction slash\n '/\\p{Sm}(?<![' . $plus . $minus . '=~\\x{2044}])/u',\n // Remove + - if space before, no number or currency after\n '/((?<= )|^)[' . $plus . $minus . ']+((?![\\p{N}\\p{Sc}])|$)/u',\n // Remove = if space before\n '/((?<= )|^)=+/u',\n // Remove + - = ~ if space after\n '/[' . $plus . $minus . '=~]+((?= )|$)/u',\n // Remove other symbols except units and ideograph parts\n '/\\p{So}(?<![' . $units . $ideo . '])/u',\n // Remove consecutive white space\n '/ +/',\n ),\n ' ',\n $text );\n}", "function strip_symbols( $text )\n{\n $plus = '\\+\\x{FE62}\\x{FF0B}\\x{208A}\\x{207A}';\n $minus = '\\x{2012}\\x{208B}\\x{207B}';\n\n $units = '\\\\x{00B0}\\x{2103}\\x{2109}\\\\x{23CD}';\n $units .= '\\\\x{32CC}-\\\\x{32CE}';\n $units .= '\\\\x{3300}-\\\\x{3357}';\n $units .= '\\\\x{3371}-\\\\x{33DF}';\n $units .= '\\\\x{33FF}';\n\n $ideo = '\\\\x{2E80}-\\\\x{2EF3}';\n $ideo .= '\\\\x{2F00}-\\\\x{2FD5}';\n $ideo .= '\\\\x{2FF0}-\\\\x{2FFB}';\n $ideo .= '\\\\x{3037}-\\\\x{303F}';\n $ideo .= '\\\\x{3190}-\\\\x{319F}';\n $ideo .= '\\\\x{31C0}-\\\\x{31CF}';\n $ideo .= '\\\\x{32C0}-\\\\x{32CB}';\n $ideo .= '\\\\x{3358}-\\\\x{3370}';\n $ideo .= '\\\\x{33E0}-\\\\x{33FE}';\n $ideo .= '\\\\x{A490}-\\\\x{A4C6}';\n\n return preg_replace(\n array(\n // Remove modifier and private use symbols.\n '/[\\p{Sk}\\p{Co}]/u',\n // Remove mathematics symbols except + - = ~ and fraction slash\n '/\\p{Sm}(?<![' . $plus . $minus . '=~\\x{2044}])/u',\n // Remove + - if space before, no number or currency after\n '/((?<= )|^)[' . $plus . $minus . ']+((?![\\p{N}\\p{Sc}])|$)/u',\n // Remove = if space before\n '/((?<= )|^)=+/u',\n // Remove + - = ~ if space after\n '/[' . $plus . $minus . '=~]+((?= )|$)/u',\n // Remove other symbols except units and ideograph parts\n '/\\p{So}(?<![' . $units . $ideo . '])/u',\n // Remove consecutive white space\n '/ +/',\n ),\n ' ',\n $text );\n}", "public function getFlavorText() {\n return null;\n }", "function nbs_fix_products_shortcode_output( $output, $tag, $attr, $m ) {\n\n if ( strtolower( $tag ) != 'products' ) return $output;\n\n return preg_replace( '/\\t|\\n/sim', '', $output );\n\n}", "function remove_et_variation_gallery_filter( $ob_get_clean ){\n\t\tremove_filter( 'woocommerce_available_variation', 'etheme_available_variation_gallery', 90, 3 );\n\t\tremove_filter( 'sten_wc_archive_loop_available_variation', 'etheme_available_variation_gallery', 90, 3 );\n\t\treturn $ob_get_clean;\n\t}", "public static function strip_unprintable_utf8($string) {\n return preg_replace('/[\\x00-\\x1F\\x7F\\xA0]/u', '', $string);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Update status when import starts
public function updateStatusStart() { $this->resetStatuses(); $this->pubDirectory->touch($this->getRelativeFilePath(self::IMPORT_STATUS_BUSY)); }
[ "protected function _updateStatus()\n {\n $this->_writeStatusFile(\n array(\n 'time' => time(),\n 'done' => ($this->_currentItemCount == $this->_totalFeedItems),\n 'count' => $this->_currentItemCount,\n 'total' => $this->_totalFeedItems,\n 'message' => \"Importing content. Item \" . $this->_currentItemCount\n . \" of \" . $this->_totalFeedItems . \".\"\n )\n );\n }", "function import_start() {\n\t\t$this->importing = true;\n\t}", "public function actionCheck_import_status()\n\t{\n\t\t$pid = $this->getImportPID();\n\t\t\n\t\t$update = Tbl_ImportTplFiles::model()->updateAll(array('pid'=>0),$pid ? 'pid != :pid':'',$pid ? array(':pid'=>$pid):array());\n\t\t\n\t\techo $update ? 'true':'false';\n\t}", "function getImportStatus();", "public function inProgress()\n {\n $this->setStatus(self::STATUS_IN_PROGRESS);\n }", "function updateStatus() {\n \n }", "public function updateStatus()\n {\n }", "public function start_import() {\n $this->prepare_for_import();\n $this->process_File();\n }", "public function markInProgress()\n {\n $this->update(['status' => config('constants.hr.status.in-progress.label')]);\n }", "protected function updateInstallStatus() {\n $path = Laraset::path('core.json');\n\n if (File::exists($path)) {\n\n $modules = json_decode(File::get($path), true);\n\n if (!$modules['installed'][\"status\"] || !isset($modules['installed'][\"status\"])) {\n\n $this->generateArchitecture();\n $this->generateFiles();\n $this->updateWebpackMixJs();\n\n $modules['installed'][\"status\"] = true;\n $modules['installed'][\"installed_at\"] = date('Y-m-d H:i:s');\n File::put($path, json_encode((Object) $modules));\n\n $this->info($this->messages['success']);\n } else {\n\n $this->info($this->messages['warning']);\n $this->info('//installed at : ' . $modules['installed']['installed_at'] . '');\n }\n } else {\n\n $this->error('core.json not found');\n }\n }", "public function clear_import_statuses()\n {\n }", "public function setImportStatus($status_import) {\n $accepted_values = array(\n self::AUTO_UPDATE_ENABLED,\n self::AUTO_UPDATE_DISABLED,\n self::AUTO_UPDATE_LOCAL_CHANGE,\n );\n if (in_array($status_import, $accepted_values)) {\n $this->statusImport = $status_import;\n return $this;\n }\n else {\n return FALSE;\n }\n }", "private function setStatusInProgressForProcessedDatabaseRecords()\n {\n $GLOBALS['TYPO3_DB']->exec_UPDATEquery(self::EVENT_ITEM_TABLE_NAME, \"pid={$this->pid}\", array('processing_status' => self::PROCESSING_STATUS_IN_PROGRESS));\n\n $GLOBALS['TYPO3_DB']->exec_UPDATEquery(self::LOCATION_ITEM_TABLE_NAME, \"pid={$this->pid}\", array('processing_status' => self::PROCESSING_STATUS_IN_PROGRESS));\n }", "public function refreshStatus(): void\n {\n $this->setDataFromApiResponse($this->api->getJob($this));\n }", "public function markAsStarted()\n {\n if (! $this->hasStarted()) {\n $this->update([\n 'status' => static::STATUS_STARTED,\n 'started_at' => Carbon::now(),\n ]);\n }\n }", "public function import()\n {\n $this->_beforeImport();\n while ($this->_importOne()) {\n }\n $this->_afterImport();\n }", "protected function updateStatus()\n {\n $status = $this->getStatusByProcess();\n $total_tracks = $this->getTotalTracks();\n $percentage = 0;\n $message = '';\n\n $encoded = $this->getEncodedTracks();\n $ripped = $this->getRippedTracks();\n\n $content = self::getStatusFileContent();\n $pid = intval($content['pid']);\n $process = new Process();\n\n try {\n $process->setPid($pid);\n } catch (InvalidArgumentException $x) {\n }\n $process_status = $process->status();\n\n // Calculate the process percentage\n if ($ripped != 0 && $process_status) {\n $status = self::STATUS_RIPPING;\n $average = floor(($ripped + $encoded) / 2);\n $percentage = $this->calculatePercentage($average, $total_tracks);\n }\n\n if ($encoded == $total_tracks && $total_tracks > 0) {\n $status = self::STATUS_COMPLETE;\n $message = 'your disc is ready';\n $percentage = 100;\n }\n\n $this->setStatusMessagePercentage($status, $message, $percentage);\n }", "public function execute()\n {\n //Clear missed records\n $this->resourceConn->getConnection()->query(\n \"DELETE FROM {$this->importStatusTable}\n WHERE import_run_type = 'MANUAL'\n AND global_status_import = 'Scheduled'\n AND start_import < NOW() - INTERVAL 5 MINUTE\"\n );\n\n $importType = $this->resourceConn->getConnection()->fetchOne(\n \"SELECT import_type FROM {$this->importStatusTable}\n WHERE import_run_type = 'MANUAL'\n AND global_status_import = 'Scheduled'\n AND start_import > NOW() - INTERVAL 5 MINUTE\"\n );\n\n if(!empty($importType) && !$this->sinch->isImportNotRun()) {\n //Import scheduled, but one is already running\n $this->logger->info(\"An import of type '{$importType}' is scheduled, but an import is already running\");\n return;\n }\n\n if(!empty($importType)) {\n try {\n switch (strtoupper($importType)) {\n case 'FULL':\n $this->logger->info(\"Starting scheduled full import\");\n $this->sinch->runSinchImport();\n break;\n case 'PRICE STOCK':\n $this->logger->info(\"Starting scheduled stock price import\");\n $this->sinch->runStockPriceImport();\n break;\n default:\n $this->logger->info(\"Unknown import type: \" . $importType);\n break;\n }\n } catch (\\Exception $e) {\n $this->logger->warning(\"Caught exception while running import: \" . $e->getMessage());\n }\n }\n }", "public function _checkImportStatus()\n {\n if ($items = $this->_getImportingItems($this->bulkSyncLimit)) {\n foreach ($items as $item) {\n $websiteId = $item->getWebsiteId();\n $client = false;\n if ($this->helper->isEnabled($websiteId)) {\n $client = $this->helper->getWebsiteApiClient(\n $websiteId\n );\n }\n if ($client) {\n try {\n if ($item->getImportType() == self::IMPORT_TYPE_CONTACT ||\n $item->getImportType() == self::IMPORT_TYPE_SUBSCRIBERS ||\n $item->getImportType() == self::IMPORT_TYPE_GUEST\n ) {\n $response = $client->getContactsImportByImportId($item->getImportId());\n } else {\n $response = $client->getContactsTransactionalDataImportByImportId(\n $item->getImportId()\n );\n }\n } catch (\\Exception $e) {\n $item->setMessage($e->getMessage())\n ->setImportStatus(self::FAILED);\n $this->saveItem($item);\n continue;\n }\n\n $this->processResponse($response, $item, $websiteId);\n }\n }\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Get the number of minutes between this and the other. The result will be negative when this is after the other
public function diffInMinutes($other) { $other = $this->ensure($other); return $this->diffInSeconds($other) / 60; }
[ "public function differenceInMinutes(): int\n {\n $this->ensureTravelDateIsSet();\n\n $days = $this->differenceInHours()*60;\n\n return $this->travel->invert ? $days+$this->travel->i : $days-$this->travel->i;\n }", "public function durationInMinutes(): int\n\t{\n\t\t$start = new Carbon($this->started_at);\n\t\t$end = new Carbon($this->finished_at);\n\n\t\tif ($start < $end)\n\t\t\treturn $start->diffInMinutes($end);\n\t\telse\n\t\t\treturn 0;\n\t}", "function diffInMinutes ($firstDate, $secondDate)\n\t{\n\t\t$diff = $firstDate - $secondDate;\n\t\t$minuteInSecs = 60;\n\t\treturn ($diff / $minuteInSecs);\n\t}", "public function getMinutes()\n {\n $secs = floor($this->getTime() - $this->start);\n\n return floor($secs / 60);\n }", "public function penaltyTimeInMinutes()\n {\n $penaltyTimeInSeconds = $this -> getPenaltyTimeInSeconds();\n\n $penaltyTimeInMinutes = intdiv($penaltyTimeInSeconds, 60);\n\n if($penaltyTimeInSeconds % 60) \n {\n $penaltyTimeInMinutes++;\n }\n\n return $penaltyTimeInMinutes;\n }", "public function getDurationInMinutes()\n {\n $end = $this->isActive() ? new \\DateTime() : $this->getEnd();\n $start = $this->getStart();\n\n return (int)ceil(($end->getTimestamp() - $start->getTimestamp()) / 60);\n }", "function calc_time_diff($before, $after) {\n return (( strtotime( $after ) - strtotime( $before ) ) / 60);\n }", "public function getMinutesToWait() {\r\n \t\r\n \t$last_game_time = strtotime($this->date);\r\n \t\r\n \tif($this->getGameSettings()->getWaitTime() === false){\r\n \t\t$start_today_time = strtotime(date('Y-m-d').' 00:00:00');\r\n \t\tif($last_game_time < $start_today_time){\r\n \t\t\treturn 0;\r\n \t\t}else{\r\n \t\t\treturn $minutes_to_wait = ceil(($start_today_time + 24*60*60 - time())/60);\r\n \t\t}\r\n \t}else{\r\n \t\treturn $minutes_to_wait = ceil(($last_game_time + $this->getGameSettings()->getWaitTime()*60 - time())/60);\r\n \t}\r\n }", "public function get_minutes()\n\t{\n\t\treturn $this->floor(($this->int_value / DateTime::int_in_minute) % 60);\n\t}", "public function getWholeMinutes() {\n return (int)floor(($this->_seconds % 3600) / 60);\n }", "protected function _getMinutesWorked()\n {\n if ( null !== $this->getAudioJobTypist()->minutes_start )\n {\n $minutes = $this->getAudioJobTypist()->minutes_end - $this->getAudioJobTypist()->minutes_start;\n }\n else\n {\n $minutes = Application_Model_AudioJobMapper::getMinutesFromFileTime( $this->getAudioJob()->length_seconds );\n }\n return $minutes;\n }", "public function getMinutes () {\n\t\treturn (int)(date(\"i\", (int)($this->__t)));\n\t}", "public function getMinutes()\n {\n return ($this->hours * 60) + $this->minutes;\n }", "public function getMinutes(): int\n {\n return $this->dms['minutes'];\n }", "public function calculateChargingElapsedTimeInMinutes()\n {\n $startChargingTime = $this -> getStartTimestamp();\n $finishChargingTime = $this -> getEndTimestamp();\n\n if( ! $finishChargingTime )\n {\n $finishChargingTime = now();\n }\n \n return $finishChargingTime -> diffInMinutes( $startChargingTime );\n }", "function convertTwoDateTimesToTimeDifferenceInMinutes($startDateTime, $endDateTime){\n\t$timeDifferenceStartDate = new DateTime($startDateTime);\n\t$timeDifferenceCompletionDate = new DateTime($endDateTime);\n\t$timeDifference = $timeDifferenceStartDate->diff($timeDifferenceCompletionDate);\n\t$timeDifferenceInSeconds = $timeDifference->s;\n\t$timeDifferenceInMinutes = $timeDifference->i;\n\t$timeDifferenceInHours = $timeDifference->h;\n\t$timeDifferenceInDays = $timeDifference->d;\n\n\tif($timeDifferenceInSeconds > 0){\n\t\t$timeDifferenceInMinutes += 1;\n\t}\n\n\t$timeDifference = $timeDifferenceInDays*1440 + $timeDifferenceInHours*60 + $timeDifferenceInMinutes;\n\n\treturn $timeDifference;\n}", "function calc_time_difference($time1, $time2) {\n//NOTE: submitted times should be of the format 8:00, 14:30 etc\n $start_hour = substr($time1, 0, 2);\n $start_minute = substr($time1, -2, 2);\n \n $end_hour = substr($time2, 0, 2); \n $end_minute = substr($time2, -2, 2);\n \n $total_start_minutes = (60*$start_hour)+$start_minute;\n $total_end_minutes = (60*$end_hour)+$end_minute;\n\n $interval = $total_end_minutes-$total_start_minutes; \n return $interval;\n}", "protected function nextMinute()\n {\n $current = Carbon::now();\n return 60 -$current->second;\n }", "public function getMinutes()\n {\n $interval = $this->getWrappedDateInterval();\n $invert = $interval->invert ? -1 : 1;\n\n return $interval->i * $invert;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/ Function isertMultipleTableRows inserts multiple tables into database. Used to insert multiple child table rows by calling updateTableData. Parameters: tableName name of database table. resultsArray[numRows][fieldName]=value array with multiple rows of data to insert.
function insertMultipleTableRows($tableName,&$resultsArray) { $rowCount=0; foreach ($resultsArray As $tableData) { $rowId=updateTableData($tableName,$tableData,''); if (!$rowId) { echo 'Error inserting table data: '.$tableName.' rowCount: '.$rowCount.'<br><br>'; } $rowCount++; } }
[ "function insert_multiple_data_rows($result_object, $table_name, $table_fields) {\n\twhile ($row = $result_object->fetchRow()) { \n\t\t//foreach($row as $item) {\n\t\t\t\n\t\t//}\n\t\tinsert_data($table_name, $table_fields, $row);\n\t}\n}", "public function exec_INSERTmultipleRows_postProcessAction(&$table, array &$fields, array &$rows, &$noQuoteFields, \\TYPO3\\CMS\\Core\\Database\\DatabaseConnection $parentObject);", "public function bulkinsert(string $table_name, array $rows): void;", "public function bulkinsert(Table $table, $rows);", "private function insertPartners($rows,$table_name){\n\t\tSQLQuery::create()->insertMultiple($table_name.\"Partner\",$rows);\n\t}", "function insertBulk($data_array, $feild_array, $table_name)\n\t\t{\n\t\t\t$feild_array_explod = implode(',',$feild_array);\n\t\t\t$first=true;\n\t\t\t$first1=true;\n\t\t\t$query=\"INSERT INTO \".$table_name.\" (\".$feild_array_explod.\") VALUES \";\n\t\t\tforeach($data_array as $singel_row){\n\t\t\t\tif(!$first){\n\t\t\t\t\t$query.=\", \";\n\t\t\t\t}else{\n\t\t\t\t\t$first=false;\n\t\t\t\t}\n\t\t\t\t$query.=\" (\";\n\t\t\t\t$first1=true;\n\t\t\t\tforeach($singel_row as $val){\n\t\t\t\t\tif(!$first1){\n\t\t\t\t\t\t$query.=\", \";\n\t\t\t\t\t}else{\n\t\t\t\t\t\t$first1=false;\n\t\t\t\t\t}\t\n\t\t\t\t\t$query.=\"'\".$val.\"'\";\n\t\t\t\t}\n\t\t\t\t$query.=\")\";\n\t\t\t}\n\t\t\t//echo $query;exit;\n\t\t\tlog_history('Insert Bulk',$query);\n\t\t\tupdateData($query);\t\n\t\t}", "protected function insert_batch($tablename, $values) {\n\t\t$this->db->insert_batch($tablename, $values);\n\t}", "function singleRecordMultiTableMultiRecordBatchInsert(&$records){\r\n\r\n $insert=FALSE;\r\n $insert_id =FALSE;\r\n if(isset($records) && !empty($records))\r\n {\r\n $this->db->trans_start();\r\n foreach ($records as $table_name => &$records) \r\n {\r\n foreach ($records as &$singleRecord) \r\n {\r\n $state= $this->_getOperation($singleRecord['fields'],$table_name);\r\n if( is_array($state) && ($state['operation']=='insert') ){\r\n $insert_id =$this->single_insert($table_name,$singleRecord['fields']); \r\n if (isset($insert_id) && $insert_id) {\r\n \r\n if (isset($this->insertIds)) {\r\n # code...\r\n $this->insertIds[]=$insert_id;\r\n }else\r\n {\r\n $this->insertIds=array();\r\n $this->insertIds[]=$insert_id;\r\n\r\n\r\n }\r\n \r\n }\r\n }else if(is_array($state) && ($state['operation'] =='update')){\r\n $column=($state['primary_key']);\r\n $insert_id =$singleRecord['fields'][$column];\r\n \r\n unset($singleRecord['fields'][$column]);\r\n $this->update_record($table_name,$singleRecord['fields'],$column,$insert_id ); \r\n }else{\r\n \r\n return false;\r\n }\r\n \r\n \r\n if(isset($singleRecord['dependency']))\r\n {\r\n if(isset($singleRecord['dependency']['fields']))\r\n {\r\n $x=($singleRecord['dependency']['fields']);\r\n $dependency_columns=$singleRecord['dependency']['fields'];\r\n unset($x);\r\n unset($singleRecord['dependency']['fields']);\r\n foreach ($singleRecord['dependency'] as $dependancy_table => &$insert_array) {\r\n \r\n $this->multi_dependancy($insert_array,$dependency_columns,$insert_id);\r\n $update_records = $this->checkInsertUpdate($insert_array, $dependancy_table );\r\n /* if(sizeof($insert_array)){*/\r\n $this->insert_batch($dependancy_table,$insert_array,FALSE);\r\n /* }*/\r\n if(isset($update_records)&& is_array($update_records) && sizeof($update_records)){\r\n foreach ($update_records as $updateTable => &$updateRecord) {\r\n $field_name=$updateRecord['primary_key'];\r\n unset($update_records[$updateTable]['primary_key']);\r\n $this->update_batch($updateTable,$updateRecord,$field_name,FALSE);\r\n }\r\n }\r\n /*print_r($update_records);*/\r\n }\r\n }\r\n }\r\n }\r\n }\r\n $this->db->trans_complete();\r\n if($this->db->trans_status())\r\n {\r\n $this->returnarray['state']=TRUE;\r\n $this->returnarray['msg']=\"Saved successfully\";\r\n $this->returnarray['insert_id']=$insert_id;\r\n }\r\n else\r\n {\r\n $this->returnarray['state']=FALSE;\r\n $this->returnarray['msg']='Unknown error occured';\r\n }\r\n return $this->returnarray;\r\n }\r\n\r\n }", "function insertManyAndExecute ($table_into, array $records = array(), $chunk_size = 1)\n\t{\t\t\n\t\tif (empty($table_into))\n\t\t\tthrow new Exception(\"Table not specified in call to 'insertManyAndExecute'.\");\n\t\t\n\t\tif (count($records) == 0)\n\t\t\treturn false;\n\t\t\t\n\t\tif ($chunk_size < 1)\n\t\t\treturn false;\n\t\t\t\n\t\t// Get the columns list\n\t\tforeach ($records[0] as $column => $value)\n\t\t\t$columns_list[] = \"$column\";\n\t\t$columns_string = implode(', ', $columns_list);\n\t\t\n\t\t$into = \"$table_into ($columns_string)\";\n\t\t$index = 1;\n\t\t$first_chunk = true;\n\t\t$to_bind = array();\n\t\t$record_count = count($records);\n\t\t\n\t\t// Execute all the queries using this prepared statement\n\t\t$row_of_chunk = 1;\n\t\tforeach ($records as $record) {\n\t\t\tif ($first_chunk) {\n\t\t\t\t// Prepare statement from first query\n\t\t\t\t$values_list = array();\n\t\t\t\tforeach ($record as $column => $value) {\n\t\t\t\t\tif ($value instanceof Db_Expression) {\n\t\t\t\t\t\t$values_list[] = \"$value\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$values_list[] = \":$column\" . $row_of_chunk;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t$values_string = implode(', ', $values_list);\n\t\t\t\tif ($index == 1) {\n\t\t\t\t\t$q = \"INSERT INTO $into VALUES ($values_string) \";\n\t\t\t\t} else {\n\t\t\t\t\t$q .= \"\\n\\t ($values_string) \";\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tforeach ($record as $column => $value)\n\t\t\t\t$to_bind[$column . $row_of_chunk] = $value;\n\t\t\t\t\n\t\t\t++$row_of_chunk;\n\t\t\tif ($row_of_chunk % $chunk_size == 1\n\t\t\tor $index == $record_count) {\n\t\t\t\tif ($first_chunk) {\n\t\t\t\t\t$q .= ';';\n\t\t\t\t\t$this->pdoConnect();\n\t\t\t\t\t$stmt = $this->pdo->prepare($q);\n\t\t\t\t\t$first_chunk = false;\n\t\t\t\t}\n\t\t\t\tforeach ($to_bind as $key => $value) {\n\t\t\t\t\t$stmt->bindValue($key, $value);\n\t\t\t\t}\n\t\t\t\t$stmt->execute();\n\t\t\t\t$to_bind = array();\n\t\t\t\t$row_of_chunk = 1;\n\t\t\t}\n\t\t\t++$index;\n\t\t}\n\t}", "public function testInsertMultiRow() {\r\n $original = $this->_database\r\n ->select()\r\n ->from('version')\r\n ->fetchAll();\r\n\r\n $data = array(\r\n array('name' => 'multi row 1'),\r\n array('name' => 'multi row 2'),\r\n array('name' => 'multi row 3')\r\n );\r\n $this->_database\r\n ->insert()\r\n ->setTable('version')\r\n ->massInsert($data)->run();\r\n\r\n $insertedAll = $this->_database\r\n ->select()\r\n ->from('version')\r\n ->fetchAll();\r\n $this->assertEquals(3, count($insertedAll) - count($original));\r\n }", "function insertMulti($table, $fields, $values) {\n\t\t$table = $this->fullTableName($table);\n\t\tif (is_array($fields)) {\n\t\t\t$fields = implode(', ', array_map(array(&$this, 'name'), $fields));\n\t\t}\n\t\t$count = count($values);\n\t\tfor ($x = 0; $x < $count; $x++) {\n\t\t\t$this->query(\"INSERT INTO {$table} ({$fields}) VALUES {$values[$x]}\");\n\t\t}\n\t}", "protected function insertMultiple($tableExpression, array $data, array $types = [])\n {\n $values = [];\n $params = [];\n\n foreach ($data as $index => $array) {\n $values[] = '(' . implode(', ', array_fill(0, count($array), '?')) . ')';\n array_push($params, ...array_values($array));\n }\n\n $first = reset($data);\n $sql = 'INSERT INTO ' . $tableExpression . ' (' . implode(', ', array_keys($first)) . ') VALUES '\n . implode(', ', $values);\n\n $types = is_string(key($types)) ? $this->extractTypeValues($first, $types) : $types;\n $finalTypes = $this->repeatTypeValues($data, $types);\n\n return $this->executeUpdate($sql, $params, $finalTypes);\n }", "function InsertRowsBulk($table, $arrFields, $arrRows, $bulkSize)\n\t{\t\n\t\t$arrSql = $this->BuildInsertBulkSql($table, $arrFields, $arrRows, $bulkSize);\n\t\tif (count($arrSql) > 0)\n\t\t{\n\t\t\tforeach ($arrSql as $sql)\n\t\t\t{\n\t\t\t\t// echo $sql;\n\t\t\t\t$this->Query($sql);\n\t\t\t}\n\t\t}\n\t}", "function batch_insert($datas)\n\t{\n\t\t$ci = &get_instance();\n\t\t$ci->db->trans_strict(TRUE);\n\t\t$ci->db->trans_start();\n\n\t\tif (IS_LOCAL) $ci->load->helper('logger');\n\n\t\tforeach($datas as $table => $data) {\n\t\t\t$ci->db->insert($table, $data);\n\n\t\t\tif (IS_LOCAL)\tlogme('INSERT_QUERY', 'info', $ci->db->last_query());\n\t\t}\n\n\t\t$ci->db->trans_complete();\n\t\tif ($ci->db->trans_status() === FALSE)\n\t\t{\n\t\t\tif (IS_LOCAL)\tlogme('ERROR_QUERY', 'info', 'Database Error: '.$ci->db->error()['message']);\n\t\t\treturn [FALSE, ['message' => F::_err_msg('err_commit_data')]];\n\t\t}\n\n\t\treturn [TRUE, NULL];\n\t}", "protected function insertRows($table)\n {\n $rows = $table->getRows();\n foreach ($rows as $row) {\n $this->insertRow($row);\n }\n }", "public function insertMulti($table, $fields, $values) {\n\t\t$holder = implode(',', array_fill(0, count($fields), '?'));\n\t\t$fields = implode(', ', array_map(array(&$this, 'name'), $fields));\n\n\t\t$count = count($values);\n\t\t$sql = \"INSERT INTO {$table} ({$fields}) VALUES ({$holder})\";\n\t\t$statement = $this->_connection->prepare($sql);\n\t\t$this->begin();\n\t\tfor ($x = 0; $x < $count; $x++) {\n\t\t\t$statement->execute($values[$x]);\n\t\t\t$statement->closeCursor();\n\t\t}\n\t\treturn $this->commit();\n\t}", "public function testInsertMultiRows()\n {\n // Open data store\n $this->DB = new DB('../' . DB_PATH);\n \n // Check DB\n $this->assertInstanceOf('DB', $this->DB);\n \n // For each test row, add the row\n foreach($this->testRows as $row)\n {\n // Insert\n $result = $this->DB->insert('alltypes-test', $row);\n \n // Assert that one row was inserted\n $this->assertEquals(1, $result->affected);\n }\n }", "function insertMulti($table, $fields, $values) {\n\t\t$table = $this->fullTableName($table);\n\t\tif (is_array($fields)) {\n\t\t\t$fields = implode(', ', array_map(array(&$this, 'name'), $fields));\n\t\t}\n\t\t$values = implode(', ', $values);\n\t\t$this->query(\"INSERT INTO {$table} ({$fields}) VALUES {$values}\");\n\t}", "public function insertBatch($tablename,$data)\r\n {\r\n return $this->db->insert_batch($tablename,$data);\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/! Interupts the current export if interruption has been requested \a eZStaticExport::requestInterruption \return bool true if the export has been interrupted
function interrupt() { if ($this->attribute( 'status' ) == EZ_STATIC_EXPORT_STATUS_INTERRUPT_REQUESTED ) { eZStaticExportLogger::log( "Interruption requested" ); $cli =& eZCLI::instance(); $ini =& eZINI::instance( 'staticexport.ini' ); $staticFolder = $ini->variable( 'ExportSettings', 'StaticStorageDir' ); $workfFolder = $staticFolder . $this->attribute( 'target' ) . '/work/'; eZDir::recursiveDelete( $workfFolder ); $this->setAttribute( 'status', EZ_STATIC_EXPORT_STATUS_INTERRUPTED ); $this->store(); eZStaticExportLogger::log( "Interruption completed" ); return true; } else { return false; } }
[ "public function isInterrupted(): bool\n {\n return $this->isInterrupted;\n }", "public function mustInterrupt(): bool\n {\n return $this->interrupt ?? false;\n }", "public function isPaymentExecutionInterruptive();", "public function amNotInterrupted()\n {\n return $this->terminate !== true;\n }", "public function test_pre_download_doesnt_interrupt_an_interruption() {\n\t\t$reply = uniqid();\n\n\t\t$this->assertSame(\n\t\t\t$reply,\n\t\t\tFunctions\\pre_download( $reply, self::DOWNLOAD_URL, $this->get_upgrader() ),\n\t\t\t'If the function was already aborting, don\\'t interrupt.'\n\t\t);\n\t}", "public function isShutdownOnInterrupt(): bool\n {\n return $this->shutdownOnInterrupt;\n }", "public function isAbort()\n {\n return $this->isStatus(self::STATUS_ABORT);\n }", "public function interrupt()\n {\n $this->isRunning = false;\n }", "public function isAbort()\n {\n return $this->abort;\n }", "public function resume()\n {\n if (!$this->isQueued() && !$this->isQueuedUndo()) {\n $this->_log(\"Cannot resume an import or undo import that has not been queued.\");\n return false;\n }\n \n $undoImport = $this->isQueuedUndo();\n \n if ($this->isQueued()) {\n $this->status = self::IN_PROGRESS;\n $this->save();\n $this->_log(\"Resumed import.\");\n $this->_importLoop($this->file_position);\n } else {\n $this->status = self::IN_PROGRESS_UNDO;\n $this->save();\n $this->_log(\"Resumed undo import.\");\n $this->_undoImportLoop();\n }\n \n return !$this->isError();\n }", "public function isInterrupted($a = null)\n {\n throw new NotImplementedException(__METHOD__);\n }", "public function getAbort(): bool;", "public function interruptSimulation()\n {\n $this->status = self::STATUS_INTERRUPTED;\n $this->simulation->save();\n }", "protected function hasSystemCallBeenInterrupted()\n {\n $lastError = error_get_last();\n\n // stream_select returns false when the `select` system call is interrupted by an incoming signal\n return isset($lastError['message']) && false !== stripos($lastError['message'], 'interrupted system call');\n }", "public function isCanceled();", "public function isSuspended(): bool;", "public static function inProgress()\n {\n return isset($_SESSION['in-progress']);\n }", "public function isSuspended()\n {\n }", "public function isCancelRequested(){\n\t\treturn $this->getSubscription()->getCancelRequest() == 1;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
update detail map using ajax.
public function actionUpdateDetailMap(){ if (Yii::$app->request->isAjax) { Yii::$app->response->format = Response::FORMAT_JSON; $request= Yii::$app->request; $data_latlg=$request->post('val'); $explode = explode(',',$data_latlg); $model = $this->findModelcust($explode[0]); $model->MAP_LAT = $explode[1]; $model->MAP_LNG = $explode[2]; $model->LOCK_MAP = 1; $model->save(); } return true; }
[ "protected function onUpdateAjax() {}", "function ajaxUpdateAction() {\n $request = $this->getRequest()->request;\n $params = $this->getDashboardParams();\n $locationFinderService = $this->get('e2w_location_finder_service');\n $locationFinderService->updateLocatoinFinderValue(intval($params['user']->getId()), $request->get('type'), $request->get('value'));\n\n return $this->json(array('status' => 1));\n }", "public function ajaxeventmapAction() {\n $request = $this->getRequest(); /* Fetching Request */\n $em = $this->getEntityManager(); /* Call Entity Manager */\n $id;\n $eventId;\n $mapObject;\n if ($request->isPost()) {\n $data = $request->getPost();\n $eventId = $data['eventID'];\n //$layoutID = $data['layoutID']; //not in used, may be future\n $mapObj = $em->getRepository('Admin\\Entity\\EventMap')->getMapByEventId($eventId);\n //$zoneObj = $em->getRepository('Admin\\Entity\\MapZone')->getZoneByEventId($eventId);\n foreach ($mapObj as $obj) {\n $id = $obj['id'];\n $eventId = $obj['eventId'];\n $mapObject = $obj['mapObject'];\n }\n $mapObject = unserialize($mapObject); //unserialize object\n print json_encode(array('status' => 'success', 'id' => $id, 'eventId' => $eventId, 'mapObject' => $mapObject));\n die();\n } else {\n print json_encode(array('status' => 'error'));\n die();\n }\n }", "function ajax() {\n $method = $this->input->post('method');\n switch ($method) {\n case \"add\" :\n $this->form_validation->set_rules($this->config->item('insert', 'user_map_validation'));\n if ($this->form_validation->run($this, 'insert') == FALSE)\n echo json_encode(array(\"event\" => \"error\", \"msg\" => validation_errors()));\n else {\n $insertedrows = $this->umap->insertInto($this->input->post());\n if ($insertedrows)\n echo json_encode(array(\"event\" => \"success\", \"msg\" => _e('user map added')));\n else\n echo json_encode(array(\"event\" => \"error\", \"msg\" => _e('user map add fail')));\n }\n break;\n }\n }", "public function updateMap(){\n mapModel::insertMap($this, \"Update\");\n }", "function ajaxUpdate() {\n sleep(1);\n $req = $_POST['data'];\n if ($req['pId'] > 0) {\n $res = $this->productmodel->update($req);\n if ($res) {\n $pInfo = $this->productmodel->getProductInfoById($res);\n if ($pInfo){\n $pInfo['error'] = '0';\n if (file_exists(PUBLIC_PATH . 'images/' . $pInfo['image_path'])) {\n $pInfo['image_path'] = base_url() . 'public/images/' . $pInfo['image_path'];\n } else {\n $pInfo['image_path'] = base_url() . 'public/images/default_img_thumb.gif';\n }\n echo json_encode($pInfo);\n } else {\n echo json_encode(array('error' => '1'));\n }\n } else {\n echo json_encode(array('error' => '1'));\n }\n } else {\n echo json_encode(array('error' => '0'));\n }\n }", "public function ajaxMapsIsNoPostAction()\n {\n $this->_helper->ajax();\n $userId = (int) $this->_getParam('userId');\n\n if ( isset( $userId ) && ( $userId != 0 ) ) {\n\n $userModelDbTableSettings = new User_Model_DbTable_Settings();\n $info = $userModelDbTableSettings->otherInformation( $userId );\n\n $this->view->result = Zend_Json::encode(array(\n 'id' => $userId,\n 'info' => $info \n ));\n\n } else {\n $this->view->result = Zend_Json::encode(array(\n 'Error' => \"Wrong user id\"\n ));\n }\n }", "public function ajaxUpdate()\n {\n try {\n $listKey = array('id', 'start', 'end');\n\n Verify::checkArrayKeyNotEmpty($listKey, $_POST);\n Verify::checkIsDateStartLessThanDateEnd($_POST['start'], $_POST['end']);\n\n $workObject = new Works($_POST['id'], '', $_POST['start'], $_POST['end'], '');\n\n if (!$this->workBloModel->updateWorkByResize($workObject))\n throw new Exception(\"Update Resize Fail\");\n\n $this->view->to('works/index');\n\n } catch (Exception $exception) {\n $data['message'] = $exception->getMessage();\n }\n }", "public function updateLandmarkInfo() \n {\n $ajax_data = array();\n $user_id = $this->user_session->getUserId();\n $account_id = $this->user_session->getAccountId();\n $post = $this->request->request->all();\n\n \t$landmark_id = (isset($post['primary_keys']['landmarkPk'])) ? $post['primary_keys']['landmarkPk'] : 0;\n \t$page = (isset($post['primary_keys']['landmarkPage'])) ? $post['primary_keys']['landmarkPage'] : '';\n \t$radius = (isset($post['primary_keys']['landmarkRadius'])) ? $post['primary_keys']['landmarkRadius'] : '660';\n $params = array();\n $table = '';\n\n if (isset($post['id'])) {\n switch ($post['id']) {\n case 'landmark-name':\n $params['territoryname'] = $post['value'];\n $table = 'territory';\n break;\n case 'landmark-group':\n $params['territorygroup_id'] = $post['value'];\n $table = 'territorygroup_territory';\n break;\n case 'landmark-unit':\n $params['unit_id'] = $post['value'];\n $table = 'unit_territory';\n break;\n case 'landmark-type':\n //$params['reference'] = $post['value'];\n $params['territorytype'] = $post['value'];\n $table = 'territory';\n break;\n case 'landmark-shape':\n $params['shape'] = $post['value'];\n $params['radius'] = $radius;\n if (isset($page) AND $page != 'incomplete') {\n $params['update_shape'] = 1;\n }\n\n $table = 'territory';\n break;\n case 'landmark-radius':\n $params['radius'] = $post['value'];\n $table = 'territory';\n break;\n case 'landmark-address':\n $params['address'] = $post['value'];\n \n //$params['streetaddress'] = '';\n //$params['city'] = '';\n //$params['state'] = '';\n //$params['zipcode'] = '';\n //$params['country'] = '';\n \n $table = 'territory';\n break;\n case 'landmark-map-click':\n $params['lat_long'] = $post['value'];\n \n //$params['latitude'] = '';\n //$params['longitude'] = '';\n \n $table = 'territory';\n break;\n case 'landmark-category':\n $params['territorycategory_id'] = ($post['value'] == 0 ? null : $post['value']);\n $table = 'territory'; \n default:\n break;\n }\n }\n \n // updating shape/location\n if (! empty($post['shape'])) {\n $params['shape'] = $post['shape'];\n $table = 'territory';\n }\n \n if (! empty($post['latitude']) AND ! empty($post['longitude'])) {\n $params['latitude'] = $post['latitude'];\n $params['longitude'] = $post['longitude'];\n $table = 'territory';\n }\n \n if (! empty($post['coordinates']) AND $page == '') {\n $params['coordinates'] = $post['coordinates'];\n $table = 'territory';\n }\n \n if (isset($post['street_address'])) {\n $params['streetaddress'] = $post['street_address'];\n $table = 'territory';\n }\n \n if (isset($post['city'])) {\n $params['city'] = $post['city'];\n $table = 'territory';\n }\n\n if (isset($post['state'])) {\n $params['state'] = $post['state'];\n $table = 'territory';\n }\n\n if (isset($post['zip'])) {\n $params['zipcode'] = (! empty($post['zip'])) ? $post['zip'] : '';\n $table = 'territory';\n }\n \n if (isset($post['country'])) {\n $params['country'] = (! empty($post['country'])) ? $post['country'] : '';\n $table = 'territory';\n }\n \n if (isset($post['process'])) {\n $params['process'] = $post['process'];\n }\n\n if (! empty($params) AND ! empty($landmark_id)) {\n // if from incomplete detail page, update landmarkupload table\n if (isset($page) AND $page == 'incomplete') {\n\n // update first\n $update_landmark = $this->territory_logic->updateIncompleteTerritory($landmark_id, $params, 'territoryupload');\n \n if ($update_landmark !== false) {\n // get this incomplete landmark info $landmark_id\n $landmarkupload = $this->territory_data->getTerritoryUploadByIds(array($landmark_id));\n \n if ( isset($landmarkupload[0]) AND ! empty($landmarkupload[0])) {\n $row = $landmarkupload[0];\n // calculate bounding box\n $boundingbox = $this->territory_logic->getBoundingBoxValue('circle', array($row['latitude'] . ' ' . $row['longitude']), $row['radius']);\n \n // create landmark params \n $landmark_created = false;\n $params = array(\n 'account_id' => $account_id,\n 'territorycategory_id' => $row['territorycategory_id'],\n 'unit_id' => (isset($row['unit_id']) ? trim($row['unit_id']) : 0),\n 'territoryname' => (isset($row['territoryname']) ? trim($row['territoryname']) : ''),\n 'streetaddress' => (isset($row['streetaddress']) ? trim($row['streetaddress']) : ''),\n 'city' => (isset($row['city']) ? trim($row['city']) : ''),\n 'state' => (isset($row['state']) ? trim($row['state']) : ''),\n 'zipcode' => (isset($row['zipcode']) ? trim($row['zipcode']) : 0),\n 'country' => (isset($row['country']) ? trim($row['country']) : ''),\n 'latitude' => ((is_numeric($row['latitude']) AND ! empty($row['latitude'])) ? trim($row['latitude']) : 0),\n 'longitude' => ((is_numeric($row['longitude']) AND ! empty($row['longitude'])) ? trim($row['longitude']) : 0),\n 'radius' => ((is_numeric($row['radius']) AND ! empty($row['radius'])) ? trim($row['radius']) : 0),\n 'territorygroupname' => (isset($row['territorygroupname'])) ? trim($row['territorygroupname']) : '',\n 'territorytype' => (isset($row['territorytype'])) ? trim($row['territorytype']) : 'landmark',\n 'shape' => 'circle',\n 'boundingbox' => ((isset($boundingbox) AND $boundingbox != '') ? trim($boundingbox) : ''),\n 'active' => 1,\n 'process' => $row['process']\n );\n \n // process validation for inline field\n $validated = $this->territory_logic->validateIncompleteTerritoryInfo($post['id'], $params);\n if ($validated === true) {\n \n // if no error then validation passes so process transfer\n $validated_transfer = $this->territory_logic->saveIncompleteToTerritory($account_id, $user_id, $landmark_id, $params);\n if ($validated_transfer === true) {\n \n \t $ajax_data['data'] = $post;\n \t $ajax_data['code'] = 0;\n \t $ajax_data['message'] = 'Updated and Transfer Successful';\n \t \n } else {\n // errors while transfering\n \t $ajax_data['data'] = $post;\n \t $ajax_data['code'] = 0;\n \t $ajax_data['new_error'] = $validated_transfer;\n \t $ajax_data['message'] = 'Transfer Not Successful';\n }\n } else {\n // has validation error for this field\n \t $ajax_data['data'] = $post;\n \t $ajax_data['code'] = 1;\n \t $ajax_data['validation_error'] = $validated;\n \t $ajax_data['new_error'] = $validated;\n \t $ajax_data['message'] = 'Transfer Not Successful';\n }\n \n $row['formatted_address'] = $this->address_logic->validateAddress($row['streetaddress'], $row['city'], $row['state'], $row['zipcode'], $row['country']);\n $row['radius_in_miles'] = Measurement::radiusFeetToFractionConverter($row['radius']);\n $ajax_data['data']['landmark_data'] = $row;\n } else {\n //incomplete landmark not found\n \t $ajax_data['data'] = $post;\n \t $ajax_data['code'] = 0;\n \t $ajax_data['message'] = 'This Incomplete Landmark Not Found';\n }\n } else {\n $error = $this->territory_logic->getErrorMessage();\n $ajax_data['validation_error'] = $error;\n\t $ajax_data['data'] = $post;\n\t $ajax_data['code'] = 1; \n\t $ajax_data['message'] = 'Failed to update the Incomplete Landmark'; \n }\n } else {\n // Not incomplete landmark updates\n\t if ($this->territory_logic->updateTerritoryInfo($landmark_id, $params, $table) !== false) {\n\t $ajax_data['data'] = $post;\n\n\t $landmark_info = $this->territory_logic->getTerritoryByIds($landmark_id);\n\t $ajax_data['data']['landmark_data'] = array_pop($landmark_info);\n\t $ajax_data['code'] = 0;\n\t $ajax_data['message'] = 'Updated Landmark Information';\n\t } else {\n $errors = $this->territory_logic->getErrorMessage();\n if (! empty($errors) AND is_array($errors)) {\n $errors = implode(',', $errors); \n }\n $ajax_data['code'] = 1;\n $ajax_data['validation_error'][] = $ajax_data['message'] = $errors;\n\t }\n }\n } else {\n $ajax_data['code'] = 1;\n $ajax_data['message'] = 'Invalid landmark ID or nothing to update';\n }\n\n $this->ajax_respond($ajax_data);\n }", "public function updateArticleInfo()\n {\n if($_POST){\n $re_data['status'] = 100;\n $postinfo= $this->Common->html_filter_array($_POST);\n $where=array('id' => $postinfo['id']);\n $data=array('name' => $postinfo['name'],'author' => $postinfo['author'],'title' => $postinfo['title'],'read' => $postinfo['read'],'page' => $postinfo['page'],'type' => $postinfo['type'],'themeId' => $postinfo['theme'],'language'=>$postinfo['language'],'province' => $postinfo['province']);\n $rep=$this->Common->update($this->article_table,$where,$data);\n if($rep>0){\n $re_data['status'] =200;\n }\n echo json_encode($re_data);\n }\n }", "public function update_details()\n {\n $data = $this->input->post(null, true);\n $data['member_id'] = $this->session->id;\n\n if ($this->agenda_model->update_nszk_inschrijving($data)) {\n success('Je aanmelding is bijgewerkt!');\n } else {\n error('Er is een fout opgetreden.');\n }\n\n redirect('/agenda/id/' . $data['nszk_id']);\n }", "public function wp_ajax_save_mappings() {\n\t\t$data = $_POST['data'];\n\t\t$data = html_entity_decode( stripslashes( $data ) );\n\t\t$maps = WPLR_MappingsManager::instance();\n\t\t$maps->load( $data );\n\t\ttry {\n\t\t\t$maps->save();\n\t\t} catch ( Exception $e) {\n\t\t\twp_send_json_error( $e->getMessage() );\n\t\t}\n\t\twp_send_json_success();\n\t}", "protected function _process_ajax() {}", "public function ajaxeditAction(){\n $request = $this->getRequest();\n \n $result['state'] = false;\n \n if ($request->isPost()) {\n $post = $request->getPost();\n $id = $post['id'];\n $from = $post['from'];\n $to = $post['to'];\n if (!$id || !$from || !$to) {\n return $this->redirect()->toRoute('timereg');\n }\n $timereg = $this->getTimeregmapper()->find($id);\n\n if ($timereg) {\n $timereg->setTimestart(new DateTime($from . ':00'));\n $timereg->setTimestop(new DateTime($to . ':00'));\n $this->getEntityManager()->persist($timereg);\n $this->getEntityManager()->flush();\n $result['state'] = true;\n } else {\n $result['error'] = 'Timereg not found!';\n } \n }\n return new JsonModel($result);\n }", "static function ajax_load_map() {\n $saved_maps = get_option(WF_GMP_MAPS_KEY);\n $map_name = substr($_POST['map_name'], 0, 20);\n\n $out = $saved_maps[$map_name];\n $out['map_name'] = $map_name;\n\n die(json_encode($out));\n }", "public function ajaxProductAttributeUpdate()\n {\n $conditons = array('pid' => $this->input->post('attId'));\n $dataArr = array('attr_id' => $this->input->post('attname'), 'attr_price' => $this->input->post('attval'));\n $subproductDetails = $this->product_model->edit_subproduct_update($dataArr, $conditons);\n }", "public function actionAjaxUpdate()\n {\n if ($model = $this->findModel(Yii::$app->request->post('id'))) {\n $this->getPermission($model);\n $model->{Yii::$app->request->post('attribute')} = Yii::$app->request->post('value');\n $model->save();\n }\n }", "public function updateCityBuildingsAjax() {\n\n $data['city_id'] = $this->input->post('city_id');\n $data['building_type'] = $this->input->post('bldType');\n $data['level'] = $this->input->post('level');\n $data['status'] = $this->input->post('status');\n $data['created_on'] = date('Y-m-d H:i:s');\n $data['updated_on'] = date('Y-m-d H:i:s');\n $operation = $this->input->post('operation');\n\n $this->Buildermodel->updateCityBuildings($data, $data['status'], $operation);\n }", "public function wp_ajax_fetch_mappings() {\n\t\t$maps = WPLR_MappingsManager::instance();\n\t\twp_send_json_success( $maps->toArray() );\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Handles generation of HTML field <textarea
function generator_textarea($varname,$value='',$class='') { return( "<textarea id=\"$varname\" name=\"$varname\" class=\"$class\">$value</textarea>" ); }
[ "private function get_textarea() {\n\t\t$html = '';\n\t\t$html .= $this->get_html_label();\n\t\t$input[] = 'name=\"' . $this->name . '\"';\n\t\tif($this->id)\n\t\t\t$input[] = 'id=\"' . $this->id . '\"';\n\t\tif(count($this->class) > 0)\n\t\t\t$input[] = 'class=\"' . implode(' ', $this->class) . '\"';\n\t\tif($this->title)\n\t\t\t$input[] = 'title=\"' . $this->title . '\"';\n\t\tif($this->required)\n\t\t\t$input[] = 'required';\n\t\t$input = array_merge($input, $this->get_html_multiple_attr());\n\t\t$html .= '<textarea ' . implode(' ', $input) . ' >' . ($this->value ? $this->value : '') . '</textarea>';\n\t\treturn $html;\n\t}", "private function prepareTextarea(){\n\t\n\t\techo (isset($this->settings['before_field']))? $this->settings['before_field']:null;\n\t\techo '<textarea ';\n\t\techo 'name = \"'.$this->name.'\" ';\n\t\techo (isset($this->settings['id']))? 'id = \"'.$this->settings['id'].'\" ':null;\n\t\t\n\t\techo (isset($this->settings['datatype']))? 'datatype = \"'.$this->settings['datatype'].'\" ':null;\n\t\techo($this->settings['required_mark'])? ' required ':null;\n\t\t\n\t\techo (isset($this->settings['style']))? $this->settings['style']:null;\n\t\techo (isset($this->settings['disabled']) && $this->settings['disabled'])? 'disabled=\"disabled\"':null;\n\t\techo (isset($this->settings['cols']))? ' cols=\"'.$this->settings['cols'].'\"':'cols=\"40\" ';\n\t\techo (isset($this->settings['rows']))? ' rows=\"'.$this->settings['rows'].'\"':'rows=\"5\" ';\n\t\techo ' >';\n\t\techo (isset($this->settings['value']))? $this->settings['value']:null;\n\t\techo '</textarea>';\n\t\techo (isset($this->settings['after_field']))? $this->settings['after_field']:null;\n\t\techo $this->display_field_msg($this->name, $this->settings['field_msg']);\n\t\n\t}", "public function textarea(): string\n {\n\t\t$attrs = $this->_buildAttrs(['rows' => 3]);\n\t\t\n $value = $this->_getValue();\n\n return $this->_renderWrapperCommonField('<textarea ' . $attrs . '>' . $value . '</textarea>');\n }", "public function textareaFieldCallback()\n {\n $value = esc_attr( get_option( $this->option_name ) );\n echo '<textarea class=\"regular-text\" name=\"' . $this->option_name . '\">' . $value . '</textarea>';\n }", "function setFldTextArea(){\n$Field .= \"<textarea name=\\\"$this->fldName\\\" id=\\\"$this->fldId\\\" class=\\\"$this->cssClass\\\" style=\\\"$this->cssStyle\\\" title=\\\"$this->fldTitle\\\"\" . $this->setReadOnly() .\" \". $this->setDisabled() . \" $this->fldEvento >\";\n$Field .= $this->fldValue;\n$Field .= \"</textarea>\";\nreturn $Field;\n}", "function renderTextareaTypeField($elementName,$value,$options,&$htmlOutput)\n{\n\t\t\t$rows = 5;\n\t\t\t$cols = 20;\n\t\t\t$htmlOutput .= '<textarea style=\"width:100%\" rows=\"'.$rows.'\" cols=\"'.$cols.'\" name=\"'.$elementName.'\" id=\"'.$elementName.'\" />'.$value.'</textarea>';\n\t\t\treturn true;\n}", "function wpcf7dtx_textarea_html($atts)\r\n{\r\n // Attributes specific to HTML creation\r\n $atts = array_merge(array('value' => ''), array_change_key_case((array)$atts, CASE_LOWER));\r\n return sprintf(\r\n '<textarea %s>%s</textarea>',\r\n wpcf7dtx_format_atts($atts),\r\n apply_filters('wpcf7dtx_escape', $atts['value'], false, 'textarea')\r\n );\r\n}", "function athematic_textarea($variables) {\n $element = $variables['element'];\n element_set_attributes($element, array('id', 'name', 'cols', 'rows'));\n _form_set_class($element, array('form-textarea'));\n\n $wrapper_attributes = array(\n 'class' => array('form-textarea-wrapper'),\n );\n\n // Add resizable behavior.\n \n if (!empty($element['#resizable'])) {\n drupal_add_library('system', 'drupal.textarea');\n $wrapper_attributes['class'][] = 'resizable';\n }\n\n $output = '<div' . drupal_attributes($wrapper_attributes) . '><div class=\"text-area-top\"></div> <!--/.text-area-top -->';\n $output .= '<textarea' . drupal_attributes($element['#attributes']) . '>' . check_plain($element['#value']) . '</textarea>';\n $output .= '<div class=\"text-area-bottom\"></div> <!--/.text-area-bottom --></div>';\n return $output;\n}", "function mashsb_textarea_callback( $args ) {\n global $mashsb_options;\n\n if( isset( $mashsb_options[$args['id']] ) )\n $value = $mashsb_options[$args['id']];\n else\n $value = isset( $args['std'] ) ? $args['std'] : '';\n\n $size = ( isset( $args['size'] ) && !is_null( $args['size'] ) ) ? $args['size'] : '40';\n $html = '<textarea class=\"large-text mashsb-textarea\" cols=\"50\" rows=\"' . $size . '\" id=\"mashsb_settings[' . $args['id'] . ']\" name=\"mashsb_settings[' . $args['id'] . ']\">' . esc_textarea( stripslashes( $value ) ) . '</textarea>';\n $html .= '<label class=\"mashsb_hidden\" for=\"mashsb_settings[' . $args['id'] . ']\"> ' . $args['desc'] . '</label>';\n\n echo $html;\n}", "function textarea_field ()\n{\n\tstatic $_defaults = array(\n\t\t'name' => 'textareafield'\n\t\t, 'cols' => 50\n\t\t, 'rows' => 10\n\t\t, 'wrap' => 'soft'\n\t\t, 'default' => NULL\n\t\t, 'value' => NULL\n\t\t, 'source' => NULL\n\t\t, 'allowed' => array('Common','wrap','accesskey','cols','name'\n\t\t\t,'rows','tabindex'\n\t\t)\n\t);\n\tstatic $_simple = array('name','default');\n\t$p = func_get_args();\n\t$p = parse_arguments($p, $_simple, $_defaults);\n\t$p['value'] = get_field_value($p['name'],$p['default'],$p['value'],$p['source']);\n\t$attlist = get_attlist($p);\n\t$output = \"<textarea $attlist>{$p['value']}</textarea>\";\n\treturn $output;\n}", "function starterkit_textarea($variables) {\n\t$element = $variables['element'];\n element_set_attributes($element, array('id', 'name', 'cols', 'rows'));\n _form_set_class($element, array('form-textarea'));\n\n $wrapper_attributes = array(\n 'class' => array('form-textarea-wrapper'),\n );\n\n // Add resizable behavior.\n if (!empty($element['#resizable'])) {\n drupal_add_library('system', 'drupal.textarea');\n $wrapper_attributes['class'][] = 'resizable';\n }\n\n\t// Add bootstrap CSS class\n\t$element['#attributes']['class'][] = 'input-xlarge';\n\n $output = '<textarea' . drupal_attributes($element['#attributes']) . '>' . check_plain($element['#value']) . '</textarea>';\n\n return $output;\n}", "function format_textarea($p_id, $p_name, $p_value, $p_class = 'input-xs', $p_style = '', $p_prop = ''){\n\treturn '<textarea id=\"' . $p_id . '\" name=\"' . $p_name . '\" class=\"' . $p_class . '\" style=\"' . $p_style . '\" value=\"' . $p_value . '\" ' . $p_prop . '>' . $p_value . '</textarea>';\n}", "private function render_textarea_field( array $field_data ) {\n\n\t\t?>\n\t\t<textarea\n\t\t\tid=\"<?php echo esc_attr( $field_data['id'] ); ?>\"\n\t\t\tname=\"<?php echo esc_attr( $field_data['name'] ); ?>\"\n\t\t\tclass=\"<?php echo esc_attr( $field_data['class'] ); ?>\"\n\t\t\tplaceholder=\"<?php echo esc_attr( $field_data['placeholder'] ); ?>\"\n\t\t\tstyle=\"<?php echo esc_attr( $field_data['style'] ); ?>\"\n\t\t\t<?php implode( ' ', $this->get_field_custom_attributes( $field_data ) ); ?>\n\t\t><?php echo wp_kses_post( $field_data['value'] ); ?></textarea>\n\t\t<?php\n\t}", "function ffw_staff_textarea_callback( $args ) {\n global $ffw_staff_settings;\n\n if ( isset( $ffw_staff_settings[ $args['id'] ] ) )\n $value = $ffw_staff_settings[ $args['id'] ];\n else\n $value = isset( $args['std'] ) ? $args['std'] : '';\n\n $size = ( isset( $args['size'] ) && ! is_null( $args['size'] ) ) ? $args['size'] : 'regular';\n $html = '<textarea class=\"large-text\" cols=\"50\" rows=\"5\" id=\"ffw_staff_settings_' . $args['section'] . '[' . $args['id'] . ']\" name=\"ffw_staff_settings_' . $args['section'] . '[' . $args['id'] . ']\">' . esc_textarea( stripslashes( $value ) ) . '</textarea>';\n $html .= '<label for=\"ffw_staff_settings_' . $args['section'] . '[' . $args['id'] . ']\"> ' . $args['desc'] . '</label>';\n\n echo $html;\n}", "function html_textarea($var, $label, $value='') {\r\n return html_label($var, $label)\r\n . '<textarea name=\"' . $var . '\" rows=\"16\" cols=\"72\">' . htmlspecialchars($value) . '</textarea>' . \"\\n\";\r\n}", "function acf_get_textarea_input($attrs = array()) {}", "function textarea($fieldName, $options = array(), $isLDF = null)\n\t{\t\n\t\t$this->setEntity($fieldName);\n\t\t\n\t\t$code = parent::textarea($fieldName, $options);\n\t\t$js = $this->_genFocusCode(Inflector::camelize($this->model()) . Inflector::camelize($this->field()), $options);\n\t\treturn $code . $js;\n\t}", "function BCMH_settings_field_sample_textarea() {\n\t$options = BCMH_get_theme_options();\n\t?>\n\t<textarea class=\"large-text\" type=\"text\" name=\"BCMH_theme_options[sample_textarea]\" id=\"sample-textarea\" cols=\"50\" rows=\"10\" /><?php echo esc_textarea( $options['sample_textarea'] ); ?></textarea>\n\t<label class=\"description\" for=\"sample-textarea\"><?php _e( 'Sample textarea', 'BCMH' ); ?></label>\n\t<?php\n}", "static function textarea($options = []) {\n //default options\n $p['name'] = 'text';\n $p['filecontainer'] = 'fileupload_info';\n $p['rand'] = mt_rand();\n $p['editor_id'] = 'text'.$p['rand'];\n $p['value'] = '';\n $p['enable_richtext'] = false;\n $p['enable_fileupload'] = false;\n $p['display'] = true;\n $p['cols'] = 100;\n $p['rows'] = 15;\n $p['multiple'] = true;\n $p['required'] = false;\n $p['uploads'] = [];\n\n //merge default options with options parameter\n $p = array_merge($p, $options);\n\n $required = $p['required'] ? 'required=\"required\"' : '';\n $display = '';\n $display .= \"<textarea name='\".$p['name'].\"' id='\".$p['editor_id'].\"'\n rows='\".$p['rows'].\"' cols='\".$p['cols'].\"' $required>\".\n $p['value'].\"</textarea>\";\n\n if ($p['enable_richtext']) {\n $display .= Html::initEditorSystem($p['editor_id'], $p['rand'], false);\n } else {\n $display .= Html::scriptBlock(\"\n $(document).ready(function() {\n $('\".$p['editor_id'].\"').autogrow();\n });\n \");\n }\n if (!$p['enable_fileupload'] && $p['enable_richtext']) {\n $display .= self::uploadedFiles([\n 'filecontainer' => $p['filecontainer'],\n 'name' => $p['name'],\n 'display' => false,\n 'uploads' => $p['uploads'],\n 'editor_id' => $p['editor_id'],\n ]);\n }\n\n if ($p['enable_fileupload']) {\n $p_rt = $p;\n unset($p_rt['name']);\n $p_rt['display'] = false;\n $display .= Html::file($p_rt);\n }\n\n if ($p['display']) {\n echo $display;\n return true;\n } else {\n return $display;\n }\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates a XMLRPC call with specified XMLRPC method and parameters from array.
protected function xmlrpc_call($method, $array) { $this->_checkConfig(); if (!isset($method) || !is_string($method)) { throw new Klarna_InvalidTypeException('method', 'string'); } if ($array === null || count($array) === 0) { throw new KlarnaException("Parameterlist is empty or null!", 50067); } if (self::$disableXMLRPC) { return true; } try { /* * Disable verifypeer for CURL, so below error is avoided. * CURL error: SSL certificate problem, verify that the CA * cert is OK. * Details: error:14090086:SSL * routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed (#8) */ $this->xmlrpc->verifypeer = false; $timestart = microtime(true); //Create the XMLRPC message. $msg = new xmlrpcmsg($method); $params = array_merge( array( $this->PROTO, $this->VERSION ), $array ); $msg = new xmlrpcmsg($method); foreach ($params as $p) { if (!$msg->addParam( php_xmlrpc_encode($p, array('extension_api')) ) ) { throw new KlarnaException( "Failed to add parameters to XMLRPC message.", 50068 ); } } //Send the message. $selectDateTime = microtime(true); if (self::$xmlrpcDebug) { $this->xmlrpc->setDebug(2); } $xmlrpcresp = $this->xmlrpc->send($msg); //Calculate time and selectTime. $timeend = microtime(true); $time = (int) (($selectDateTime - $timestart) * 1000); $selectTime = (int) (($timeend - $timestart) * 1000); $status = $xmlrpcresp->faultCode(); if ($status !== 0) { throw new KlarnaException($xmlrpcresp->faultString(), $status); } return php_xmlrpc_decode($xmlrpcresp->value()); } catch(KlarnaException $e) { //Otherwise it is caught below, and rethrown. throw $e; } catch(Exception $e) { throw new KlarnaException($e->getMessage(), $e->getCode()); } }
[ "function xmlrpc($url) {\n //require_once './includes/xmlrpc.inc';\n $args = func_get_args();\n return call_user_func_array('_xmlrpc', $args);\n}", "public function call(string $method, array $parameters = []);", "function callServer($url, $method, $params='')\n{\n require_once 'lib/xmlrpc.inc';\n\n // init client with server-parameters\n $client = new xmlrpc_client($url);\n // $client->setDebug(2);\n \n // prepare parameters (if needed)\n $parameter_valid = array();\n if(is_array($params))\n {\n foreach($params as $value)\n array_push($parameter_valid, new xmlrpcval($value['value'], $value['type']));\n }\n \n // prepare message for server (w/ ord w/o parameters)\n if(count($parameter_valid) > 0)\n $message = new xmlrpcmsg($method, $parameter_valid);\n else\n $message = new xmlrpcmsg($method);\n\n // send message to server\n $result = $client->send($message);\n\n // check response and create response-array\n if (!$result)\n $ret_array = array('success'=>false, \n \"err\" => \"Could not connect to server.\");\n elseif ($result->faultCode())\n $ret_array = array('success'=>false,\n \"err\" => \"XML-RPC Fault #\".$result->faultCode().\" : \".$result->faultString());\n else\n $ret_array = array('success'=>true, \"xmlrpc\" => $result);\n\n // resturn response-array\n return $ret_array;\n}", "public function __xmlrpcCall($methodName)\n {\n $params = func_num_args() > 1 ? array_shift(func_get_args())\n : null;\n\n return $this->__call($methodName, $params);\n }", "function rpc($procedure, $params)\r\r\n{\r\r\n return XMLRPC_request(RPCHOST, RPCSERVER, $procedure, array(XMLRPC_prepare($params)));\r\r\n}", "public function handle_rpc_call($arr)\n\t{\n\t\textract($arr);\n\n\t\t// now, catch all output\n\t\tob_start();\n\n\t\t// load rpc handler\n\t\t$inst = new $method();\n\t\tif (!is_object($inst))\n\t\t{\n\t\t\t$this->raise_error(\"ERR_ORB_RPC_NO_HANDLER\",sprintf(t(\"orb::handle_rpc_call - Could not load request handler for request method '%s'\"), $method), true,false);\n\t\t}\n\n\t\t// decode request\n\t\t$request = $inst->decode_request();\n\n\t\tif (empty($request[\"class\"]))\n\t\t{\n\t\t\t$inst->handle_error(1, \"No class given\");\n\t\t}\n\n\t\t// do the method calling thing\n\t\t$orb_defs = $this->try_load_class($request[\"class\"]);\n\n\t\t$params = $this->check_method_params($orb_defs, $request[\"params\"], $request[\"class\"], $request[\"action\"]);\n\n\t\tif (!isset($orb_defs[$request[\"class\"]][$request[\"action\"]]))\n\t\t{\n\t\t\t$this->raise_error(\"ERR_ORB_MNOTFOUND\",sprintf(\"No action with name %s defined in class %s! Malformed XML?\",$request[\"action\"],$request[\"class\"]),true,$this->silent);\n\t\t}\n\n\t\t$ret = $this->do_local_call($orb_defs[$request[\"class\"]][$request[\"action\"]][\"function\"], $request[\"class\"], $params,$orb_defs[$request[\"class\"]][\"___folder\"]);\n\n\n\t\t$output = (string) ob_get_contents();\n\t\tob_end_clean();\n\n\t\tif (strlen($output))\n\t\t{\n\t\t\t$output = htmlentities($output);\n\t\t\t$inst->handle_error(2, \"Output generated during RPC call! content: '{$output}'\");\n\t\t}\n\n\t\treturn $inst->encode_return_data($ret);\n\t}", "function xenRPC_method(String $name, array $params)\n\t{\n\n\t\t$encoded_request = xmlrpc_encode_request($name, $params);\n\n\t\treturn $encoded_request;\n\t}", "public function createPayload()\n {\n $this->payload = '<?xml version=\"1.0\"?'.\">\\r\\n<methodCall>\\r\\n\"\n .'<methodName>'.$this->method_name.\"</methodName>\\r\\n\"\n .\"<params>\\r\\n\";\n\n for ($i = 0, $c = count($this->params); $i < $c; $i++)\n {\n // $p = XML_RPC_Values\n $p = $this->params[$i];\n $this->payload .= \"<param>\\r\\n\".$p->serialize_class().\"</param>\\r\\n\";\n }\n\n $this->payload .= \"</params>\\r\\n</methodCall>\\r\\n\";\n }", "function xenrpc_method($name, $params)\n\t{\n\n\t\t$encoded_request = xmlrpc_encode_request($name, $params);\n\n\t\treturn $encoded_request;\n\t}", "function internal_call_xmlrpc($method, $args = NULL, $backtrace_level = 2) {\n $curl = curl_init();\n\n // Verify peer certificate if talking over SSL\n if ($this->port == 443) {\n curl_setopt($curl, CURLOPT_SSL_VERIFYPEER, 2);\n if (!empty($this->cainfo)) {\n curl_setopt($curl, CURLOPT_CAINFO, $this->cainfo);\n } elseif (defined('PLC_API_CA_SSL_CRT')) {\n curl_setopt($curl, CURLOPT_CAINFO, PLC_API_CA_SSL_CRT);\n }\n $url = 'https://';\n } else {\n $url = 'http://';\n }\n\n // Set the URL for the request\n $url .= $this->server . ':' . $this->port . '/' . $this->path;\n curl_setopt($curl, CURLOPT_URL, $url);\n\n // Marshal the XML-RPC request as a POST variable. <nil/> is an\n // extension to the XML-RPC spec that is supported in our custom\n // version of xmlrpc.so via the 'allow_null' output_encoding key.\n $request = xmlrpc_encode_request($method, $args, array('null_extension'));\n curl_setopt($curl, CURLOPT_POSTFIELDS, $request);\n\n // Construct the HTTP header\n $header[] = 'Content-type: text/xml';\n $header[] = 'Content-length: ' . strlen($request);\n curl_setopt($curl, CURLOPT_HTTPHEADER, $header);\n\n // Set some miscellaneous options\n curl_setopt($curl, CURLOPT_TIMEOUT, 180);\n\n // Get the output of the request\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, 1);\n $t0 = $this->microtime_float();\n $output = curl_exec($curl);\n $t1 = $this->microtime_float();\n\n if (curl_errno($curl)) {\n $this->error_log('curl: ' . curl_error($curl), true);\n $ret = NULL;\n } else {\n $ret = xmlrpc_decode($output);\n if (is_array($ret) && xmlrpc_is_fault($ret)) {\n $this->error_log('Fault Code ' . $ret['faultCode'] . ': ' .\n $ret['faultString'], $backtrace_level, true);\n $ret = NULL;\n }\n }\n\n curl_close($curl);\n\n $this->trace[] = array('method' => $method,\n 'args' => $args,\n 'runtime' => $t1 - $t0,\n 'return' => $ret,\n 'errors' => $this->errors);\n $this->errors = array();\n\n return $ret;\n }", "public function sendXmlRpcRequest($method, $params)\r\n {\r\n $request = xmlrpc_encode_request($method, $params);\r\n $req = curl_init($this->url);\r\n\r\n //Using the cURL extension to send it off, first creating a custom header block\r\n $headers = array();\r\n array_push($headers,'Content-Type: text/xml');\r\n array_push($headers,'Content-Length: ' . strlen($request));\r\n array_push($headers,'\\r\\n');\r\n\r\n //URL to post to\r\n curl_setopt($req, CURLOPT_URL, $this->url);\r\n\r\n //Setting options for a secure SSL based xmlrpc server\r\n curl_setopt($req, CURLOPT_SSL_VERIFYPEER, false);\r\n curl_setopt($req, CURLOPT_SSL_VERIFYHOST, 2);\r\n curl_setopt( $req, CURLOPT_CUSTOMREQUEST, 'POST' );\r\n curl_setopt($req, CURLOPT_RETURNTRANSFER, 1 );\r\n curl_setopt($req, CURLOPT_HTTPHEADER, $headers );\r\n curl_setopt( $req, CURLOPT_POSTFIELDS, $request );\r\n\r\n //Finally run\r\n $response = curl_exec($req);\r\n\r\n //Close the cURL connection\r\n curl_close($req);\r\n \r\n return xmlrpc_decode($response);\r\n }", "function createPayload()\n\t{\n\t\t$this->payload = \"<?xml version=\\\"1.0\\\"?\".\">\\r\\n<methodCall>\\r\\n\";\n\t\t$this->payload .= '<methodName>' . $this->method_name . \"</methodName>\\r\\n\";\n\t\t$this->payload .= \"<params>\\r\\n\";\n\n\t\tfor ($i=0; $i<count($this->params); $i++)\n\t\t{\n\t\t\t// $p = XML_RPC_Values\n\t\t\t$p = $this->params[$i];\n\t\t\t$this->payload .= \"<param>\\r\\n\".$p->serialize_class().\"</param>\\r\\n\";\n\t\t}\n\n\t\t$this->payload .= \"</params>\\r\\n</methodCall>\\r\\n\";\n\t}", "function writeCall($method,&$params, $id, $version = PHP_MC_PACK_V2){\n /*\n\t\t$stream = &$this->stream;\n\t\t$stream = \"c\\x01\\x00m\";\n\t\t$this->writeStringData($method);\n\t\tforeach($params as $param){\n\t\t\t$this->writeObject($param);\n\t\t}\n\t\t$stream .= \"z\";\n */\n #print_r($params);\n #print_r($this->object2array($params));\n //组装调用数据\n $stream = mc_pack_array2pack(array(\n JSONRPC_HEAD => JSONRPC_VERSION,\n 'method'=>$method, \n 'params'=>$this->object2array($params), //object 转化成array\n 'id' => \"$id\"), $version);\n #print($stream);\n \n\t\treturn $stream;\n\t}", "function call_user_method_array ($method_name, &$obj, array $paramarr) {}", "protected function _call() {\n\n\t\t$argList = func_get_args();\n\n\t\t$method \t= $argList[0];\n\t\t$methodArgList \t= array_slice($argList, 1);\n\n\t\t//print $method;\n\t\t//print var_dump($argList);\n\t\t//print var_dump($methodArgList);\n\n\t\treturn $this->_request($method, $methodArgList);\n\t}", "function do_method_call($arr)\n\t{\n\t\textract($arr);\n\t\t$params = isset($arr[\"params\"]) ? $arr[\"params\"] : array();\n\n\t\t$this->fatal = true;\n\t\t$this->silent = false;\n\n\t\tif (!isset($class))\n\t\t{\n\t\t\tthrow new awex_orb_class(\"No class specified\");\n\t\t}\n\n\t\tif (!isset($action))\n\t\t{\n\t\t\t$this->raise_error(\"ERR_ORB_AUNDEF\",E_ORB_ACTION_UNDEF,true,$this->silent);\n\t\t}\n\n\t\t// get orb defs for the class\n\n\t\t// check params\n\t\tif (!isset($method) || (isset($method) && ($method === \"local\")))\n\t\t{\n\t\t\t$orb_defs = $this->try_load_class($class);\n\t\t\t$params = $this->check_method_params($orb_defs, $params, $class, $action);\n\t\t\t$arr[\"params\"] = $params;\n\t\t\t$this->do_orb_acl_checks($orb_defs[$class][$action], $params);\n\t\t}\n\n\n\t\t// do the call\n\t\tif (!isset($method) || (isset($method) && ($method === \"local\")))\n\t\t{\n\t\t\t// local call\n\t\t\t$___folder = isset($orb_defs[$class][\"___folder\"]) ? $orb_defs[$class][\"___folder\"] : NULL;\n\t\t\t$data = $this->do_local_call($orb_defs[$class][$action][\"function\"], $class, $params, $___folder);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t// log in if necessary or get the existing session for rpc call\n\t\t\tlist($arr[\"remote_host\"], $arr[\"remote_session\"]) = $this->get_remote_session($arr);\n\n\t\t\t// load rpc handler\n\t\t\t$inst = get_instance(\"core/orb/\".$method);\n\t\t\tif (!is_object($inst))\n\t\t\t{\n\t\t\t\t$this->raise_error(\"ERR_ORB_RPC_NO_HANDLER\",sprintf(t(\"Could not load request handler for request method '%s'\"), $method), true,$this->silent);\n\t\t\t}\n\t\t\t// send the remote request and read the result\n\t\t\t$data = $inst->do_request($arr);\n\t\t}\n\n\t\treturn $data;\n\t}", "function call_user_method_array ($method_name, &$obj, array $params) {}", "private function multiCall( $params = null ) {\n\t\tif ( $params && is_array( $params ) ) \n\t\t{\n\t\t\t$result = array();\n\t\t\t$params = $params[0];\n\t\t\tforeach ( $params as $param ) {\n\t\t\t\t$method = $param['methodName'];\n\t\t\t\t$args = $param['params'];\n\t\t\t\ttry {\n\t\t\t\t\t// XML-RPC specification says that non-fault results must be in a single item array\n\t\t\t\t\t$result[] = array( $this->call($method, $args) );\n\t\t\t\t} catch( Exception $e) {\n\t\t\t\t\t$result[] = ripcord::fault( $e->getCode(), $e->getMessage() );\n\t\t\t\t}\n\t\t\t}\n\t\t\t$result = xmlrpc_encode_request( null, $result, $this->outputOptions );\n\t\t} else {\n\t\t\t$result = xmlrpc_encode_request( \n\t\t\t\tnull, \n\t\t\t\tripcord::fault( -2, 'Illegal or no params set for system.multiCall'), \n\t\t\t\t$this->outputOptions\n\t\t\t);\n\t\t}\t\n\t\treturn $result;\n\t}", "public function unsignedCall(string $method, array $params = [], string $requestMethod = 'GET'): array;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
CREATE A DEFAULT FRAME OBJECT
public function default_frame($o = array(), $overwrite_with = array()){ $f = $this->get_val($o, 'fid', 'frame_0'); $_base = array( 'grayscale' => array('frame_0' => 0, 'frame_1' => 0, 'frame_999' => 'inherit'), //0 'brightness' => array('frame_0' => 100, 'frame_1' => 100, 'frame_999' => 'inherit'), //100 'blur' => array('frame_0' => 0, 'frame_1' => 0, 'frame_999' => 'inherit'), //100 'transformPerspective' => array('frame_0' => 600, 'frame_1' => 600, 'frame_999' => 600), //transform 'x' => array('frame_0' => 0, 'frame_1' => 0, 'frame_999' => 'inherit'), //0 'y' => array('frame_0' => 0, 'frame_1' => 0, 'frame_999' => 'inherit'), //0 'z' => array('frame_0' => 0, 'frame_1' => 0, 'frame_999' => 'inherit'), //0 'scaleX' => array('frame_0' => 1, 'frame_1' => 1, 'frame_999' => 'inherit'), //0 'scaleY' => array('frame_0' => 1, 'frame_1' => 1, 'frame_999' => 'inherit'), //0 'opacity' => array('frame_0' => 0, 'frame_1' => 1, 'frame_999' => 'inherit'), //1 'rotationX' => array('frame_0' => 0, 'frame_1' => 0, 'frame_999' => 'inherit'), //0 'rotationY' => array('frame_0' => 0, 'frame_1' => 0, 'frame_999' => 'inherit'), //0 'rotationZ' => array('frame_0' => 0, 'frame_1' => 0, 'frame_999' => 'inherit'), //0 'skewX' => array('frame_0' => 0, 'frame_1' => 0, 'frame_999' => 'inherit'), //0 'skewY' => array('frame_0' => 0, 'frame_1' => 0, 'frame_999' => 'inherit'), //0 'originX' => array('frame_0' => '50%', 'frame_1' => '50%', 'frame_999' => 'inherit'), //'50%' 'originY' => array('frame_0' => '50%', 'frame_1' => '50%', 'frame_999' => 'inherit'), //'50%' 'originZ' => array('frame_0' => 0, 'frame_1' => 0, 'frame_999' => 'inherit'), //'0' //timeline 'ease' => array('frame_0' => false, 'frame_999' => 'Power3.easeInOut'), //'Power3.easeInOut' 'start' => array('frame_0' => false, 'frame_1' => 10, 'frame_999' => true), //0 'speed' => array('frame_0' => false, 'frame_999' => 300) //300 ); $_split = array( 'ease' => array('frame_0' => false, 'frame_999' => 'inherit'), 'direction' => array('frame_0' => false, 'frame_999' => 'forward'), //'forward' 'delay' => array('frame_0' => false, 'frame_999' => 5), //5 'x' => array('frame_0' => 0, 'frame_1' => 0, 'frame_999' => 'inherit'), 'y' => array('frame_0' => 0, 'frame_1' => 0, 'frame_999' => 'inherit'), 'z' => array('frame_0' => 0, 'frame_1' => 0, 'frame_999' => 'inherit'), 'scaleX' => array('frame_0' => 1, 'frame_1' => 1, 'frame_999' => 'inherit'), 'scaleY' => array('frame_0' => 1, 'frame_1' => 1, 'frame_999' => 'inherit'), 'rotationX' => array('frame_0' => 1, 'frame_1' => 1, 'frame_999' => 'inherit'), 'rotationY' => array('frame_0' => 1, 'frame_1' => 1, 'frame_999' => 'inherit'), 'rotationZ' => array('frame_0' => 1, 'frame_1' => 1, 'frame_999' => 'inherit'), 'skewX' => array('frame_0' => 0, 'frame_1' => 0, 'frame_999' => 'inherit'), 'skewY' => array('frame_0' => 0, 'frame_1' => 0, 'frame_999' => 'inherit'), 'originX' => array('frame_0' => '50%', 'frame_1' => '50%', 'frame_999' => 'inherit'), //'50%' 'originY' => array('frame_0' => '50%', 'frame_1' => '50%', 'frame_999' => 'inherit'), //'50%' 'originZ' => array('frame_0' => 0, 'frame_1' => 0, 'frame_999' => 'inherit') ); $_mask = array( 'x' => array('frame_0' => 0, 'frame_1' => 0, 'frame_999' => 'inherit'), 'y' => array('frame_0' => 0, 'frame_1' => 0, 'frame_999' => 'inherit') ); $o['chars'] = $this->get_val($o, 'chars', array()); $o['words'] = $this->get_val($o, 'words', array()); $o['lines'] = $this->get_val($o, 'lines', array()); $o['mask'] = $this->get_val($o, 'mask', array()); $o['color'] = $this->get_val($o, 'color', array()); $o['bgcolor'] = $this->get_val($o, 'bgcolor', array()); $gs = $this->get_val($o, 'grayscale', $this->get_val($_base, array('grayscale', $f), 0)); $bs = $this->get_val($o, 'brightness', $this->get_val($_base, array('brightness', $f), 100)); $blr = $this->get_val($o, 'blur', $this->get_val($_base, array('blur', $f), 0)); $fuse = (intval($gs) !== 0 || intval($bs) !== 100 || intval($blr) !== 0) ? true : false; $frame = array( 'alias' => $this->get_val($o, 'alias', __('On Stage', 'revslider')), 'filter' => array( 'use' => $fuse, 'grayscale' => $gs, 'brightness' => $bs, 'blur' => $blr ), 'transform' => array( 'x' => $this->c_to_resp(array('default' => $this->get_val($o, 'x', $this->get_val($_base, array('x', $f), 0)))), 'y' => $this->c_to_resp(array('default' => $this->get_val($o, 'y', $this->get_val($_base, array('y', $f), 0)))), 'z' => $this->get_val($o, 'z', $this->get_val($_base, array('z', $f), 0)), 'scaleX' => $this->get_val($o, 'scaleX', $this->get_val($_base, array('scaleX', $f), 1)), 'scaleY' => $this->get_val($o, 'scaleY', $this->get_val($_base, array('scaleY', $f), 1)), 'opacity' => $this->get_val($o, 'opacity', $this->get_val($_base, array('opacity', $f), 1)), 'rotationX' => $this->get_val($o, 'rotationX', $this->get_val($_base, array('rotationX', $f), 0)), 'rotationY' => $this->get_val($o, 'rotationY', $this->get_val($_base, array('rotationY', $f), 0)), 'rotationZ' => $this->get_val($o, 'rotationZ', $this->get_val($_base, array('rotationZ', $f), 0)), 'skewX' => $this->get_val($o, 'skewX', $this->get_val($_base, array('skewX', $f), 0)), 'skewY' => $this->get_val($o, 'skewY', $this->get_val($_base, array('skewY', $f), 0)), 'originX' => $this->get_val($o, 'originX', $this->get_val($_base, array('originX', $f), '50%')), 'originY' => $this->get_val($o, 'originY', $this->get_val($_base, array('originY', $f), '50%')), 'originZ' => $this->get_val($o, 'originY', $this->get_val($_base, array('originZ', $f), '0')), 'transformPerspective' => $this->get_val($o, 'transformPerspective', $this->get_val($_base, array('transformPerspective', $f), '600px')), ), 'reverseDirection' => array( 'x' => $this->_truefalse($this->get_val($o, 'rx', false)), 'y' => $this->_truefalse($this->get_val($o, 'ry', false)), 'rotationX' => $this->_truefalse($this->get_val($o, 'rrotationX', false)), 'rotationY' => $this->_truefalse($this->get_val($o, 'rrotationY', false)), 'rotationZ' => $this->_truefalse($this->get_val($o, 'rrotationZ', false)), 'skewX' => $this->_truefalse($this->get_val($o, 'rskewX', false)), 'skewY' => $this->_truefalse($this->get_val($o, 'rskewY', false)), 'maskX' => $this->_truefalse($this->get_val($o, 'rmaskX', false)), 'maskY' => $this->_truefalse($this->get_val($o, 'rmaskY', false)), 'charsX' => $this->_truefalse($this->get_val($o, 'crx', false)), 'charsY' => $this->_truefalse($this->get_val($o, 'cry', false)), 'charsDirection' => $this->_truefalse($this->get_val($o, 'crsd', false)), 'wordsX' => $this->_truefalse($this->get_val($o, 'wrx', false)), 'wordsY' => $this->_truefalse($this->get_val($o, 'wry', false)), 'wordsDirection' => $this->_truefalse($this->get_val($o, 'wrsd', false)), 'linesX' => $this->_truefalse($this->get_val($o, 'lrx', false)), 'linesY' => $this->_truefalse($this->get_val($o, 'lry', false)), 'linesDirection' => $this->_truefalse($this->get_val($o, 'lrsd', false)), /*'z' => $this->get_val($o, 'rz', false), 'scaleX' => $this->get_val($o, 'rscaleX', false), */ ), 'mask' => array( 'use' => $this->_truefalse($this->get_val($o['mask'], 'use', false)), 'x' => $this->c_to_resp(array('default' => $this->get_val($o['mask'], 'x', $this->get_val($_mask, array('x', $f), 0)))), 'y' => $this->c_to_resp(array('default' => $this->get_val($o['mask'], 'y', $this->get_val($_mask, array('y', $f), 0)))) ), 'color' => array( 'color' => $this->get_val($o['color'], 'color', '#ffffff'), 'use' => $this->get_val($o['color'], 'use', false) ), 'bgcolor' => array( 'backgroundColor' => $this->get_val($o['bgcolor'], 'backgroundColor', 'transparent'), 'use' => $this->get_val($o['bgcolor'], 'use', false) ), 'timeline' => array( //'delay' => $this->get_val($o, 'delay', 1000), 'actionTriggered' => $this->get_val($o, 'actionTriggered', $this->get_val($_base, array('actionTriggered', $f), false)), 'ease' => $this->get_val($o, 'ease', $this->get_val($_base, array('ease', $f), '')), 'speed' => $this->get_val($o, 'speed', $this->get_val($_base, array('speed', $f), 300)), 'start' => $this->get_val($o, 'start', $this->get_val($_base, array('start', $f), 0)), 'startRelative' => $this->get_val($o, 'startRelative', 0), 'endWithSlide' => $this->get_val($o, 'endWithSlide', false) ), 'chars' => array( 'ease' => $this->get_val($o['chars'], 'ease', $this->get_val($_split, array('ease', $f), '')), 'use' => $this->get_val($o['chars'], 'use', false), 'direction' => $this->get_val($o['chars'], 'direction', $this->get_val($_split, array('direction', $f), '')), 'delay' => $this->get_val($o['chars'], 'delay', $this->get_val($_split, array('delay', $f), '')), 'x' => $this->c_to_resp(array('default' => $this->get_val($o['chars'], 'x', $this->get_val($_split, array('x', $f), 'inherit')))), 'y' => $this->c_to_resp(array('default' => $this->get_val($o['chars'], 'y', $this->get_val($_split, array('y', $f), 'inherit')))), 'z' => $this->get_val($o['chars'], 'z', $this->get_val($_split, array('z', $f), 'inherit')), 'scaleX' => $this->get_val($o['chars'], 'scaleX', $this->get_val($_split, array('scaleX', $f), 'inherit')), 'scaleY' => $this->get_val($o['chars'], 'scaleY', $this->get_val($_split, array('scaleY', $f), 'inherit')), 'opacity' => $this->get_val($o['chars'], 'opacity', 'inherit'), 'rotationX' => $this->get_val($o['chars'], 'rotationX', $this->get_val($_split, array('rotationX', $f), 'inherit')), 'rotationY' => $this->get_val($o['chars'], 'rotationY', $this->get_val($_split, array('rotationY', $f), 'inherit')), 'rotationZ' => $this->get_val($o['chars'], 'rotationZ', $this->get_val($_split, array('rotationZ', $f), 'inherit')), 'skewX' => $this->get_val($o['chars'], 'skewX', $this->get_val($_split, array('skewX', $f), 'inherit')), 'skewY' => $this->get_val($o['chars'], 'skewY', $this->get_val($_split, array('skewY', $f), 'inherit')), 'originX' => $this->get_val($o['chars'], 'originX', $this->get_val($_split, array('originX', $f), '50%')), 'originY' => $this->get_val($o['chars'], 'originY', $this->get_val($_split, array('originY', $f), '50%')), 'originZ' => $this->get_val($o['chars'], 'originY', $this->get_val($_split, array('originZ', $f), '0')), 'fuse' => $fuse, 'grayscale' => $gs, 'brightness' => $bs, 'blur' => $blr ), 'words' => array( 'ease' => $this->get_val($o['words'], 'ease', $this->get_val($_split, array('ease', $f), '')), 'use' => $this->get_val($o['words'], 'use', false), 'direction' => $this->get_val($o['words'], 'direction', $this->get_val($_split, array('direction', $f), '')), 'delay' => $this->get_val($o['words'], 'delay', $this->get_val($_split, array('delay', $f), '')), 'x' => $this->c_to_resp(array('default' => $this->get_val($o['words'], 'x', $this->get_val($_split, array('x', $f), 'inherit')))), 'y' => $this->c_to_resp(array('default' => $this->get_val($o['words'], 'y', $this->get_val($_split, array('y', $f), 'inherit')))), 'z' => $this->get_val($o['words'], 'z', $this->get_val($_split, array('z', $f), 'inherit')), 'scaleX' => $this->get_val($o['words'], 'scaleX', $this->get_val($_split, array('scaleX', $f), 'inherit')), 'scaleY' => $this->get_val($o['words'], 'scaleY', $this->get_val($_split, array('scaleY', $f), 'inherit')), 'opacity' => $this->get_val($o['words'], 'opacity', 'inherit'), 'rotationX' => $this->get_val($o['words'], 'rotationX', $this->get_val($_split, array('rotationX', $f), 'inherit')), 'rotationY' => $this->get_val($o['words'], 'rotationY', $this->get_val($_split, array('rotationY', $f), 'inherit')), 'rotationZ' => $this->get_val($o['words'], 'rotationZ', $this->get_val($_split, array('rotationZ', $f), 'inherit')), 'skewX' => $this->get_val($o['words'], 'skewX', $this->get_val($_split, array('skewX', $f), 'inherit')), 'skewY' => $this->get_val($o['words'], 'skewY', $this->get_val($_split, array('skewY', $f), 'inherit')), 'originX' => $this->get_val($o['words'], 'originX', $this->get_val($_split, array('originX', $f), '50%')), 'originY' => $this->get_val($o['words'], 'originY', $this->get_val($_split, array('originY', $f), '50%')), 'originZ' => $this->get_val($o['words'], 'originY', $this->get_val($_split, array('originZ', $f), '0')), 'fuse' => $fuse, 'grayscale' => $gs, 'brightness' => $bs, 'blur' => $blr ), 'lines' => array( 'ease' => $this->get_val($o['lines'], 'ease', $this->get_val($_split, array('ease', $f), '')), 'use' => $this->get_val($o['lines'], 'use', false), 'direction' => $this->get_val($o['lines'], 'direction', $this->get_val($_split, array('direction', $f), '')), 'delay' => $this->get_val($o['lines'], 'delay', $this->get_val($_split, array('delay', $f), '')), 'x' => $this->c_to_resp(array('default' => $this->get_val($o['lines'], 'x', $this->get_val($_split, array('x', $f), 'inherit')))), 'y' => $this->c_to_resp(array('default' => $this->get_val($o['lines'], 'y', $this->get_val($_split, array('y', $f), 'inherit')))), 'z' => $this->get_val($o['lines'], 'z', $this->get_val($_split, array('z', $f), 'inherit')), 'scaleX' => $this->get_val($o['lines'], 'scaleX', $this->get_val($_split, array('scaleX', $f), 'inherit')), 'scaleY' => $this->get_val($o['lines'], 'scaleY', $this->get_val($_split, array('scaleY', $f), 'inherit')), 'opacity' => $this->get_val($o['lines'], 'opacity', 'inherit'), 'rotationX' => $this->get_val($o['lines'], 'rotationX', $this->get_val($_split, array('rotationX', $f), 'inherit')), 'rotationY' => $this->get_val($o['lines'], 'rotationY', $this->get_val($_split, array('rotationY', $f), 'inherit')), 'rotationZ' => $this->get_val($o['lines'], 'rotationZ', $this->get_val($_split, array('rotationZ', $f), 'inherit')), 'skewX' => $this->get_val($o['lines'], 'skewX', $this->get_val($_split, array('skewX', $f), 'inherit')), 'skewY' => $this->get_val($o['lines'], 'skewY', $this->get_val($_split, array('skewY', $f), 'inherit')), 'originX' => $this->get_val($o['lines'], 'originX', $this->get_val($_split, array('originX', $f), '50%')), 'originY' => $this->get_val($o['lines'], 'originY', $this->get_val($_split, array('originY', $f), '50%')), 'originZ' => $this->get_val($o['lines'], 'originY', $this->get_val($_split, array('originZ', $f), '0')), 'fuse' => $fuse, 'grayscale' => $gs, 'brightness' => $bs, 'blur' => $blr ), 'sfx' => array( 'effect' => $this->get_val($o, 'effect', ''), 'color' => $this->get_val($o, 'sfxcolor', '#ffffff') ) ); /*if(isset($frame['actionTriggered'])){ $frame['timeline']['actionTriggered'] = $frame['actionTriggered']; }*/ //only for frame_999 currently if($this->get_val($o, 'animation', false) === 'auto'){ $frame['timeline']['auto'] = true; } if($frame['sfx']['effect'] === 'blockfrombottom'){ $frame['sfx']['effect'] = 'blocktotop'; }elseif($frame['sfx']['effect'] === 'blockfromtop'){ $frame['sfx']['effect'] = 'blocktobottom'; }elseif($frame['sfx']['effect'] === 'blockfromleft'){ $frame['sfx']['effect'] = 'blocktoright'; }elseif($frame['sfx']['effect'] === 'blockfromright'){ $frame['sfx']['effect'] = 'blocktoleft'; }else{ $frame['sfx']['effect'] = 'none'; } //add to all origins a % if no % or px is set $check = array('originX', 'originY', 'originZ'); $path = array('transform', 'chars', 'words', 'lines'); foreach($path as $_path){ foreach($check as $_check){ if(strpos($frame[$_path][$_check], '%') !== false) continue; if(strpos(strtolower($frame[$_path][$_check]), 'px') !== false) continue; $frame[$_path][$_check] .= '%'; } } /** * we need to overwrite values here once again * @added because of animations, to change i.e. 'inherit' of default old to the needed value **/ if(!empty($overwrite_with)){ $_ign = array('ease', 'speed', 'delay', 'direction', 'color'); //ignore these values and do not take them from the animation template foreach($overwrite_with as $ok => $oval){ if(!isset($frame[$ok])) $frame[$ok] = array(); if(is_array($oval)){ if(!empty($oval)){ foreach($oval as $k => $v){ if(in_array($k, $_ign)){ if($k == 'color'){ //ignore color only in sfx path if($ok == 'sfx') continue; }else{ continue; } } $frame[$ok][$k] = $v; } } }else{ if(in_array($ok, $_ign)) continue; $frame[$ok] = $oval; } } } return $frame; }
[ "public function createFrame()\n {\n $frame = parent::createFrame();\n $frame->setAutoContentLength(false);\n return $frame;\n }", "public function createFrame()\n {\n return $this->getConnection()->createFrame();\n }", "public function newFrame() {\n $this->frame = new \\WBW\\Bundle\\HighchartsBundle\\API\\Chart\\Chart\\Options3d\\HighchartsFrame();\n return $this->frame;\n }", "function __construct(){\n $this->new_frame();\n }", "public function fromFrame($frame);", "public function create()\r\n {\r\n // Clone the empty blueprint-struct ($this) into the new data $struct.\r\n $struct = clone $this;\r\n \r\n // Populate the new struct.\r\n $properties = array_keys((array) $struct);\r\n foreach (func_get_args() as $key => $value) {\r\n if (!is_null($value)) {\r\n $struct->$properties[$key] = $value;\r\n }\r\n }\r\n \r\n // Return the populated struct.\r\n return $struct;\r\n }", "abstract protected function createDefaultBody();", "public function getDefaultFrameSetting() {\n\t\t$frame = array(\n\t\t\t'QuestionnaireFrameSetting' => array(\n\t\t\t\t'id' => '',\n\t\t\t\t'display_type' => QuestionnairesComponent::DISPLAY_TYPE_LIST,\n\t\t\t\t'display_num_per_page' => QuestionnairesComponent::QUESTIONNAIRE_DEFAULT_DISPLAY_NUM_PER_PAGE,\n\t\t\t\t'sort_type' => QuestionnairesComponent::DISPLAY_SORT_TYPE_NEW_ARRIVALS,\n\t\t\t)\n\t\t);\n\t\treturn $frame;\n\t}", "public function create_default() {\n\n $gamemode_om = new Bowstyle_Model_Class($this->connection);\n if (!$gamemode_om->has_default()) {\n $gamemode_om->create_default();\n }\n }", "public function basicObjectFixture() {\n\n $o = new Object(self::FNAME);\n $o->setContent(self::FCONTENT, self::FTYPE);\n\n return $o;\n }", "abstract protected function getFrame(): Frame;", "public abstract function initDefault();", "protected function createFramePicker()\n {\n return new NullFramePicker();\n }", "public static function create();", "public static function factory()\r\n {\r\n $struct = new self;\r\n foreach (func_get_args() as $value) {\r\n $struct->$value = null;\r\n }\r\n return $struct;\r\n }", "public function createFrame():HTMLReportTemplate {\n\t\t\t$template = new HTMLReportTemplate($this->content);\n\t\t\t$this->frames[] = $template;\n\t\t\treturn $template;\n\t\t}", "function ctools_export_new_object($table, $set_defaults = TRUE) {\r\n $schema = ctools_export_get_schema($table);\r\n $export = $schema['export'];\r\n\r\n $object = new $export['object'];\r\n foreach ($schema['fields'] as $field => $info) {\r\n if (isset($info['object default'])) {\r\n $object->$field = $info['object default'];\r\n }\r\n else if (isset($info['default'])) {\r\n $object->$field = $info['default'];\r\n }\r\n else {\r\n $object->$field = NULL;\r\n }\r\n }\r\n\r\n if ($set_defaults) {\r\n // Set some defaults so this data always exists.\r\n // We don't set the export_type property here, as this object is not saved\r\n // yet. We do give it NULL so we don't generate notices trying to read it.\r\n $object->export_type = NULL;\r\n $object->{$export['export type string']} = t('Local');\r\n }\r\n return $object;\r\n}", "public static function frameInitialize(): void\n {\n date_default_timezone_set('Asia/Shanghai');\n // 获得数据库配置\n $dbConf = Config::getInstance()->getConf('database');\n // 全局初始化\n Db::setConfig($dbConf);\n\n }", "function CreateDefaultWebPanelEntity()\n {\n\t\t$result = $this->sendRequest(\"CreateDefaultWebPanelEntity\", array());\n\t\treturn $this->getResultFromResponse($result);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Determines if the post has a copy intended for Rewrite & Republish which is scheduled to be published.
public function has_scheduled_rewrite_and_republish_copy( \WP_Post $post ) { $copy = $this->get_rewrite_and_republish_copy( $post ); if ( ! empty( $copy ) && $copy->post_status === 'future' ) { return $copy; } return false; }
[ "public function is_copy_allowed_to_be_republished( \\WP_Post $post ) {\n\t\treturn \\in_array( $post->post_status, [ 'dp-rewrite-republish', 'private' ], true );\n\t}", "public function isRepost()\n {\n return $this->copy_history !== false;\n }", "public function has_original_changed( \\WP_Post $post ) {\n\t\tif ( ! $this->is_rewrite_and_republish_copy( $post ) ) {\n\t\t\treturn false;\n\t\t}\n\n\t\t$original = Utils::get_original( $post );\n\t\t$copy_creation_date_gmt = \\get_post_meta( $post->ID, '_dp_creation_date_gmt', true );\n\n\t\tif ( $original && $copy_creation_date_gmt ) {\n\t\t\tif ( \\strtotime( $original->post_modified_gmt ) > \\strtotime( $copy_creation_date_gmt ) ) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\n\t\treturn false;\n\t}", "public function original_post()\n {\n return !Share::where('new_post_id', $this->id)->exists();\n }", "private function requested_post_is_valid() {\n\t\treturn ( get_post_type( (int) $_GET['post_id'] ) === $this->post_type && get_post_status( (int) $_GET['post_id'] ) === 'publish' );\n\t}", "public function canPublish() {\n\t\treturn $this->canEdit();\n\t}", "public function is_publish() {\n\t\t\treturn apply_filters( 'learn-press/' . $this->_post_type . '/is-publish',\n\t\t\t\tget_post_status( $this->get_id() ) === 'publish' );\n\t\t}", "public function isPublishable(){\n return ( ! $this->isDeleted()) && $this->isContentReady();\n }", "function duplicate_post_is_current_user_allowed_to_copy() {\n\treturn current_user_can('copy_posts');\n}", "public function canPublish(Entry $entry): bool;", "public function getIsPublishScheduled()\n {\n if (!$this->owner->PublishOnDate) {\n return false;\n }\n $now = DBDatetime::now()->getTimestamp();\n $publish = $this->owner->dbObject('PublishOnDate')->getTimestamp();\n\n return $now < $publish;\n }", "public function isPublished()\n\t{\n\t\treturn $this->getPostStatus() == 'publish';\n\t}", "function current_user_can_modify_post( $post ) {\n\t\t\n\t\tif ( !$post )\n\t\t\treturn false;\n\t\t\t\n\t\t$post_type_object = get_post_type_object( $post->post_type );\n\n\t\t// Editors and admins are fine\n\t\tif ( current_user_can( $post_type_object->cap->edit_others_posts, $post->ID ) )\n\t\t\treturn true;\n\t\t// Authors and contributors can move their own stuff if it's not published\n\t\tif ( current_user_can( $post_type_object->cap->edit_post, $post->ID ) && wp_get_current_user()->ID == $post->post_author && !in_array( $post->post_status, $this->published_statuses ) )\n\t\t\treturn true;\n\t\t// Those who can publish posts can move any of their own stuff\n\t\tif ( current_user_can( $post_type_object->cap->publish_posts, $post->ID ) && wp_get_current_user()->ID == $post->post_author )\n\t\t\treturn true;\n\t\t\n\t\treturn false;\n\t}", "function _jr_needs_publish( $job ){\n\treturn in_array( $job->post_status, array( 'draft', 'expired' ) );\n}", "function wp_is_post_revision($post)\n {\n }", "function check_and_publish_future_post($post)\n {\n }", "public function isScheduled()\n {\n return (null !== $this->getPublishing() || null !== $this->getArchiving());\n }", "function bcg_is_post_published( $post_id ) {\n\n\treturn get_post_field( 'post_status', $post_id ) == 'publish';\n}", "private function _checkPublished() {\n\t\tif($this->_content !== null) {\n\t\t\tif(!$this->_content->getPublished()) {\n\t\t\t\tif($this->_content->getPublishingDate()) {\n\t\t\t\t\t$zDate = new Zend_Date();\n\t\t\t\t\t$result = $zDate->compare(strtotime($this->_content->getPublishingDate()));\n\t\t\t\t\tif($result == 0 || $result == 1) {\n\t\t\t\t\t\t$this->_content->setPublishingDate('');\n\t\t\t\t\t\t$this->_content->setPublished(true);\n\t\t\t\t\t\tApplication_Model_Mappers_ContainerMapper::getInstance()->save($this->_content);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn $this->_content->getPublished();\n\t\t}\n\t\treturn true;\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Retrieve background image for custom background.
function get_background_image() { }
[ "function get_background_image() {}", "function get_background_image() {\n\treturn get_theme_mod('background_image', get_theme_support( 'custom-background', 'default-image' ) );\n}", "public function get_background_image() {\n return $this->background_image;\n }", "public function get_background()\r\n\t{\r\n\t\treturn $this->get_attr('background');\r\n\t}", "public static function getBackground()\n {\n $background = self::getConfig()->get('steempi', 'background');\n\n if (empty($background)) {\n $background = '/app/images/backgrounds/default-06.jpg';\n }\n\n $realPath = self::getRootPath().$background;\n\n if (!file_exists($realPath)) {\n $background = '/app/images/backgrounds/default-06.jpg';\n }\n\n return $background;\n }", "public function getBackgroundImage()\n {\n return Mage::getStoreConfig(self::XML_PATH_BACKGROUND_IMAGE);\n }", "public static function getBackgroundImagePath()\n\t{\n\t\treturn ilObjCertificateSettingsAccess::getBackgroundImageDefaultFolder() . ilObjCertificateSettingsAccess::getBackgroundImageName();\n\t}", "public function getimagebackgroundcolor(){}", "public function getBg() {\n return $this->get(self::BG);\n }", "public function background()\n {\n $this->background = true;\n $this->handleLoggedInUsers();\n $this->prepareSrc(null);\n $this->toJSON();\n\n $format = ' %2$s style=\"background-image: url(\\'%1$s\\');\"';\n\n return sprintf($format, $this->image->getSrc(), $this->_renderAttributes());\n }", "protected function getBackgroundImage()\n {\n $image = rtrim($this->modx->modxdashboardwidgetpack->config['assets_url'], '/') . '/img/default-welcome-widget-bg.jpg';\n\n $properties = $this->widget->get('properties');\n if (isset($properties['background_image_path']) && !empty($properties['background_image_path'])) {\n $image = str_replace(\n [\n '[[++base_path]]',\n '[[++core_path]]',\n '[[++manager_path]]',\n '[[++assets_path]]',\n '[[++manager_theme]]',\n ], [\n $this->modx->getOption('base_path',null,MODX_BASE_PATH),\n $this->modx->getOption('core_path',null,MODX_CORE_PATH),\n $this->modx->getOption('manager_path',null,MODX_MANAGER_PATH),\n $this->modx->getOption('assets_path',null,MODX_ASSETS_PATH),\n $this->modx->getOption('manager_theme',null,'default'),\n ],\n $properties['background_image_path']\n );\n }\n\n return $image;\n }", "function wmf_get_background_image() {\n\tif ( is_404() ) {\n\t\treturn array(\n\t\t\t'image' => get_theme_mod( 'wmf_404_image' ),\n\t\t);\n\t}\n\n\t$post_id = is_home() ? get_option( 'page_for_posts' ) : get_the_ID();\n\n\treturn get_post_meta( $post_id, 'page_header_background', true );\n}", "public function getBackground()\n {\n return $this->background;\n }", "public function getBackground()\n\t{\n\t\treturn $this->background; \n\n\t}", "public function set_background_image() {\n\t\t\t$background_image_style = '';\n\t\t\t$bg_title = '';\n\t\t\t$background_data = '';\n\t\t\tif ( ! empty( $this->args['background_image'] ) ) {\n\n\t\t\t\t$background_data = fusion_library()->images->get_attachment_data_by_helper( $this->args['background_image_id'], $this->args['background_image'] );\n\t\t\t\t$background_image_style .= $this->args['lazy_load'] ? '' : \"background-image: url('\" . esc_attr( $this->args['background_image'] ) . \"');\";\n\t\t\t\t$bg_title = $background_data['title'];\n\t\t\t}\n\n\t\t\tif ( $this->is_gradient_color() ) {\n\t\t\t\t$background_image_style .= 'background-image: ' . Fusion_Builder_Gradient_Helper::get_gradient_string( $this->args, 'column' );\n\t\t\t}\n\n\t\t\tif ( ! empty( $this->args['background_position'] ) ) {\n\t\t\t\t$background_image_style .= 'background-position:' . esc_attr( $this->args['background_position'] ) . ';';\n\t\t\t}\n\n\t\t\tif ( 'none' !== $this->args['background_blend_mode'] ) {\n\t\t\t\t$background_image_style .= 'background-blend-mode: ' . esc_attr( $this->args['background_blend_mode'] ) . ';';\n\t\t\t}\n\n\t\t\tif ( ! empty( $this->args['background_repeat'] ) ) {\n\t\t\t\t$background_image_style .= 'background-repeat:' . esc_attr( $this->args['background_repeat'] ) . ';';\n\n\t\t\t\tif ( 'no-repeat' === $this->args['background_repeat'] ) {\n\t\t\t\t\t$background_image_style .= '-webkit-background-size:cover;-moz-background-size:cover;-o-background-size:cover;background-size:cover;';\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$this->args['bg_title'] = $bg_title;\n\t\t\t$this->args['background_image_style'] = $background_image_style;\n\t\t\t$this->args['background_data'] = $background_data;\n\t\t}", "public static function getBackgroundImageName()\n\t{\n\t\treturn \"background.jpg\";\n\t}", "public function getBackgroundImage() {\n $provider = new Pfb_Provider_HttpProvider();\n $provider->setObjectSource('https://ssl.gstatic.com/s2/oz/images/stars/po/Publisher/sprite.png');\n $provObj = $provider->requestObject('GET');\n \n if (200 == $provObj->getStatus() || 304 == $provObj->getStatus()) {\n return $provObj->getBody();\n }\n return false;\n }", "function flow_elated_get_post_back_image(){\n\t\t\n\t\t$style_attr = '';\n\t\t\n\t\tif ( has_post_thumbnail() ) {\n\t\t\t$background_image_object = wp_get_attachment_image_src(get_post_thumbnail_id( get_the_ID()),'full');\t\n\t\t\t$background_image_src = $background_image_object[0];\n\t\t\t$style_attr = 'background-image:url('. esc_url($background_image_src) .')';\n\t\t}\n\t\t\n\t\treturn $style_attr;\n\t\t\n\t}", "public function setImageBackgroundColor ($background) {}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Add the authentication credentials to a request.
public function addCredentialsToRequest(Request $request) { $request->setAuth($this->key, 'x', 'basic'); return $request; }
[ "public function addCredentialsToRequest(Request $request);", "public function addRequestCredentialsTo($handle) {\n\t\t\tcurl_setopt_array($handle, array(\n\t\t\t\t\tCURLOPT_USERPWD => $this->__toString(),\n\t\t\t\t\tCURLOPT_HTTPAUTH => CURLAUTH_DIGEST));\n\t\t}", "public function addAuthentication(){\n\n // adding the cookies\n foreach($this->cookies as $cookie){\n $this->curl->setCookie($cookie->name, $cookie->value);\n }\n\n // adding the authentication header\n $this->curl->setHeader(\"authorization\", \"bearer \" . $this->token );\n }", "public function authenticateRequest(&$request)\n {\n $username = Config::get('auth.basic.username');\n $password = Config::get('auth.basic.password');\n $request->setAuth($username, $password);\n }", "public function updateCredentials(HttpRequest $request);", "protected function applyAuthCredentials(PendingRequest $request): void\n {\n $this->auth->applyCredentials($request);\n }", "protected function setAuthToRequest()\n {\n $oRequestBuilder = new \\Payone\\Request\\Builder\\Auth;\n $oRequestBuilder->build();\n $aParams = $oRequestBuilder->getParams();\n if (is_array($aParams) && count($aParams) > 0) {\n foreach ($aParams as $sKey => $sValue) {\n $this->setParam($sKey, $sValue);\n }\n }\n }", "public function addCredential(ContextInterface $ctx, AddCredentialRequest $request): void;", "public function processRequest($request) {\n\n $headers = $request->getHeaders();\n $headers->set(Headers::AUTHORISATION, \"Basic \" . base64_encode($this->username . \":\" . $this->password));\n return $request;\n }", "public function testAddCredentials()\n {\n $auth = new WpBasicAuth('jim', 'hunter2');\n $request = new Request('GET', '/users');\n\n $newRequest = $auth->addCredentials($request);\n\n $this->assertInstanceOf(Request::class, $newRequest);\n $this->assertEquals(\n $newRequest->getHeader('Authorization'),\n ['Basic ' . base64_encode('jim:hunter2')]\n );\n }", "public function authenticate(\\Buzz\\Message\\Request $request)\n {\n $url = $request->getUrl();\n $prefix = (strpos($url, '?') > 0) ? '&' : '?';\n \n $request->fromUrl($url . $prefix . 'access_token=' . $this->accessToken);\n \n return $request;\n }", "public function addOauthV2($request) {\n\t\t$request['uri']['query'] = (array)Hash::get($request, 'uri.query') + $this->getCredentials();\n\t\treturn $request;\n\t}", "public function add_creds() {\r\n\t\tadd_filter( 'request_filesystem_credentials', array( $this, 'maybe_set_cred' ), 10, 7 );\r\n\t}", "private function applyAuthentication() {\n // Retrieve client config, for WS credentials\n $clientId = $this->f3->get(\"client_id\");\n $clientConfigService = Resolver::instance()->resolve('\\Service\\ClientConfig');\n $clientConfig = $clientConfigService->get($clientId);\n\n $wsUsername = $clientConfig->webservice_username();\n $wsPassword = $clientConfig->webservice_password();\n\n $authString = base64_encode(\"{$wsUsername}:{$wsPassword}\");\n $this->request = $this->request->withHeader(\"Authorization\", \"Basic {$authString}\");\n }", "public function client_credentials()\n {\n $this->server->addGrantType(new OAuth2\\GrantType\\ClientCredentials($this->storage, array(\n \"allow_credentials_in_request_body\" => true,\n )));\n $this->server->handleTokenRequest($this->request)->send();\n }", "function http_auth_headers() {\n\t\tif($this->http_user || $this->http_pass):\n\t\t\t$this->http_headers_add('Authorization', \" Basic \".base64_encode($this->http_user . \":\" . $this->http_pass));\n\t\tendif;\n\t}", "function wpbp_http_request_args( $r, $url ) {\n\t\t$digest = self::$instance->options->get( 'http_basic_auth_digest' );\n\t\tif ( $digest ) {\n\t\t\t$r['headers']['Authorization'] = 'Basic ' . $digest;\n\t\t}\n\t\treturn $r;\n\t}", "public function client_credentials(){\n\t\t$this->server->addGrantType(new OAuth2\\GrantType\\ClientCredentials($this->storage, array(\n \t\t\"allow_credentials_in_request_body\" => true\n\t\t)));\n\t\t$this->server->handleTokenRequest($this->request)->send();\n\t}", "function auth($request);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Remove Deleted Product Images
private function cleanImages(): void { if (!is_array($this->object->images)) { return; } foreach ($this->object->images as $index => $shopifyImage) { //====================================================================// // If Image has no ID => NEW Image => Skip // If Image Already Found, Skip if (!isset($shopifyImage['id']) || in_array($shopifyImage['id'], $this->imgFound, true)) { continue; } //====================================================================// // Remove Image from Product unset($this->object->images[$index]); $this->needUpdate(); } }
[ "protected function discardExistingImages() {\n\t\t$mapper = tx_oelib_MapperRegistry::get('tx_realty_Mapper_Image');\n\t\tforeach ($mapper->findAllByRelation($this, 'object') as $image) {\n\t\t\t$mapper->delete($image);\n \t\t}\n\n \t\t$this->oldImagesNeedToGetDeleted = FALSE;\n\t}", "public function deleteImages(){\n $db = JFactory::getDBO();\n\n $query = \"SELECT \" . $db->quoteName('image_id') . \" FROM \" . $db->quoteName('#__jeproshop_image') . \" WHERE \" . $db->quoteName('product_id') . \" = \" . (int)$this->product_id;\n\n $db->setQuery($query);\n $result = $db->loadObjectList();\n\n $status = true;\n if ($result) {\n foreach ($result as $row) {\n $image = new JeproshopImageModelImage($row->image_id);\n $status &= $image->delete();\n }\n }\n return $status;\n }", "protected function _fixImages()\r\n {\r\n $updatedProductIds = $this->getUpdatedProductIds();\r\n $productAction = $this->getProductAction();\r\n $collection = $this->getProductCollection();\r\n $this->_splitCollection();\r\n\r\n foreach ($collection as $product) {\r\n Mage::helper('progos_catalog')->resetDefaultMediaGalleryImage($product, $productAction);\r\n\r\n $updatedProductIds[] = $product->getId();\r\n $this->_showProgress(count(array_diff($updatedProductIds, $this->_updatedProductIds)));\r\n\r\n $product->clearInstance();\r\n }\r\n\r\n $this->saveUpdatedProductIds($updatedProductIds);\r\n }", "private function removeNonFavoriteImages() {\n $this->imageTable->deleteWithFavoriteStatus($this->user->getName(), false);\n }", "public function delete_image() {\t\n\t\tglobal $site_config;\t\t\n\t\t$this->sql = \"SELECT img_name, img_full\n\t\tFROM product_image a\n\t\tWHERE a.img_id = \".$this->img_id.\";\";\n\t\t$this->connect->query($this->sql);\n\t\t$result = $this->connect->resultArray();\n\t\t\n\t\tunlink($site_config['prd_img_path'].$result[0]['img_full']);\n\t\tunlink($site_config['prd_img_icon_path'].$result[0]['img_full']);\n\t\tunlink($site_config['prd_img_feat_path'].$result[0]['img_full']);\n\t\t\n\t\t$this->sql = \"DELETE FROM product_image \n\t\tWHERE img_id = \".$this->img_id.\";\";\t\t\t\n\t\t$this->connect->query($this->sql);\n\t\t$this->update_image_main();\n\t\t\n\t\t//Sys Log\t\n\t\t//$this->insert_log(\"DELETE IMAGE: \".$result[0]['img_name']);\n\t}", "public function deleteProductAttributeImage()\n {\n }", "public function deleteImage()\n {\n Storage::deleted($this->main_image);\n Storage::deleted($this->index_image);\n Storage::deleted($this->image);\n }", "public function removeImages() {\n $this->imageTable->deleteByUser($this->user->getName());\n }", "public function remove_gallery_img()\n{\n\t$product_id = $this->input->post('product_id');\n\t$gallery_img_id = $this->input->post('gallery_img_id');\n\n\t$gallery_image = explode(\",\", get_product_meta($product_id, 'gallery_image'));\n\tif (sizeof($gallery_image) > 0) {\n\t\t$gallery_image = array_values(array_filter($gallery_image));\n\n\t\tif ($gallery_image[$gallery_img_id]) {\n\t\t\tunset($gallery_image[$gallery_img_id]);\n\t\t\t$gallery_image = implode(\",\", $gallery_image);\n\t\t\tupdate_product_meta($product_id, 'gallery_image', $gallery_image);\n\n\t\t\techo true;\n\t\t}\n\t}\n\n\tdie();\n}", "function admin_remove_image() {\n\t\t//\n\t}", "function remove_product($product_id) {\n // get content of product\n $product_content_query = xtc_db_query(\"SELECT content_file \n FROM \".TABLE_PRODUCTS_CONTENT.\" \n WHERE products_id = '\".(int)$product_id.\"'\");\n // check if used elsewhere, delete db-entry + file if not\n while ($product_content = xtc_db_fetch_array($product_content_query)) {\n $duplicate_content_query = xtc_db_query(\"SELECT count(*) AS total \n FROM \".TABLE_PRODUCTS_CONTENT.\" \n WHERE content_file = '\".xtc_db_input($product_content['content_file']).\"' \n AND products_id != '\".(int)$product_id.\"'\");\n $duplicate_content = xtc_db_fetch_array($duplicate_content_query);\n if ($duplicate_content['total'] == 0) {\n if (is_file(DIR_FS_DOCUMENT_ROOT.'media/products/'.$product_content['content_file'])) {\n @unlink(DIR_FS_DOCUMENT_ROOT.'media/products/'.$product_content['content_file']);\n }\n }\n //delete DB-Entry\n xtc_db_query(\"DELETE FROM \".TABLE_PRODUCTS_CONTENT.\" WHERE products_id = '\".(int)$product_id.\"' AND (content_file = '\".xtc_db_input($product_content['content_file']).\"' OR content_file = '')\");\n }\n\n $product_image_query = xtc_db_query(\"SELECT products_image \n FROM \".TABLE_PRODUCTS.\" \n WHERE products_id = '\".(int)$product_id.\"'\");\n $product_image = xtc_db_fetch_array($product_image_query);\n\n $duplicate_image_query = xtc_db_query(\"SELECT count(*) AS total \n FROM \".TABLE_PRODUCTS.\" \n WHERE products_image = '\".xtc_db_input($product_image['products_image']).\"'\");\n $duplicate_image = xtc_db_fetch_array($duplicate_image_query);\n\n if ($duplicate_image['total'] < 2) {\n xtc_del_image_file($product_image['products_image']);\n }\n\n //delete more images\n $mo_images_query = xtc_db_query(\"SELECT image_name \n FROM \".TABLE_PRODUCTS_IMAGES.\" \n WHERE products_id = '\".(int)$product_id.\"'\");\n while ($mo_images_values = xtc_db_fetch_array($mo_images_query)) {\n $duplicate_more_image_query = xtc_db_query(\"SELECT count(*) AS total \n FROM \".TABLE_PRODUCTS_IMAGES.\" \n WHERE image_name = '\".xtc_db_input($mo_images_values['image_name']).\"'\");\n $duplicate_more_image = xtc_db_fetch_array($duplicate_more_image_query);\n if ($duplicate_more_image['total'] < 2) {\n xtc_del_image_file($mo_images_values['image_name']);\n }\n }\n\n //new module support\n $this->catModules->remove_product($product_id);\n\n xtc_db_query(\"DELETE FROM \".TABLE_SPECIALS.\" WHERE products_id = '\".(int)$product_id.\"'\");\n xtc_db_query(\"DELETE FROM \".TABLE_PRODUCTS.\" WHERE products_id = '\".(int)$product_id.\"'\");\n xtc_db_query(\"DELETE FROM \".TABLE_PRODUCTS_XSELL.\" WHERE products_id = '\".(int)$product_id.\"'\");\n xtc_db_query(\"DELETE FROM \".TABLE_PRODUCTS_XSELL.\" WHERE xsell_id = '\".(int)$product_id.\"'\");\n xtc_db_query(\"DELETE FROM \".TABLE_PRODUCTS_IMAGES.\" WHERE products_id = '\".(int)$product_id.\"'\");\n xtc_db_query(\"DELETE FROM \".TABLE_PRODUCTS_TO_CATEGORIES.\" WHERE products_id = '\".(int)$product_id.\"'\");\n xtc_db_query(\"DELETE FROM \".TABLE_PRODUCTS_DESCRIPTION.\" WHERE products_id = '\".(int)$product_id.\"'\");\n xtc_db_query(\"DELETE FROM \".TABLE_PRODUCTS_ATTRIBUTES.\" WHERE products_id = '\".(int)$product_id.\"'\");\n xtc_db_query(\"DELETE FROM \".TABLE_CUSTOMERS_BASKET.\" WHERE products_id = '\" . (int)$product_id . \"' OR products_id LIKE '\" . (int)$product_id . \"{%'\");\n xtc_db_query(\"DELETE FROM \".TABLE_CUSTOMERS_BASKET_ATTRIBUTES.\" WHERE products_id = '\" . (int)$product_id . \"' OR products_id LIKE '\" . (int)$product_id . \"{%'\");\n xtc_db_query(\"DELETE FROM \".TABLE_PRODUCTS_TAGS.\" WHERE products_id = '\".(int)$product_id.\"'\");\n\n if (defined('MODULE_WISHLIST_SYSTEM_STATUS') && MODULE_WISHLIST_SYSTEM_STATUS == 'true') {\n xtc_db_query(\"DELETE FROM \".TABLE_CUSTOMERS_WISHLIST.\" WHERE products_id = '\" . (int)$product_id . \"' OR products_id LIKE '\" . (int)$product_id . \"{%'\");\n xtc_db_query(\"DELETE FROM \".TABLE_CUSTOMERS_WISHLIST_ATTRIBUTES.\" WHERE products_id = '\" . (int)$product_id . \"' OR products_id LIKE '\" . (int)$product_id . \"{%'\");\n }\n\n $customers_statuses_array = xtc_get_customers_statuses();\n for ($i = 0, $n = sizeof($customers_statuses_array); $i < $n; $i ++) {\n if (isset($customers_statuses_array[$i]['id']))\n xtc_db_query(\"DELETE FROM \".TABLE_PERSONAL_OFFERS_BY.$customers_statuses_array[$i]['id'].\" WHERE products_id = '\".(int)$product_id.\"'\");\n }\n\n $product_reviews_query = xtc_db_query(\"SELECT reviews_id \n FROM \".TABLE_REVIEWS.\" \n WHERE products_id = '\".(int)$product_id.\"'\");\n while ($product_reviews = xtc_db_fetch_array($product_reviews_query)) {\n xtc_db_query(\"DELETE FROM \".TABLE_REVIEWS_DESCRIPTION.\" WHERE reviews_id = '\".$product_reviews['reviews_id'].\"'\");\n }\n xtc_db_query(\"DELETE FROM \".TABLE_REVIEWS.\" WHERE products_id = '\".(int)$product_id.\"'\");\n }", "public function clear_products() {\n\t\ttry {\n\t\t\t$ids = $this->ShopProduct->find('list', array(\n\t\t\t\t'fields' => array(\n\t\t\t\t\t$this->ShopProduct->alias . '.' . $this->ShopProduct->primaryKey,\n\t\t\t\t\t$this->ShopProduct->alias . '.shop_image_id'\n\t\t\t\t),\n\t\t\t\t'contain' => false\n\t\t\t));\n\t\t\t$this->ShopProduct->unbindModel(array(\n\t\t\t\t'hasOne' => array('ShopCurrentSpecial')\n\t\t\t), false);\n\n\t\t\t$Folder = new Folder();\n\t\t\tforeach (array_keys($ids) as $id) {\n\t\t\t\t$this->ShopProduct->delete($id);\n\t\t\t\t$this->ShopProduct->ShopImage->delete($ids[$id]);\n\n\t\t\t\t$folder = APP . 'webroot' . DS . 'files' . DS . 'shop_image' . DS . 'image' . DS . $ids[$id];\n\t\t\t\t$Folder->delete($folder);\n\t\t\t}\n\t\t} catch(Exception $e) {\n\t\t\t$this->quit($e->getMessage());\n\t\t\tthrow $e;\n\t\t}\n\n\t\t$this->quit('All products removed');\n\t}", "public function removeImage () {}", "public function refresh_product_tmp_images()\n\t{\n\t\t// Delete current tb_post_tag\n\t\t$date = date('Y-m-d');\t\t\n\n\t\t// Get query tmp images \n\t\t$tmp_images = $this->produk_model->get_all_images_tmp_by_date($date);\n\n\t\tif(!empty($tmp_images)) foreach($tmp_images as $rows) {\n\n\t\t\t// Define filepath\n\t\t\t$filepath = $rows['filepath'];\n\t\t\t// Check if file not exists\n\t\t\tif (is_dir($filepath)) {\n\t\t\t DeletePath($filepath);\n\n\t\t\t $table = 'tb_tmp_images';\n\t\t\t\t$where = array('id' => $rows['id']);\n\t\t\t\t$this->general_model->delete_data($table, $where);\n\n\t\t\t\techo 'Done';\n\t\t\t}\n\n\t\t}\n\t}", "public function delete_img()\n {\n $id = $_POST['id'];\n $ID = Encripsi::encode('decrypt', $id);\n $this->model('M_Product')\n ->delete_img($ID);\n }", "public function deleteImages() {\n if ($this->university_logo)\n unlink(Yii::getAlias('@universityImages') . \"/\" . $this->university_logo);\n if ($this->university_id_template)\n unlink(Yii::getAlias('@universityImages') . \"/\" . $this->university_id_template);\n if ($this->university_graphic)\n unlink(Yii::getAlias('@universityImages') . \"/\" . $this->university_graphic);\n }", "protected function _removeOldEntities($productId)\n {\n $oldProductImages = Mage::getModel('imageuploader/product_image')\n ->getCollection()\n ->addFieldToFilter('product_id', $productId);\n /* @var $oldProductImages Florczak_ImageUploader_Model_Resource_Product_Image_Collection */\n foreach ($oldProductImages as $oldProductImage) {\n /* @var $oldProductImage Florczak_ImageUploader_Model_Product_Image */\n $oldProductImage->delete();\n }\n }", "function removeImage(){}", "public function deleteImage()\n {\n // image in database is stored as:\n // storage/products/46f02s5B7RWYJZAvz354bitvvNJatUvZ70WuZqfg.png\n // to delete we want products/46f02s5B7RWYJZAvz354bitvvNJatUvZ70WuZqfg.png\n\n $imageExplode = explode(\"/\",$this->image);\n\n Storage::delete(\"$imageExplode[1]/$imageExplode[2]\");\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Returns list of message flags converted to lower case.
public function getFlagsLowerCase() { return $this->aFlagsLowerCase; }
[ "private function _humanReadableFlags($flags) {\n $flagsHumanReadable = array();\n\n $descs = array();\n foreach($this->imapflags as $key => $val) {\n foreach($val as $k=>$v) {\n $descs[$k] = $v;\n }\n }\n $flags = array_keys($flags);\n foreach($flags as $flag) {\n if(isset($descs[$flag])) {\n $flagsHumanReadable[] = $descs[$flag];\n } else {\n $flagsHumanReadable[] = $flag;\n }\n }\n return $flagsHumanReadable;\n }", "public static function getStatuses()\n {\n $arr = array_filter(\n (new \\ReflectionClass(static::class))->getConstants(),\n function ($key) {\n return strpos($key, 'STATUS') !== false;\n }, ARRAY_FILTER_USE_KEY);\n\n return array_flip(array_change_key_case($arr, CASE_LOWER));\n }", "public static function getMessageCodeChoices()\n {\n if (null === self::$_messageCodeValues) {\n self::$_messageCodeValues = [];\n\n $rClass = new \\ReflectionClass('App\\Model\\Workflow');\n $prefix = 'MESSAGE_CODE_';\n\n foreach ($rClass->getConstants() as $key => $value) {\n if ($prefix === substr($key, 0, strlen($prefix))) {\n self::$_messageCodeValues[$value] = $value;\n }\n }\n }\n\n return self::$_messageCodeValues;\n }", "public function data_toLowerCase() {\n\t\t\t$data = array(\n\t\t\t\tarray(array('a'), array('a')),\n\t\t\t\tarray(array('A'), array('a')),\n\t\t\t);\n\t\t\treturn $data;\n\t\t}", "static function getLower()\n {\n return array( \n \"a\", \"b\", \"c\", \"d\", \"e\", \"f\", \"g\", \"h\", \"i\", \"j\", \"k\", \"l\", \"m\", \"n\", \"o\", \"p\", \"q\", \"r\", \"s\", \"t\", \"u\", \n \"v\", \"w\", \"x\", \"y\", \"z\", \"à\", \"á\", \"â\", \"ã\", \"ä\", \"å\", \"æ\", \"ç\", \"è\", \"é\", \"ê\", \"ë\", \"ì\", \"í\", \"î\", \"ï\", \n \"ð\", \"ñ\", \"ò\", \"ó\", \"ô\", \"õ\", \"ö\", \"ø\", \"ù\", \"ú\", \"û\", \"ü\", \"ý\", \"а\", \"б\", \"в\", \"г\", \"д\", \"е\", \"ё\", \"ж\", \n \"з\", \"и\", \"й\", \"к\", \"л\", \"м\", \"н\", \"о\", \"п\", \"р\", \"с\", \"т\", \"у\", \"ф\", \"х\", \"ц\", \"ч\", \"ш\", \"щ\", \"ъ\", \"ы\", \n \"ь\", \"э\", \"ю\", \"я\", \"œ\"\n ); \n }", "public function getFlags();", "public function provider_strcasecmp()\n\t{\n\t\treturn [\n\t\t\t['Cocoñùт', 'Cocoñùт', 0],\n\t\t\t['Čau', 'Čauo', -1],\n\t\t\t['Čau', 'Ča', 1],\n\t\t\t['Cocoñùт', 'Cocoñ', 4],\n\t\t\t['Cocoñùт', 'Coco', 6],\n\t\t];\n\t}", "public function getFlags () {}", "public function listFlags($optParams = array())\n {\n $params = array();\n $params = array_merge($params, $optParams);\n return $this->call('list', array($params), 'Google\\Service\\SQLAdmin\\FlagsListResponse');\n }", "public function get_flag_statuses() {\n\t\treturn (array) json_decode( get_option( $this->flags_option ), true );\n\t}", "public function getFlags(): array;", "public static function keysToLowerCase($array)\n {\n return array_change_key_case($array, self::CASE_LOWER);\n }", "public static function flagToEnumNames(int $flag): ?array;", "public function getFeatureFlags()\n {\n if (null === $this->feature_flags_unserialized) {\n $this->feature_flags_unserialized = array();\n }\n if (!$this->feature_flags_unserialized && null !== $this->feature_flags) {\n $feature_flags_unserialized = substr($this->feature_flags, 2, -2);\n $this->feature_flags_unserialized = $feature_flags_unserialized ? explode(' | ', $feature_flags_unserialized) : array();\n }\n\n return $this->feature_flags_unserialized;\n }", "public static function toCamelCase(array $messages)\n\t{\n\t\tforeach ($messages as $code => $value)\n\t\t{\n\t\t\tunset($messages[$code]);\n\t\t\t$code = str_replace('_', ' ', mb_strtolower($code));\n\t\t\t$code = str_replace(' ', '', ucwords($code));\n\t\t\t$code = lcfirst($code);\n\t\t\t$messages[$code] = $value;\n\t\t}\n\n\t\treturn $messages;\n\t}", "function getStatusNameList()\n\t{\n\t\tglobal $lang;\n\t\tif(!isset($lang->status_name_list))\n\t\t\treturn array_flip($this->getStatusList());\n\t\telse return $lang->status_name_list;\n\t}", "public static function get_stati() {\r\n\t\treturn array(\r\n\t\t\tself::UNCONFIRMED => tr(self::UNCONFIRMED, 'status'),\r\n\t\t\tself::ACTIVE => tr(self::ACTIVE, 'status'),\r\n\t\t\tself::DISABLED => tr(self::DISABLED, 'status'),\r\n\t\t\tself::DELETED => tr(self::DELETED, 'status')\r\n\t\t);\r\n\t}", "private function _convertParameterValuesToLowercase()\n {\n foreach ($this->_ldapParameter as $index => $value) {\n // Don't lowercase the bind credentials -- they may be case sensitive!\n if ($index != 'bind_username' && $index != 'bind_password') {\n $this->_ldapParameter[$index] = strtolower($value);\n }\n }\n }", "function tolower($c)\n {\n foreach($c as &$value){\n $value = strtolower($value);\n }\n print_r($c);\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Copies a block from a document to another.
public function copy_block() { $id = $_POST['id']; $src_document = $_POST['src_document']; $dst_document = $_POST['dst_document']; $block = Cortex::get_block($src_document, $id); if ($block == null) { return; } Cortex::copy_block($src_document, $dst_document, $block); exit; }
[ "public static function copy_block($src_document, $dst_document, CortexBlock $block) {\n\n\t\t$dst_blocks = self::get_blocks($dst_document);\n\n\t\t$dst_block = self::duplicate_block($src_document, $dst_document, $block);\n\t\t$dst_nodes = self::duplicate_nodes($src_document, $dst_document, $block, $dst_block);\n\n\t\tself::set_blocks($dst_document, array_merge($dst_blocks, [$dst_block], $dst_nodes));\n\t}", "public function copyBlock(Block $block, Block $targetBlock, string $placeholder, ?int $position = null): Block;", "public static function move_block($src_document, $dst_document, CortexBlock $block) {\n\n\t\t$src_block_id = $block->get_id();\n\n\t\t$post = get_post($src_block_id);\n\n\t\t$args = array(\n\t\t\t'ID' => $src_block_id,\n\t\t\t'post_content' => $post->post_content,\n\t\t\t'post_excerpt' => $post->post_excerpt,\n\t\t\t'post_name' => $post->post_name,\n\t\t\t'post_parent' => $dst_document,\n\t\t\t'post_password' => $post->post_password,\n\t\t\t'post_status' => $post->post_status,\n\t\t\t'post_title' => $post->post_title,\n\t\t\t'post_type' => $post->post_type,\n\t\t);\n\n\t\twp_update_post($args);\n\n\t\t$src_blocks = self::get_blocks($src_document);\n\t\t$dst_blocks = self::get_blocks($dst_document);\n\n\t\t$removed = array();\n\n\t\t$src_blocks = self::block_array_remove($src_blocks, $block);\n\t\t$src_blocks = self::block_array_remove_children($src_blocks, $block, $removed);\n\t\t$dst_blocks = self::block_array_insert($dst_blocks, $block);\n\n\t\t$dst_blocks = array_merge($dst_blocks, $removed);\n\n\t\tforeach ($dst_blocks as &$dst_block) {\n\t\t\t$dst_block->set_document($dst_document);\n\t\t}\n\n\t\tself::set_blocks($src_document, $src_blocks);\n\t\tself::set_blocks($dst_document, $dst_blocks);\n\t}", "private static function duplicate_block($src_document, $dst_document, CortexBlock $block) {\n\n\t\tglobal $wpdb;\n\n\t\t$src_block_id = $block->get_id();\n\n\t\t$post = get_post($src_block_id);\n\n\t\t$args = array(\n\t\t\t'post_content' => $post->post_content,\n\t\t\t'post_excerpt' => $post->post_excerpt,\n\t\t\t'post_name' => $post->post_name,\n\t\t\t'post_parent' => $dst_document,\n\t\t\t'post_password' => $post->post_password,\n\t\t\t'post_status' => $post->post_status,\n\t\t\t'post_title' => $post->post_title,\n\t\t\t'post_type' => $post->post_type,\n\t\t);\n\n\t\t$id = wp_insert_post($args);\n\n\t\t$metas = $wpdb->get_results(\"SELECT meta_key, meta_value FROM $wpdb->postmeta WHERE post_id=$src_block_id\");\n\n\t\tif (count($metas) > 0) {\n\n\t\t\t$insert = \"INSERT INTO $wpdb->postmeta (post_id, meta_key, meta_value) \";\n\t\t\t$values = array();\n\n\t\t\tforeach ($metas as $source_meta) {\n\n\t\t\t\t$key = $source_meta->meta_key;\n\t\t\t\t$val = $source_meta->meta_value;\n\t\t\t\t$val = addslashes($val);\n\n\t\t\t\t$values[] = \"SELECT $id, '$key', '$val'\";\n\t\t\t}\n\n\t\t\t$wpdb->query($insert . implode(\" UNION ALL \", $values));\n\t\t}\n\n\t\treturn new CortexBlock(\n\t\t\t$id, $dst_document,\n\t\t\t$block->get_template(),\n\t\t\t$block->get_parent_layout(),\n\t\t\t$block->get_parent_region()\n\t\t);\n\t}", "public function restoreBlock(Block $block): Block;", "function PDF_fill_pdfblock($pdfdoc, $page, $blockname, $contents, $optlist){}", "public function moveBlock(Block $block, Block $targetBlock, string $placeholder, int $position): Block;", "function wpbb_move_block($source_stack_id, $source_block_id, $target_stack_id) {\n\n\t$source_page_blocks = wpbb_get_blocks($source_stack_id);\n\t$target_page_blocks = wpbb_get_blocks($target_stack_id);\n\n\tif ($source_page_blocks == null) $source_page_blocks = array();\n\tif ($target_page_blocks == null) $target_page_blocks = array();\n\n\tforeach ($source_page_blocks as $i => $source_page_block) {\n\n\t\tif ($source_page_block['block_id'] == $source_block_id) {\n\n\t\t\t$source_page_block['stack_id'] = $target_stack_id;\n\t\t\t$source_page_block['super_id'] = 0;\n\t\t\t$source_page_block['space_id'] = 0;\n\n\t\t\t$target_page_blocks[ ] = $source_page_block;\n\t\t\t$source_page_blocks[$i] = null;\n\n\t\t\tbreak;\n\t\t}\n\t}\n\n\t$source_page_blocks = array_filter($source_page_blocks, function($item) {\n\t\treturn !!$item;\n\t});\n\n\tupdate_post_meta($source_stack_id, '_wpbb_blocks', $source_page_blocks);\n\tupdate_post_meta($target_stack_id, '_wpbb_blocks', $target_page_blocks);\n}", "function PDF_fill_pdfblock($pdfdoc, $page, $blockname, $contents, $optlist)\n{\n}", "public abstract function copy($location);", "public function insert_block() {\n\n\t\tglobal $post;\n\n\t\t$template = $_POST['template'];\n\t\t$document = $_POST['document'];\n\t\t$parent_layout = isset($_POST['parent_layout']) ? $_POST['parent_layout'] : '';\n\t\t$parent_region = isset($_POST['parent_region']) ? $_POST['parent_region'] : '';\n\n\t\t$this->inserting = true;\n\n\t\t$id = wp_insert_post(array(\n\t\t\t'post_parent' => $document,\n\t\t\t'post_type' => 'cortex-block',\n\t\t\t'post_title' => '',\n\t\t\t'post_content' => '',\n\t\t\t'post_status' => 'publish',\n\t\t));\n\n\t\t$this->inserting = false;\n\n\t\t$block = Cortex::create_block(\n\t\t\t$id,\n\t\t\t$document,\n\t\t\t$template,\n\t\t\t$parent_layout,\n\t\t\t$parent_region\n\t\t);\n\n\t\tCortex::insert_block($document, $block);\n\n\t\tCortex::render('cortex-block-list-item-preview.twig', array('block' => $block));\n\t\texit;\n\t}", "public function setFromBlock(Block $block) {\r\n $this->X = $block->x;\r\n $this->Z = $block->z;\r\n }", "protected function loadBlock($parent, $name, $block)\n {\n $className = $block['class'];\n $document = $this->manager->find(null, $this->getIdentifier($parent).'/'.$name);\n $class = $this->manager->getClassMetadata($className);\n if ($document && get_class($document) != $className) {\n $this->manager->remove($document);\n $document = null;\n }\n if (!$document) {\n $document = $class->newInstance();\n\n // $document needs to be an instance of BaseBlock ...\n $document->setParentDocument($parent);\n $document->setName($name);\n }\n\n if ('Symfony\\Cmf\\Bundle\\BlockBundle\\Doctrine\\Phpcr\\ReferenceBlock' == $className) {\n $referencedBlock = $this->manager->find(null, $block['referencedBlock']);\n if (null === $referencedBlock) {\n throw new \\Exception('did not find '.$block['referencedBlock']);\n }\n $document->setReferencedBlock($referencedBlock);\n } elseif ('Symfony\\Cmf\\Bundle\\BlockBundle\\Doctrine\\Phpcr\\ActionBlock' == $className) {\n $document->setActionName($block['actionName']);\n }\n\n $this->manager->persist($document);\n\n // set properties\n if (isset($block['properties'])) {\n foreach ($block['properties'] as $propName => $prop) {\n if (is_array($prop)) {\n foreach ($prop as $lang => $translatedProp) {\n $class->reflFields[$propName]->setValue($document, $translatedProp);\n }\n $this->manager->bindTranslation($document, $lang);\n } else {\n $class->reflFields[$propName]->setValue($document, $prop);\n }\n\n }\n }\n // create children\n if (isset($block['children'])) {\n foreach ($block['children'] as $childName => $child) {\n $this->loadBlock($document, $childName, $child);\n }\n }\n }", "function InsertDocBlock($file, $doc, $type, $code=\"\", $line=0) {\n\t\t// Read file...\n\t\t$source = @file_get_contents($file);\n\t\tif (!$source) die(\"ERR3\"); // error 3 => can't read file\n\t\t\n\t\t// Split the code in an array\n\t\t$lines = preg_split(\"/((\\r?\\n)|(\\n?\\r))/\", $source);\n\t\t\n\t\t// Figure out line number\n\t\t// Make sure the retained line contains the same code as previously, otherwise we may have a problem\n\t\tif ($type != BLOCK_PAGE) {\n\t\t\t$linenumber = intval($line);\t\t\n\t\t\tif (trim($lines[$linenumber-1]) != trim($code) ) die(\"ERR1\");\t\t\t\n\t\t\t// Figure out indent\n\t\t\tif ( preg_match('@^([\\t\\040]*).*$@', $lines[$linenumber-1], $matches) ) {\n\t\t\t\t$doc->indent = $matches[1];\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\t// For the page block, we have to find the first open tag and insert after\n\t\t\t$tokens = token_get_all($source);\n\t\t\t$found = false;\n\t\t\tforeach($tokens as $token) {\n\t\t\t\tif ($token[0] == T_OPEN_TAG) {\n\t\t\t\t\t$found = true;\n\t\t\t\t\t$linenumber = intval($token[2])+1;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!$found) die(\"ERR4\");\n\t\t}\n\t\t\n\t\t// Which line breaks does the source use?\n\t\t$lbtype = \"\\n\";\n\t\tif (substr_count($source,\"\\r\\n\") > 0) $lbtype = \"\\r\\n\";\n\n\t\t// Insert docblock\n\t\tarray_splice($lines, $linenumber-1, 0, $lbtype.@implode($lbtype,$doc->Output( isUtf8($source) )) );\n\t\t\t\t\n\t\t// final source\n\t\t$source = implode($lbtype, $lines);\n\t\t//rename($file,$file.\".bak\");\n\t\tfile_put_contents($file, $source);\n\t}", "private function setBlock($parent, $block) {\n\t\t$name = \"B_\".$block;\n\t\t$str = $this->getVar($parent);\n\t\tif($this->accurate){\n\t\t\t$str = str_replace(\"\\r\\n\", \"\\n\", $str);\n\t\t\t$reg = \"/\\t*<!--\\s*BEGIN\\s+$block\\s+-->\\n*(\\s*.*?\\n?)\\t*<!--\\s+END\\s+$block\\s*-->\\n?/sm\";\n\t\t} \n\t\telse $reg = \"/<!--\\s*BEGIN\\s+$block\\s+-->\\s*(\\s*.*?\\s*)<!--\\s+END\\s+$block\\s*-->\\s*/sm\";\n\t\tif(1!==preg_match($reg, $str, $m)) throw new UnexpectedValueException(\"bloco $block está mal formado\");\n\t\t$this->setValue($name, '');\n\t\t$this->setValue($block, $m[1]);\n\t\t$this->setValue($parent, preg_replace($reg, \"{\".$name.\"}\", $str));\n\t}", "public function setBlock($block) {\n $this->block = $block;\n }", "function copyblock($im, $bi, $x, $y, $v) {\n\n\t\t$bx\t= $v % 16;\n\t\t$by\t= floor($v / 16);\n\n\n\t\timagecopy($im, $bi, $x * 8, $y * 8, $bx * 8, $by * 8, 8, 8);\n\n\n\t}", "public function createBlockInstance ($block);", "public function copy($from, $to);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
This sets the course instructor
function set_instructor( $instructor ) { $this->instructor = $instructor; }
[ "private function set_coursestudents() {\n $this->coursestudents = get_enrolled_users($this->context, 'mod/assign:submit');\n }", "public function getInstructor()\n {\n return $this->instructor;\n }", "function setCourse( $course ) {\r\n $this->course = $course;\r\n }", "public function single_course_instructors() {\n\t\t\t$course = LP_Global::course();\n\n\t\t\t$course_id = $course->get_id();\n\t\t\t$instructors = $this->get_instructors( $course_id );\n\n\t\t\tlearn_press_get_template( 'single-course-tab.php', array( 'instructors' => $instructors ), learn_press_template_path() . '/addons/co-instructors/', LP_ADDON_CO_INSTRUCTOR_TEMPLATE );\n\t\t}", "function setCourse( $course ) {\n $this->course = $course;\n }", "public function set_instructor_stimulus ($instructor_stimulus) {\n $this->instructor_stimulus = $instructor_stimulus;\n }", "function learn_press_courses_loop_item_instructor() {\r\n\t\tlearn_press_get_template( 'loop/course/instructor.php' );\r\n\t}", "public function setInstructorAndAdminName()\n {\n // Add medal stamp image.\n $this->Image('C:\\xampp\\htdocs\\Nexus\\resource\\img\\fpdf\\medal-stamp.png', 121, 162, 40, 40);\n\n // Set the font.\n $this->AddFont('BebasNeue-Regular', '', 'BebasNeue-Regular.php');\n $this->SetFont('BebasNeue-Regular', '', 18);\n\n // Line break.\n $this->Ln(26);\n\n $this->SetLeftMargin(17);\n\n $this->Cell(90, 30, $this->aAdminDetails['instructorName'], 0, 0, 'C');\n $this->Cell(224, 30, $this->aAdminDetails['adminName'], 0, 0, 'C');\n\n // Line break.\n $this->Ln(1);\n\n $this->Cell(90, 30, '____________________________________', 0, 0, 'C');\n $this->Cell(223, 30, '____________________________________', 0, 0, 'C');\n\n $this->AddFont('Calibri', '', 'Calibri.php');\n $this->SetFont('Calibri', '', 12);\n\n // Line break.\n $this->Ln(23);\n \n // Set the font.\n $this->Cell(87, 0, 'Instructor', 0, 0, 'C');\n $this->Cell(232, 0, 'Administrator', 0, 0, 'C');\n }", "function pm_assign_instructor_from_mdl($eventdata) {\n\n global $CFG, $DB;\n\n //make sure we have course manager roles defined\n if(empty($CFG->coursecontact)) {\n return;\n }\n\n //retrieve the appropriate roles\n $valid_instructor_roles = explode(',', $CFG->coursecontact);\n\n //make sure the assigned role is one of the ones we care about\n if(!in_array($eventdata->roleid, $valid_instructor_roles)) {\n return;\n }\n\n //get the id of the appropriate curriculum user\n if(!$instructorid = pm_get_crlmuserid($eventdata->userid)) {\n return;\n }\n\n //get the curriculum user object\n $instructor = new user($instructorid);\n\n //get the role assignment context\n if(!$context = $DB->get_record('context', array('id'=> $eventdata->contextid))) {\n return;\n }\n\n //make sure we're using a course context\n if($context->contextlevel != CONTEXT_COURSE) {\n return;\n }\n\n //make sure the Moodle course is not tied to other curriculum administartion classes\n if($DB->count_records(classmoodlecourse::TABLE, array('moodlecourseid'=> $context->instanceid)) != 1) {\n return true;\n }\n\n //make sure the course is tied to at least one class\n if(!$crlm_class = $DB->get_record(classmoodlecourse::TABLE, array('moodlecourseid'=> $context->instanceid))) {\n return;\n }\n\n //add user as instructor for the appropriate class\n\n if(!$DB->record_exists(instructor::TABLE, array('classid'=> $crlm_class->classid,\n 'userid'=> $instructorid))) {\n $ins_record = new instructor(array('classid' => $crlm_class->classid,\n 'userid' => $instructorid,\n 'assigntime' => $eventdata->timestart,\n 'completetime' => $eventdata->timeend));\n $ins_record->save();\n }\n\n}", "public function setInstructorName($instructorName)\n {\n $this->instructorName = filter_var($instructorName, FILTER_SANITIZE_MAGIC_QUOTES);\n }", "private function instructor()\n {\n $instructor = Auth::user()->userable;\n\n return View::make('core::instructors.account')->with([\n 'instructor' => $instructor,\n 'trainings' => $instructor->teaching_trainings()->get()->lists('name')->all(),\n 'facilities' => $instructor->facilities()->get()\n ]);\n }", "function create_course_setup_nav_instructor(){\n\t global $bp;\n\t\t$check =0;\n\t if(bp_is_my_profile() && current_user_can('edit_posts')){\n\t $check =1;\n\t bp_core_new_nav_item( array(\n\t 'name' => __('Create a Course', 'vibe-customtypes' ),\n\t 'slug' => 'create-course',\n\t 'position' => 100,\n\t 'screen_function' => array($this,'wplms_create_course_redirect'),\n\t 'show_for_displayed_user' => $check\n\t ) );\n\t } \n\t}", "public function set_course($course) {\n $this->course = $course;\n }", "public function instructorsAction()\n {\n $this->_initInstructordoc();\n $this->loadLayout();\n $this->getLayout()->getBlock('instructordoc.edit.tab.instructor')\n ->setInstructordocInstructors($this->getRequest()->getPost('instructordoc_instructors', null));\n $this->renderLayout();\n }", "public function setUp() {\n $course = $this->getDataGenerator()->create_course();\n $user = $this->getDataGenerator()->create_and_enrol($course, 'editingteacher');\n\n $this->setUser($user);\n\n global $COURSE;\n $COURSE = $course;\n }", "public function set_course()\n\t\t{\n\t\t\t// Check for existing course\n\t\t\t$result = database::query(\"SELECT id FROM courses WHERE id=?;\", $this->id);\n\n\t\t\t// If course doesn't exist, insert this object\n\t\t\tif (count($result) === 0)\n\t\t\t{\n\t\t\t\t// Store course object by fields in database\n\t\t\t\t$success = database::query(\"INSERT INTO courses VALUES (null, ?, ?, ?, ?, ?);\", $this->year, $this->term, $this->subject, $this->number, $this->title);\n\n\t\t\t\t// Check for success\n\t\t\t\tif ($success)\n\t\t\t\t{\n\t\t\t\t\t// Set course's ID from database return (last insert ID)\n\t\t\t\t\t$this->id = $success;\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t// On failure, trigger warning\t\n\t\t\t\t\ttrigger_error(\"course->set_course() database insert failed with code: '\" . $success . \"'\", E_USER_WARNING);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t// Else, update this object\n\t\t\t\t$success = database::query(\"UPDATE courses SET year=?, term=?, subject=?, number=?, title=? WHERE id=?;\", $this->year, $this->term, $this->subject, $this->number, $this->title, $this->id);\n\n\t\t\t\t// Check for failure\n\t\t\t\tif (!$success)\n\t\t\t\t{\n\t\t\t\t\t// On failure, trigger warning\t\n\t\t\t\t\ttrigger_error(\"course->set_course() database update failed with code: '\" . $success . \"'\", E_USER_WARNING);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\treturn $success;\n\t\t}", "function setSeedCourseCode($txt)\r\n {\r\n $this->_seed_course_code = $txt ;\r\n }", "function setTableCourse($table_course) {\n\n\t\t$this->_table_course = $table_course;\n\t}", "public function instructor()\n {\n return $this->hasOne('App\\Instructor',\"user_id\");\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Include Parent of Job
public function includeParent($job) { $parent = $job->parentJob; if($parent) { return $this->item($parent, new ParentJobTransformer); } }
[ "public function parent()\n {\n return $this->getParentTask();\n }", "public function parentEntity();", "Public Function getParent() { Return $this->project; }", "public function parent() {\n\t\treturn $this->parent;\n\t}", "public function parentRecord()\r\n {\r\n return $this->_parent;\r\n }", "public function parent()\n {\n return $this->_parent;\n }", "public function getParentId()\n {\n if($this->parentId) {\n return $this->parentId;\n }\n\n $path = [];\n\t\tif($this->scope->has()) {\n\t\t\t$path[] = $this->scope->id();\n\t\t}\n $path[] = 'jobs';\n $path[] = $this->job->number;\n $path[] = $this->entityType;\n\n $parentId = null;\n\t\tforeach ($path as $keyName) {\n\t\t\t$parentId = $this->repository->findOrCreateByName($keyName, $parentId);\n }\n $this->parentId = $parentId;\n return $parentId;\n }", "function parent(){\r\n\t\treturn rsgGalleryManager::get( $this->parent );\r\n\t}", "public function getParentBackedUp();", "public function parent() { return $this->post->post_parent; }", "public function getParent() {\n\t\treturn new Google_Drive_Parent_output(json_decode($this->get('Response'), true));\n\t}", "public function get_parent()\n {\n return $this->get_application();\n }", "function getParent(){\n\n if ($this->data['uid'] != \"\") {\n $queryParts = array(\n 'SELECT' => \"uid_foreign\",\n 'FROM' => \"tx_paeproject_projectelement_parent_mm\",\n 'WHERE' => \"uid_local=\" . intval($this->data['uid']),\n );\n\n $result = $GLOBALS['TYPO3_DB']->exec_SELECTquery(\n $queryParts['SELECT'],\n $queryParts['FROM'],\n $queryParts['WHERE']\n ) or die(\"ERROR: tx_paeproject_project->getParent(req1): \" . $GLOBALS['TYPO3_DB']->sql_error());\n\n while($row = $GLOBALS['TYPO3_DB']->sql_fetch_row($result)){\n $parent = t3lib_div::makeInstance('tx_paeproject_project');\n $parent->load($row[0]);\n }\n }\n if (isset($parent)) return $parent;\n else return false;\n }", "public function job() {\n\t\treturn $this->belongsTo('Job', 'FK_jobId');\n\t}", "public function getParent() {\n $class = static::extendsFrom();\n return $this->hasOne($class::className(), [$this->parentPrimaryKey() => $this->parentAttribute()]);\n }", "public function setParentJobId($parentJobId)\n {\n $this->parentJobId = $parentJobId;\n return $this;\n }", "public function getParentContext();", "public function &_get_parent()\n\t{\n\t\treturn $this->parent;\n\t}", "function print_parent_job_details( $parentDetails ) {\n\n $newLine = \"\\n\";\n $subFilesDetails = '';\n $CI =& get_instance();\n $CI->load->helper( 'itime' );\n\n $subFilesDetails .= '<div class=\"filtered-list-link\" data-id=\"' . $parentDetails->jobId . '\">' . $newLine\n . format_job_ref_name( $parentDetails->jobReferenceNo, $parentDetails->jobName ) . $newLine\n . '</div>';\n \n return $subFilesDetails;\n}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Load the datagrid with the drafts
private function loadDataGridDrafts() { // create datagrid $this->dgDrafts = new BackendDataGridDB(BackendPagesModel::QRY_DATAGRID_BROWSE_DRAFTS, array('draft', BackendAuthentication::getUser()->getUserId(), BL::getWorkingLanguage())); // hide columns $this->dgDrafts->setColumnsHidden(array('revision_id')); // disable paging $this->dgDrafts->setPaging(false); // set column functions $this->dgDrafts->setColumnFunction(array('BackendDataGridFunctions', 'getUser'), array('[user_id]'), 'user_id', true); $this->dgDrafts->setColumnFunction(array('BackendDataGridFunctions', 'getLongDate'), array('[edited_on]'), 'edited_on'); // set headers $this->dgDrafts->setHeaderLabels(array('user_id' => SpoonFilter::ucfirst(BL::lbl('By')), 'edited_on' => SpoonFilter::ucfirst(BL::lbl('LastEdited')))); // check if allowed to edit if(BackendAuthentication::isAllowedAction('edit', $this->getModule())) { // set column URLs $this->dgDrafts->setColumnURL('title', BackendModel::createURLForAction('edit') . '&amp;id=[id]&amp;draft=[revision_id]'); // add edit column $this->dgDrafts->addColumn('edit', null, BL::lbl('Edit'), BackendModel::createURLForAction('edit') . '&amp;id=[id]&amp;draft=[revision_id]', BL::lbl('Edit')); } }
[ "private function loadDataGrid()\n\t{\n\t\t// create datagrid\n\t\t$this->datagrid = new BackendDataGridDB(BackendSendysubscribeModel::QRY_DATA_GRID_BROWSE);\n\n\t\t// sorting columns\n\t\t$this->datagrid->setSortingColumns(array('label', 'listId'), 'label');\n\n\t\t// set colum URLs\n\t\t$this->datagrid->setColumnURL('label', BackendModel::createURLForAction('edit') . '&amp;id=[id]');\n\t\t$this->datagrid->addColumn('delete', null, 'delete', BackendModel::createURLForAction('delete') . '&amp;id=[id]');\n\n\t\t// add edit column\n\t\t$this->datagrid->addColumn('edit', null, BL::getLabel('Edit'), BackendModel::createURLForAction('edit') . '&amp;id=[id]', BL::getLabel('Edit'));\n\t}", "function _load() {\n $this->load->helper('flexigrid');\n\n // NOTE: this order has to match the records in ajax_load_page()\n //\n $colModel['id'] = array('id',40,TRUE,'center',2);\n $colModel[''] = array('Edit',40,false,'center',0);\n $colModel['menu'] = array('Page Type',80,TRUE,'left',2);\n $colModel['title'] = array('Title',200,TRUE,'left',2);\n $colModel['status'] = array('Status',40,TRUE,'left',2);\n $colModel['content'] = array('Content',478,TRUE,'left',2);\n $colModel['name'] = array('Name',140,TRUE,'left',2);\n\t\t\n $num_rows = $this->page_model->get_num_rows('fs_page');\n\n $gridParams = array(\n 'width' => 'auto',\n 'height' => 650,\n 'rp' => 50,\n 'rpOptions' => \"[$num_rows / 2, $num_rows]\",\n 'pagestat' => 'Displaying: {from} to {to} of {total} items.',\n 'blockOpacity' => 0.5,\n 'title' => 'Content',\n 'showTableToggleBtn' => false\n );\n\t\t\n $buttons[] = array('Select All','select all','grid_functions');\n $buttons[] = array('DeSelect All','deselect all','grid_functions');\n $buttons[] = array('Delete','delete','grid_functions');\n $buttons[] = array('Export','export','grid_functions');\n $grid_js = build_grid_js('Grid',site_url(\"cms/pages/ajax_load_pages\"),$colModel,'id','desc',$gridParams, $buttons);\n \n return $grid_js;\n }", "private function load() {\n\t\t\t$sheet = array();\n\t\t\t\n\t\t\t$this->db->where('username',$this->user->getUsername());\n\t\t\t$rows = $this->db->get('sheets');\n\t\t\tforeach($rows as $row) {\n\t\t\t\t$sheet['id'] = $row['id'];\n\t\t\t\t$sheet['name'] = $row['name'];\n\t\t\t\t$sheet['updated'] = $row['updated'];\n\t\t\t\t$this->data[] = $sheet;\n\t\t\t}\n\t\t}", "function load() {\n global $db_conn;\n\n $this->data = $this->table->load_entries_data(array($this->id));\n $this->data = $this->data[$this->id];\n $this->_load();\n }", "public function viewAllDrafts()\r\n {\r\n\t\t// ** Drafts **\r\n\r\n\t\t$options = array('user_id' => $this->userId\r\n\t\t\t\t\t\t );\r\n\t\t$draftIds = DatabaseObject_Resource::getAllDraftsByUserId($this->db, $options);\r\n\t\t\r\n\t\tif (count($draftIds) > 0) {\r\n\t\t\t$options = array('order'\t=> 'rsrc_date DESC',\r\n\t\t\t\t\t\t\t 'rsrc_id'\t=> $draftIds,\r\n\t\t\t\t\t\t\t 'limit'\t=> 0,\r\n\t\t\t\t\t\t\t 'offset'\t=> 0\r\n\t\t\t\t\t\t\t );\r\n\t\t\t$draftResources = DatabaseObject_Resource::getResourceById($this->db, $options);\r\n\t\r\n\t\t\t$this->view->resources = $draftResources;\r\n\t\t\t$this->view->totalDrafts = count($draftIds);\r\n\t\t}\r\n }", "private function loadData()\n {\n /* Load all plans */\n $plans = $this->planManager->getFindAll();\n foreach ($plans as $plan) {\n $planName = $plan->getName();\n $planName = strtolower(trim($planName));\n\n $this->plans[$planName] = $plan->getId();\n }\n\n /* Load all States with districts */\n $this->states = $this->stateManager->getAllStatesForAgentImporter();\n }", "public function ajax_load_layers_editor() {\n\t\t$slide_default_settings = BQW_SliderPro_Settings::getSlideSettings();\n\t\t$layer_default_settings = BQW_SliderPro_Settings::getLayerSettings();\n\n\t\t$layers = json_decode( stripslashes( $_POST['data'] ), true );\n\t\t$content_type = isset( $_POST['content_type'] ) ? $_POST['content_type'] : $slide_default_settings['content_type']['default_value'];\n\t\t\n\t\tinclude( 'views/layers-editor.php' );\n\n\t\tdie();\n\t}", "public function createComponentDataGrid() {\n\n\t\tif(empty($this->dateRange)) {\n\t\t\t$source = $this->db->table('project')\n\t\t\t\t\t->where('project_institute:institute_id', $this->institute_id);\n\t\t} else {\n\t\t\t$source = $this->db->table('project')\n\t\t\t\t\t->where('project_institute:institute_id', $this->institute_id)\n\t\t\t\t\t->where('project_institute:project_institute_date:start >= ?', $this->dateRange->from)\n\t\t\t\t\t->where('project_institute:project_institute_date:end <= ?', $this->dateRange->to)\n\t\t\t\t\t->select('\n\t\t\t\t\t\tDISTINCT project.id,\n\t\t\t\t\t\tproject.name,\n\t\t\t\t\t\tproject.cost,\n\t\t\t\t\t\tproject.approved_cost,\n\t\t\t\t\t\tproject.participation,\n\t\t\t\t\t\tproject.approved_participation,\n\t\t\t\t\t\tproject.hr,\n\t\t\t\t\t\tproject.approved_hr\n\t\t\t\t\t');\n\t\t}\n\n\t\tif($source->count('*') <= 0) {\n\t\t\t\n\t\t\t$dg = new DataGrid();\n\t\t\t$dg->setDataSource($source);\n\n\t\t\t$dg->template->empty = true;\n\t\t\treturn $dg;\n\t\t}\n\t\t\n $dg = new DataGrid();\n $dg->setDataSource($source);\n\t\t\n $dg->addAction('edit', 'Uprav', ':Projects:Projects:edit', array('id'));\n\n $dg->addColumn('id', 'No.')->setIntFilter('project.id')->setStyle('width: 50px');\n $dg->addColumn('name', 'Name')->setTextFilter('project.name')->setStyle('text-align: left');\n\t\t$dg->addCustomColumn('cost', 'Fin. zdroje')->setIntFilter('project.cost')->setHtml(create_function('$row', '$helper = new EmptyPrice(); return $helper->process($row->cost);')); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t$dg->addCustomColumn('approved_cost', 'Schválené fin.zdroje')->setIntFilter('project.approved_cost')->setHtml(create_function('$row', '$helper = new EmptyPrice(); return $helper->process($row->approved_cost);'));\n\t\t$dg->addCustomColumn('participation', 'Spoluúčasť')->setIntFilter('project.participation')->setHtml(create_function('$row', '$helper = new EmptyPrice(); return $helper->process($row->participation);'));\n\t\t$dg->addCustomColumn('approved_participation', 'Schválená spoluúčasť')->setIntFilter('project.approved_participation')->setHtml(create_function('$row', '$helper = new EmptyPrice(); return $helper->process($row->approved_participation);'));\n\t\t$dg->addCustomColumn('hr', 'Ľudské zdroje')->setIntFilter('project.hr')->setHtml(create_function('$row', '$helper = new EmptyNumber(); return $helper->process($row->hr);'));\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t$dg->addCustomColumn('approved_hr', 'Schválené ľudské zdroje')->setIntFilter('project.approved_hr')->setHtml(create_function('$row', '$helper = new EmptyNumber(); return $helper->process($row->approved_hr);'));\n\t\treturn $dg;\n\t}", "public function loadContents()\n {\n $entries = $this->getCollectedRecords();\n $this->removeAll();\n foreach ($entries as $entry) {\n $this->add($entry);\n }\n }", "public function loadContents() {\n\t\t$entries = $this->getCollectedRecords();\n\t\t$this->removeAll();\n\t\tforeach ($entries as $entry) {\n\t\t\t$this->add($entry);\n\t\t}\n\t}", "public function loadData();", "private function loadData()\n {\n $this->data = $this->query->find();\n }", "protected function loadData()\n {\n $this->data = $this->mapper->fetchObjects($this->query);\n }", "private function fillData()\n {\n $this->loadPrinters();\n $this->loadCartridges();\n $this->loadSituatedPrinters();\n $this->loadDepartments();\n }", "function loadImportData()\n {\n // GROUP 3: SUPER ADMINS ONLY.\n if ( $this->accessPrivManager->hasSitePriv()){\t \n\t \n\t // set the pageCallBack to be without any additional parameters\n\t // (an AdminBox needs this so Language Switching on a page doesn't\n\t // pass a previous operations)\n\t $parameters = array('PERSON_ID'=>$this->PERSON_ID, 'PROVINCE_ID'=>$this->PROVINCE_ID, 'GENDER_ID'=>$this->GENDER_ID, 'STAFF_ID'=>$this->STAFF_ID);//[RAD_CALLBACK_PARAMS]\n\t $pageCallBack = $this->getCallBack(modulecim_hrdb::PAGE_IMPORTDATA, $this->sortBy, $parameters);\n\t $this->setPageCallBack( $pageCallBack );\n\t\n\t\n\t $this->pageDisplay = new page_ImportData( $this->moduleRootPath, $this->viewer );\n\t\n\t $links = array();\n\t\n\t/*[RAD_LINK_INSERT]*/\n\t\n\t $this->pageDisplay->setLinks( $links );\n }\n else\n {\n\t $this->pageDisplay = new page_NotAuthorized($this->moduleRootPath, $this->viewer); \n } \n\n }", "public function loadData(){\n $Provinceid = $this -> getId();\n if( is_numeric($Provinceid) && !empty($Provinceid) ){\n $query = \"select * from ProvinceTab where ProvinceId=\".$Provinceid;\n\n $res = execute($query);\n if(mysql_num_rows($res) > 0 ){\n while($l = mysql_fetch_assoc($res))\n $this -> placerChamps($l);//Affectation au champ de cet objet\n \n }\n }\n\n }", "public function createComponentDataGridMyProjects() {\n\t\t\n\t\tif(empty($this->dateRange)) {\n\t\t\t$source = $this->db->table('project')\n\t\t\t\t\t->where('project.user_id', $this->user->getId());\n\t\t} else {\n\t\t\t$source = $this->db->table('project')\n\t\t\t\t\t->where('project.user_id', $this->user->getId())\n\t\t\t\t\t->where('project_institute:project_institute_date:start >= ?', $this->dateRange->from)\n\t\t\t\t\t->where('project_institute:project_institute_date:end <= ?', $this->dateRange->to)\n\t\t\t\t\t->select('\n\t\t\t\t\t\tDISTINCT project.id,\n\t\t\t\t\t\tproject.name,\n\t\t\t\t\t\tproject.cost,\n\t\t\t\t\t\tproject.approved_cost,\n\t\t\t\t\t\tproject.participation,\n\t\t\t\t\t\tproject.approved_participation,\n\t\t\t\t\t\tproject.hr,\n\t\t\t\t\t\tproject.approved_hr\n\t\t\t\t\t');\n\t\t}\n\t\t\n\t\tif($source->count('*') <= 0) {\n\t\t\t\n\t\t\t$dg = new DataGrid();\n\t\t\t$dg->setDataSource($source);\n\n\t\t\t$dg->template->empty = true;\n\t\t\treturn $dg;\n\t\t}\n\t\t\n $dg = new DataGrid();\n $dg->setDataSource($source);\n\t\t\n $dg->addAction('edit', 'Uprav', 'Projects:edit', array('id'));\n\n $dg->addColumn('id', 'ID')->setIntFilter('project.id')->setStyle('width: 50px');\n $dg->addColumn('name', 'Názov projektu')->setTextFilter('project.name')->setStyle('text-align: left');\n\t\t$dg->addCustomColumn('cost', 'Fin. zdroje')->setIntFilter('project.cost')->setHtml(create_function('$row', '$helper = new EmptyPrice(); return $helper->process($row->cost);')); \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t$dg->addCustomColumn('approved_cost', 'Schválené fin.zdroje')->setIntFilter('project.approved_cost')->setHtml(create_function('$row', '$helper = new EmptyPrice(); return $helper->process($row->approved_cost);'));\n\t\t$dg->addCustomColumn('participation', 'Spoluúčasť')->setIntFilter('project.participation')->setHtml(create_function('$row', '$helper = new EmptyPrice(); return $helper->process($row->participation);'));\n\t\t$dg->addCustomColumn('approved_participation', 'Schválená spoluúčasť')->setIntFilter('project.approved_participation')->setHtml(create_function('$row', '$helper = new EmptyPrice(); return $helper->process($row->approved_participation);'));\n $dg->addCustomColumn('hr', 'Ľudské zdroje')->setIntFilter('project.hr')->setHtml(create_function('$row', '$helper = new EmptyNumber(); return $helper->process($row->hr);'));\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t$dg->addCustomColumn('approved_hr', 'Schválené ľudské zdroje')->setIntFilter('project.approved_hr')->setHtml(create_function('$row', '$helper = new EmptyNumber(); return $helper->process($row->approved_hr);'));\n\t\treturn $dg;\n\t}", "public function load() {\n\t\t$count = 1;\n\t\t$this->template = TemplateManager::load(\"NewsFeed\");\n\t\t$threads = $this->database->query(\"SELECT * FROM \". FORUM_DB . \".threads WHERE board_id=1 OR board_id=2 ORDER BY date DESC LIMIT \".self::NEWS_COUNT.\"\");\n\t\twhile ($thread = $threads->fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$threadLink = \"/community/thread/index.php?board_id=\" . $thread['board_id'] . \"&id=\" . $thread['thread_id']. \"&page=1\";\n\t\t\t$firstPost = $this->database->query(\"SELECT * FROM web_forums.posts WHERE thread_id=\".$thread['thread_id'].\" AND first_post=1 LIMIT 1\");\n\t\t\tif ($firstPost->rowCount() == 1) {\n\t\t\t\t$firstPost = $firstPost->fetch(PDO::FETCH_ASSOC);\n\t\t\t\t$this->template->insert(\"title\", $thread['title']);\n\t\t\t\t$this->template->insert(\"post\", $firstPost['content']);\n\t\t\t\t$this->template->insert(\"collapsed\", $count++ > self::UNCOLLAPSED_COUNT ? \"collapsed\" : \"\");\n\t\t\t\t$this->template->insert(\"threadLink\", $threadLink);\n\t\t\t\t$this -> display();\n\t\t\t}\n\t\t}\n\t}", "public function _load_deposits()\n\t{\n\t\t$this->data['deposits'] = array();\n\n\t\t$deposits = new \\PSU\\AR\\Deposits( $this->pidm );\n\t\t$deposits->load();\n\n\t\t$this->data['deposits'] = $deposits;\n\n\t\t$this->_calc_deposits();\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
/searchRecipes Returns all recipe names that use all input ingredients, sorted by number of ingreds the recipe requires that aren't in the given user's inventory or grocery list Input: (int userid, String[] ingredients) (note each ingredient in the array should have its name enclosed with quotes) Output: a JSON array with the format ["", "", ... ]
function searchRecipes($userid, $ingreds){ $execstring = 'java -cp .:mysql-connector-java-5.1.35-bin.jar MyMealManager.searchMain '. $userid . ' '; foreach ($ingreds as $i){ $execstring .= $i; $execstring .= ' '; } exec($execstring, $results); return json_encode($results); }
[ "public function search(array $ingredients)\n {\n return $this->repository->search(RecipeSearchCriteria::instance()->setIngredients($ingredients));\n }", "public function searchRecipes($query, $cuisine = null, $exclude_cuisine = null, $diet = null, $intolerances = null, $equipment = null, $include_ingredients = null, $exclude_ingredients = null, $type = null, $instructions_required = null, $fill_ingredients = null, $add_recipe_information = null, $add_recipe_nutrition = null, $author = null, $tags = null, $recipe_box_id = null, $title_match = null, $max_ready_time = null, $ignore_pantry = null, $sort = null, $sort_direction = null, $min_carbs = null, $max_carbs = null, $min_protein = null, $max_protein = null, $min_calories = null, $max_calories = null, $min_fat = null, $max_fat = null, $min_alcohol = null, $max_alcohol = null, $min_caffeine = null, $max_caffeine = null, $min_copper = null, $max_copper = null, $min_calcium = null, $max_calcium = null, $min_choline = null, $max_choline = null, $min_cholesterol = null, $max_cholesterol = null, $min_fluoride = null, $max_fluoride = null, $min_saturated_fat = null, $max_saturated_fat = null, $min_vitamin_a = null, $max_vitamin_a = null, $min_vitamin_c = null, $max_vitamin_c = null, $min_vitamin_d = null, $max_vitamin_d = null, $min_vitamin_e = null, $max_vitamin_e = null, $min_vitamin_k = null, $max_vitamin_k = null, $min_vitamin_b1 = null, $max_vitamin_b1 = null, $min_vitamin_b2 = null, $max_vitamin_b2 = null, $min_vitamin_b5 = null, $max_vitamin_b5 = null, $min_vitamin_b3 = null, $max_vitamin_b3 = null, $min_vitamin_b6 = null, $max_vitamin_b6 = null, $min_vitamin_b12 = null, $max_vitamin_b12 = null, $min_fiber = null, $max_fiber = null, $min_folate = null, $max_folate = null, $min_folic_acid = null, $max_folic_acid = null, $min_iodine = null, $max_iodine = null, $min_iron = null, $max_iron = null, $min_magnesium = null, $max_magnesium = null, $min_manganese = null, $max_manganese = null, $min_phosphorus = null, $max_phosphorus = null, $min_potassium = null, $max_potassium = null, $min_selenium = null, $max_selenium = null, $min_sodium = null, $max_sodium = null, $min_sugar = null, $max_sugar = null, $min_zinc = null, $max_zinc = null, $offset = null, $number = null, $limit_license = null)\n {\n list($response) = $this->searchRecipesWithHttpInfo($query, $cuisine, $exclude_cuisine, $diet, $intolerances, $equipment, $include_ingredients, $exclude_ingredients, $type, $instructions_required, $fill_ingredients, $add_recipe_information, $add_recipe_nutrition, $author, $tags, $recipe_box_id, $title_match, $max_ready_time, $ignore_pantry, $sort, $sort_direction, $min_carbs, $max_carbs, $min_protein, $max_protein, $min_calories, $max_calories, $min_fat, $max_fat, $min_alcohol, $max_alcohol, $min_caffeine, $max_caffeine, $min_copper, $max_copper, $min_calcium, $max_calcium, $min_choline, $max_choline, $min_cholesterol, $max_cholesterol, $min_fluoride, $max_fluoride, $min_saturated_fat, $max_saturated_fat, $min_vitamin_a, $max_vitamin_a, $min_vitamin_c, $max_vitamin_c, $min_vitamin_d, $max_vitamin_d, $min_vitamin_e, $max_vitamin_e, $min_vitamin_k, $max_vitamin_k, $min_vitamin_b1, $max_vitamin_b1, $min_vitamin_b2, $max_vitamin_b2, $min_vitamin_b5, $max_vitamin_b5, $min_vitamin_b3, $max_vitamin_b3, $min_vitamin_b6, $max_vitamin_b6, $min_vitamin_b12, $max_vitamin_b12, $min_fiber, $max_fiber, $min_folate, $max_folate, $min_folic_acid, $max_folic_acid, $min_iodine, $max_iodine, $min_iron, $max_iron, $min_magnesium, $max_magnesium, $min_manganese, $max_manganese, $min_phosphorus, $max_phosphorus, $min_potassium, $max_potassium, $min_selenium, $max_selenium, $min_sodium, $max_sodium, $min_sugar, $max_sugar, $min_zinc, $max_zinc, $offset, $number, $limit_license);\n return $response;\n }", "function lookForRecipes($bdd, $ingredients,$nbMissing){\n\t $recipes=array();\n\t $count=array();\n\t for($i=0;$i<count($ingredients);$i++){\n\t\t$req=$bdd->prepare('SELECT * FROM recipe WHERE Idingredient=?');\n\t\t$req->execute(array($ingredients[$i]));\n\t\twhile($donnes =$req->fetch()){\n\t\t\tif(in_array($donnes['Idrecipe'],$recipes)){\n\t\t\t\t$position=array_search($donnes['Idrecipe'],$recipes);\n\t\t\t\t$count[$position]=$count[$position]+1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\tarray_push($recipes,$donnes['Idrecipe']);\n\t\t\t\tarray_push($count,1);\n\t\t\t}\n\t\t}\n\t }\n\t $recipes=getRecipes($recipes, $count, $nbMissing,$bdd);\n\t return $recipes;\n}", "public function searchRecipes()\n {\n if (isset($_POST['keyword'])) {\n $keyword = $_POST['keyword'];\n $recipesManager = new RecipesManager();\n $recipes = $recipesManager->getRecipesByTitleOrCategory($keyword);\n if (empty($recipes)) {\n echo json_encode([\n 'status' => 'empty',\n 'recipes' => $recipes,\n ]);\n } else {\n echo json_encode([\n 'status' => 'success',\n 'recipes' => $recipes,\n ]);\n }\n } else {\n echo json_encode('Une erreur est survenue');\n }\n }", "public function getRecipesByUser($userId)\n {\n // Get dependencies\n $dataMapper = $this->app->dataMapper;\n $RecipeMapper = $dataMapper('RecipeMapper');\n $UserMapper = $dataMapper('UserMapper');\n $Paginator = $this->app->PaginationHandler;\n $twig = $this->app->twig;\n\n // Get the page number\n $pageNumber = $this->app->request->get('page') ?: 1;\n\n // Verify user and get proper name and ID\n $userResult = $UserMapper->getUser($userId);\n\n // If no valid user was found then return 404\n if (!$userResult) {\n $this->app->notFound();\n }\n\n // Configure pagination object\n $Paginator->useQueryString = true;\n $Paginator->setPagePath($this->app->urlFor('recipesByUser', ['id' => $userResult->user_id, 'username' => $userResult->user_url]));\n $Paginator->setCurrentPageNumber($pageNumber);\n\n // Fetch recipes\n $recipes = $RecipeMapper->getRecipesByUser($userResult->user_id, $Paginator->getRowsPerPage(), $Paginator->getOffset());\n\n // Get count of recipes returned by query and load pagination\n $Paginator->setTotalRowsFound($RecipeMapper->foundRows());\n $twig->parserExtensions[] = $Paginator;\n\n // Return the array of recipes and the user name (set in the category field)\n $data['list'] = $recipes;\n $data['category']['name'] = $userResult->user_name . '\\'s';\n\n $twig->display('recipeList.html', ['recipes' => $data, 'title' => $userResult->user_name]);\n }", "protected function getAllRecipesData()\n {\n $response = Http::withHeaders([\n 'Content-Type' => 'application/json'\n ])->get('https://api.spoonacular.com/recipes/findByIngredients?', [\n 'apiKey' => config('services.spoonacular.api_key'),\n 'ingredients' => $this->stringIngredientsNames\n ]);\n\n //dd($response->json());\n return $response->json();\n }", "public function searchRecipes($keyword=null){\n\t\t$recipes = \\App\\Recipes::where('cuisine', '=', $keyword)\n\t\t\t->orWhere('category', '=', $keyword)\n\t\t\t->orWhere('recipe_name', '=', $keyword)\n\t\t\t->orderBy('created_at', 'desc')\n ->get(['recipe_id', 'recipe_name', 'cuisine', 'category', 'img_path', 'created_at'])\n ->toArray();\n\t\t\t\n\t\treturn $recipes;\n\t}", "function searchIngredients(Array $ingredients) {\n $stmt = $this->conn->prepare(\"SELECT ingredient_id FROM ingredients WHERE ingredient_desc LIKE :desc LIMIT 1\");\n $ids = [];\n foreach($ingredients as $ingredient) {\n $desc = '%' . $ingredient . '%';\n if($stmt->execute([':desc' => $desc])) {\n $id = $stmt->fetch(PDO::FETCH_COLUMN);\n array_push($ids, $id);\n }\n }\n return $ids;\n }", "public static function searchRecipes($search)\n\t{\n\t\t// Makes a connection to the database\n\t\t$connection = new mysqli(\"localhost\", \"root\", \"\", \"recipes\");\n \n\t\tif($connection->connect_error)\n\t\t\tdie(\"Error: \".$connection->connect_error);\n\n\t\t$sql = \"SELECT DISTINCT * FROM generalRecipes WHERE Title LIKE '%\".$search.\"%' OR description LIKE'%\".$search.\"%'\";\n\n\t\t// Performs queries\n\t\t$result = $connection->query($sql); // Does query\n\t\tif($result) // If result has been found\n\t\t{\n\t\t\t$users = Array();\n\t\t\twhile($row = $result->fetch_assoc())\n\t\t\t\t$users[] = $row;\n\t\t\treturn $users;\n\t\t}\n\t\telse \n\t\t\treturn NULL;\n\t}", "function getRecipesByIngredientId($ingredientIds,$excludeRecipes,$inInventory) {\n\t\t$results = array();\n\t\tif($ingredientIds)\n\t\t{\n\t\t\t$cond = $excludeRecipes!='' ? ' and r.id NOT IN ( '.$excludeRecipes .') ' : '';\n\t\t\t$qry = 'SELECT r.*,i.id as ingredientId , i.ingredientTitle, \"'.$inInventory.'\" as inInventory\n\t\t\t\t\t FROM recipes r\n\t\t\t\t\t LEFT JOIN `recipeIngredients` ri ON r.id = ri.recipeId\n\t\t\t\t\t LEFT JOIN `ingredients` i ON i.id = ri.ingredientId\n\t\t\t\t\t WHERE ri.ingredientId IN ( '.$ingredientIds.' ) ' . $cond. '\n\t\t\t\t\t GROUP BY r.id ';\n\t\t\t\n\t\t\t$results = $this->db->query($qry)->result_array();\n\t\t}\n\t\t\n\t\treturn $results;\n\t\t\n\t}", "public function getRecipesByIngredients(array $ingredients)\n\t{\n\t\t$recipes = array();\n\t\t$allRecipes = $this->getRecipes();\n\t\tforeach ($allRecipes as $recipe)\n\t\t{\n\t\t\t$recipeIngredients = $recipe->ingredients;\n\t\t\t$allIngredientsAvailable = true;\n\t\t\tforeach ($recipeIngredients as $recipeIngredient)\n\t\t\t{\n\t\t\t\tif ($this->ingredientAvailable($recipeIngredient, $ingredients) === false) {\n\t\t\t\t\t$allIngredientsAvailable = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ($allIngredientsAvailable === true) {\n\t\t\t\t$recipes[] = $recipe;\n\t\t\t}\n\t\t}\n\t\treturn $recipes;\n\t}", "public function getRecipes()\n\t{\n\t\t$recipes = array();\n\t\tif( Auth::check() )\n\t\t{\n\t\t\t$user = Auth::user();\n\t\t\t$recipes = Recipe::where('owneruser_id', $user->userid)->orderBy('name', 'asc')->with('owneruser')->get();\n\t\t\t//Log::info('Found ' . count($recipes) . ' recipes for user: ' . $user->userid);\n\t\t}\n\t\treturn view('recipes')->with('recipes', $recipes);\n\t}", "private function addIngredients($ingredients) {\n\n $ingredients = trim($ingredients);\n $ing_array = explode(\" \", $ingredients);\n\n $this->searchApiUrl .= '?_app_id='.$this->id.'&_app_key='.$this->key;\n $ingr = '&q=';\n if (is_array($ing_array)) {\n\n foreach($ing_array as $ing) {\n $ingr .= $ing.'+';\n }\n } else {\n $ingr .= $ing_array.'+';\n }\n $this->searchApiUrl .= rtrim($ingr, \"+\");\n\n $this->searchApiUrl .= '&maxResult=100';\n\n return $this->searchApiUrl;\n }", "public function getIngredientsAction()\n\t{\t\n\t\t$i = new Recipe_Model_Ingredient();\n\t\t$select = $i->table->select()\n\t\t\t->where( 'LOWER(name) LIKE ?', '%'.strtolower($this->_text).'%' )\n\t\t\t->limit(5);\n\t\t\n\t\t$rowset = $i->table->fetchAll( $select );\n\t\tif ( $rowset )\n\t\t\techo json_encode( $rowset->toArray() );\n\t}", "function get_recipe_ingredients_by_id($recipe_id){\n\t\t//$recipe_id = 24;\n\t\tglobal $conn;\n\t\t$rows[] = array();\n\t\t$sql = \"SELECT ingredient, quantity, unit FROM ingredient_recipe WHERE recipe = '$recipe_id'\";\n\t\t$result = $conn->query($sql);\n\t\t//echo \"$stmt\";\n\t\tif($result === false) {\n\t\t echo json_encode('Wrong SQL: ' . $sql . ' Error: ' . $conn->errno . ' ' . $conn->error, E_USER_ERROR);\n\t\t}\n\t\telse {\n\t\t\techo \"Records printing\" . \"<br>\";\n\t\t\twhile ($row = $result->fetch_assoc()) {\n\t\t\t\t//$rows[$row[\"ingredient\"]] = array($row[\"unit\"], $row[\"quantity\"]);\n\t\t\t\t$rows[] = array(\"ingredient\" => $row[\"ingredient\"],\"unit\" => $row[\"unit\"], \"quantity\" => $row[\"quantity\"]);\n\t\t\t}\n\t\t}\n\t\tunset($rows[key($rows)]);\n\t\techo json_encode(array_values($rows));\n\t}", "public function getRecipeIngredients() {\n\t \t$postArray = $this->input->post();\n\t\t$recipeId = $postArray['recipeId'];\n\t\t$output = $this->RI_Model->getAllRecipeIngredients( $recipeId );\n\t\techo json_encode($output);\n\t}", "public function searchRecipesByNutrients($min_carbs = null, $max_carbs = null, $min_protein = null, $max_protein = null, $min_calories = null, $max_calories = null, $min_fat = null, $max_fat = null, $min_alcohol = null, $max_alcohol = null, $min_caffeine = null, $max_caffeine = null, $min_copper = null, $max_copper = null, $min_calcium = null, $max_calcium = null, $min_choline = null, $max_choline = null, $min_cholesterol = null, $max_cholesterol = null, $min_fluoride = null, $max_fluoride = null, $min_saturated_fat = null, $max_saturated_fat = null, $min_vitamin_a = null, $max_vitamin_a = null, $min_vitamin_c = null, $max_vitamin_c = null, $min_vitamin_d = null, $max_vitamin_d = null, $min_vitamin_e = null, $max_vitamin_e = null, $min_vitamin_k = null, $max_vitamin_k = null, $min_vitamin_b1 = null, $max_vitamin_b1 = null, $min_vitamin_b2 = null, $max_vitamin_b2 = null, $min_vitamin_b5 = null, $max_vitamin_b5 = null, $min_vitamin_b3 = null, $max_vitamin_b3 = null, $min_vitamin_b6 = null, $max_vitamin_b6 = null, $min_vitamin_b12 = null, $max_vitamin_b12 = null, $min_fiber = null, $max_fiber = null, $min_folate = null, $max_folate = null, $min_folic_acid = null, $max_folic_acid = null, $min_iodine = null, $max_iodine = null, $min_iron = null, $max_iron = null, $min_magnesium = null, $max_magnesium = null, $min_manganese = null, $max_manganese = null, $min_phosphorus = null, $max_phosphorus = null, $min_potassium = null, $max_potassium = null, $min_selenium = null, $max_selenium = null, $min_sodium = null, $max_sodium = null, $min_sugar = null, $max_sugar = null, $min_zinc = null, $max_zinc = null, $offset = null, $number = null, $random = null, $limit_license = null)\n {\n list($response) = $this->searchRecipesByNutrientsWithHttpInfo($min_carbs, $max_carbs, $min_protein, $max_protein, $min_calories, $max_calories, $min_fat, $max_fat, $min_alcohol, $max_alcohol, $min_caffeine, $max_caffeine, $min_copper, $max_copper, $min_calcium, $max_calcium, $min_choline, $max_choline, $min_cholesterol, $max_cholesterol, $min_fluoride, $max_fluoride, $min_saturated_fat, $max_saturated_fat, $min_vitamin_a, $max_vitamin_a, $min_vitamin_c, $max_vitamin_c, $min_vitamin_d, $max_vitamin_d, $min_vitamin_e, $max_vitamin_e, $min_vitamin_k, $max_vitamin_k, $min_vitamin_b1, $max_vitamin_b1, $min_vitamin_b2, $max_vitamin_b2, $min_vitamin_b5, $max_vitamin_b5, $min_vitamin_b3, $max_vitamin_b3, $min_vitamin_b6, $max_vitamin_b6, $min_vitamin_b12, $max_vitamin_b12, $min_fiber, $max_fiber, $min_folate, $max_folate, $min_folic_acid, $max_folic_acid, $min_iodine, $max_iodine, $min_iron, $max_iron, $min_magnesium, $max_magnesium, $min_manganese, $max_manganese, $min_phosphorus, $max_phosphorus, $min_potassium, $max_potassium, $min_selenium, $max_selenium, $min_sodium, $max_sodium, $min_sugar, $max_sugar, $min_zinc, $max_zinc, $offset, $number, $random, $limit_license);\n return $response;\n }", "function getAllRecipes(){\n\t $list = @mysql_query(\"SELECT * FROM Recipes\");\n\t $array = array();\n\t\t$i = 0;\n\t while($row = @mysql_fetch_assoc($list)) \n\t { \n\t\t $recipeid = $row['RecipeID'];\n\t\t $recipename = mysql_fetch_assoc(@mysql_query(\"SELECT RecipeName FROM Recipes WHERE '$recipeid' = RecipeID\"));\n\t\t $name = $recipename['RecipeName'] ;\t\n\t\t $array[$i] = $name ;\n\t\t \t$i = $i+1;\n\t }\n\t return json_encode($array);\n\t}", "function getSavedRecipes(int $id) {\n $stmt = $this->conn->prepare(\"SELECT recipe_id from saved_recipes WHERE user_id = :user_id\");\n $stmt->bindParam(':user_id', $id, PDO::PARAM_INT);\n if($stmt->execute()) {\n $recipeIDs = $stmt->fetchAll(PDO::FETCH_COLUMN);\n $recipes = [];\n foreach($recipeIDs as $rID) {\n $row = new FullRecipe($this->conn, $rID);\n array_push($recipes, $row->jsonSerialize());\n }\n $response = array(\n 'status' => 1,\n 'status_message' => 'success',\n 'recipes' => $recipes\n );\n } else {\n $response = array(\n 'status' => 0,\n 'status_message' => 'something went wrong'\n );\n }\n return $response;\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Registers asset writer, writes to the 'assetic.path_to_web' folder
protected function registerAsseticWriter() { $this->app['assetic.asset_writer'] = $this->app->share(function ($app) { return new CheckedAssetWriter($app['assetic.path_to_web']); }); }
[ "protected function getAsseticWriterService()\n {\n return $this->services['assetic_writer'] = new \\Assetic\\AssetWriter('D:\\\\Git\\\\WellCommerce\\\\design');\n }", "private function assetPublisher() {\n $assetOrigin = $this->getDir().$this->getPathConfig().'/assets';\n if ($this->fs->exists($assetOrigin)) {\n $assetDest = $this->getPublicPath($this->getPathConfig());\n $this->fs->copyDirectory($assetOrigin,$assetDest);\n }\n }", "public function onBeforeWrite() {\n\t\t$this->owner->setField('Filename', 'assets/' . $this->owner->generateFilename());\n\t}", "public function registerAssets()\n {\n }", "abstract protected function registerAssets();", "protected function _getAssetWriter()\n {\n if (!isset($this->_assetWriter)) {\n $this->_assetWriter = new AssetWriter($this->_getConfig('writePath'));\n }\n\n return $this->_assetWriter;\n }", "public function register_assets() {\n\t}", "public function onBeforeWrite()\n {\n $this->owner->setField('Filename', 'assets/' . $this->owner->generateFilename());\n }", "private function injectAssets() : void\n\t{\n\t\t$src = __DIR__ . '/../Assets/injection/media/asset.jext';\n\t\t$dest = $this->workingDirectory . '/media/' .\n\t\t\tComponentHelper::getModifiedName($this->getName(), 'prefix') .\n\t\t\t'/joomla.asset.json';\n\n\t\t$parser = new InjectionParser;\n\t\t$parser->setMeta($this->getMeta($this->getName()));\n\t\t$parser->setType('components_view_assets')\n\t\t\t->src($src)\n\t\t\t->dest($dest)\n\t\t\t->parse();\n\t}", "public function register_assets_handler() {\n\t\t$this->assets_handler->register();\n\t}", "protected function registerAssets() {\n $this->publishAssets();\n $this->registerCssFiles();\n $this->registerJsFiles();\n }", "function mgWriteAsset($id, $name, $data, $path = FRAMEWORK_ASSETS_PATH) {\n\t\t// form path\n\t\t$path = sprintf(\"%s%s/\", $path, $id);\n\t\t// check if path exists\n\t\tif(!is_dir($path)) {@mkdir($path);}\n\t\t// write file\n\t\t@file_put_contents(sprintf(\"%s%s.%s\", $path, $id, $name), $data);\n\t}", "public function publishAssets()\r\n {\r\n $dir = dirname(__FILE__).DIRECTORY_SEPARATOR.'assets';\r\n \r\n $this->baseUrl = Yii::app()->getAssetManager()->publish($dir);\r\n }", "public function addAssets()\r\n {\r\n if (!$this->environment->hasExtension('assets')) {\r\n return;\r\n }\r\n\r\n if ($this->autoInclude) {\r\n $path = $this->environment\r\n ->getExtension('assets')\r\n ->getAssetUrl($this->basePath);\r\n\r\n echo sprintf('<link href=\"%s/css/doc.css\" media=\"all\" rel=\"stylesheet\" type=\"text/css\" />', $path);\r\n echo sprintf('<script src=\"%s/js/external/ajaxupload/ajaxupload.min.js\" type=\"text/javascript\"></script>', $path);\r\n echo sprintf('<script src=\"%s/js/application.js\" type=\"text/javascript\"></script>', $path);\r\n\r\n $this->autoInclude = false;\r\n }\r\n }", "public function publishResourceAssets()\n {\n// $assets = [\n// __DIR__ . '/../../public/plugins/jstree' => public_path('plugins/jstree'),\n// ];\n//\n// $this->publishes($assets, 'motor-media-install');\n }", "protected function registerAssetFinder() : void {\n\t\t$this->app->singleton('basset.finder', function($app) {\n\t\t\treturn new AssetFinder($app['files'], $app['config'], base_path() . '/resources/assets');\n\t\t});\n\t}", "public function registerCustomerAssets()\n {\n $assetsUrl = Yii::app()->assetManager->publish(dirname(__FILE__).'/assets/customer', false, -1, MW_DEBUG);\n Yii::app()->clientScript->registerScriptFile($assetsUrl . '/js/payment-form.js');\n }", "public function addAsset($asset, $path);", "public function setOutputExtension(Asset $asset);" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Creates and returns JWK.
private function getJWK(string $key = null): JWK { return JWKFactory::createFromSecret( $key ?? Security::getSalt(), [ 'alg' => (new HS256())->name(), 'use' => 'sig', ] ); }
[ "public function createJWS();", "private function createJwsContent(): string\n {\n $jwk = JWKFactory::createFromKeyFile($this->jwt->getPath(), '', [\n 'kid' => $this->jwt->getKey(),\n 'alg' => self::ALGORITHM,\n 'use' => 'sig',\n ]);\n\n $payload = [\n 'iss' => $this->jwt->getTeamId(),\n 'iat' => time(),\n ];\n\n $header = [\n 'alg' => self::ALGORITHM,\n 'kid' => $jwk->get('kid'),\n ];\n\n return JWSFactory::createJWSToCompactJSON(\n $payload,\n $jwk,\n $header\n );\n }", "private function createKey() {\n $ts = time();\n $hash = md5($ts . $this->_privatekey . $this->_publickey);\n $key = 'ts=' . $ts . '&apikey=' . $this->_publickey . \n '&hash=' . $hash;\n return $key;\n }", "private function getJWSPrivateKey()\n\t{\n\t\tif ($this->jwsPrivateKey === null)\n\t\t{\n\t\t\t// Load key\n\t\t\t$this->jwsPrivateKey = $this->acctInfoProvider->getPrivateKey();\n\t\t\tif ($this->jwsPrivateKey !== null)\n\t\t\t\t$res = openssl_pkey_get_private($this->jwsPrivateKey);\n\t\t\t// Create new key\n\t\t\telse\n\t\t\t{\n\t\t\t\t$res = openssl_pkey_new([\n\t\t\t\t\t'private_key_bits' => 4096,\n\t\t\t\t\t'private_key_type' => OPENSSL_KEYTYPE_RSA\n\t\t\t\t]);\n\t\t\t\topenssl_pkey_export($res, $this->jwsPrivateKey);\n\t\t\t\t$this->acctInfoProvider->savePrivateKey($this->jwsPrivateKey);\n\t\t\t}\n\n\t\t\t// Set up public key and JWK\n\t\t\t$keyDetails = openssl_pkey_get_details($res);\n\t\t\t$this->jwsPublicKey = $keyDetails['key'];\n\t\t\t$this->jwsJwk = [\n\t\t\t\t'e' => AcmeV2Utils::base64UrlEncode($keyDetails['rsa']['e']),\n\t\t\t\t'kty' => 'RSA',\n\t\t\t\t'n' => AcmeV2Utils::base64UrlEncode($keyDetails['rsa']['n'])\n\t\t\t];\n\t\t\tif (PHP_MAJOR_VERSION < 8)\n\t\t\t\topenssl_pkey_free($res);\n\t\t}\n\t\treturn $this->jwsPrivateKey;\n\t}", "public function toJWK($password = null, $format = JWE::COMPACT_FORMAT) {\n $json = json_encode($this->data);\n if ($json == false) throw new KeyException('Cannot encode key');\n if (($password == null) || $this->isPublic()) return $json;\n\n $keys = KeySet::createFromSecret($password, 'bin');\n $headers = [\n 'alg' => 'PBES2-HS256+A128KW',\n 'enc' => 'A128CBC-HS256',\n 'cty' => 'jwk+json'\n ];\n $jwe = new JWE($headers, $json);\n return $jwe->encrypt($keys, null, $format);\n }", "public function create()\n {\n $kit = Kits::create(array(\n 'KitType' => 0,\n 'AtBranch' => 0,\n 'KitState' => 1,\n 'Available' =>0 ,\n 'Name' => \"New Kit Name\",\n 'KitDesc' => \"Place a description of the contents of this kit here. \"\n ));\n\n $res = $this->makeJTreeKitRecord($kit);\n return $res;\n }", "protected function getJWA()\n {\n if (!$this->jwa) {\n preg_match('/(RS|ES|HS|none)(256|384|512)?/i', $this->header['alg'], $algorithm);\n if (!$algorithm || count($algorithm) < 3 && $algorithm[1] !== 'none') {\n throw new JWAException(\n 'Unsupported JWA, Allowed Algorithms: HS256, HS384, HS512, RS256, RS384, RS512, ES256, ES384, ES512'\n );\n }\n $jwaClass = sprintf(\"Tc\\\\JOSE\\\\JWA\\\\%s\", $algorithm[1]);\n if (class_exists($jwaClass)) {\n $this->jwa = new $jwaClass($algorithm[2]);\n } else {\n throw new JWAException(\n 'Unsupported JWA, Allowed Algorithms: HS256, HS384, HS512, RS256, RS384, RS512, ES256, ES384, ES512'\n );\n }\n }\n\n return $this->jwa;\n }", "function getSignedJwks()\n {\n\n $private_enc_key_pem = file_get_contents(getenv('PRIVATE_KEY_PATH'));\n $private_sig_key_pem = file_get_contents(getenv('SIGNING_KEY_PATH'));\n\n // signing key\n $signing_key = new phpseclib\\Crypt\\RSA();\n $signing_key->loadKey($private_sig_key_pem);\n $signing_key->loadKey($signing_key->getPublicKey());\n $sig_jwk = JOSE_JWK::encode($signing_key, array(\n 'use' => 'sig'\n ));\n\n // encryption key\n $encryption_key = new phpseclib\\Crypt\\RSA();\n $encryption_key->loadKey($private_enc_key_pem);\n $encryption_key->loadKey($encryption_key->getPublicKey());\n $enc_jwk = JOSE_JWK::encode($encryption_key, array(\n 'use' => 'enc'\n ));\n\n // make JWKSet\n $keys = array($enc_jwk,$sig_jwk);\n $jwks = new JOSE_JWKSet($keys);\n\n // create JSON web token\n $jwt = new JOSE_JWT(array(\n 'keys' => json_decode($jwks->toString(), true)['keys'],\n 'iss' => getenv('REDIRECT_URI'),\n 'sub' => getenv('REDIRECT_URI'),\n 'iat' => time(),\n 'exp' => time() + 25 * 60 * 60 // 25 hours\n ));\n\n // create entity signing key\n $entity_signing_key_pem = file_get_contents(getenv('ENTITY_SIGNING_KEY_PATH'));\n $entity_signing_key = new phpseclib\\Crypt\\RSA();\n $entity_signing_key->loadKey($entity_signing_key_pem);\n $entity_sig_jwk = JOSE_JWK::encode($entity_signing_key);\n\n // add kid manually\n $jws = new JOSE_JWS($jwt);\n $jws->header['kid'] = $entity_sig_jwk->thumbprint();\n\n // sign the JSON web token\n $jws = $jws->sign($entity_signing_key_pem, 'RS256');\n\n header_remove();\n http_response_code(200);\n header('Content-Type: application/jwk-set+jwt');\n echo($jws->toString());\n }", "protected function computeJwt()\n {\n $payload = [\n 'iss' => $this->config->get('client_id'),\n 'aud' => sprintf('%s/%s', rtrim($this->client->getBaseUrl(), '/'), ltrim($this->config->get('token_url'), '/')),\n 'exp' => time() + 60 * 60,\n 'iat' => time()\n ];\n\n return JWT::encode($payload, $this->readPrivateKey($this->config->get('private_key')), 'RS256');\n }", "private function generatePrivateECKey(): JWK\n {\n if ($this->privateKeyContent) {\n $content = $this->privateKeyContent;\n } elseif ($this->privateKeyPath) {\n $content = \\file_get_contents($this->privateKeyPath);\n } else {\n throw new \\InvalidArgumentException('Unable to find private key.');\n }\n\n return JWKFactory::createFromKey($content, null, [\n 'kid' => $this->keyId,\n 'alg' => 'ES256',\n ]);\n }", "public function getDeviceJWK()\n {\n if ($this->hasError()) {\n throw new GoodIDException(__METHOD__ . \" called when there was an error: \"\n . $this->error . \": \" . $this->errorDescription);\n }\n\n if ($this->securityLevel !== SecurityLevel::HIGH) {\n throw new GoodIDException(\"deviceJWK is available only on 'high' SecurityLevel\");\n }\n\n if (!$this->userinfo->hasClaim('seal_jwk')) {\n throw new GoodIDException(\"Internal error: seal_jwk not set\");\n }\n\n return $this->userinfo->getClaim('seal_jwk');\n }", "public function testGetJwkSet()\n {\n }", "public function getJwkSetUrl(): string;", "public function generate()\n {\n $encodedHeader = $this->getHeader();\n $encodedClaimSet = $this->getClaimSet();\n\n $signaturePlain = $encodedHeader . '.' . $encodedClaimSet;\n\n $signatureEnc = $this->getEncodedSignature($signaturePlain);\n\n $jwt = $encodedHeader . '.' . $encodedClaimSet . '.' . $signatureEnc;\n\n return $jwt;\n }", "protected function CreateJson() {\n\t\t$object = new \\stdClass ();\n\t\t\n\t\t$elem = $this->JsonName ();\n\t\t$object->$elem = new \\stdClass ();\n\t\t\n\t\tforeach ( $this->_create_keys as $key ) {\n\t\t\t$object->$elem->$key = $this->$key;\n\t\t}\n\t\t\n\t\treturn $object;\n\t}", "private function generateJWTKey() {\r\n $key = $this->zoom_api_key;\r\n $secret = $this->zoom_api_secret;\r\n $token = array(\r\n \"iss\" => $key,\r\n \"exp\" => time() + 3600 //60 seconds as suggested\r\n );\r\n // $token = \"eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJhdWQiOm51bGwsImlzcyI6IlI1OWZNMEViUXFPcWNrU0c4dzR2MmciLCJleHAiOjE1OTA1MTM4NDUsImlhdCI6MTU5MDUwODQ0N30.4ch2OZoFM_vZFdqhoMzJX8r8GPYjKlOkV_vUa7LprFc\";\r\n return JWT::encode( $token, $secret );\r\n }", "function generateJwt($user){\n $payload = array(\n \"aud\" => \"http://catalogo.tecneco.com\",\n \"iat\" => time(),\n \"exp\" => strtotime('+3 hours'),\n 'user' => $user\n );\n $jwtCreation = JWT::encode($payload, $this->key);\n return $jwtCreation;\n}", "public static function createKey(): ApiKey\n {\n $apiKey = new self([\n 'key' => self::generateKey(),\n ]);\n\n $apiKey->save();\n\n return $apiKey;\n }", "public function loadJwkString(string $json) : Jwk\n {\n throw new InvalidArgumentException(\"Invalid or unsupported JWK format.\");\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
get retrieve an existing placeholder or create one for the given context
public function get($context) { $key = md5($context); $object = $this->createQuery('p') ->select('p.*, i.*') ->leftJoin('p.Items i') ->where('p.identifier_key = ?', array($key)) ->execute() ->getFirst(); if (!$object) { $object = new sfEasyCommentsPlaceholder(); $object['identifier_key'] = $key; $object->save(); } return $object; }
[ "function GetReplacement($placeholder);", "protected final function getParameterHolder() {\n\t\treturn Context::getParameterHolder();\n\t}", "public function makePlaceholderFromURL(){\n $oURLResolver = new UrlResolver();\n return $this->makePlaceHolder($oURLResolver->getWidthValue(), $oURLResolver->getHeightValue(),\n $oURLResolver->getText(), $oURLResolver->getBackgroundColor(), $oURLResolver->getForegroundColor());\n }", "abstract function getPlaceholderResolver();", "function _() {\n // Use a known stdClass instance as the placeholder\n static $placeholder = null;\n if( $placeholder === null ) $placeholder = new \\stdClass;\n return $placeholder;\n}", "public function get_context();", "public function placeholder($placeholder)\n {\n return $this->set('placeholder', $placeholder);\n }", "public function getPlaceholder()\n {\n return $this->_placeholder;\n }", "public function getPlaceholder()\n {\n return $this->placeholder;\n }", "public function getPlaceholder($if_empty=null)\n {\n return $this->getOption('placeholder',$if_empty);\n }", "public function createPlaceholder()\n {\n $placeholder = new srCertificatePlaceholder();\n $placeholder->setCertificateType($this->type);\n $form = new srCertificateTypePlaceholderFormGUI($this, $placeholder);\n if ($form->saveObject()) {\n ilUtil::sendSuccess($this->pl->txt('msg_placeholder_saved'), true);\n $this->ctrl->redirect($this, 'showPlaceholders');\n } else {\n $this->tpl->setContent($form->getHTML());\n }\n }", "public function placeholder(): ?string {\n\t\treturn $this->m_item->placeholder();\n\t}", "public function getPlaceholder(): string\n {\n return $this->placeholder;\n }", "protected static function get_instance_from_context(\\context_block $context) {\n global $DB;\n\n return $DB->get_record('block_instances', ['id' => $context->instanceid, 'blockname' => 'html']);\n }", "public function getPlaceHolder(){\n\t\treturn ValueUtils::val($this->placeHolder);\n\t}", "private function getContext($context)\n {\n if (!$this->contextCache->has($context)) {\n $this->contextCache[$context] = Data::find($context);\n }\n\n return $this->contextCache[$context];\n }", "public function GetReplacement($placeholder)\n {\n if (isset($this->texts[$placeholder]))\n {\n return $this->texts[$placeholder];\n }\n return $this->phpTranslator->GetReplacement($placeholder);\n }", "public static function findSnippetInContext($context, $name, $defaultValue = null, $globalFallback = false) {\n\t\t$snippets = $context['__snippets'];\n\n\t\t$value = $defaultValue;\n\t\t$globalValue = null;\n\t\tforeach ($snippets as $snippet) {\n\t\t\tif ($snippet->name === $name) {\n\t\t\t\tif ($snippet->page === \"__global__\") {\n\t\t\t\t\t$globalValue = $snippet->value;\n\t\t\t\t} else {\n\t\t\t\t\treturn $snippet->value;\n//\t\t\t\t\t$value = $snippet->value;\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tif ($globalValue !== null && $globalFallback) {\n\t\t\treturn $globalValue;\n\t\t}\n\t\treturn $value;\n\t}", "public function getStrategy(string $context) : StrategyInterface;" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
create the purchases table
function createPurchasesTable() { $query = "CREATE TABLE `purchases`(". "`purchase_id` int(11) NOT NULL AUTO_INCREMENT,". "`type` varchar(255) NOT NULL,". "`amount` int(11) NOT NULL,". "`date` date NOT NULL,". "`house_id` int(11) NOT NULL,". "`user_id` int(11) NOT NULL,". "PRIMARY KEY (`purchase_id`))"; mysql_query($query) or die(mysql_error()); }
[ "private function _createPurchase()\n {\n Purchase::unguard();\n\n $affiliateIds = Profile::select('owner_id')->where('owner_type', 'Affiliate')->get()->toArray();\n $freeProductOptions = ['yes','no'];\n foreach($affiliateIds as $aff){\n for($i = 1; $i < rand(2,100); $i++) {\n Purchase::create(['product_id' => rand(1,14),\n 'product_type' => 'Course',\n 'student_id' => 3,\n 'ltc_affiliate_id' => 2,\n 'product_affiliate_id' => $aff['owner_id'],\n 'purchase_price' => rand(5,100),\n 'created_at' => date('Y-m-d', strtotime('-' . rand(0,50) . ' day')),\n 'free_product' => $freeProductOptions[rand(0,1)]\n ]);\n }\n }\n }", "function createPaymentTable() {\n global $db_conn;\n executePlainSQL(\"DROP TABLE Payment\");\n \n echo \"<br> creating Payment table <br>\";\n executePlainSQL(\"CREATE TABLE Payment(\n CustomerID int,\n MethodID int,\n CONSTRAINT Payment_pk PRIMARY KEY (CustomerID,MethodID))\");\n \n OCICommit($db_conn);\n }", "public function createProductTable() {\n \n //set locally\n $this->setProductName();\n $this->setProductPrice();\n \n foreach(array_combine($this->totalProducts, $this->prices) as $key=>$value){\n \n //fancy echo stuff to populate table rows\n echo '<tr><td><label><input type=\"checkbox\" name=\"product[]\" value=\"'. $key .'\">' .$key. '</td><td>'.$value.'</td>';\n echo '<td><input type=\"number\" name=\"quantity[]\" min=\"0\" max=\"10\" value=\"0\"></td></tr>';\n }\n }", "public function moptCreatePaymentDataTable()\n {\n $sql = \"CREATE TABLE IF NOT EXISTS `s_plugin_mopt_payone_payment_data` \n (`userId` int(11) NOT NULL,`moptPaymentData` TEXT NOT NULL, PRIMARY KEY (`userId`))\";\n Shopware()->Db()->exec($sql);\n }", "private function createTableRecurring()\n {\n $sql = \"CREATE TABLE IF NOT EXISTS `payment_vrpayecommerce_recurring` (\n `id` INT(11) NOT NULL AUTO_INCREMENT,\n `cust_id` INT(11) NOT NULL,\n `payment_group` VARCHAR(32),\n `brand` VARCHAR(100),\n `holder` VARCHAR(100) NULL default NULL,\n `email` VARCHAR(100) NULL default NULL,\n `last4digits` VARCHAR(4),\n `expiry_month` VARCHAR(2),\n `expiry_year` VARCHAR(4),\n `ref_id` VARCHAR(32),\n `payment_default` boolean NOT NULL default '0',\n PRIMARY KEY (id) );\";\n\n Shopware()->Db()->query($sql);\n }", "function create_reference_table()\n {\n $table_name = 'paywithamazon_payments';\n $sql = \"CREATE TABLE \" . $table_name . \" (\n order_id int(11) unsigned NOT NULL,\n amazon_order_id varchar(100) NOT NULL,\n amazon_auth_id varchar(100) NOT NULL,\n amazon_capture_id varchar(100) NULL,\n authorized tinyint(1) unsigned NOT NULL,\n charged tinyint(1) unsigned NOT NULL\n )\";\n tep_db_query($sql);\n }", "private function createRowFromPurchase($purchase) {\n $r = new Widget_TableRow();\n $r->AutoCreateCell($purchase->id);\n $r->AutoCreateCell($purchase->purchased);\n $r->AutoCreateCell(isset($purchase->expires) ? $purchase->expires : \"Never\");\n $r->AutoCreateCell($purchase->paid);\n $r->AutoCreateCell($purchase->type);\n return $r;\n }", "public static function createReceiptTable()\n\t{\n\t\t$create = \"CREATE TABLE IF NOT EXISTS RECEIPT (\n\t\t\treceiptcode \tINT AUTO_INCREMENT NOT NULL,\n\t\t\tuid \t\t\tINT NOT NULL,\n\t\t\ttransactiondate DATETIME NOT NULL DEFAULT CURRENT_TIMESTAMP,\n\t\t\ttotalspent \t\tdecimal(10,3) NOT NULL,\n\n\t\t\tFOREIGN KEY (uid) REFERENCES USER (uid),\n\t\t\tPRIMARY KEY (receiptcode)\n\t\t);\";\n\n\t\treturn $create;\n\t}", "public static function createIAPAutorenewReceiptTable()\n {\n return TDOTableManager::createGenericTable(\"CREATE TABLE tdo_iap_autorenew_receipts (userid VARCHAR(36) NOT NULL, latest_receipt_data BLOB NOT NULL, expiration_date INT NOT NULL DEFAULT 0, transaction_id VARCHAR(255) NOT NULL, autorenewal_canceled TINYINT(1) NOT NULL DEFAULT 0, INDEX tdo_iap_autorenew_receipts_userid (userid), INDEX tdo_iap_autorenewal_canceled (autorenewal_canceled))\");\n }", "public function up()\n\t{\n\t\tSchema::create('purchases', function($table)\n {\n $table->increments('id')->unsigned(); \n $table->string('email', 255); \n $table->string('purchase', 255); \n $table->integer('amount');\n $table->integer('image_id'); \n $table->timestamps();\n }); \n\t}", "private function createTableItems()\n {\n\n Schema::create('skpt_items', function (Blueprint $table) {\n\n $table->engine = 'MyISAM';\n\n $table->increments('id');\n\n $table->string('code', 128)->unique();\n $table->string('name', 128)->unique();\n $table->mediumText('description');\n $table->decimal('price', 6, 2)->default(0.0);\n $table->integer('quantity')->unsigned()->default(0);\n $table->integer('category_id')->unsigned()->nullable();\n\n $table->timestamps();\n });\n }", "private function createOrdersTable()\n\t{\n\t\t$tableName = $this->wordpressDB->prefix . 'troo_orders';\n\t\t$charsetCollate = $this->wordpressDB->get_charset_collate();\n\n\t\t$sql = \"CREATE TABLE $tableName (\n id bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT,\n woocom_order_item_id bigint(20) UNSIGNED NOT NULL,\n woocom_order_id bigint(20) UNSIGNED NOT NULL,\n batch_id int(11) UNSIGNED NOT NULL,\n PRIMARY KEY (id)\n ) $charsetCollate;\";\n\n\t\t// using the worppress sql function to create/update.\n dbDelta($sql);\n\t}", "public function actionPurchases(){\n $client = Clients::getClient(Yii::app()->user->id);\n $data = Deposits::getUsersDeposit(Yii::app()->user->id);\n $this->render('purchases', array('data' => $data, 'client' => $client));\n }", "public function purchases()\n\t{\n\t $purchases = $this->coupons->get_coupons();\t\n\t foreach($purchases as $purchase)\n\t {\n\t $purchase->used_coupons = $this->Common->get_details('coupon_purchases',array('pack_id'=>$purchase->cpack_id))->num_rows(); \n $total_purchase = $this->coupons->getCouponPurchases($purchase->cpack_id);\n $purchase->total_purchase = 0+$total_purchase;\n\t }\n\t $data['purchases'] = $purchases;\n\t $this->load->view('admin/coupons/purchase',$data);\n\t}", "public function create_sales_items_temp_table()\n\t{\n\t\tif ($this->config->item('tax_included'))\n\t\t{\n\t\t\t$total = \"1\";\n\t\t\t$subtotal = \"(1 - (SUM(1 - 100/(100+percent))))\";\n\t\t\t$tax=\"(SUM(1 - 100/(100+percent)))\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$tax = \"(SUM(percent)/100)\";\n\t\t\t$total = \"(1+(SUM(percent/100)))\";\n\t\t\t$subtotal = \"1\";\n\t\t}\n\n\t\t$this->db->query(\"CREATE TEMPORARY TABLE IF NOT EXISTS \".$this->db->dbprefix('sales_items_temp').\"\n\t\t(SELECT date(sale_time) as sale_date, sale_time, \".$this->db->dbprefix('sales_items').\".sale_id, comment, payments.payment_type, payments.sale_payment_amount, item_location, customer_id, employee_id,\n\t\t\".$this->db->dbprefix('items').\".item_id, supplier_id, quantity_purchased, item_cost_price, item_unit_price, SUM(percent) as item_tax_percent,\n\t\tdiscount_percent, ROUND((item_unit_price*quantity_purchased-item_unit_price*quantity_purchased*discount_percent/100)*$subtotal,2) as subtotal,\n\t\t\".$this->db->dbprefix('sales_items').\".line as line, serialnumber, \".$this->db->dbprefix('sales_items').\".description as description,\n\t\tROUND((item_unit_price*quantity_purchased-item_unit_price*quantity_purchased*discount_percent/100)*$total, 2) as total,\n\t\tROUND((item_unit_price*quantity_purchased-item_unit_price*quantity_purchased*discount_percent/100)*$tax, 2) as tax,\n\t\tROUND((item_unit_price*quantity_purchased-item_unit_price*quantity_purchased*discount_percent/100)- (item_cost_price*quantity_purchased), 2) as profit,\n\t\t(item_cost_price*quantity_purchased) as cost,\n\t\tinvoice_number\n\t\tFROM \".$this->db->dbprefix('sales_items').\"\n\t\tINNER JOIN \".$this->db->dbprefix('sales').\" ON \".$this->db->dbprefix('sales_items').'.sale_id='.$this->db->dbprefix('sales').'.sale_id'.\"\n\t\tINNER JOIN \".$this->db->dbprefix('items').\" ON \".$this->db->dbprefix('sales_items').'.item_id='.$this->db->dbprefix('items').'.item_id'.\"\n\t\tINNER JOIN (SELECT sale_id, SUM(payment_amount) AS sale_payment_amount,\n\t\tGROUP_CONCAT(CONCAT(payment_type,' ',payment_amount) SEPARATOR ', ') AS payment_type FROM \" . $this->db->dbprefix('sales_payments') . \" GROUP BY sale_id) AS payments \n\t\tON \" . $this->db->dbprefix('sales_items') . '.sale_id'. \"=\" . \"payments.sale_id\t\t\n\t\tLEFT OUTER JOIN \".$this->db->dbprefix('suppliers').\" ON \".$this->db->dbprefix('items').'.supplier_id='.$this->db->dbprefix('suppliers').'.person_id'.\"\n\t\tLEFT OUTER JOIN \".$this->db->dbprefix('sales_items_taxes').\" ON \"\n\t\t.$this->db->dbprefix('sales_items').'.sale_id='.$this->db->dbprefix('sales_items_taxes').'.sale_id'.\" and \"\n\t\t.$this->db->dbprefix('sales_items').'.item_id='.$this->db->dbprefix('sales_items_taxes').'.item_id'.\" and \"\n\t\t.$this->db->dbprefix('sales_items').'.line='.$this->db->dbprefix('sales_items_taxes').'.line'.\"\n\t\tGROUP BY sale_id, item_id, line)\");\n\n\t\t//Update null item_tax_percents to be 0 instead of null\n\t\t$this->db->where('item_tax_percent IS NULL');\n\t\t$this->db->update('sales_items_temp', array('item_tax_percent' => 0));\n\n\t\t//Update null tax to be 0 instead of null\n\t\t$this->db->where('tax IS NULL');\n\t\t$this->db->update('sales_items_temp', array('tax' => 0));\n\n\t\t//Update null subtotals to be equal to the total as these don't have tax\n\t\t$this->db->query('UPDATE '.$this->db->dbprefix('sales_items_temp'). ' SET total=subtotal WHERE total IS NULL');\n\t}", "public function moptCreateCreditcardPaymentDataTable()\n {\n $sql = \"CREATE TABLE IF NOT EXISTS `s_plugin_mopt_payone_creditcard_payment_data`\n (`userId` int(11) NOT NULL, `moptCreditcardPaymentData` TEXT , PRIMARY KEY (`userId`))\";\n Shopware()->Db()->exec($sql);\n }", "function Create_CustomerOrders_Table ($ses) {\r\n print(\"\\t\\ttable CustomerOrders<br>\\n\");\r\n\r\n $qry = ctsql_query(\r\n \"CREATE TABLE custordr (\r\n co_ordrdate DATE,\r\n co_promdate DATE,\r\n co_ordrnumb CHAR(6),\r\n co_custnumb CHAR(4))\",\r\n $ses);\r\n if (!$qry)\r\n Handle_Error(\"ctsql_query(CREATE TABLE)\");\r\n\r\n $qry = ctsql_query(\r\n \"CREATE UNIQUE INDEX co_ordrnumb_idx ON custordr (co_ordrnumb)\",\r\n $ses);\r\n if (!$qry)\r\n Handle_Error(\"ctsql_query(CREATE INDEX)\");\r\n\r\n $qry = ctsql_query(\r\n \"CREATE INDEX co_custnumb_idx ON custordr (co_custnumb)\",\r\n $ses);\r\n if (!$qry)\r\n Handle_Error(\"ctsql_query(CREATE INDEX)\");\r\n }", "public static function createProductTable()\n\t{\n\t\t$create = \"CREATE TABLE IF NOT EXISTS PRODUCT (\n\t\t\tpid \t\tINT AUTO_INCREMENT NOT NULL,\n\t\t\tbarcode \tVARCHAR(10) NOT NULL,\n\t\t\tpname \t\tVARCHAR(20) NOT NULL,\n\t\t\tbrand \t\tVARCHAR(20) NOT NULL,\n\t\t\tcategory \tVARCHAR(20) NOT NULL,\n\t\t\tdescription VARCHAR(100) NOT NULL,\n\n\t\t\tPRIMARY KEY (pid)\n\t\t);\";\n\n\t\treturn $create;\n\t}", "function insertpurchase($ordervars)\n\t{\n $keyAttrib1 = new stdClass();\n $keyAttrib1->attrName = \"email+purchase\";\n $keyAttrib1->attrValue = $ordervars['email'];\n $keyAttrib2 = new stdClass();\n $keyAttrib2->attrName = \"purchaseid\";\n $keyAttrib2->attrValue = $ordervars['orderid'];\n $keyAttrList = array($keyAttrib1, $keyAttrib2);\n $keyList = new stdClass();\n $keyList->attribute = $keyAttrList;\n $attr1 = new stdClass();\n $attr1->attrName = \"subtotal\";\n $attr1->attrValue = $ordervars['purchtot'];\n $attrListArray = array($attr1);\n $attrList = new stdClass();\n $attrList->attribute = $attrListArray;\n $custObj = new stdClass();\n $custObj->customObjKeyList = $keyList;\n $custObj->customObjAttributeList = $attrList;\n $custObjList = new stdClass();\n $custObjList->customObj = array($custObj);\n $params = new stdClass();\n $params->operation = 'UPSERT';\n $params->objTypeName = 'purchases';\n $params->customObjList = $custObjList;\n $params = array($params);\n \t$leads = $this->soapclientcall('syncCustomObjects', $params);\n\t\t$this->insertorder($ordervars);\n\t}" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
Adds a JOIN clause to the query using the sfGuardUser relation
public function joinsfGuardUser($relationAlias = null, $joinType = Criteria::LEFT_JOIN) { $tableMap = $this->getTableMap(); $relationMap = $tableMap->getRelation('sfGuardUser'); // create a ModelJoin object for this join $join = new ModelJoin(); $join->setJoinType($joinType); $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias); if ($previousJoin = $this->getPreviousJoin()) { $join->setPreviousJoin($previousJoin); } // add the ModelJoin to the current object if($relationAlias) { $this->addAlias($relationAlias, $relationMap->getRightTable()->getName()); $this->addJoinObject($join, $relationAlias); } else { $this->addJoinObject($join, 'sfGuardUser'); } return $this; }
[ "public function query() {\n parent::query();\n\n // Specify the type of relationships to join\n if (isset($this->options['participant_type']) && $this->options['participant_type']) {\n $this->query->table_queue[$this->alias]['join']->extra[] = array(\n 'value' => $this->options['participant_type'],\n 'numeric' => TRUE,\n 'field' => 'role_id',\n );\n }\n }", "protected abstract function getJoinStatement();", "#[@arg]\n public function setJoin() {\n $this->criteria->setFetchmode(Fetchmode::join('Person'));\n }", "protected static function get_course_rel_user_joins()\n {\n $joinConditions = array();\n $joinConditions[] = new EqualityCondition(\n new PropertyConditionVariable(CourseEntityRelation::class_name(), CourseEntityRelation::PROPERTY_ENTITY_ID),\n new PropertyConditionVariable(User::class_name(), User::PROPERTY_ID));\n $joinConditions[] = new EqualityCondition(\n new PropertyConditionVariable(CourseEntityRelation::class_name(), CourseEntityRelation::PROPERTY_ENTITY_TYPE),\n new StaticConditionVariable(CourseEntityRelation::ENTITY_TYPE_USER));\n\n $joins = new Joins();\n $joins->add(new Join(User::class_name(), new AndCondition($joinConditions)));\n\n return $joins;\n }", "private function join()\n {\n $a = $this->prefix($this->pk(), $this->table());\n $b = $this->prefix($this->pk(), $this->ee_table);\n\n ee()->db->join($this->ee_table, $a . ' = ' . $b, 'inner');\n }", "private function addJoinsToQuery()\n {\n if (!empty($this->joins)) {\n foreach ($this->joins as $join) {\n $this->query .= \" {$join->type} `{$this->dbName}`.`{$join->tableToJoin}`\";\n \n if (!empty($join->alias)) {\n $this->query .= \" AS {$join->alias}\";\n }\n \n $this->query .= \" ON `{$this->dbName}`.\";\n \n $this->query .= \"`\".(!empty($join->alias) ? $join->alias : $join->tableToJoin).\"`.\";\n \n $this->query .= \"`{$join->tableField}` =\";\n \n $this->query .= \" `{$this->dbName}`.`{$join->parentTable}`.`{$join->parentField}`\";\n if ($join->additionalCondition) {\n $this->query .= \" \".$join->additionalCondition;\n }\n }\n }\n }", "function search_authors_join( $join ) {\n\t\t\n\t\tif ($this->is_inner_query) {\n\t\t\treturn $join;\n\t\t}\n\t\t\n\t\tglobal $wpdb;\n\n\t\tif ( $this->is_tainacan_search ) {\n\t\t\t$join .= \" LEFT JOIN $wpdb->users AS u ON ($wpdb->posts.post_author = u.ID) \";\n\t\t}\n\t\treturn $join;\n\t}", "public function joinsfGuardUserRelatedByCreatedBy($relationAlias = null, $joinType = Criteria::LEFT_JOIN)\n {\n $tableMap = $this->getTableMap();\n $relationMap = $tableMap->getRelation('sfGuardUserRelatedByCreatedBy');\n\n // create a ModelJoin object for this join\n $join = new ModelJoin();\n $join->setJoinType($joinType);\n $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n if ($previousJoin = $this->getPreviousJoin()) {\n $join->setPreviousJoin($previousJoin);\n }\n\n // add the ModelJoin to the current object\n if ($relationAlias) {\n $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n $this->addJoinObject($join, $relationAlias);\n } else {\n $this->addJoinObject($join, 'sfGuardUserRelatedByCreatedBy');\n }\n\n return $this;\n }", "public function joinafGuardUserPermission($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n\t{\n\t\t$tableMap = $this->getTableMap();\n\t\t$relationMap = $tableMap->getRelation('afGuardUserPermission');\n\n\t\t// create a ModelJoin object for this join\n\t\t$join = new ModelJoin();\n\t\t$join->setJoinType($joinType);\n\t\t$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n\t\tif ($previousJoin = $this->getPreviousJoin()) {\n\t\t\t$join->setPreviousJoin($previousJoin);\n\t\t}\n\n\t\t// add the ModelJoin to the current object\n\t\tif($relationAlias) {\n\t\t\t$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n\t\t\t$this->addJoinObject($join, $relationAlias);\n\t\t} else {\n\t\t\t$this->addJoinObject($join, 'afGuardUserPermission');\n\t\t}\n\n\t\treturn $this;\n\t}", "private function getUserWithPermissionsQuery()\n {\n return $this->createQueryBuilder('user')\n ->addSelect('userRoles')\n ->addSelect('role')\n ->addSelect('permissions')\n ->leftJoin('user.userRoles', 'userRoles')\n ->leftJoin('userRoles.role', 'role')\n ->leftJoin('role.permissions', 'permissions');\n }", "public function joinUser()\n \t{\n \t\t$this->db->select(\"*\");\n \t\t$this->db->from(\"user\");\n \t\t$this->db->join(\"akun\",'user.nik = akun.id_nik');\n \t\treturn $this->db->get();\n \t}", "public function joinFoo()\n {\n $this->db->join($this->M_foo->table, \"{$this->M_foo->table}.{$this->M_foo->primaryKey} = {$this->table}.foo_id\");\n }", "abstract function appendJoin(AbstractQuery &$query, $sourceAlias, $targetAlias, $left_join = false);", "public function joinAmistadRelatedById_usuario($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n\t{\n\t\t$tableMap = $this->getTableMap();\n\t\t$relationMap = $tableMap->getRelation('AmistadRelatedById_usuario');\n\n\t\t// create a ModelJoin object for this join\n\t\t$join = new ModelJoin();\n\t\t$join->setJoinType($joinType);\n\t\t$join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n\t\tif ($previousJoin = $this->getPreviousJoin()) {\n\t\t\t$join->setPreviousJoin($previousJoin);\n\t\t}\n\n\t\t// add the ModelJoin to the current object\n\t\tif($relationAlias) {\n\t\t\t$this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n\t\t\t$this->addJoinObject($join, $relationAlias);\n\t\t} else {\n\t\t\t$this->addJoinObject($join, 'AmistadRelatedById_usuario');\n\t\t}\n\n\t\treturn $this;\n\t}", "public function addJoin(JoinQueryComponent $component) { $this->joins[] = $component; }", "public function joinLeasedOutUser() {\n $sqlSelect = $this->tableGateway->getSql()->select();\n\t\t$sqlSelect\n ->columns(array('Id','requestedTime','returnedTime','userId','returnedTime','assetId'));\n $sqlSelect\n ->join('UserInfoTable', 'UserInfoTable.Id = leasedoutuserTable.userId', array('firstname','email'), 'inner');\n $sqlSelect\n ->join('AssetInfoTable', 'AssetInfoTable.AssetId = leasedoutuserTable.assetId', array('AssetName','AssetStatus','AssetDesc'), 'inner');\n $statement \n = $this->tableGateway->getSql()->prepareStatementForSqlObject($sqlSelect);\n\t\t$resultSet = $statement->execute();\n\t\treturn $resultSet;\n\n }", "public function joinsfGuardUserPermission($relationAlias = null, $joinType = Criteria::INNER_JOIN)\n {\n $tableMap = $this->getTableMap();\n $relationMap = $tableMap->getRelation('sfGuardUserPermission');\n\n // create a ModelJoin object for this join\n $join = new ModelJoin();\n $join->setJoinType($joinType);\n $join->setRelationMap($relationMap, $this->useAliasInSQL ? $this->getModelAlias() : null, $relationAlias);\n if ($previousJoin = $this->getPreviousJoin()) {\n $join->setPreviousJoin($previousJoin);\n }\n\n // add the ModelJoin to the current object\n if ($relationAlias) {\n $this->addAlias($relationAlias, $relationMap->getRightTable()->getName());\n $this->addJoinObject($join, $relationAlias);\n } else {\n $this->addJoinObject($join, 'sfGuardUserPermission');\n }\n\n return $this;\n }", "private function injectJoin(&$query, $table, $first, $second)\n {\n $joins = [];\n\n foreach ((array) $query->joins as $join)\n $joins[] = $join->table;\n\n if (!in_array($table, $joins))\n $query->join($table, $first, '=', $second, 'left');\n }", "private function joins()\r\n {\r\n /* SELECT* FROM DOCUMENT WHERE DOCUMENT.\"id\" IN ( SELECT ID FROM scholar WHERE user_company_id = 40 )*/\r\n\r\n $query = EyufScholar::find()\r\n ->select('id')\r\n ->where([\r\n 'user_company_id' => 40\r\n ])\r\n ->sql();\r\n\r\n $table = EyufDocument::find()\r\n ->where('\"id\" IN ' . $query)\r\n ->all();\r\n\r\n $second = EyufDocument::findAll(EyufScholar::find()\r\n ->select('id')\r\n ->where([\r\n 'user_company_id' => 40\r\n ])\r\n );\r\n\r\n vdd($second);\r\n }" ]
{ "objective": { "paired": [], "self": [], "triplet": [ [ "query", "document", "negatives" ] ] } }