query
stringlengths
7
5.25k
document
stringlengths
15
1.06M
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
Show the form for editing the specified resource.
public function edit(FishHealth $fishHealth) { $data['projectTanks'] = ProjectTank::with('project')->with('tank')->get(); $data['fishHealth'] = $fishHealth; return view('admin.fishHealth.editFishHealth',$data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit(Resource $resource)\n {\n return view('admin.resources.edit', compact('resource'));\n }", "public function edit(Resource $resource)\n {\n //\n }", "public function edit($id)\n {\n /* Check if logged in user is authorized to make this request */\n ...
[ "0.78550774", "0.7692893", "0.7273195", "0.7242132", "0.7170847", "0.70622855", "0.7053459", "0.6982539", "0.69467914", "0.6945275", "0.6941114", "0.6928077", "0.69019294", "0.68976134", "0.68976134", "0.6877213", "0.68636996", "0.68592185", "0.68566656", "0.6844697", "0.6833...
0.0
-1
Update the specified resource in storage.
public function update(Request $request, $id) { $request->validate([ 'date' => 'required', 'project_tank_id' => 'required', 'fish_amount' => 'required', 'weight' => 'required', ]); $fishHealth = FishHealth::findOrFail($id); $fishHealth->date = $request->date; $fishHealth->project_tank_id = $request->project_tank_id; $fishHealth->fish_amount = $request->fish_amount; $fishHealth->weight = $request->weight; $fishHealth->save(); return redirect()->route('fishHealth.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy(FishHealth $fishHealth) { $fishHealth->delete(); return redirect()->route('fishHealth.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Get record creation date.
public function getCreatedAt();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCreationDate();", "function get_creation_date()\n\t{\n\t\treturn $this->creation_date;\n\t}", "public function getCreationDate()\n {\n return $this->created;\n }", "public function getCreatedDate() {\n return $this->get('created_date', 'user');\n }", "public functi...
[ "0.8296067", "0.8269652", "0.8211525", "0.816339", "0.81560564", "0.8133791", "0.8133791", "0.80770206", "0.80770206", "0.80770206", "0.80770206", "0.80770206", "0.8051261", "0.80468845", "0.8045682", "0.8045682", "0.80448633", "0.80269784", "0.8020328", "0.7966827", "0.79577...
0.0
-1
Set record creation date.
public function setCreatedAt($createdAt);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setDate()\n\t{\n\t\tif ($this->getIsNewRecord())\n\t\t\t$this->create_time = time();\n\t}", "public function setCreationDate($date) {}", "public function setDate()\n\t{\n\t\tif($this->isNewRecord)\n\t\t\t$this->create_time=$this->update_time=time();\n\t\telse\n\t\t\t$this->update_time=time();\n...
[ "0.80380654", "0.7804801", "0.7601685", "0.7601685", "0.75117356", "0.749926", "0.7331321", "0.7274461", "0.72033113", "0.7157544", "0.70984656", "0.7078556", "0.70617324", "0.7055927", "0.6998101", "0.6968266", "0.6968266", "0.69622236", "0.6954288", "0.6888641", "0.68883127...
0.63943017
74
check is value of key in json is acceptable or not
public static function is_allow_type($key, $value) { $classes = Information::get_class_of($key); $check = false; if (in_array(Information::array, $classes)) $check = ($check or is_array($value)); if (in_array(Information::string, $classes)) $check = ($check or is_string($value)); if (in_array(Information::int, $classes)) $check = ($check or is_numeric($value)); if (in_array(Information::encrypt, $classes)) $check = ($check or is_string($value)); // maybe something else if (in_array(Information::unknown, $classes)) $check = false; return $check; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function jsonKeyIs($json, $key, $is) {\n if ($json[$key] !== $is) {\n throw new Exception(\n 'Malformed JSON response! Expected the key '.$key.' to have the '.\n 'value \"'.$is.'\"');\n }\n }", "private function is_json_valid() {\n\t\treturn $this->is_amp() ? $this->is_js...
[ "0.72255677", "0.7126022", "0.68430865", "0.6533277", "0.6379805", "0.63524634", "0.6302284", "0.6298439", "0.6244058", "0.6196389", "0.6190813", "0.6174564", "0.6154309", "0.6151847", "0.6071435", "0.6054434", "0.6018026", "0.59966654", "0.59790486", "0.5961675", "0.59456164...
0.0
-1
Override, add admin_members specific assignments
function commonAssign() { // call parent parent::commonAssign(); if ($this->addSaveButtons) { ///$this->xt->assign("recordcontrols_block",true); $this->xt->assign("savebuttons_block", true); $this->xt->assign("savebutton_attrs","id=\"saveBtn\""); $this->xt->assign("resetbutton_attrs", "id=\"resetBtn\""); } //$this->xt->assign("toplinks_block",true); $this->xt->assign("search_records_block",true); $this->xt->assign("username",htmlspecialchars($_SESSION["UserName"])); $this->xt->assign("displayusername",htmlspecialchars($_SESSION["UserName"])); $this->xt->assign("shiftstyle_block",true); $this->xt->assign("security_block",true); $this->xt->assign("logoutbutton",isSingleSign()); $this->xt->assign("left_block",true); $this->xt->assign("message_block", true); $this->xt->displayBrickHidden("message"); $userheaderlink_attrs = "href=\"".$this->tName."_list.php?orderby=Ausername\""; //for display name $displayuserheaderlink_attrs = "href=\"".$this->tName."_list.php?orderby="."Ausername\""; if ($this->sortByGroup === false && $this->sortField != ""){ if ($this->sortField == "username"){ $userheaderlink_attrs = "href=\"".$this->tName."_list.php?orderby="; if($this->sortOrder == "A") { if($this->is508) $this->xt->assign("users_orderimg","<img src=\"images/up.gif\" alt=\" \" border=0>"); else $this->xt->assign("users_orderimg","<img src=\"images/up.gif\" border=0>"); $userheaderlink_attrs.="Dusername"; } else { if($this->is508) $this->xt->assign("users_orderimg","<img src=\"images/down.gif\" alt=\" \" border=0>"); else $this->xt->assign("users_orderimg","<img src=\"images/down.gif\" border=0>"); $userheaderlink_attrs.="Ausername"; } $userheaderlink_attrs.="\""; } else if ($this->sortField == "username"){ $displayuserheaderlink_attrs = "href=\"".$this->tName."_list.php?orderby="; if($this->sortOrder == "A") { if($this->is508) $this->xt->assign("displayusers_orderimg","<img src=\"images/up.gif\" alt=\" \" border=0>"); else $this->xt->assign("displayusers_orderimg","<img src=\"images/up.gif\" border=0>"); $displayuserheaderlink_attrs.="Dusername"; } else { if($this->is508) $this->xt->assign("displayusers_orderimg","<img src=\"images/down.gif\" alt=\" \" border=0>"); else $this->xt->assign("displayusers_orderimg","<img src=\"images/down.gif\" border=0>"); $displayuserheaderlink_attrs.="Ausername"; } $displayuserheaderlink_attrs.="\""; } } $this->xt->assign("userheaderlink_attrs",$userheaderlink_attrs); $this->xt->assign("displayuserheaderlink_attrs",$displayuserheaderlink_attrs); $this->xt->assign("menu_block",true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function admin_member() {\n\n\t\t}", "function SettingsController_DefineAdminPermissions_Handler(&$Sender) {\n if (isset($Sender->RequiredAdminPermissions)) {\n $Sender->RequiredAdminPermissions[] = 'Vanilla.Settings.Manage';\n $Sender->RequiredAdminPermissions[] = 'Vanilla.Categories.Manage...
[ "0.6832798", "0.62739706", "0.6143681", "0.6088178", "0.6056686", "0.6035346", "0.60091466", "0.60054535", "0.5966215", "0.59038585", "0.5889461", "0.5886156", "0.5807708", "0.580208", "0.57290244", "0.5711114", "0.5708526", "0.5706806", "0.56677896", "0.5653106", "0.5646239"...
0.0
-1
For group array sorting
function DPOrderUsers(&$rowInfo) { // deal with global vars global $sortgroup, $sortorder; $sortgroup = $this->sortByGroup; $sortorder = $this->sortOrder; sortMembers($rowInfo); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function sortDataArray() {}", "function sortbygroup($col,$groupby) {\n $unique = array();\n $sorted = array();\n foreach ($col as $val) { //get all the unique values\n if (!in_array($val[$groupby],$unique)) {\n $unique[] = $val[$groupby];\n } \n }\n \n foreach($unique as ...
[ "0.7303369", "0.7173537", "0.6935573", "0.69022197", "0.6550804", "0.63853896", "0.6378011", "0.6331206", "0.629705", "0.6268537", "0.6228598", "0.62082255", "0.6202641", "0.6186246", "0.6182708", "0.61658376", "0.6165121", "0.6116323", "0.61158746", "0.6106439", "0.6101769",...
0.0
-1
Fill members array from DB, call after save
function fillMembers() { // select members list $trs = db_query("select , from `ugmembers` order by ,",$this->conn); while($tdata = db_fetch_numarray($trs)) { $this->members[] = array($tdata[1],$tdata[0]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadMembers()\n {\n /*\n * we assume the members-array is always filled\n */\n if (!empty($this->members) && !($this->members[0] instanceof User)) {\n $response = Helper::get('group/'.$this->unique_id);\n if (isset($response->body['result']['me...
[ "0.63185906", "0.6252849", "0.62182105", "0.58949727", "0.58558077", "0.58474684", "0.58137405", "0.57514226", "0.5740742", "0.5721191", "0.56579614", "0.5626018", "0.5620895", "0.5606167", "0.5605646", "0.5579679", "0.5575196", "0.5548283", "0.5530898", "0.55300987", "0.5522...
0.7707988
0
Fill groups array from DB, call after save
function fillGroups() { $this->groups[] = array(-1,"<"."Admin".">"); $this->groupFullChecked[] = true; $trs = db_query("select , from `uggroups` order by ",$this->conn); while($tdata = db_fetch_numarray($trs)) { $this->groups[] = array($tdata[0],$tdata[1]); $this->groupFullChecked[] = true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n\t{\n\t\t\\DB::table('customers_groups')->truncate();\n \n\t\t\\DB::table('customers_groups')->insert(array (\n\t\t\t0 => \n\t\t\tarray (\n\t\t\t\t'customers_groups_id' => 1,\n\t\t\t\t'groupname' => 'Allianz',\n\t\t\t\t'default' => 0,\n\t\t\t\t'created_at' => '2014-04-19 04:02:36',\n\...
[ "0.699877", "0.68180984", "0.669832", "0.6545684", "0.6545394", "0.64563257", "0.63628787", "0.6347619", "0.6304524", "0.6304524", "0.61291844", "0.6095662", "0.60956174", "0.59995973", "0.5989722", "0.59783983", "0.59105325", "0.589611", "0.58927", "0.5882657", "0.5872308", ...
0.74067
0
Sort rows headers by group
function sortGroups(&$smartyGroups) { // assign sort links foreach($this->groups as $i=>$g) { if($this->sortByGroup==$g[0] && $this->sortOrder=="a") { $smartyGroups[$i]["groupheaderlink_attrs"]="href=\"".$this->tName."_list.php?orderby=d".$g[0]."\""; if($this->is508) $smartyGroups[$i]["groupheader_img"] = "<img src=\"images/up.gif\" alt=\" \" border=0>"; else $smartyGroups[$i]["groupheader_img"] = "<img src=\"images/up.gif\" border=0>"; } elseif($this->sortByGroup==$g[0] && $this->sortOrder=="d") { if($this->is508) $smartyGroups[$i]["groupheader_img"] = "<img src=\"images/down.gif\" alt=\" \" border=0>"; else $smartyGroups[$i]["groupheader_img"] = "<img src=\"images/down.gif\" border=0>"; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortbygroup($col,$groupby) {\n $unique = array();\n $sorted = array();\n foreach ($col as $val) { //get all the unique values\n if (!in_array($val[$groupby],$unique)) {\n $unique[] = $val[$groupby];\n } \n }\n \n foreach($unique as $key) {\n foreach($col as $val) {//rea...
[ "0.66689247", "0.6360726", "0.6190524", "0.61459106", "0.61008143", "0.6057868", "0.6030386", "0.5916241", "0.5741681", "0.56294346", "0.56017643", "0.5596814", "0.5589225", "0.55279315", "0.55238867", "0.5521596", "0.55134374", "0.54856294", "0.5464401", "0.5462017", "0.5441...
0.5858889
8
PRG rule, to avoid POSTDATA resend call after save
function rulePRG() { if(no_output_done() && (postvalue("a")=="save"/* || count($this->selectedRecs)*/)) { // redirect, add a=return param for saving SESSION header("Location: ".$this->shortTableName."_".$this->getPageType().".php?a=return"); // turned on output buffering, so we need to stop script exit(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _postSave()\r\n\t{\r\n\t}", "protected function postSave() {\n\t\treturn true;\n\t}", "public function preSave() {}", "public function postSave() {}", "protected function _beforeSave() {\n\t}", "protected function _beforeSave()\n {\n $this->_prepareData();\n return par...
[ "0.7229803", "0.6784588", "0.674641", "0.6724635", "0.66410494", "0.66304314", "0.66277975", "0.65638745", "0.65442723", "0.65260077", "0.64244986", "0.64205617", "0.6369321", "0.63170016", "0.62881553", "0.62835324", "0.62809086", "0.6279916", "0.6258944", "0.6257989", "0.62...
0.0
-1
Sort rows by groups
function doSortByGroup(&$rowInfo) { if ($this->sortByGroup!==false) { $this->DPOrderUsers($rowInfo); // apply pagination $firstindex=$this->pageSize*($this->myPage-1); for($i=0;$i<$firstindex;$i++) array_shift($rowInfo); if(count($rowInfo)>$this->pageSize) array_splice($rowInfo,$this->pageSize,0); $this->recNo=1; for($i=0;$i<count($rowInfo);$i++) { $rowInfo[$i]["usercheckbox_attrs"].= " rowid=".$this->recNo; for($j=0;$j<count($rowInfo[$i]["usergroup_boxes"]["data"]);$j++) { $rowInfo[$i]["usergroup_boxes"]["data"][$j]["groupbox_attrs"]="name=\"cb_" .$this->recNo."[]\" value=\"" .$rowInfo[$i]["usergroup_boxes"]["data"][$j]["group"]."\""; if($rowInfo[$i]["usergroup_boxes"]["data"][$j]["checked"]) $rowInfo[$i]["usergroup_boxes"]["data"][$j]["groupbox_attrs"].=" checked"; } $this->recNo++; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sortbygroup($col,$groupby) {\n $unique = array();\n $sorted = array();\n foreach ($col as $val) { //get all the unique values\n if (!in_array($val[$groupby],$unique)) {\n $unique[] = $val[$groupby];\n } \n }\n \n foreach($unique as $key) {\n foreach($col as $val) {//rea...
[ "0.7277136", "0.63317204", "0.61603296", "0.61170053", "0.60967094", "0.60207325", "0.6004537", "0.6000417", "0.5940128", "0.59272116", "0.5854101", "0.5689667", "0.5616957", "0.55312103", "0.5512167", "0.54556215", "0.5423618", "0.54202884", "0.5408487", "0.5398429", "0.5362...
0.6480533
1
Build order query only for users header
function buildOrderParams() { if ($this->sortByGroup === false && $this->sortField != ""){ $this->strOrderBy = "Order by ".$this->sortField; if ($this->sortOrder == "A") $this->strOrderBy .= " asc"; else $this->strOrderBy .= " desc"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function buildOrderBy() {\n\t\t$hasorderby = false;\n\t\tforeach($this->ordergroup as $key=>$extra) {\n\t\t\tif(strpos(strtoupper($extra), 'ORDER BY') !== false) {\n\t\t\t\t$this->orders[] = str_replace('ORDER BY', \"\", strtoupper($extra));\n\t\t\t\tunset($this->ordergroup[$key]);\n\t\t\t}\n\t\t\tif(strpo...
[ "0.657257", "0.6338045", "0.6278584", "0.62075746", "0.61841697", "0.59864897", "0.5945194", "0.58682173", "0.58612037", "0.58563966", "0.58198804", "0.5796896", "0.5749024", "0.5743752", "0.573178", "0.5701377", "0.5698724", "0.5691919", "0.56600934", "0.5658602", "0.5637405...
0.590457
7
Main function, call to build page Do not change methods call oreder!!
function prepareForBuildPage() { // save recs //$this->save(); // PRG rule, to avoid POSTDATA resend $this->rulePRG(); //Sorting fields $this->buildOrderParams(); // fill data $this->fillMembers(); $this->fillGroups(); // build sql query $this->buildSQL(); // build pagination block $this->buildPagination(); // seek page must be executed after build pagination if ($this->sortByGroup===false) $this->seekPageInRecSet($this->querySQL); else $this->recSet = db_query($this->querySQL, $this->conn); // fill grid data $this->fillGridData(); // build search panel $this->buildSearchPanel("adv_search_panel"); // add common js code $this->addCommonJs(); // add common html code $this->addCommonHtml(); // Set common assign $this->commonAssign(); // build admin block $this->assignAdmin(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function makePage()\n {\n $db = new DB();\n $page_color = !empty($db->getOptions('page_color')) ? 'style=\"background-color:' . $db->getOptions('page_color') . ';\"' : '';\n $footer_color = !empty($db->getOptions('footer_color')) ? 'style=\"background-color:' . $db->getOptions('foote...
[ "0.7154442", "0.7112494", "0.7056035", "0.7013833", "0.6957274", "0.6911622", "0.68590343", "0.68590343", "0.6792585", "0.670868", "0.66941017", "0.66861767", "0.6685303", "0.6683136", "0.6669572", "0.66624767", "0.6662136", "0.6631596", "0.6613989", "0.6596617", "0.6590792",...
0.6731561
9
show page at the end of its proccess, depending on mode
function showPage() { $this->xt->display($this->templatefile); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function endPage() {}", "function _endpage()\n\t\t{\n\t\t\t$this->state=1;\n\t\t}", "public function show() {\n $this->buildPage();\n echo $this->_page;\n }", "function show_panel()\n\t{\n\t\tglobal $errors, $template;\n\t\t\n\t\t// get the mode\n\t\t$s = ( isset( $_GET[ 's' ] ) ) ? strval( $_G...
[ "0.646372", "0.64264375", "0.61686623", "0.6052898", "0.5991154", "0.59908134", "0.59840226", "0.5971935", "0.5953765", "0.59502494", "0.594355", "0.592937", "0.5919857", "0.5916541", "0.5906409", "0.58810574", "0.58413965", "0.575019", "0.57367516", "0.5735362", "0.57323486"...
0.6577301
0
Add js files and scripts
function addCommonJs() { // call parent if need RunnerJS API RunnerPage::addCommonJs(); $this->addJsGroupsAndRights(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addJavascriptFiles($js /* array */);", "function addJSFiles()\n\t{\n\t\t\t\t$this->getContainer()->AddJSFile(\"include/zoombox/zoombox.js\");\n\t\t$this->getJSControl();\t\n\t}", "protected function addJS() {\n foreach ($this->js_files as $js_file) {\n $this->header.=\"<script...
[ "0.8257018", "0.80317503", "0.78767383", "0.7692773", "0.75588006", "0.7554378", "0.7425421", "0.7417731", "0.73718065", "0.73589677", "0.732436", "0.73231", "0.73058265", "0.7305374", "0.7244625", "0.72350645", "0.72072726", "0.71925575", "0.713012", "0.7094808", "0.70646554...
0.68546486
41
Prepare JS arrays with groups and tables data
function addJsGroupsAndRights() { $this->jsSettings['tableSettings'][$this->tName]['usersList'] = $this->users; $this->jsSettings['tableSettings'][$this->tName]['rightsGroups'] = array(); foreach ($this->groups as $grArr) $this->jsSettings['tableSettings'][$this->tName]['rightsGroups'][] = $grArr[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function prepare_data(){\r\n\t\t\t$this->data_table['cols'] = array();\r\n\t\t\t\r\n\t\t\tforeach($this->columns as $column_id => $column_info){\r\n\t\t\t\tswitch($column_info['type']){\r\n\t\t\t\t\tcase 'number':\r\n\t\t\t\t\tcase 'float':\r\n\t\t\t\t\tcase 'currency':\r\n\t\t\t\t\t\t$column_info['type'] ...
[ "0.6029873", "0.59428996", "0.59328324", "0.5794448", "0.5662764", "0.5616224", "0.5587127", "0.55423874", "0.5533799", "0.5496702", "0.5495796", "0.5493983", "0.5481913", "0.5437257", "0.5432323", "0.5429731", "0.5423126", "0.5413633", "0.54101", "0.54054624", "0.54025483", ...
0.5382986
22
el id corresponde a el id de jugador
function getComenariosByJugadorid($id){ $sentencia = $this->db->prepare("SELECT c.* , u.nombre as nombreUsario FROM comentario as c join usuario as u on c.id_usuario= u.id WHERE c.id_jugador=? "); $sentencia->execute(array($id)); return $sentencia->fetchAll(PDO::FETCH_OBJ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function id_tarjeta();", "function getId();", "function buscarPorId($id) {\r\n \r\n }", "function ler_id($id) {\n $x = (int)$id;\n if($x >= $this->bd[0][0] || $x <= 0) {return false;}\n //comecando a setar tudo\n $this->id = $this->bd[$x][0];\n $this->maximo = $this->bd[$x][1];\n $this...
[ "0.68314767", "0.67544657", "0.6698543", "0.6679972", "0.6662805", "0.66325396", "0.66325396", "0.659792", "0.6591352", "0.65614784", "0.6553019", "0.652426", "0.652426", "0.652426", "0.652426", "0.652426", "0.652426", "0.652426", "0.652426", "0.652426", "0.65217054", "0.65...
0.0
-1
Transform the resource into an array.
public function toArray($request) { return [ 'id' => $this->id, 'description' => $this->description, 'has_card' => (bool) $this->has_card, 'number_days' => $this->number_days, 'charge' => $this->charge, 'is_purchase' => (bool) $this->is_purchase, 'is_sale' => (bool) $this->is_sale, ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toArray(): array\n {\n if (is_null($this->resource)) {\n return [];\n }\n\n return is_array($this->resource)\n ? $this->resource\n : $this->resource->toArray();\n }", "public function toArray(): array\n {\n if (is_null($this->r...
[ "0.7750928", "0.7750928", "0.7715773", "0.75906307", "0.7310379", "0.7138024", "0.7134791", "0.7096877", "0.7096877", "0.70968604", "0.70968604", "0.70968604", "0.70968604", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.70955557", "0.7...
0.0
-1
Determine if the user is authorized to make this request.
public function authorize() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function authorize()\n {\n if ($this->user() !== null) {\n return true;\n }\n return false;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }", "public function authorize()\n {\n return $this->user() !== null;\n }"...
[ "0.8401071", "0.8377486", "0.8377486", "0.8344406", "0.8253731", "0.824795", "0.8213121", "0.8146598", "0.81115526", "0.8083369", "0.7991986", "0.79907674", "0.79836637", "0.79604936", "0.79516214", "0.79494005", "0.79265946", "0.7915068", "0.79001635", "0.7894822", "0.789145...
0.0
-1
Get the validation rules that apply to the request.
public function rules() { return [ 'name' => 'required|string', 'slug' => 'required|string|unique:brands,id,'.$this->request->get('brand_id'), ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rules()\n {\n $commons = [\n\n ];\n return get_request_rules($this, $commons);\n }", "public function getRules()\n {\n return $this->validator->getRules();\n }", "public function getValidationRules()\n {\n $rules = [];\n\n // Get the sche...
[ "0.8342703", "0.80143493", "0.7937251", "0.79264987", "0.79233825", "0.79048395", "0.78603816", "0.7790699", "0.77842164", "0.77628785", "0.7737272", "0.7733618", "0.7710535", "0.7691693", "0.76849866", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.7683038", "0.76830...
0.0
-1
Get max Date history.
public function maxDate() { $qb = $this->createQueryBuilder('h')->select('h')->orderBy('h.date', 'DESC')->setMaxResults(1); /** @var AbstractHistory $last */ $last = $qb->getQuery()->getOneOrNullResult(); if (is_null($last)) { return; } return $last->getDate(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLatestHistory() {\n $history = $this->getHistory();\n if (count($history) === 0) {\n return null;\n }\n return $history[count($history) - 1];\n }", "public function get_last_date()\n\t{\n\t\treturn \"SELECT MAX(Date) AS recentDate from HistoricalPrices...
[ "0.6784279", "0.66746044", "0.65539384", "0.63473743", "0.63310075", "0.62765956", "0.62141496", "0.6095562", "0.605567", "0.59828943", "0.5976562", "0.5956593", "0.5956593", "0.5948144", "0.5928591", "0.592095", "0.58956885", "0.58838457", "0.58695847", "0.5862871", "0.58573...
0.77326894
0
Count databases by server.
public function countDatabasesByServer(\DateTime $date, Server $server) { $qb = $this->createQueryBuilder('h') ->select('count(distinct(h.dbName)) AS nb') ->where('h.date = :date') ->setParameter('date', $date) ->andWhere('h.server = :server') ->setParameter('server', $server) ->groupBy('h.date'); $row = $qb->getQuery()->getOneOrNullResult(); if (is_null($row)) { return; } return $row['nb']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findServersCount()\r\n {\r\n \t$query = \"select count(*) as count from `servers`\";\r\n \r\n \t$result = $this->DB->fetchColumn($query);\r\n \r\n \treturn $result;\r\n }", "public function countNameservers(): int {}", "public function getServerCountAttribute()\n {\n ...
[ "0.6889528", "0.6640621", "0.64038384", "0.6285838", "0.6276865", "0.62096363", "0.59162617", "0.58938473", "0.58740133", "0.585931", "0.5757923", "0.57197607", "0.55678326", "0.55013627", "0.5486577", "0.5465805", "0.5440619", "0.5419378", "0.53868574", "0.53843683", "0.5370...
0.74388295
0
Count tables by server.
public function countTablesByServer(\DateTime $date, Server $server) { $qb = $this->createQueryBuilder('h') ->select('count(distinct(h.tableName)) AS nb') ->where('h.date = :date') ->setParameter('date', $date) ->andWhere('h.server = :server') ->setParameter('server', $server) ->groupBy('h.date'); $row = $qb->getQuery()->getOneOrNullResult(); if (is_null($row)) { return; } return $row['nb']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNumTables() {}", "public function getNumTables() {}", "public function getNumTables() {}", "public function findServersCount()\r\n {\r\n \t$query = \"select count(*) as count from `servers`\";\r\n \r\n \t$result = $this->DB->fetchColumn($query);\r\n \r\n \treturn $result;...
[ "0.6838429", "0.6838429", "0.6838429", "0.68073165", "0.67963475", "0.66255975", "0.6573536", "0.65506923", "0.6436579", "0.6405971", "0.63667876", "0.63447046", "0.62474513", "0.622492", "0.6220429", "0.62158865", "0.6205093", "0.60975605", "0.6027791", "0.6019517", "0.60080...
0.7152058
0
Count rows by server.
public function countRowsByServer(\DateTime $date, Server $server) { $qb = $this->createQueryBuilder('h') ->select('sum(h.nbRows) AS nb') ->where('h.date = :date') ->setParameter('date', $date) ->andWhere('h.server = :server') ->setParameter('server', $server) ->groupBy('h.date'); $row = $qb->getQuery()->getOneOrNullResult(); if (is_null($row)) { return; } return $row['nb']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findServersCount()\r\n {\r\n \t$query = \"select count(*) as count from `servers`\";\r\n \r\n \t$result = $this->DB->fetchColumn($query);\r\n \r\n \treturn $result;\r\n }", "public function getConnectionCount();", "function RowCount() {}", "public function countNameserver...
[ "0.7499425", "0.69844323", "0.6795526", "0.6788697", "0.67516476", "0.6736734", "0.66643447", "0.65903634", "0.65692735", "0.65692735", "0.65692735", "0.65692735", "0.65692735", "0.65692735", "0.65692735", "0.65692735", "0.65692735", "0.65692735", "0.65692735", "0.65692735", ...
0.69098175
2
Count data length by server.
public function countDataLengthByServer(\DateTime $date, Server $server) { $qb = $this->createQueryBuilder('h') ->select('sum(h.dataLength) AS nb') ->where('h.date = :date') ->setParameter('date', $date) ->andWhere('h.server = :server') ->setParameter('server', $server) ->groupBy('h.date'); $row = $qb->getQuery()->getOneOrNullResult(); if (is_null($row)) { return; } return $row['nb']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function receivedCount();", "public function length()\n {\n return count($this->__data);\n }", "public function countNameservers(): int {}", "public function getServerCountAttribute()\n {\n return $this->servers->count();\n }", "function getTotalServerCount() {\n\t\t$count ...
[ "0.7069123", "0.70289326", "0.6917783", "0.69170046", "0.6832487", "0.6818939", "0.6818939", "0.6818939", "0.6776129", "0.6776129", "0.6750892", "0.6740343", "0.6739666", "0.6736326", "0.6736326", "0.6701528", "0.6701528", "0.6701528", "0.6700576", "0.6686487", "0.667469", ...
0.6993582
2
Count index length by server.
public function countIndexLengthByServer(\DateTime $date, Server $server) { $qb = $this->createQueryBuilder('h') ->select('sum(h.indexLength) AS nb') ->where('h.date = :date') ->setParameter('date', $date) ->andWhere('h.server = :server') ->setParameter('server', $server) ->groupBy('h.date'); $row = $qb->getQuery()->getOneOrNullResult(); if (is_null($row)) { return; } return $row['nb']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function countNameservers(): int {}", "public function getServerCountAttribute()\n {\n return $this->servers->count();\n }", "public function findServersCount()\r\n {\r\n \t$query = \"select count(*) as count from `servers`\";\r\n \r\n \t$result = $this->DB->fetchColumn($query);...
[ "0.70486385", "0.6739224", "0.6609436", "0.65574414", "0.65519214", "0.65519214", "0.64854103", "0.62902117", "0.62204385", "0.61674774", "0.61458224", "0.613579", "0.613579", "0.6122543", "0.60973823", "0.60973823", "0.60973823", "0.60953397", "0.60846794", "0.6083668", "0.6...
0.7009692
1
Init session check for existing session or create one there's none
protected function initSession ($es_id) { $query = $this->db->select(self::SESSION_TABLE,'*', array('collab_es_id' => $es_id),__LINE__,__FILE__); $full_name = $GLOBALS['egw_info']['user']['account_fullname']; $color = $GLOBALS['egw_info']['user']['preferences']['filemanager']['collab_user_color']; $user_id = $GLOBALS['egw_info']['user']['account_id']; $imageUrl = $GLOBALS['egw_info']['server']['webserver_url'].'/api/avatar.php?account_id='.$user_id; if (!($result = self::db2id($query->fetchRow())) && $es_id) { $result = self::db2id($this->SESSION_add2Db($es_id)); } $this->MEMBER_add2Db($es_id, $user_id, $color); $result['member_id'] = $this->MEMBER_getLastMember(); $this->OP_addMember($es_id, $result['member_id'], $full_name, $user_id, $color, $imageUrl); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function init_session () {\n\t\t$Request = Request::instance();\n\t\t/**\n\t\t * If session exists\n\t\t */\n\t\tif ($Request->cookie('session')) {\n\t\t\t$this->user_id = $this->load();\n\t\t}\n\t\t$this->update_user_is();\n\t}", "public function initSession() {\n\n\n\n if (session_id() == '') {\...
[ "0.7851746", "0.7782912", "0.76417595", "0.7552575", "0.75235814", "0.7335976", "0.7333934", "0.7329697", "0.7329697", "0.7308893", "0.7281749", "0.717642", "0.7171256", "0.7158347", "0.7138417", "0.7096825", "0.7091553", "0.7042952", "0.7040641", "0.7023014", "0.69988203", ...
0.0
-1
Add session data with provided session id into DB
protected function SESSION_add2Db ($es_id, $genesis_url='') { if ($es_id) { $data = array ( 'collab_es_id' => $es_id, 'collab_genesis_url' => $genesis_url, 'collab_last_save' => self::getTimeStamp(), 'account_id' => $GLOBALS['egw_info']['user']['account_id'] ); $this->db->insert(self::SESSION_TABLE, $data,false,__LINE__, __FILE__,self::APP_NAME); } return $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addToSession() {\n $s = Session::getInstance();\n $key = $this->sessionId;\n $s->$key = $this->getId();\n if ($s->$key === null) {\n Log::warn(\"Adding null user ID to session\");\n }\n $this->setAuthed(true);\n }", "abstract function addSes...
[ "0.7560846", "0.7298568", "0.7223369", "0.72110367", "0.7210869", "0.70778334", "0.69971204", "0.68858904", "0.68794155", "0.680383", "0.67680585", "0.67177266", "0.6669184", "0.6604359", "0.6600263", "0.66001433", "0.65509933", "0.6525061", "0.652337", "0.6510754", "0.650017...
0.0
-1
Method to clean up left over modifications data
public function SESSION_cleanup ($es_id) { if (!$es_id) throw new Exception (self::EXCEPTION_MESSAGE_NO_SESSION); $this->db->delete( self::OP_TABLE, array('collab_es_id' => $es_id), __LINE__, __FILE__ ); $this->db->delete( self::SESSION_TABLE, array('collab_es_id' => $es_id), __LINE__, __FILE__ ); $this->db->delete( self::MEMBER_TABLE, array('collab_es_id' => $es_id), __LINE__, __FILE__ ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function clean() {\n $this->data = \"\";\n $this->currentRow = 1;\n $this->curPosition = 0;\n }", "function reset_data() {\n\t\t$this->data_layer()->clear();\n\t\t$this->log = null;\n\t\t$this->location = null;\n\t\t$this->tax_location = null;\n\t}", "public static function additionalCleaning(...
[ "0.7260963", "0.7188586", "0.7162092", "0.71479654", "0.7107181", "0.70009637", "0.69280523", "0.69280523", "0.69280523", "0.69146013", "0.69146013", "0.69146013", "0.69146013", "0.69146013", "0.69146013", "0.69146013", "0.69138855", "0.69138855", "0.69138855", "0.69138855", ...
0.0
-1
Method to update last time saved in session table
public function SESSION_Save ($es_id) { if (!$es_id) throw new Exception (self::EXCEPTION_MESSAGE_NO_SESSION); $query = $this->db->update( self::SESSION_TABLE, array('collab_last_save' => self::getTimeStamp()), array('collab_es_id' => $es_id), __LINE__, __FILE__, self::APP_NAME); $where_query = 'collab_es_id ="'.$es_id.'" AND collab_optype != "AddMember" AND'. ' collab_optype != "RemoveMember" AND collab_optype !="AddCursor" AND'. ' collab_optype !="RemoveCursor"'; // cleanup the op table $this->db->delete( self::OP_TABLE, $where_query, __LINE__, __FILE__, self::APP_NAME ); return !$query? false: true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function updateSession() {\n\t\t$db = new Database ();\n\t\t\n\t\t$start_time = time ();\n\t\t$query = \"UPDATE user_sessions SET last_modified = '\" . $start_time . \"' WHERE session_id='\" . session_id () . \"'\";\n\t\t$db->Execute ( $query );\n\t\treturn;\n\t}", "public function updateNewTimeClient() {...
[ "0.76585907", "0.73753375", "0.7359112", "0.72226524", "0.720104", "0.7141288", "0.69723654", "0.69235957", "0.6865267", "0.6819765", "0.67830396", "0.6634726", "0.6633282", "0.6617109", "0.6592153", "0.65544885", "0.65254915", "0.650042", "0.6477527", "0.6471449", "0.6460946...
0.0
-1
Get session information based on session id
public function SESSION_Get($es_id) { if (!$es_id) throw new Exception (self::EXCEPTION_MESSAGE_NO_SESSION); $query = $this->db->select( self::SESSION_TABLE, '*', array('collab_es_id' => $es_id), __LINE__, __FILE__ ); $session = $query->fetchrow(); return is_array($session)? self::db2id($session): false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getSessionid();", "public function get_session($id)\n\t\t{\n\t\t\treturn parent::get_item($id,'session_items');\n\t\t}", "public function getSessionID();", "public function getSessionid()\n {\n return $this->sessionid;\n }", "public function getSessionID(){\r\n\t\treturn...
[ "0.7845626", "0.76956093", "0.76895046", "0.76307", "0.7481294", "0.7471582", "0.7471582", "0.74602777", "0.74592704", "0.74201137", "0.7395109", "0.73791367", "0.73444605", "0.7332998", "0.73250186", "0.7319716", "0.7316152", "0.7284384", "0.7270166", "0.72597903", "0.724001...
0.0
-1
OP addMember function is backend equivalent to addMember from frontend
protected function OP_addMember($es_id, $member_id, $full_name, $user_id, $color='', $imageUrl='') { $op = array( 'optype' => 'AddMember', 'memberid' => (string) $member_id, 'timestamp' => self::getTimeStamp(), 'setProperties' => array( 'fullName' => $full_name, 'color' => $color, 'imageUrl' => $imageUrl, 'uid' => $user_id, ) ); $this->OP_add2Db($op, $es_id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function guildMemberAdd(GuildMember $member);", "public function create(Member $member)\n {\n\n }", "private function addMember($id, $name)\n { \n $session = $this->getSession($id);\n \n // Check for existing member\n foreach($session->getMembers() as $candidate)\n {\n if($candidat...
[ "0.7528836", "0.6849953", "0.674873", "0.67154115", "0.6639882", "0.6631616", "0.6631186", "0.65621877", "0.64868206", "0.6434715", "0.6418337", "0.63542473", "0.6310112", "0.629266", "0.6277639", "0.62651896", "0.6220186", "0.6204895", "0.6203308", "0.6151345", "0.613131", ...
0.6664866
4
Function to remove cursor for a member
protected function OP_removeCursor ($es_id, $member_id) { $op = array( 'optype' => 'RemoveCursor', 'memberid' => (string) $member_id, 'reason' => 'server-idle', 'timestamp' => self::getTimeStamp() ); $this->OP_add2Db($op, $es_id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function unsetCursor(): void\n {\n $this->cursor = [];\n }", "public function unsetCursor(): void\n {\n $this->cursor = [];\n }", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public static function ...
[ "0.61880624", "0.61880624", "0.55962497", "0.55962497", "0.55962497", "0.55962497", "0.55338293", "0.5466746", "0.546618", "0.5457626", "0.54472154", "0.54234403", "0.54133487", "0.5399922", "0.53695506", "0.5363168", "0.533858", "0.5336895", "0.5275598", "0.5251874", "0.5243...
0.70319855
0
Function to discard all changes applied to a session
public function OP_Discard ($es_id) { $this->db->update( self::MEMBER_TABLE, array('collab_status' => 0, 'collab_is_active' => 0), array('collab_es_id' => $es_id), __LINE__, __FILE__, self::APP_NAME ); $this->db->delete( self::OP_TABLE, array('collab_es_id' => $es_id), __LINE__, __FILE__, self::APP_NAME ); $this->db->delete( self::SESSION_TABLE, array('collab_es_id' => $es_id), __LINE__, __FILE__ ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function unsetSession();", "public static function drop_sessions()\n {\n }", "public static function drop_sessions()\n {\n }", "public function removeRetainsObjectForObjectsNotInCurrentSession() {}", "public function reset() {\n foreach ($this->syncedProperties as ...
[ "0.66614044", "0.65340483", "0.6533941", "0.6476351", "0.6224096", "0.6189403", "0.6173932", "0.61390436", "0.6048924", "0.59845716", "0.5978013", "0.59437376", "0.5937414", "0.5900933", "0.5890979", "0.58871174", "0.58767116", "0.5870971", "0.5862928", "0.58318496", "0.58000...
0.0
-1
Function to remove member from list
function OP_removeMember ($es_id, $member_id) { $op = array ( 'optype' => 'RemoveMember', 'memberid' => (string) $member_id, 'timestamp' => self::getTimeStamp() ); return $this->OP_add2Db($op, $es_id)?true:false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove();", "public function remove();", "public function remove();", "public function remove();", "abstract public function remove();", "abstract public function remove();", "abstract public function remove();", "private function _removeFromList(&$list, $item, $key_field = null) {\r\...
[ "0.67100924", "0.67100924", "0.67100924", "0.67100924", "0.6637411", "0.6637411", "0.6637411", "0.6479156", "0.6431521", "0.6333516", "0.6289243", "0.6288896", "0.6226231", "0.61869496", "0.6176993", "0.60966", "0.6086098", "0.60722435", "0.6023293", "0.59781575", "0.5962931"...
0.5522016
56
Function to get top head seq for a given session
protected function OP_getHeadSeq($es_id) { if (!$es_id) throw new Exception (self::EXCEPTION_MESSAGE_NO_SESSION); $query = $this->db->select( self::OP_TABLE, 'collab_seq', array('collab_es_id' => $es_id), __LINE__, __FILE__, FALSE, 'ORDER BY collab_seq DESC LIMIT 1', self::APP_NAME ); $head_seq = $query->fetchRow(); return is_array($head_seq)? $head_seq['collab_seq']: ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function top();", "public function top()\n {\n return $this->getIterator()->top();\n }", "public function getTop();", "public function getHead();", "public function getTop()\n {\n if (array_key_exists(\"top\", $this->_propDict)) {\n return $this->_propDict[\"top\"];...
[ "0.59836835", "0.55977356", "0.557538", "0.5495176", "0.54859746", "0.5455377", "0.5431178", "0.54204017", "0.53859967", "0.5345514", "0.53383577", "0.53364176", "0.52989614", "0.5285113", "0.5258256", "0.5236315", "0.522766", "0.51509637", "0.5137425", "0.5137425", "0.512563...
0.55038524
3
Function to get opsepcs of session base on seq head
protected function OP_getOPSECS($es_id, $seq_head) { if ($seq_head == "") { $seq_head = -1; } $ops = array(); $query = $this->db->select( self::OP_TABLE, 'collab_opspec', 'collab_es_id ="'. $es_id.'" AND collab_seq >'.$seq_head, __LINE__, __FILE__, false, 'ORDER BY collab_seq ASC', self::APP_NAME); foreach ($query as $spec) { $op = json_decode($spec['collab_opspec'], true); $op['memberid'] = strval($op['memberid']); $ops [] = $op; } return $ops; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSessionsOrdonnees() {\n return $this->sessions()->orderBy('num_ordre', 'asc')->get();\n }", "public function GetStricModeBySession ();", "public function get_sessions($request){\r\n\t\treturn $request['session'];\r\n\t}", "public function actionGetListaSessions()\r\n\t\t{\r\n\t\t...
[ "0.5624508", "0.5365307", "0.51935595", "0.5177928", "0.5064789", "0.50476223", "0.49416816", "0.4900877", "0.48181275", "0.47832248", "0.4782369", "0.47655076", "0.47472677", "0.4743909", "0.47213674", "0.46889418", "0.4683073", "0.4671476", "0.4665172", "0.45895436", "0.458...
0.5884436
0
Function to ops data array into op table
protected function OP_addOPS ($es_id, $member_id, $client_ops) { if (count($client_ops)<= 0) throw new Exception (self::EXCEPTION_MESSAGE_NO_OPS); foreach ($client_ops as $op) { $this->OP_add2Db($op, $es_id); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getTableDataArray($input_data_array, $action = '')\n {\n\n // Get the Table Column Names.\n $keys = $this->getTableColumnNames($this->getTableName());\n \n // Get data array with table collumns\n // NULL if collumns and data does not match in count\n //\n ...
[ "0.54557186", "0.5374968", "0.5150977", "0.51401806", "0.5041382", "0.49245256", "0.49213132", "0.49166223", "0.4891549", "0.4887271", "0.4883796", "0.48743492", "0.4858389", "0.48508042", "0.48250848", "0.48192516", "0.48186302", "0.47782418", "0.47737855", "0.47589722", "0....
0.0
-1
Insert op data into OP table in database
protected function OP_add2Db ($op, $es_id) { $data = array ( 'collab_es_id' => $es_id, 'collab_member' => $op['memberid'], 'collab_optype' => $op['optype'], 'collab_opspec' => json_encode($op) ); return $this->db->insert(self::OP_TABLE, $data,false,__LINE__, __FILE__, self::APP_NAME); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function importDataOLT()\n {\n $data = $this->varBatchImportOLT;\n $this->db->insert_batch('rekap_data_olt', $data);\n }", "public function insert($nu_pcp_op, $qtd_produzir, $qtd_produto,$dt_emissao, $ds_produto, $co_int_produto, $nu_lote, $nu_comprimento, $nu_largura, $nu_espessura,$corte_esp...
[ "0.6586351", "0.638593", "0.6281094", "0.621066", "0.6174042", "0.6163925", "0.6153548", "0.61318165", "0.6112625", "0.6103746", "0.6088793", "0.6077515", "0.6069826", "0.6036237", "0.599964", "0.5981402", "0.59799707", "0.59795", "0.59556705", "0.5954009", "0.5949651", "0....
0.5801917
47
Add member data into member table in database
protected function MEMBER_add2Db ($es_id, $user_id, $color) { $data = array ( 'collab_es_id' => $es_id, 'collab_uid' => $user_id, 'collab_color' => $color, 'collab_is_active' => 1 ); $this->db->insert(self::MEMBER_TABLE, $data,false,__LINE__, __FILE__, self::APP_NAME); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function push_member($data) {\n $this->db->insert('members_tbl', $data);\n }", "public function add_member($mData)\r\n\t\t{\r\n\t\t\t$this->db->insert('members', $mData);\r\n\t\t}", "function addMemberToDb($memberId, $name, $email, $address, $nic, $dob, $gender, $contactNo, $contactNo_extra, $categor...
[ "0.74950755", "0.7251451", "0.6968827", "0.6809161", "0.6750422", "0.66469246", "0.6610301", "0.6574418", "0.650177", "0.6448147", "0.64001244", "0.6329131", "0.63047284", "0.6247545", "0.6220069", "0.62189096", "0.6206442", "0.6200557", "0.617121", "0.61311066", "0.611401", ...
0.0
-1
Function to update is_active field in member table
protected function MEMBER_UpdateActiveMember ($es_id, $member_id, $is_active = 0) { if (!$es_id || !$member_id) throw new Exception (self::EXCEPTION_MESSAGE_NO_SESSION); $this->db->update( self::MEMBER_TABLE, array('collab_is_active' => $is_active), 'collab_es_id ="'.$es_id.'" AND collab_member_id="'.$member_id.'"', __LINE__, __FILE__, self::APP_NAME ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function activate_member($email){\n $email = trim($email);\n $con=mysqli_connect(DB_SERVER,DBASE_USER,DBASE_PASS,DBASE_NAME);\n $query=\"UPDATE member SET member_active = 1 WHERE email='$email'\";\n (mysqli_query($con,$query))?TRUE: FALSE;\n}", "public function setActive()\n {\n $this->upd...
[ "0.67448854", "0.6643353", "0.66346633", "0.6509788", "0.65005726", "0.64855874", "0.647759", "0.64525944", "0.64073735", "0.63928854", "0.6386452", "0.63571596", "0.6319321", "0.6301888", "0.6296167", "0.6295317", "0.6287328", "0.62756395", "0.62187636", "0.6199255", "0.6165...
0.65825844
3
Function to get active members
protected function MEMBER_getActiveMembers ($es_id) { if (!$es_id) throw new Exception (self::EXCEPTION_MESSAGE_NO_SESSION); $query = $this->db->select( self::MEMBER_TABLE, '*', array('collab_es_id' => $es_id, 'collab_is_active' => 1), __LINE__, __FILE__, self::APP_NAME ); $members = $query->getRows(); return is_array($members)?self::db2id($members):true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMembers() {\n\t\t$query = $this->createQuery();\n\t\t$query .= \"WHERE c2.status = '\" . KontakteData::$STATUS_MEMBER . \"'\";\n\t\t$query .= \" OR c2.status = '\" . KontakteData::$STATUS_ADMIN . \"' \";\n\t\t$query .= \"ORDER BY c2.name ASC\";\n\t\treturn $this->database->getSelection($query);\n\t}", ...
[ "0.80012345", "0.7684926", "0.74794537", "0.7434961", "0.7269039", "0.72425365", "0.722996", "0.71845484", "0.7047907", "0.70404905", "0.699853", "0.6960789", "0.6949636", "0.6937514", "0.6930156", "0.68866575", "0.68112105", "0.6805276", "0.67924124", "0.6789627", "0.6783542...
0.67285955
23
Function to get member record of specific member id
protected function MEMBER_getUserMemberId ($es_id, $user_id) { if (!$es_id || !$user_id) throw new Exception (self::EXCEPTION_MESSAGE_NO_SESSION); $query = $this->db->select( self::MEMBER_TABLE, 'collab_member_id', array('collab_es_id' => $es_id, 'collab_uid' => $user_id), __LINE__, __FILE__ ); $member = $query->fetchRow(); return is_array($member)? $member['collab_member_id']: null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMember($member_id)\r\n {\r\n $sql = \"SELECT * FROM member WHERE member_id = $member_id\";\r\n // prepare statement\r\n $statement = $this->_dbh->prepare($sql);\r\n // bind parameters\r\n $statement->bindParam(':member_id', $member_id);\r\n // execute statem...
[ "0.8043735", "0.7808105", "0.7782162", "0.77767754", "0.77177817", "0.7425958", "0.7399169", "0.7290205", "0.7225267", "0.7194968", "0.71350014", "0.71309346", "0.7128773", "0.7086434", "0.70318955", "0.70265555", "0.7008263", "0.69631207", "0.69531375", "0.6926504", "0.68676...
0.0
-1
Function to get member record of specific member id
protected function MEMBER_getUserLastMemberId ($es_id, $user_id) { if (!$es_id || !$user_id) throw new Exception (self::EXCEPTION_MESSAGE_NO_SESSION); $query = $this->db->select( self::MEMBER_TABLE, 'collab_member_id', array('collab_es_id' => $es_id, 'collab_uid' => $user_id), __LINE__, __FILE__, false, "ORDER BY `collab_member_id` DESC LIMIT 1;" ); $member = $query->fetchRow(); return is_array($member)? $member['collab_member_id']: null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getMember($member_id)\r\n {\r\n $sql = \"SELECT * FROM member WHERE member_id = $member_id\";\r\n // prepare statement\r\n $statement = $this->_dbh->prepare($sql);\r\n // bind parameters\r\n $statement->bindParam(':member_id', $member_id);\r\n // execute statem...
[ "0.8043735", "0.7808105", "0.7782162", "0.77767754", "0.77177817", "0.7425958", "0.7399169", "0.7290205", "0.7225267", "0.7194968", "0.71350014", "0.71309346", "0.7128773", "0.7086434", "0.70318955", "0.70265555", "0.7008263", "0.69631207", "0.69531375", "0.6926504", "0.68676...
0.0
-1
Function to get member record of a session
protected function MEMBER_getMember ($es_id, $member_id) { if (!$es_id) throw new Exception (self::EXCEPTION_MESSAGE_NO_SESSION); $query = $this->db->select( self::MEMBER_TABLE, '*', array('collab_es_id' => $es_id, 'collab_member_id' => $member_id), __LINE__, __FILE__ ); $member = $query->fetchRow(); return is_array($member)? self::db2id($member): null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMemberInfo() {\n\n $memberModel = $GLOBALS[\"memberModel\"];\n // Get the member by the membership number\n $GLOBALS[\"member\"] = $memberModel->getOneByMemberNumber($_SESSION[\"MembershipNumber\"]);\n }", "public function get_member()\n {\n //get cookie infor...
[ "0.71275514", "0.68085736", "0.6756994", "0.6671576", "0.661896", "0.6557247", "0.6517439", "0.64598435", "0.64545643", "0.6414697", "0.6408463", "0.63951254", "0.63184893", "0.6295677", "0.62880427", "0.62831295", "0.624084", "0.6213733", "0.62068886", "0.6187607", "0.616245...
0.5816196
76
Utility function to map DB fields to ids
protected static function db2id($data) { if (!is_array($data)) return false; $keys = array_keys($data); array_walk($keys,function (&$key){$key = str_replace(self::DB_FILEDS_PREFIX, '', $key);}); return array_combine ($keys, $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function list_to_map($list, $by_field = 'id'){\r\n $result = array();\r\n if(!is_array($list)) return null;\r\n foreach($list as $item){\r\n $result[$item[$by_field]] = $item;\r\n }\r\n return $result;\r\n}", "public function getIdentifierField();", "function get_field_ids() {\n\t\t$field...
[ "0.6164644", "0.6092288", "0.60898066", "0.6085791", "0.60190606", "0.5998895", "0.5976072", "0.5922771", "0.5918418", "0.5852925", "0.5794718", "0.57797635", "0.57696486", "0.5767683", "0.57275665", "0.57100767", "0.57082015", "0.56430936", "0.56392765", "0.5623994", "0.5602...
0.5836039
10
Return last member id from member table in db
protected function MEMBER_getLastMember() { $query = $this->db->select( self::MEMBER_TABLE, 'collab_member_id', '', __LINE__, __FILE__, false, "ORDER BY `collab_member_id` DESC LIMIT 1;" ); $last_row = $query->fetchRow(); return is_array($last_row)? $last_row['collab_member_id']: 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIdMax() {\n $maxId = myPDO()->query('SELECT MAX(member_id) FROM members');\n return $maxId->fetch()[0];\n }", "public function get_next_member($member)\n {\n $tempid = $this->connection->query_value_if_there('SELECT uid FROM ' . $this->connection->get_table_prefix() ...
[ "0.7670292", "0.7262416", "0.7063046", "0.7017604", "0.6915603", "0.6869594", "0.68215907", "0.67845875", "0.67845875", "0.6772071", "0.67696506", "0.6763802", "0.6717809", "0.6717809", "0.6717809", "0.6717809", "0.6717809", "0.6717809", "0.6717809", "0.6685689", "0.6667588",...
0.7924007
0
Run the database seeds.
public function run() { foreach (range(1,35)as $index) { DB::table('codehours')->insert([ 'nama' => str_random(10), 'email' => str_random(10) . '@gmail.com', 'kode_codehours' => substr(str_shuffle(str_repeat("0123456789abcdefghijklmnopqrstuvwxyz", 3)), 0, 3), 'no_hp' => substr(str_shuffle(str_repeat("0123456789", 3)), 0, 3), 'jurusan' => str_random(10), 'confirmed' => 0 ]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.78414...
0.0
-1
Forces initialization of the proxy
public function __load() { $this->__initializer__ && $this->__initializer__->__invoke($this, '__load', []); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _initProxy() {\n\t\t$options = $this->getOptions();\n\t\t$this->_config->setAutoGenerateProxyClasses(isset($options['proxy']['autoGenerateProxyClasses']) ? $options['proxy']['autoGenerateProxyClasses'] : true);\n\t\t$this->_config->setProxyDir(isset($options['proxy']['directory']) ? $options['pr...
[ "0.75635636", "0.6560218", "0.65170795", "0.6495727", "0.6461294", "0.6409547", "0.6353856", "0.6326196", "0.630571", "0.6300076", "0.6300076", "0.6300076", "0.6300076", "0.6299988", "0.6299988", "0.62994456", "0.62994456", "0.62994456", "0.62994456", "0.62994456", "0.6299445...
0.0
-1
Extra Note Pre Order Product
public function afterGetItem($subject, $result) { if ($this->helper->isEnable()) { if ($result->getProductType() == Configurable::TYPE_CODE) { $productSku = $result->getProductOptionByCode('simple_sku'); } else { $productSku = $result->getProduct()->getSku(); } $product = $this->helper->getProductBySku($productSku); $isInStock = $this->helper->getIsInStock($product->getId()); $preOrder = $product->getData('preorder'); $message = $this->helper->replaceVariableX( $this->helper->getNote(), $this->helper->formatDate($product->getData('restock')) ); if ($preOrder == Order::ORDER_YES || ($preOrder == Order::ORDER_OUT_OF_STOCK && !$isInStock)) { return $result->setDescription($message); } } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function prepareProductNotes(): void\n {\n $this->_entityBehaviors['catalog_product']['notes'] =\n [\n Import::BEHAVIOR_APPEND => new Phrase('New product data is added to the existing product data for'\n . ' the existing entries in the database. All fi...
[ "0.65660423", "0.61329114", "0.6099768", "0.59902406", "0.594709", "0.5854249", "0.57603", "0.5758536", "0.56690377", "0.56532335", "0.56476337", "0.5603815", "0.5599003", "0.5598472", "0.55736876", "0.5568656", "0.5567262", "0.5566836", "0.5563339", "0.5561422", "0.55511886"...
0.0
-1
Set a given header to given value
public function addHeader($name, $value) { $this->customHeader[$name]= $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_header($header, $value);", "public function set_header($header, $value)\n {\n }", "public function setHeader($name, $value);", "public function setHeader($name, $value);", "public function setHeader($name, $value) {}", "public function set_header($header, $value)\r\n ...
[ "0.9084489", "0.8723993", "0.8707229", "0.8707229", "0.8640194", "0.85939264", "0.8559497", "0.854026", "0.85209066", "0.8275199", "0.82264906", "0.8187726", "0.8184322", "0.8067886", "0.8042121", "0.7988979", "0.79538876", "0.7892776", "0.7863322", "0.7845232", "0.7845232", ...
0.6820429
70
Description =========== Arguments Returns
function ciniki_blog_postAudioUpdate(&$ciniki) { // // Find all the required and optional arguments // ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'prepareArgs'); $rc = ciniki_core_prepareArgs($ciniki, 'no', array( 'tnid'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Tenant'), 'post_audio_id'=>array('required'=>'yes', 'blank'=>'no', 'name'=>'Post Audio'), 'post_id'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Post'), 'name'=>array('required'=>'no', 'blank'=>'no', 'name'=>'Name'), 'permalink'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Permalink'), 'sequence'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Order'), 'flags'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Options'), 'description'=>array('required'=>'no', 'blank'=>'yes', 'name'=>'Description'), )); if( $rc['stat'] != 'ok' ) { return $rc; } $args = $rc['args']; // // Make sure this module is activated, and // check permission to run this function for this tenant // ciniki_core_loadMethod($ciniki, 'ciniki', 'blog', 'private', 'checkAccess'); $rc = ciniki_blog_checkAccess($ciniki, $args['tnid'], 'ciniki.blog.postAudioUpdate'); if( $rc['stat'] != 'ok' ) { return $rc; } if( isset($args['name']) ) { ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'makePermalink'); $args['permalink'] = ciniki_core_makePermalink($ciniki, $args['name']); // // Make sure the permalink is unique // $strsql = "SELECT id, name, permalink " . "FROM ciniki_blog_post_audio " . "WHERE tnid = '" . ciniki_core_dbQuote($ciniki, $args['tnid']) . "' " . "AND permalink = '" . ciniki_core_dbQuote($ciniki, $args['permalink']) . "' " . "AND id <> '" . ciniki_core_dbQuote($ciniki, $args['post_audio_id']) . "' " . ""; $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.blog', 'item'); if( $rc['stat'] != 'ok' ) { return $rc; } if( $rc['num_rows'] > 0 ) { return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.blog.64', 'msg'=>'You already have an post audio with this name, please choose another.')); } } // // Get the current details // $strsql = "SELECT ciniki_blog_post_audio.id, " . "ciniki_blog_post_audio.uuid, " . "ciniki_blog_post_audio.post_id, " . "ciniki_blog_post_audio.name, " . "ciniki_blog_post_audio.permalink, " . "ciniki_blog_post_audio.sequence, " . "ciniki_blog_post_audio.flags, " . "ciniki_blog_post_audio.mp3_audio_id, " . "ciniki_blog_post_audio.wav_audio_id, " . "ciniki_blog_post_audio.ogg_audio_id, " . "ciniki_blog_post_audio.description " . "FROM ciniki_blog_post_audio " . "WHERE ciniki_blog_post_audio.tnid = '" . ciniki_core_dbQuote($ciniki, $args['tnid']) . "' " . "AND ciniki_blog_post_audio.id = '" . ciniki_core_dbQuote($ciniki, $args['post_audio_id']) . "' " . ""; $rc = ciniki_core_dbHashQuery($ciniki, $strsql, 'ciniki.blog', 'item'); if( $rc['stat'] != 'ok' ) { return $rc; } if( !isset($rc['item']) ) { return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.blog.69', 'msg'=>'Audio not found', 'err'=>$rc['err'])); } $audio = $rc['item']; // // Start transaction // ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionStart'); ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionRollback'); ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbTransactionCommit'); ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'dbAddModuleHistory'); $rc = ciniki_core_dbTransactionStart($ciniki, 'ciniki.blog'); if( $rc['stat'] != 'ok' ) { return $rc; } // // Check to see if an audio was uploaded // if( isset($_FILES['uploadfile']) ) { // // Remove the current file // ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'storageFileDelete'); $rc = ciniki_core_storageFileDelete($ciniki, $args['tnid'], 'ciniki.blog.audio', array( 'uuid' => $audio['uuid'], 'subdir' => 'audio', )); if( $rc['stat'] != 'ok' ) { return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.blog.74', 'msg'=>'Unable to save upload', 'err'=>$rc['err'])); } if( isset($_FILES['uploadfile']['error']) && $_FILES['uploadfile']['error'] == UPLOAD_ERR_INI_SIZE ) { return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.blog.75', 'msg'=>'Upload failed, file too large.')); } // FIXME: Add other checkes for $_FILES['uploadfile']['error'] // // Check for a uploaded file // if( !isset($_FILES) || !isset($_FILES['uploadfile']) || $_FILES['uploadfile']['tmp_name'] == '' ) { return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.blog.76', 'msg'=>'Upload failed, no audio file specified.')); } $uploaded_file = $_FILES['uploadfile']['tmp_name']; if( ($audio['flags']&0x02) == 0 ) { $args['flags'] = (isset($args['flags']) ? $args['flags'] : $audio['flags']) | 0x02; } // // Copy the uploaded file into ciniki-storage // ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'storageFileAdd'); $rc = ciniki_core_storageFileAdd($ciniki, $args['tnid'], 'ciniki.blog.audio', array( 'subdir' => 'audio', 'uuid' => $audio['uuid'], )); if( $rc['stat'] != 'ok' ) { return array('stat'=>'fail', 'err'=>array('code'=>'ciniki.blog.77', 'msg'=>'Unable to save upload', 'err'=>$rc['err'])); } $args['uuid'] = $rc['uuid']; } // // Update the Post Audio in the database // ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'objectUpdate'); $rc = ciniki_core_objectUpdate($ciniki, $args['tnid'], 'ciniki.blog.postaudio', $args['post_audio_id'], $args, 0x04); if( $rc['stat'] != 'ok' ) { ciniki_core_dbTransactionRollback($ciniki, 'ciniki.blog'); return $rc; } // // Commit the transaction // $rc = ciniki_core_dbTransactionCommit($ciniki, 'ciniki.blog'); if( $rc['stat'] != 'ok' ) { return $rc; } // // Update the last_change date in the tenant modules // Ignore the result, as we don't want to stop user updates if this fails. // ciniki_core_loadMethod($ciniki, 'ciniki', 'tenants', 'private', 'updateModuleChangeDate'); ciniki_tenants_updateModuleChangeDate($ciniki, $args['tnid'], 'ciniki', 'blog'); // // Update the web index if enabled // ciniki_core_loadMethod($ciniki, 'ciniki', 'core', 'private', 'hookExec'); ciniki_core_hookExec($ciniki, $args['tnid'], 'ciniki', 'web', 'indexObject', array('object'=>'ciniki.blog.postAudio', 'object_id'=>$args['post_audio_id'])); return array('stat'=>'ok'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function arguments(): array;", "abstract public static function args();", "function getArguments() ;", "abstract protected function get_args();", "public function arguments(): array;", "public function parameters();", "public function parameters();", "protected function getArgument...
[ "0.67508256", "0.6698555", "0.66951525", "0.6622531", "0.661063", "0.6515748", "0.6515748", "0.6413197", "0.6299401", "0.6224408", "0.6224408", "0.62135655", "0.6188775", "0.6185073", "0.6185073", "0.61060125", "0.60971993", "0.60971993", "0.6092937", "0.6078287", "0.60333544...
0.0
-1
Performs the preaction filtering.
protected function preFilter($filterChain) { $itemName = ''; $controller = $filterChain->controller; $action = $filterChain->action; /* @var $user CWebUser */ $user = Yii::app()->getUser(); //未登陆可访问页面:帮助中心 $controllerId = strtolower($controller->getId()); $actionId = strtolower($action->getId()); if (in_array($controllerId, array('page', 'pay'))) { return true; } //判断用户是否过期 $ExpirationTime = Yii::app()->user->getExpirationTime(); if ($ExpirationTime && $ExpirationTime < $_SERVER['REQUEST_TIME']) { Yii::app()->user->logout(); } // 是否登录 if ($user->isGuest) $user->loginRequired(); //用户配额管理 $this->operatequota(); if (isset($_SERVER["HTTP_X_REQUESTED_WITH"]) && strtolower($_SERVER["HTTP_X_REQUESTED_WITH"]) == "xmlhttprequest") { return true; // ajax 请求的处理方式 } else { //self::updatelasttime(); //判断机构是否登记 $organID = Yii::app()->user->getOrganID(); $organ = Organ::model()->findByPk($organID); if ($organ->Status == 0) { Yii::app()->controller->redirect(array('/user/activation/index')); } else if ($organ->Status == 2) { Yii::app()->controller->redirect(array('/user/activecompany/index')); } // $identityorganID = Commonmodel::getAuthOrgan(); // if (empty($identityorganID['ID']) || empty($identityorganID['OrganName']) || empty($identityorganID['Phone']) || empty($identityorganID['Email'])) { // if (!($controllerId == 'company' && $actionId == 'index')) { // Yii::app()->controller->redirect(array("/member/company/index")); // } // if ($identityorganID['Identity'] == 1) { //// Yii::app()->controller->red("//site/nopower"); // if (!($controllerId == 'makecompany' && ($actionId == 'index' || $actionId == 'Savedealerorgan'))) { // Yii::app()->controller->redirect(array("/maker/makecompany/index")); // } // } elseif ($identityorganID['Identity'] == 2) { // if (!($controllerId == 'dealercompany' && ($actionId == 'index' || $actionId == 'Savedealerorgan'))) { // Yii::app()->controller->redirect(array("/dealer/dealercompany/index")); // } // } elseif ($identityorganID['Identity'] == 3) { // if (!($controllerId == 'servicecompany' && ($actionId == 'index' || $actionId == 'Saveserviceorgan'))) { // Yii::app()->controller->redirect(array("/servicer/servicecompany/index")); // } // } // } $route = $controller->getRoute(); $rootID = F::getroot(); $activeMenu = FrontMenu::getMenuIDByRoute($route, $rootID); //url参数 $urlparams = $_GET; $urlparams = array_filter($urlparams); if ($activeMenu) { //用户日志 $infos = $this->recordlog($activeMenu['Name']); //MongoDB用户操作详细日志 $oper = F::getoperation($activeMenu['Url'], $info == null, $urlparams); if (($mod = $controller->getModule()) !== null) { $item .= strtolower($mod->getId()); $cont = strtolower($controller->getId()); $item .= "-" . $cont; if (!in_array($item, array('maker-default', 'dealer-default', 'servicer-default'))) { if (Yii::app()->user->isEmploye() && !Yii::app()->user->checkAccess($activeMenu['ID'])) { Yii::app()->controller->render("//site/nopower"); Yii::app()->end(); } } } } else { $route = $controller->getRoute(); $urlparams = $_GET; $oper = F::getoperation($route, $info == null, $urlparams); if (Yii::app()->user->isEmploye() && !Yii::app()->user->checkAccess($activeMenu['ID'])) { Yii::app()->controller->render("//site/nopower"); Yii::app()->end(); }// 正常请求的处理方式 } } // Module if (($module = $controller->getModule()) !== null) { $itemName .= strtolower($module->getId()); $controllerId = strtolower($controller->getId()); if (!in_array($itemName, array('maker', 'dealer', 'servicer', 'mall', 'cim'))) { return true; } else if (Yii::app()->user->isMaker()) { if (in_array($itemName, array('maker'))) { return true; } else { $itemName .= "-" . $controllerId; if (in_array($itemName, array('mall-makeorder', 'cim-contact', 'mall-makecount'))) { return true; } Yii::app()->controller->redirect(array('/maker')); } } else if (Yii::app()->user->isDealer()) { if (in_array($itemName, array('dealer'))) { return true; } else { $itemName .= "-" . $controllerId; if (in_array($itemName, array('mall-order', 'mall-goods', 'mall-quotationbuy', 'mall-quotationsell', 'mall-myaddress', 'mall-querygoods', 'mall-payment', 'mall-quotations', 'mall-sellcount', 'mall-quotationorder', 'mall-sell', 'mall-jporder', 'dealer-makequery', 'cim-businessshare', 'cim-contact', 'cim-pricemanage', 'cim-logistics', 'cim-discountset' ))) { return true; } Yii::app()->controller->redirect(array('/dealer')); } } else if (Yii::app()->user->isServicer()) { if (in_array($itemName, array('servicer'))) { return true; } else { $itemName .= "-" . $controllerId; if (in_array($itemName, array('mall-quotationbuy', 'mall-payment', 'mall-querygoods', 'mall-jporder', 'mall-buy', 'mall-myaddress', 'mall-inquiry', 'mall-quotation', 'cim-contact'))) { return true; } Yii::app()->controller->redirect(array('/servicer')); } } else { Yii::app()->controller->redirect(array('/site/index')); } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function filters() {\n\n\n\t}", "public function filtering();", "abstract public function prepareFilters();", "protected function preProcess() {}", "abstract public function filters();", "public function preProcess();", "public function preProcess();", "public function filterBeforeAll($filter...
[ "0.6875115", "0.6758861", "0.66757816", "0.651489", "0.65148854", "0.6501038", "0.6501038", "0.6385768", "0.63504684", "0.617276", "0.61702263", "0.60974896", "0.6090256", "0.60895634", "0.608513", "0.6079149", "0.60790163", "0.60206604", "0.6020461", "0.6009828", "0.59967625...
0.0
-1
bail if no value
function format_value($value, $post_id, $field) { if( empty($value) ) { return $value; } return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getValueOrNull($value) {\n global $db;\n if(strlen($value) == 0) return \"NULL\";\n else return \"'\".$db->validate($value).\"'\";\n}", "function check_value($value) {\n\tif((@count($value)>0 and !@empty($value) and @isset($value)) || $value=='0') {\n\t\treturn true;\n\t}\n}", "public function stdW...
[ "0.64593214", "0.6408888", "0.63520825", "0.605821", "0.6047816", "0.6041996", "0.60352194", "0.59725547", "0.5885208", "0.58217305", "0.5736559", "0.57344323", "0.5721759", "0.5718673", "0.57174385", "0.57053155", "0.56735754", "0.56643957", "0.5655598", "0.56401557", "0.561...
0.0
-1
this happens everytime a user hits "update"
function update_value($value, $post_id, $field) { //$value = "this overrides"; return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function update() {}", "protected function _update()\n\t{\n\t}", "protected function _update()\n {\n \n }", "protected function _update()\n {\n \n }", "function before_update() {}", "function update() {\n\n\t\t\t}", "public function update()\r\n {\r\n //\r\...
[ "0.8199159", "0.8164612", "0.8133564", "0.8133564", "0.79639953", "0.795212", "0.7944092", "0.79247046", "0.7919004", "0.78993064", "0.7883289", "0.7883289", "0.7883289", "0.7858079", "0.78170353", "0.78170353", "0.7795831", "0.7770692", "0.7770692", "0.7770692", "0.7770692",...
0.0
-1
Create a new controller instance.
public function __construct() { $this->middleware(['auth', 'user_verified']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function createController()\n {\n $this->createClass('controller');\n }", "protected function createController()\n {\n $controller = Str::studly(class_basename($this->getNameInput()));\n\n $modelName = $this->qualifyClass('Models/'.$this->getNameInput());\n\n $this-...
[ "0.82668066", "0.8173394", "0.78115296", "0.77052677", "0.7681875", "0.7659338", "0.74860525", "0.74064577", "0.7297601", "0.7252339", "0.7195181", "0.7174191", "0.70150065", "0.6989306", "0.69835985", "0.69732994", "0.6963521", "0.6935819", "0.68973273", "0.68920785", "0.687...
0.0
-1
Show the application dashboard.
public function index() { $total_invoices = Invoice::count(); $total_cost = Invoice::sum('cost'); $total_weight = Invoice::sum('weight'); $total_cost_per_unit = round($total_cost / $total_weight, 2); $stats = [ 'total_invoices' => $total_invoices, 'total_cost' => '$' . $total_cost, 'total_weight' => $total_weight . 'LB', 'total_cost_per_unit' => '$' . $total_cost_per_unit, ]; return view('home', compact(['stats'])); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dashboard()\n {\n\n $pageData = (new DashboardService())->handleDashboardLandingPage();\n\n return view('application', $pageData);\n }", "function dashboard() {\r\n\t\t\tTrackTheBookView::render('dashboard');\r\n\t\t}", "public function showDashboard() { \n\t\n ...
[ "0.77850926", "0.7760142", "0.7561336", "0.75147176", "0.74653697", "0.7464913", "0.73652893", "0.7351646", "0.7346477", "0.73420244", "0.7326711", "0.7316215", "0.73072463", "0.7287626", "0.72826403", "0.727347", "0.727347", "0.727347", "0.727347", "0.7251768", "0.7251768", ...
0.0
-1
Run the database seeds.
public function run() { foreach (range(1, 150) as $index) { $teacher = Teacher::inRandomOrder()->first(); $category = Category::inRandomOrder()->first(); $model = factory(\App\Models\TeacherCategory::class)->make(); $model->teacher_id = $teacher->id; $model->category_id = $category->id; factory(\App\Models\TeacherCategory::class)->create($model->toFillableArray()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.78414...
0.0
-1
Example:. [ BasicAuthentication::KEY => 'basic.username' ]
public function __construct(array $mapping) { $this->mapping = $mapping; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAuthenticationKey();", "function auth_apikey($key){\n\t\n}", "public function getAuthKey()\n {}", "public function getAuthKey()\n {\n }", "public function getAuthKey()\n {\n }", "public function getAuthKey()\n {\n }", "public function getAuthKey()\n {\n }",...
[ "0.6735211", "0.6493934", "0.6273707", "0.6265359", "0.6265359", "0.6265359", "0.6265359", "0.6176014", "0.6041254", "0.60409266", "0.5922076", "0.59205186", "0.5814195", "0.5807351", "0.57686675", "0.5757585", "0.5707624", "0.56995267", "0.56937206", "0.5689932", "0.5689445"...
0.0
-1
Construct the bnf object An optionnel string can be add to be parsed as rules
public function __construct($id="bnf", $rules="") { $this->id = $id; //$this->parser = new bnfParser($this); if($rules!=="") $this->parseRules($rules); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parseRule(&$part, &$strPart, $bnfId){\n\t\t$strPart = trim($strPart);\n\t\t$notParsedStrPart = $strPart;\n\t\t$type = $part->type;\n\t\t\n\t\t$end = self::findEnd(\n\t\t\t$notParsedStrPart, \n\t\t\tself::getTypeClosure($part->type),\n\t\t\tself::getTypeClosure($part->type, false)\n\t\t);\n\t\t\n\t\tif($ty...
[ "0.4974273", "0.49555087", "0.4835287", "0.4774892", "0.47628763", "0.47506887", "0.4719365", "0.46665704", "0.46207792", "0.4598571", "0.45288464", "0.45109713", "0.4503138", "0.4496302", "0.44310665", "0.44139034", "0.44032797", "0.44018376", "0.43766534", "0.4374726", "0.4...
0.56915414
0
Add a rule in this bnf system
public function addRule(bnfRule $rule){ $this->rules[] = $rule; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function addRule( phpucInputRule $rule )\n {\n $this->rules[] = $rule;\n }", "abstract public function addRule(ValidationRule$rule);", "public function addRule(RuleIface $rule);", "public function add_rule( WP_Autoload_Rule $rule );", "public function add($name, $rule = null) {\n\t\t...
[ "0.6911536", "0.68590087", "0.6796775", "0.65818495", "0.6440216", "0.6336621", "0.62616", "0.61791986", "0.6155176", "0.6053139", "0.6032105", "0.60271925", "0.60178626", "0.5961058", "0.5932126", "0.59144264", "0.58985424", "0.5861756", "0.57716537", "0.5768053", "0.5766702...
0.7884931
0
With saved rules generate a well formed string of the rule givedn in parameter
public function render($rule, $separator="") { bnf::$separator = $separator; return bnfRule::$rules[$this->id][$rule]->render(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function makeRules($rules){\n\n return 'public static $rules = array('.PHP_EOL.\"\\t\\t\".implode(','.PHP_EOL.\"\\t\\t\", $rules) . PHP_EOL.\"\\t);\";\n \n \n }", "public function __toString()\n\t{\n\t\tif (is_array($this->params[self::PARAM_VALUE]))\n\t\t{\n\t\t\t$...
[ "0.6584961", "0.64885706", "0.6029886", "0.5999867", "0.5999867", "0.5965177", "0.5884639", "0.5869635", "0.58621186", "0.5852054", "0.584795", "0.5742048", "0.5583816", "0.55798507", "0.5521961", "0.5504727", "0.549076", "0.53919786", "0.5381191", "0.5372575", "0.53536564", ...
0.0
-1
An alias from table
public function graph($rule, $level) { return $this->table($rule, $level); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTableAlias() ;", "function TableAlias($tableAlias = null);", "public function asAlias() {\n\t\treturn ($this->alias ? $this->alias : ($this->table ? $this->table->asAlias() .'__': ''/*null*/).$this->name);\n\t}", "function getTableAlias()\r\n\t{\r\n\t\tif ( is_null( $this->table ) ) return...
[ "0.7576015", "0.72749585", "0.71428895", "0.6784887", "0.66892886", "0.6619532", "0.6593147", "0.65580636", "0.6394772", "0.6394772", "0.6394772", "0.6394772", "0.637372", "0.6349145", "0.6338295", "0.6247264", "0.6220671", "0.6206173", "0.6190654", "0.6180174", "0.61768705",...
0.0
-1
Create an html table representing the rule given by the first parameter, and limit the representation by the levels of the
public function table($rule, $level) { bnf::$maxLevel = $level; return bnfRule::$rules[$this->id][$rule]->table(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function table($level){\n\t\treturn \"<div class=\\\"word quoted final\\\"><span>\".htmlspecialchars($this->id).\"</span></div>\";\t\n\t}", "function html_generate_table($heights, $weights, $rows) {\n $html = '<table>';\n $html .= html_generate_row($heights, ' ', true);\n foreach ($rows as $key => $row)...
[ "0.617564", "0.5786443", "0.5776051", "0.5737149", "0.5712434", "0.5687329", "0.56362486", "0.56211597", "0.5611117", "0.55278116", "0.5509415", "0.5502169", "0.5494241", "0.5466884", "0.54432017", "0.5440201", "0.5399959", "0.53668106", "0.5362514", "0.5359752", "0.5344287",...
0.62503046
0
Return css file positioning by the given relative path to the lib directory
public function getCss($htmlRelativeDir=".") { return $htmlRelativeDir."/assets/table.style.css"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCssPath();", "public function getStylesheetDir (): string;", "public function css_path(){\n return $this->css_path;\n }", "private static function _getPageCSSPath()\n {\n Channels::includeSystem('GUI');\n $cssPath = '/__web/'.GUI::getSystemWebPath('Help').'/Templates/H...
[ "0.6999156", "0.6348122", "0.63386613", "0.619779", "0.6131345", "0.6100872", "0.60969865", "0.60522383", "0.59797484", "0.5829283", "0.582106", "0.5774022", "0.57549167", "0.5672425", "0.5651522", "0.56451434", "0.5630282", "0.5601385", "0.557859", "0.5550439", "0.5541985", ...
0.549652
22
Return css link tag positioning by the given relative path to the lib directory
public function getCssLink($htmlRelativeDir="."){ return "<link type=\"text/css\" media=\"all\" rel=\"stylesheet\" href=\"".$this->getCss($htmlRelativeDir)."\">"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCssPath();", "function wp_make_link_relative($link)\n {\n }", "public function css() {\r\n\t\tif ($this->cssLink != false) {\r\n\t\t\tif($this->scriptTo) {\r\n\t\t\t\t$elem = pzk_element($this->scriptTo);\r\n\t\t\t\t$elem->append(pzk_parse('<html.css src=\"'.BASE_REQUEST.'/default/skin...
[ "0.5976405", "0.55870706", "0.5526606", "0.5479225", "0.54688793", "0.53883064", "0.5388249", "0.5387983", "0.5352028", "0.53480923", "0.529685", "0.52921855", "0.52615255", "0.5259174", "0.521065", "0.5196607", "0.51958925", "0.5191051", "0.5169822", "0.51544666", "0.5127104...
0.5903169
1
Make it so that people pages exist. Under WordPress, almost everything publishable is a post. register_post_type() is invoked to create a particular flavor of posts that describe people.
static function register_post_type () { register_post_type( 'person', array( 'labels' => array( 'name' => __x( 'People', 'post type general name' ), 'singular_name' => __x( 'Person', 'post type singular name' ), 'menu_name' => __x( 'People', 'admin menu' ), 'name_admin_bar' => __x( 'Person', 'add new on admin bar' ), 'add_new' => __x( 'Add New', 'book' ), 'add_new_item' => ___( 'Add New Person' ), 'new_item' => ___( 'New Person' ), 'edit_item' => ___( 'Edit Person' ), 'view_item' => ___( 'View Person' ), 'all_items' => ___( 'All People' ), 'search_items' => ___( 'Search People' ), 'parent_item_colon' => ___( 'Parent People:' ), 'not_found' => ___( 'No persons found.' ), 'not_found_in_trash' => ___( 'No persons found in Trash.' ) ), 'description' => ___( 'Noteworthy people' ), 'public' => true, 'publicly_queryable' => true, 'show_ui' => true, 'show_in_menu' => true, 'query_var' => true, 'rewrite' => array( 'slug' => 'people' ), 'capability_type' => 'post', 'has_archive' => true, 'hierarchical' => false, 'menu_position' => null, 'menu_icon' => 'dashicons-welcome-learn-more', 'supports' => array( 'title', 'editor', 'thumbnail' ) )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function people() {\n\t\tregister_post_type(\n\t\t\t'people',\n\t\t\tarray(\n\t\t\t\t'labels' => array(\n\t\t\t\t\t'name' => __( 'People' ),\n\t\t\t\t\t'singular_name' => __( 'Person' ),\n\t\t\t\t),\n\t\t\t\t'public' => true,\n\t\t\t\t'has_archive' => true,\n\t\t\t\t'supports' => array...
[ "0.7855856", "0.7418234", "0.7285491", "0.71690285", "0.71198624", "0.7066123", "0.7049788", "0.70419556", "0.70292634", "0.70178294", "0.69984156", "0.6976406", "0.6975736", "0.6975736", "0.6933671", "0.68923926", "0.6869477", "0.6799266", "0.6783482", "0.6782155", "0.674670...
0.78243846
1
TODO: not sure if useful
static function admin_init () { add_menu_page( __x('People', 'admin menu page title'), __x('People', 'admin menu title'), 'read', 'epfl-people', null, // Render callback 'dashicons-calendar', // Icon type 70 // Position ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function helper()\n\t{\n\t\n\t}", "protected function __init__() { }", "private function _i() {\n }", "private function __construct () {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "private function __construct() {}", "pr...
[ "0.559716", "0.5512605", "0.54893553", "0.5447007", "0.5405943", "0.54047257", "0.54047257", "0.54047257", "0.54047257", "0.54047257", "0.54047257", "0.54047257", "0.54047257", "0.54047257", "0.54047257", "0.54047257", "0.54047257", "0.54047257", "0.54047257", "0.54047257", "...
0.0
-1
this up() migration is autogenerated, please modify it to your needs
public function up(Schema $schema) : void { $this->addSql('CREATE TABLE consumption (id INT AUTO_INCREMENT NOT NULL, provider_id INT DEFAULT NULL, position_id INT DEFAULT NULL, machine_number VARCHAR(255) DEFAULT NULL, machine_side VARCHAR(255) DEFAULT NULL, linear_meters INT DEFAULT NULL, date DATE NOT NULL, ref VARCHAR(255) NOT NULL, INDEX IDX_2CFF2DF9A53A8AA (provider_id), INDEX IDX_2CFF2DF9DD842E46 (position_id), PRIMARY KEY(id)) DEFAULT CHARACTER SET utf8mb4 COLLATE `utf8mb4_unicode_ci` ENGINE = InnoDB'); $this->addSql('ALTER TABLE consumption ADD CONSTRAINT FK_2CFF2DF9A53A8AA FOREIGN KEY (provider_id) REFERENCES provider (id)'); $this->addSql('ALTER TABLE consumption ADD CONSTRAINT FK_2CFF2DF9DD842E46 FOREIGN KEY (position_id) REFERENCES position (id)'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function up();", "abstract public function up();", "abstract public function up();", "abstract public function up();", "public function up()\n {\n $this->execute(\"\n ALTER TABLE `tcmn_communication` \n CHANGE `tcmn_pprs_id` `tcmn_pprs_id` SMALLINT(5) UNSIGNE...
[ "0.80062366", "0.79145443", "0.79145443", "0.79145443", "0.7572342", "0.756089", "0.75283176", "0.7498379", "0.7493237", "0.7453656", "0.74463314", "0.7433381", "0.74307704", "0.7427088", "0.741794", "0.73779047", "0.7374933", "0.7370453", "0.73637444", "0.73505706", "0.73290...
0.0
-1
this down() migration is autogenerated, please modify it to your needs
public function down(Schema $schema) : void { $this->addSql('DROP TABLE consumption'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function down()\n {\n //add your migration here \n }", "public function down()\n {\n //add your migration here\n }", "public function down()\n\t{\n $this->dropColumn('producto','fecha');\n\n //add column fecha in producto\n $this->addColumn('calculo'...
[ "0.7951469", "0.78649354", "0.76072776", "0.7493371", "0.7321319", "0.72464293", "0.71893626", "0.71544456", "0.7154392", "0.7142508", "0.71340555", "0.71213156", "0.7117464", "0.71038944", "0.7099133", "0.70826566", "0.70787495", "0.7074136", "0.7068976", "0.70667255", "0.70...
0.0
-1
Return the current element.
public function current() { return \current($this->responseData->_embedded->items); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function current() {\n $element = current($this->elements);\n return $element;\n }", "public function current() {\n return $this->currentElem;\n }", "public function current()\n {\n return current($this->_elements);\n }", "public function current() {\n $e...
[ "0.88328654", "0.88291985", "0.87996125", "0.879261", "0.8787767", "0.8698666", "0.861041", "0.86010164", "0.8580815", "0.85332054", "0.80663407", "0.8059241", "0.8059241", "0.8059241", "0.8059241", "0.8059241", "0.8059241", "0.8059241", "0.8059241", "0.8059241", "0.8059241",...
0.0
-1
Move forward to next element.
public function next(): void { if (!\next($this->responseData->_embedded->items) && $this->fetchMore) { if ($this->getPage() < $this->getPages()) { $this->responseData = $this->client->requestLink($this->getLinks()->next->href); $this->rewind(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function next() {\n next($this->elements);\n $this->pointer++;\n }", "public function next()\n {\n $current = $this->current();\n\n if ($current) {\n $this->current = $current->getAfter();\n }\n }", "public function next()\n {\n $this->cur...
[ "0.83165866", "0.8130133", "0.8017392", "0.79799855", "0.7785859", "0.7781127", "0.77780634", "0.7695856", "0.7695856", "0.7695785", "0.7695785", "0.7661846", "0.7661579", "0.76516545", "0.7596287", "0.7564444", "0.7564444", "0.7564444", "0.7558148", "0.75457835", "0.7465247"...
0.0
-1
Return the key of the current element.
public function key() { return \key($this->responseData->_embedded->items); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function key()\n {\n $current = $this->current();\n\n return is_null($current) ? null : $current->getKey();\n }", "public function key()\n {\n return $this->current();\n }", "public function key()\n {\n return $this->current;\n }", "public function key() {...
[ "0.8516037", "0.8471765", "0.8468369", "0.84655845", "0.83778834", "0.83639276", "0.83433574", "0.8322241", "0.83109516", "0.8263858", "0.8154001", "0.812987", "0.8121035", "0.8107551", "0.80873317", "0.8087265", "0.8072058", "0.8048177", "0.80388904", "0.803368", "0.8018038"...
0.0
-1
Checks if current position is valid.
public function valid(): bool { return null !== \key($this->responseData->_embedded->items); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function valid() {\n return ($this->pos < $this->end);\n }", "function valid() \n {\n return $this->offsetExists($this->position);\n }", "function valid()\n {\n return $this->_position == 0 || $this->_curPage->getSize() > 0;\n }", "public function valid() {\n\t\t\treturn i...
[ "0.77952045", "0.7704004", "0.7682876", "0.7341352", "0.72905356", "0.7282062", "0.72594506", "0.72115016", "0.7175756", "0.71586627", "0.7156666", "0.7132078", "0.71155494", "0.71155494", "0.7094378", "0.7069854", "0.70690125", "0.7049169", "0.7040837", "0.7040826", "0.70395...
0.0
-1
Rewind the Iterator to the first element.
public function rewind(): void { \reset($this->responseData->_embedded->items); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function rewind()\n {\n $this->iteratorIndex = 0;\n reset($this->elements);\n }", "public function rewind()\n {\n if ($this->atStart)\n return;\n \n throw new Splunk_UnsupportedOperationException(\n 'Cannot rewind after reading past the fir...
[ "0.7744651", "0.7503379", "0.7494699", "0.748794", "0.74733067", "0.74653906", "0.7464079", "0.7462683", "0.7462683", "0.7418555", "0.7345766", "0.7334086", "0.73235923", "0.7323178", "0.7311387", "0.7309906", "0.72977483", "0.72977483", "0.72797245", "0.7265455", "0.724773",...
0.0
-1
Run the database seeds.
public function run() { DB::connection('tenant')->beginTransaction(); factory(\App\Model\Master\Customer::class, 10)->create(); factory(\App\Model\Master\Supplier::class, 10)->create(); factory(\App\Model\Master\Warehouse::class, 2)->create(); $this->importChartOfAccount(); $this->seedItems(); DB::connection('tenant')->commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n // $this->call(UserTableSeeder::class);\n // $this->call(PostTableSeeder::class);\n // $this->call(TagTableSeeder::class);\n // $this->call(PostTagTableSeeder::class);\n\n /*AB - use faker to populate table see file ModelFactory.php */\n fact...
[ "0.8013876", "0.79804534", "0.7976992", "0.79542726", "0.79511505", "0.7949612", "0.794459", "0.7942486", "0.7938189", "0.79368967", "0.79337025", "0.78924936", "0.78811055", "0.78790957", "0.78787595", "0.787547", "0.7871811", "0.78701615", "0.7851422", "0.7850352", "0.78414...
0.0
-1
Display a listing of the resource.
public function index() { $experience = Experience::orderBy('created_at', 'desc')->get(); return view('admin.experiences.index')->withExperiences($experience); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n {\n $limit = $this->Request()->getParam('limit', 1000);\n $offset = $this->Request()->getParam('start', 0);\n $sort = $this->Request()->getParam('sort', array());\n $filter = $this->Request()->getParam('filter', array());\n\n $result = $this->re...
[ "0.7446777", "0.736227", "0.73005503", "0.72478926", "0.71631265", "0.71489686", "0.7131636", "0.7105969", "0.71029514", "0.7101372", "0.70508176", "0.6995128", "0.69890636", "0.6934895", "0.6900203", "0.6899281", "0.6891734", "0.6887235", "0.68670005", "0.6849741", "0.683052...
0.0
-1
Show the form for creating a new resource.
public function create() { return view('admin.experiences.create'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(ExperienceRequest $request) { $experience = Experience::create($request->all()); if($request->current){ $experiences = Experience::where('id', '<>', $experience->id)->get(); foreach ($experiences as $experience) { $experience->current = false; $experience->update(); } } Flashy::message('Experience Added Successfully', route('experiences.index')); return redirect()->route('experiences.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Update the specified resource in storage.
public function update(ExperienceRequest $request, $id) { $experience = Experience::find($id); $experience->update($request->all()); if(! $request->current){ $experience->current = false; $experience->update(); } else { $experiences = Experience::where('id', '<>', $experience->id)->get(); foreach ($experiences as $experience) { $experience->current = false; $experience->update(); } } Flashy::message('Experience updated Successfully', route('experiences.index')); return redirect()->route('experiences.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateShopifyResource() {\n $this->saving();\n $this->getShopifyApi()->call([\n 'URL' => API::PREFIX . $this->getApiPathSingleResource(),\n 'METHOD' => 'PUT',\n 'DATA' => [\n static::getResourceSingularName() => $this->shopifyData\n ...
[ "0.7425105", "0.70612276", "0.70558053", "0.6896673", "0.6582159", "0.64491373", "0.6346954", "0.62114537", "0.6145042", "0.6119944", "0.61128503", "0.6099993", "0.6087866", "0.6052593", "0.6018941", "0.60060275", "0.59715486", "0.5946516", "0.59400934", "0.59377414", "0.5890...
0.0
-1
Remove the specified resource from storage.
public function destroy($id) { $experience = Experience::find($id); if(! $experience){ Flashy::error('experience Doesn\'t Exist'); return redirect()->back(); } $experience->delete(); Flashy::message('Experience Deleted Successfully', route('experiences.index')); return redirect()->route('experiences.index'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete($resource){\n return $this->fetch($resource, self::DELETE);\n }", "public function destroy(Resource $resource)\n {\n //\n }", "public function removeResource($resourceID)\n\t\t{\n\t\t}", "public function unpublishResource(PersistentResource $resource)\n {\n ...
[ "0.6672584", "0.6659381", "0.6635911", "0.6632799", "0.6626075", "0.65424126", "0.65416265", "0.64648265", "0.62882507", "0.6175931", "0.6129922", "0.60893893", "0.6054415", "0.60428125", "0.60064924", "0.59337646", "0.5930772", "0.59199584", "0.5919811", "0.5904504", "0.5897...
0.0
-1
Magic method to have any kind of setters or getters.
public function __call($name, array $arguments){ $prefix = strtolower(substr($name, 0, 3)); $parameter = substr($name, 3); $pToCheck = Inflector::underscore($parameter); if(in_array($pToCheck, $this->validParameters)){ if ($prefix === 'set' && isset($arguments[0])) { $this->$parameter = $arguments[0]; return $this; } elseif ($prefix === 'get') { return $this->$parameter; } } throw new MetaTypeException('Invalid parameters '.$parameter.' mapped to '.$pToCheck); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function setters();", "abstract protected function setRequiredGetters();", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static function setters()\n {\n return parent::setters() + self::$setters;\n }", "public static...
[ "0.787538", "0.7316856", "0.70563495", "0.70563495", "0.70563495", "0.70563495", "0.70563495", "0.70563495", "0.70563495", "0.70563495", "0.70563495", "0.70563495", "0.70563495", "0.70563495", "0.70563495", "0.6785478", "0.6541138", "0.6474708", "0.6419504", "0.6407943", "0.6...
0.0
-1
Get the value of id_entity
public function getId_entity($id_entity=null) { if ($id_entity != null && is_array($this->entity) && count($this->entity)!=0) { $table_name = strtolower(get_class($this)); $query = "SELECT * FROM $table_name WHERE id_entity = ?"; $req = Manager::bdd()->prepare($query); $req->execute([$id_entity]); $data = ""; if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) { $d=$data[0]; $this->setId_entity($d['id_entity']); $this->setLabel($d['label']); $this->setDomaine($d['domaine']); $this->setEmail($d['email']); $this->setPhone_number($d['phone_number']); $this->setBp($d['bp']); $this->setLocalisation($d['localisation']); $this->setVille($d['ville']); $this->setUniqueId($d['uniqueId']); $this->setCreated_at($d['created_at']); $this->setCreated_by($d['created_by']); $this->setUpdate_at($d['update_at']); $this->setUpdate_by($d['update_by']); $this->entity =$data; return $this; } } else { return $this->id_entity; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_entity_id(){\n return $this->entityId;\n }", "function getEntityId() {\n return $this->entity_id;\n }", "public function getEntityId(){\n return $this->_getData(self::ENTITY_ID);\n }", "public function getEntityId();", "public function getEntityId();", "public ...
[ "0.7901968", "0.78789693", "0.7845408", "0.76467484", "0.76467484", "0.76467484", "0.7619804", "0.7465844", "0.740618", "0.7279723", "0.7134216", "0.7111125", "0.71029484", "0.69883543", "0.69882804", "0.6968064", "0.6929938", "0.6925087", "0.6873699", "0.6873699", "0.6867964...
0.71475035
10
Get the value of label
public function getLabel($label=null) { if ($label != null && is_array($this->entity) && count($this->entity)!=0) { $table_name = strtolower(get_class($this)); $query = "SELECT * FROM $table_name WHERE label = ?"; $req = Manager::bdd()->prepare($query); $req->execute([$label]); $data = ""; if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) { $d=$data[0]; $this->setId_entity($d['id_entity']); $this->setLabel($d['label']); $this->setDomaine($d['domaine']); $this->setEmail($d['email']); $this->setPhone_number($d['phone_number']); $this->setBp($d['bp']); $this->setLocalisation($d['localisation']); $this->setVille($d['ville']); $this->setUniqueId($d['uniqueId']); $this->setCreated_at($d['created_at']); $this->setCreated_by($d['created_by']); $this->setUpdate_at($d['update_at']); $this->setUpdate_by($d['update_by']); $this->entity =$data; return $this; } } else { return $this->label; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_label();", "public function get_label();", "function getLabel() \n {\n return $this->getValueByFieldName( 'label_label' );\n }", "public function GetLabel();", "public function get_label(){ return $this->label; }", "public function label()\n {\n return $this->la...
[ "0.80410105", "0.80410105", "0.7825597", "0.77046144", "0.7689533", "0.7675733", "0.7669148", "0.7641218", "0.7638087", "0.75909126", "0.75909126", "0.7585861", "0.7530442", "0.7530442", "0.7530442", "0.7530442", "0.75266784", "0.75266784", "0.7524592", "0.7512088", "0.751208...
0.0
-1
Get the value of domaine
public function getDomaine($domaine=null) { if ($domaine != null && is_array($this->entity) && count($this->entity)!=0) { $table_name = strtolower(get_class($this)); $query = "SELECT * FROM $table_name WHERE domaine = ?"; $req = Manager::bdd()->prepare($query); $req->execute([$domaine]); $data = ""; if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) { $d=$data[0]; $this->setId_entity($d['id_entity']); $this->setLabel($d['label']); $this->setDomaine($d['domaine']); $this->setEmail($d['email']); $this->setPhone_number($d['phone_number']); $this->setBp($d['bp']); $this->setLocalisation($d['localisation']); $this->setVille($d['ville']); $this->setUniqueId($d['uniqueId']); $this->setCreated_at($d['created_at']); $this->setCreated_by($d['created_by']); $this->setUpdate_at($d['update_at']); $this->setUpdate_by($d['update_by']); $this->entity =$data; return $this; } } else { return $this->domaine; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getnomdomaine() {\r\n\t\treturn $this->nomdomaine;\r\n\t}", "public function getNom();", "public function getDirecteur(): string\n {\n return (string) $this->directeur;\n }", "public function getNom():string{\r\n\r\n\r\n\r\n return $this->nom;\r\n\r\n\r\n\r\n\r\n \...
[ "0.70136887", "0.6509265", "0.63312703", "0.62751496", "0.61357653", "0.6123138", "0.60744", "0.6072775", "0.6042257", "0.60296273", "0.60237974", "0.60232663", "0.60130036", "0.6011166", "0.6010829", "0.5993242", "0.5992967", "0.59928626", "0.5991328", "0.5987447", "0.597839...
0.6079081
6
Get the value of email
public function getEmail($email=null) { if ($email != null && is_array($this->entity) && count($this->entity)!=0) { $table_name = strtolower(get_class($this)); $query = "SELECT * FROM $table_name WHERE email = ?"; $req = Manager::bdd()->prepare($query); $req->execute([$email]); $data = ""; if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) { $d=$data[0]; $this->setId_entity($d['id_entity']); $this->setLabel($d['label']); $this->setDomaine($d['domaine']); $this->setEmail($d['email']); $this->setPhone_number($d['phone_number']); $this->setBp($d['bp']); $this->setLocalisation($d['localisation']); $this->setVille($d['ville']); $this->setUniqueId($d['uniqueId']); $this->setCreated_at($d['created_at']); $this->setCreated_by($d['created_by']); $this->setUpdate_at($d['update_at']); $this->setUpdate_by($d['update_by']); $this->entity =$data; return $this; } } else { return $this->email; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmail() {\n return $this->getValue('email');\n }", "function getEmail() {\n\t\treturn $this->getData('email');\n\t}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail() {}", "public function getEmail(...
[ "0.8002871", "0.7953225", "0.78898126", "0.78898126", "0.78898126", "0.7888253", "0.7888253", "0.7846493", "0.7846493", "0.7846493", "0.7846493", "0.7846493", "0.7846493", "0.7846493", "0.7846493", "0.7846493", "0.7846493", "0.7846493", "0.7819835", "0.78176445", "0.77480185"...
0.0
-1
Get the value of phone_number
public function getPhone_number($phone_number=null) { if ($phone_number != null && is_array($this->entity) && count($this->entity)!=0) { $table_name = strtolower(get_class($this)); $query = "SELECT * FROM $table_name WHERE phone_number = ?"; $req = Manager::bdd()->prepare($query); $req->execute([$phone_number]); $data = ""; if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) { $d=$data[0]; $this->setId_entity($d['id_entity']); $this->setLabel($d['label']); $this->setDomaine($d['domaine']); $this->setEmail($d['email']); $this->setPhone_number($d['phone_number']); $this->setBp($d['bp']); $this->setLocalisation($d['localisation']); $this->setVille($d['ville']); $this->setUniqueId($d['uniqueId']); $this->setCreated_at($d['created_at']); $this->setCreated_by($d['created_by']); $this->setUpdate_at($d['update_at']); $this->setUpdate_by($d['update_by']); $this->entity =$data; return $this; } } else { return $this->phone_number; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPhoneNumber()\n\t{\n\t\treturn $this->getIfSet('number', $this->data->phone);\n\t}", "public function getPhoneNumber()\n {\n return $this->phone_number;\n }", "public function getPhoneNumber()\n\t{\n\t\treturn $this->phone_number;\n\t}", "public function getPhoneNumber()\n ...
[ "0.83255994", "0.8160519", "0.81584746", "0.80687827", "0.8044644", "0.803766", "0.79523766", "0.7947578", "0.7947578", "0.7947578", "0.792743", "0.79130435", "0.7868342", "0.78364027", "0.78049576", "0.77411324", "0.77348197", "0.77268803", "0.7711464", "0.7707934", "0.76550...
0.6744765
96
Get the value of bp
public function getBp($bp=null) { if ($bp != null && is_array($this->entity) && count($this->entity)!=0) { $table_name = strtolower(get_class($this)); $query = "SELECT * FROM $table_name WHERE bp = ?"; $req = Manager::bdd()->prepare($query); $req->execute([$bp]); $data = ""; if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) { $d=$data[0]; $this->setId_entity($d['id_entity']); $this->setLabel($d['label']); $this->setDomaine($d['domaine']); $this->setEmail($d['email']); $this->setPhone_number($d['phone_number']); $this->setBp($d['bp']); $this->setLocalisation($d['localisation']); $this->setVille($d['ville']); $this->setUniqueId($d['uniqueId']); $this->setCreated_at($d['created_at']); $this->setCreated_by($d['created_by']); $this->setUpdate_at($d['update_at']); $this->setUpdate_by($d['update_by']); $this->entity =$data; return $this; } } else { return $this->bp; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFbp() {\n\t\treturn $this->container['fbp'];\n\t}", "public function get_value()\n {\n }", "public function get_value()\n {\n }", "public function getBb()\n {\n return $this->bb;\n }", "public function getValue()\n {\n return $this->segm...
[ "0.6406004", "0.6397813", "0.6397813", "0.6320455", "0.630909", "0.6297837", "0.6241938", "0.6188895", "0.6181492", "0.6168248", "0.6149371", "0.61411524", "0.6139749", "0.61123574", "0.6111547", "0.61073637", "0.6101271", "0.60961646", "0.6081398", "0.6075718", "0.6066218", ...
0.6202628
7
Get the value of localisation
public function getLocalisation($localisation=null) { if ($localisation != null && is_array($this->entity) && count($this->entity)!=0) { $table_name = strtolower(get_class($this)); $query = "SELECT * FROM $table_name WHERE localisation = ?"; $req = Manager::bdd()->prepare($query); $req->execute([$localisation]); $data = ""; if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) { $d=$data[0]; $this->setId_entity($d['id_entity']); $this->setLabel($d['label']); $this->setDomaine($d['domaine']); $this->setEmail($d['email']); $this->setPhone_number($d['phone_number']); $this->setBp($d['bp']); $this->setLocalisation($d['localisation']); $this->setVille($d['ville']); $this->setUniqueId($d['uniqueId']); $this->setCreated_at($d['created_at']); $this->setCreated_by($d['created_by']); $this->setUpdate_at($d['update_at']); $this->setUpdate_by($d['update_by']); $this->entity =$data; return $this; } } else { return $this->localisation; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getLocalisation() {\r\n\t\treturn $this->_localisation;\r\n\t}", "public static function l() {\n\t\treturn self::getInstance()->getLocale();\n\t}", "public function getLocale() {}", "public function getLocale();", "public function getLocale();", "static function get()\n\t{\n\t\treturn self::$lan...
[ "0.78921235", "0.740299", "0.73588103", "0.7298867", "0.7298867", "0.7245559", "0.7236888", "0.7236888", "0.7236888", "0.7216044", "0.7196216", "0.7163171", "0.71266705", "0.7114586", "0.7070484", "0.70369023", "0.70309186", "0.70023715", "0.69926345", "0.69707215", "0.696979...
0.0
-1
Get the value of ville
public function getVille($ville=null) { if ($ville != null && is_array($this->entity) && count($this->entity)!=0) { $table_name = strtolower(get_class($this)); $query = "SELECT * FROM $table_name WHERE ville = ?"; $req = Manager::bdd()->prepare($query); $req->execute([$ville]); $data = ""; if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) { $d=$data[0]; $this->setId_entity($d['id_entity']); $this->setLabel($d['label']); $this->setDomaine($d['domaine']); $this->setEmail($d['email']); $this->setPhone_number($d['phone_number']); $this->setBp($d['bp']); $this->setLocalisation($d['localisation']); $this->setVille($d['ville']); $this->setUniqueId($d['uniqueId']); $this->setCreated_at($d['created_at']); $this->setCreated_by($d['created_by']); $this->setUpdate_at($d['update_at']); $this->setUpdate_by($d['update_by']); $this->entity =$data; return $this; } } else { return $this->ville; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getVille()\n {\n return $this->ville;\n }", "public function getVille_idville()\r\n {\r\n return $this->ville_idville;\r\n }", "public function getVille(): ?string\n {\n return $this->ville;\n }", "public function getVille():?string\n {\n retur...
[ "0.7532276", "0.6676739", "0.6644004", "0.66303843", "0.6527812", "0.6513797", "0.65069413", "0.64004326", "0.64004326", "0.6396193", "0.63294667", "0.6329131", "0.6322757", "0.62430537", "0.61206555", "0.61159116", "0.61159116", "0.60736513", "0.6067691", "0.60134226", "0.59...
0.5700705
55
Get the value of uniqueId
public function getUniqueId($uniqueId=null) { if ($uniqueId != null && is_array($this->entity) && count($this->entity)!=0) { $table_name = strtolower(get_class($this)); $query = "SELECT * FROM $table_name WHERE uniqueId = ?"; $req = Manager::bdd()->prepare($query); $req->execute([$uniqueId]); $data = ""; if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) { $d=$data[0]; $this->setId_entity($d['id_entity']); $this->setLabel($d['label']); $this->setDomaine($d['domaine']); $this->setEmail($d['email']); $this->setPhone_number($d['phone_number']); $this->setBp($d['bp']); $this->setLocalisation($d['localisation']); $this->setVille($d['ville']); $this->setUniqueId($d['uniqueId']); $this->setCreated_at($d['created_at']); $this->setCreated_by($d['created_by']); $this->setUpdate_at($d['update_at']); $this->setUpdate_by($d['update_by']); $this->entity =$data; return $this; } } else { return $this->uniqueId; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function uniqueId(): string\n {\n return strval($this->user->id);\n }", "private static function get_unique_id(){\n\t\tself::$u_id+=1;\n\t\treturn (string) self::$u_id;\n\t}", "function getUniqueID() {\r\n\t\treturn $this->uniqueID;\r\n\t}", "public function getUniqueID()\n {\n ...
[ "0.77756846", "0.77335685", "0.77009636", "0.7700093", "0.7700093", "0.7626824", "0.7515115", "0.74629915", "0.74566156", "0.74561846", "0.74550617", "0.74550617", "0.74550617", "0.74550617", "0.7375319", "0.7326907", "0.7326907", "0.7326907", "0.7326907", "0.7326907", "0.732...
0.0
-1
Get the value of created_at
public function getCreated_at($created_at=null) { if ($created_at != null && is_array($this->entity) && count($this->entity)!=0) { $table_name = strtolower(get_class($this)); $query = "SELECT * FROM $table_name WHERE created_at = ?"; $req = Manager::bdd()->prepare($query); $req->execute([$created_at]); $data = ""; if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) { $d=$data[0]; $this->setId_entity($d['id_entity']); $this->setLabel($d['label']); $this->setDomaine($d['domaine']); $this->setEmail($d['email']); $this->setPhone_number($d['phone_number']); $this->setBp($d['bp']); $this->setLocalisation($d['localisation']); $this->setVille($d['ville']); $this->setUniqueId($d['uniqueId']); $this->setCreated_at($d['created_at']); $this->setCreated_by($d['created_by']); $this->setUpdate_at($d['update_at']); $this->setUpdate_by($d['update_by']); $this->entity =$data; return $this; } } else { return $this->created_at; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function created_at()\n {\n return $this->object->created_at;\n }", "public function created_at()\n\t{\n\t\treturn $this->date($this->created_at);\n\t}", "public function created_at()\n\t{\n\t\treturn $this->date($this->created_at);\n\t}", "public function created_at()\n\t{\n\t\treturn $t...
[ "0.84239244", "0.83728194", "0.83728194", "0.83728194", "0.8368174", "0.83309937", "0.83309937", "0.830069", "0.82668924", "0.82668924", "0.82668924", "0.82668924", "0.8242541", "0.82350904", "0.8179052", "0.8131711", "0.81085336", "0.81085336", "0.81085336", "0.81085336", "0...
0.0
-1
Get the value of created_by
public function getCreated_by($created_by=null) { if ($created_by != null && is_array($this->entity) && count($this->entity)!=0) { $table_name = strtolower(get_class($this)); $query = "SELECT * FROM $table_name WHERE created_by = ?"; $req = Manager::bdd()->prepare($query); $req->execute([$created_by]); $data = ""; if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) { $d=$data[0]; $this->setId_entity($d['id_entity']); $this->setLabel($d['label']); $this->setDomaine($d['domaine']); $this->setEmail($d['email']); $this->setPhone_number($d['phone_number']); $this->setBp($d['bp']); $this->setLocalisation($d['localisation']); $this->setVille($d['ville']); $this->setUniqueId($d['uniqueId']); $this->setCreated_at($d['created_at']); $this->setCreated_by($d['created_by']); $this->setUpdate_at($d['update_at']); $this->setUpdate_by($d['update_by']); $this->entity =$data; return $this; } } else { return $this->created_by; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_created_by()\n\t{\n\t\treturn $this->created_by;\n\t}", "public function getCreatedby() {\n\n return $this->u_createdby;\n\n }", "public function getCreatedby()\n {\n return ($this->m_Createdby);\n }", "protected static function created_by(): mixed\n\t{\n\t\treturn self::...
[ "0.8707473", "0.8621211", "0.8538133", "0.8527372", "0.8424627", "0.8288729", "0.8288729", "0.8288729", "0.8288729", "0.8288729", "0.8288729", "0.8246186", "0.8233586", "0.8174109", "0.81643414", "0.80780655", "0.80780655", "0.80780655", "0.80780655", "0.79217494", "0.7921749...
0.6951101
60
Get the value of update_at
public function getUpdate_at($update_at=null) { if ($update_at != null && is_array($this->entity) && count($this->entity)!=0) { $table_name = strtolower(get_class($this)); $query = "SELECT * FROM $table_name WHERE update_at = ?"; $req = Manager::bdd()->prepare($query); $req->execute([$update_at]); $data = ""; if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) { $d=$data[0]; $this->setId_entity($d['id_entity']); $this->setLabel($d['label']); $this->setDomaine($d['domaine']); $this->setEmail($d['email']); $this->setPhone_number($d['phone_number']); $this->setBp($d['bp']); $this->setLocalisation($d['localisation']); $this->setVille($d['ville']); $this->setUniqueId($d['uniqueId']); $this->setCreated_at($d['created_at']); $this->setCreated_by($d['created_by']); $this->setUpdate_at($d['update_at']); $this->setUpdate_by($d['update_by']); $this->entity =$data; return $this; } } else { return $this->update_at; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUpdateAt()\n {\n return $this->update_at;\n }", "public function getUpdateAt()\n {\n return $this->update_at;\n }", "protected static function updated_at(): mixed\n\t{\n\t\treturn self::$query->updated_at;\n\t}", "protected static function updated_at(): mixed\n\t{...
[ "0.8453704", "0.8453704", "0.77394766", "0.77394766", "0.76883537", "0.76883537", "0.76883537", "0.76812077", "0.76812077", "0.76812077", "0.76812077", "0.75388783", "0.7520476", "0.7484129", "0.7461684", "0.7398533", "0.7395248", "0.7372907", "0.733286", "0.7331199", "0.7281...
0.0
-1
Get the value of update_by
public function getUpdate_by($update_by=null) { if ($update_by != null && is_array($this->entity) && count($this->entity)!=0) { $table_name = strtolower(get_class($this)); $query = "SELECT * FROM $table_name WHERE update_by = ?"; $req = Manager::bdd()->prepare($query); $req->execute([$update_by]); $data = ""; if ($data = $req->fetchAll(PDO::FETCH_ASSOC)) { $d=$data[0]; $this->setId_entity($d['id_entity']); $this->setLabel($d['label']); $this->setDomaine($d['domaine']); $this->setEmail($d['email']); $this->setPhone_number($d['phone_number']); $this->setBp($d['bp']); $this->setLocalisation($d['localisation']); $this->setVille($d['ville']); $this->setUniqueId($d['uniqueId']); $this->setCreated_at($d['created_at']); $this->setCreated_by($d['created_by']); $this->setUpdate_at($d['update_at']); $this->setUpdate_by($d['update_by']); $this->entity =$data; return $this; } } else { return $this->update_by; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function updated_by(): mixed\n\t{\n\t\treturn self::$query->updated_by;\n\t}", "public function _getUpdatedBy() {\n\t\treturn $this->_updatedBy;\n\t}", "public function getUpdateBy()\n {\n return $this->hasOne(User::className(), ['id' => 'updated_by']);\n }", "public function ge...
[ "0.76017934", "0.7185057", "0.6915996", "0.6906583", "0.6832415", "0.67833734", "0.67491704", "0.67469263", "0.6732468", "0.6560883", "0.6495261", "0.6495261", "0.6482217", "0.6460544", "0.6429531", "0.639596", "0.63852155", "0.63611335", "0.63258135", "0.6286657", "0.6286657...
0.714059
2
Set the value of id_entity
public function setId_entity($id_entity) { $this->id_entity = $id_entity; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setEntity( $entity )\n {\n\n $this->entity = $entity;\n $this->rowid = $entity->getId();\n \n }", "function SetId($value) { $this->id=$value; }", "public function setEntityId($entityId) {\n $this->entityId = $entityId;\n }", "public function setEntityId(?int $entityId);", "p...
[ "0.7381502", "0.72896516", "0.7132784", "0.7095683", "0.7038721", "0.69752806", "0.6887758", "0.68150157", "0.66694915", "0.6633416", "0.66080946", "0.65963644", "0.65950745", "0.65950745", "0.6573833", "0.6572237", "0.65217113", "0.650569", "0.649681", "0.6467035", "0.646026...
0.7674024
0
Set the value of label
public function setLabel($label) { $this->label = $label; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setLabel($value){\r\n\t\t$this->label = $value;\r\n\t}", "public function setLabel();", "public function setLabel() {\n }", "public function setLabel($newLabel);", "public function setLabel($label);", "public function setLabel($label);", "public function setLabel($label);", "public functi...
[ "0.8885629", "0.852268", "0.82903594", "0.8090732", "0.80601186", "0.80601186", "0.80601186", "0.80601186", "0.7876703", "0.7811022", "0.7747417", "0.77465", "0.77465", "0.77465", "0.77327406", "0.76752704", "0.7671319", "0.7671319", "0.76139456", "0.7604223", "0.75869626", ...
0.66133654
45
Set the value of domaine
public function setDomaine($domaine) { $this->domaine = $domaine; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setNom($value)\n\t{\n\t\t$this -> _nom = $value;\n\t}", "public function setContenu(string $contenu): void\n {\n $this->contenu= $contenu;\n }", "function setDetalle($sdetalle = '')\n {\n $this->sdetalle = $sdetalle;\n }", "public function __set($nome, $valor) {\n ...
[ "0.670152", "0.64344215", "0.6172033", "0.614307", "0.6112591", "0.60995513", "0.60806483", "0.60806483", "0.60339695", "0.60312116", "0.59851235", "0.59814155", "0.59125835", "0.5906952", "0.5904508", "0.5878773", "0.58719325", "0.5850933", "0.5847991", "0.5809604", "0.57987...
0.7207015
0