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
Determine if the user is authorized to make this request.
public function authorize() { return Auth::user()->hasAnyRole(['kuchar', 'manager']); }
{ "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 [ "menu-validity-start" => "required", "menu-validity-end" => "required", "menu-name" => "required", "menu-soup" => ["required", Rule::notIn([-1])], "menu-meal-1" => ["required", Rule::notIn([-1])] ]; }
{ "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 the error messages for the defined validation rules.
public function messages() { return [ 'menu-validity-start.required' => 'Začátek platnosti menu musí být uveden.', 'menu-validity-end.required' => 'Konec platnosti menu musí být uveden.', 'menu-name.required' => 'Název menu musí být uveden.', 'menu-soup.required' => 'Polévka musí být vybrána.', 'menu-meal-1.required' => 'Alespoň jedno jídlo musí být vybráno.', 'menu-soup.not_in' => "Polévka musí být vybrána.", 'menu-meal-1.not_in' => 'Jídlo 1 musí být vybráno.' ]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValidationMessages();", "public function errorMessages()\n {\n return [\n self::RULE_REQUIRED => 'This field is required',\n self::RULE_EMAIL => 'This field must be a valid email address',\n self::RULE_MIN => 'Min length of this field must be {min}',\...
[ "0.82462656", "0.8072122", "0.79855305", "0.7869173", "0.7831077", "0.7776483", "0.7776483", "0.7589036", "0.75582355", "0.75402904", "0.75402904", "0.7525044", "0.75227535", "0.7516879", "0.7475822", "0.7457696", "0.7425241", "0.74180096", "0.7405273", "0.7405273", "0.740048...
0.0
-1
Add course/group container info
function addContainerInfo($a_obj_id) { $refs = $this->getReadableRefIds($a_obj_id); $ref_id = current($refs); if (count($refs) == 1 && $ref_id > 0) { $tree = $this->tree; $f = $this->ui->factory(); $r = $this->ui->renderer(); //parent course or group title $cont_ref_id = $tree->checkForParentType($ref_id, 'grp'); if ($cont_ref_id == 0) { $cont_ref_id = $tree->checkForParentType($ref_id, 'crs'); } if ($cont_ref_id > 0) { $type = ilObject::_lookupType($cont_ref_id, true); $href = ilLink::_getStaticLink($cont_ref_id); $parent_title = ilObject::_lookupTitle(ilObject::_lookupObjectId($cont_ref_id)); $this->addInfoProperty($this->lng->txt("obj_" . $type), $r->render($f->button()->shy($parent_title, $href))); $this->addListItemProperty($this->lng->txt("obj_" . $type), $r->render($f->button()->shy($parent_title, $href))); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function processContainer()\n {\n $class = \"container\";\n if ($this->hasFluid()) $class .= \"-fluid\";\n $this->add($this->createWrapper('div', ['class' => $class], $this->stringifyHeader() . $this->stringifyCollapse()));\n }", "public function add_course_view(){\n\n\t\t$heade...
[ "0.57198757", "0.56334317", "0.5376082", "0.5373823", "0.53295565", "0.52709484", "0.5211322", "0.5112306", "0.5111507", "0.5109121", "0.50899845", "0.5083939", "0.5033106", "0.50281346", "0.5005085", "0.4993219", "0.49897462", "0.49813628", "0.4975462", "0.49718344", "0.4962...
0.60336614
0
Add list item property
function addListItemProperty($a_txt, $a_val) { $this->list_properties[] = array("txt" => $a_txt, "val" => $a_val); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createProperty()\n {\n $prop = new LiquibaseProperty();\n $this->properties[] = $prop;\n\n return $prop;\n }", "public function addProperty(Property $property)\n {\n $this->properties[(string)$property->getFqsen()] = $property;\n }", "public function addP...
[ "0.5936487", "0.5896852", "0.5895679", "0.5698185", "0.56643826", "0.56640047", "0.56227416", "0.5620114", "0.5614472", "0.5489306", "0.54886883", "0.54606956", "0.5449175", "0.54440165", "0.54290044", "0.5401295", "0.5377366", "0.5342354", "0.52892697", "0.5271184", "0.52328...
0.7517841
0
Collect properties and actions
function collectPropertiesAndActions() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function assignProperties() {\n\t\t$hash = $this->__action;\n\t\tforeach ($hash as $key => $value) {\n\t\t\tif (!isset($value)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (preg_match('/^_.*/i', $key)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t$this->assignProperty($key, $value);\n\t\t}\n\t}", "public function _getPr...
[ "0.65198797", "0.6388199", "0.638078", "0.62434894", "0.618067", "0.6049998", "0.6049998", "0.6049998", "0.6049375", "0.60099375", "0.59695625", "0.59150213", "0.5841149", "0.58391273", "0.58391273", "0.58391273", "0.58391273", "0.58391273", "0.58391273", "0.5828223", "0.5791...
0.90468657
0
Collect standard properties and actions
function collectStandardPropertiesAndActions() { $cat_info = $this->getCatInfo(); //we can move this to the factory. if($cat_info['editable'] and !$this->appointment['event']->isAutoGenerated()) { $this->ctrl->clearParametersByClass('ilcalendarappointmentgui'); // $this->ctrl->setParameterByClass('ilcalendarappointmentgui','seed', $this->getSeed()->get(IL_CAL_DATE)); $this->ctrl->setParameterByClass('ilcalendarappointmentgui','app_id',$this->appointment['event']->getEntryId()); $this->ctrl->setParameterByClass('ilcalendarappointmentgui','dt',$this->appointment['dstart']); $this->addAction($this->lng->txt("edit"), $this->ctrl->getLinkTargetByClass(array('ilcalendarappointmentgui'), 'askEdit')); $this->ctrl->clearParametersByClass('ilcalendarappointmentgui'); // $this->ctrl->setParameterByClass('ilcalendarappointmentgui','seed',$this->getSeed()->get(IL_CAL_DATE)); $this->ctrl->setParameterByClass('ilcalendarappointmentgui','app_id',$this->appointment['event']->getEntryId()); $this->ctrl->setParameterByClass('ilcalendarappointmentgui','dt',$this->appointment['dstart']); $this->addAction($this->lng->txt("delete"), $this->ctrl->getLinkTargetByClass(array('ilcalendarappointmentgui'), 'askDelete')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function collectPropertiesAndActions()\n\t{\n\n\t}", "public function _getProperties() {}", "function properties()\n {\n }", "function assignProperties() {\n\t\t$hash = $this->__action;\n\t\tforeach ($hash as $key => $value) {\n\t\t\tif (!isset($value)) {\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif...
[ "0.8810592", "0.6445596", "0.644509", "0.6407183", "0.6366273", "0.62556255", "0.6227583", "0.6152637", "0.6152637", "0.6152637", "0.6152103", "0.61252975", "0.6114845", "0.6023548", "0.6023548", "0.6023548", "0.6023548", "0.6023548", "0.6023548", "0.5967956", "0.5967956", ...
0.70133436
1
Get readable ref ids
function getReadableRefIds($a_obj_id) { if (!isset($this->readable_ref_ids[$a_obj_id])) { $ref_ids = array(); foreach (ilObject::_getAllReferences($a_obj_id) as $ref_id) { if ($this->access->checkAccess("read", "", $ref_id)) { $ref_ids[] = $ref_id; } } $this->readable_ref_ids[$a_obj_id] = $ref_ids; } return $this->readable_ref_ids[$a_obj_id]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getReferenceIdsList(){\n return $this->_get(2);\n }", "public function getReferences();", "public function getReferencesList(){\n return $this->_get(1);\n }", "public function getIds();", "public function getIds();", "public function getDefinedObjectIds() {}", "public func...
[ "0.7446031", "0.6592448", "0.65029806", "0.6434908", "0.6434908", "0.64225173", "0.64218223", "0.64218223", "0.634521", "0.63354915", "0.6313947", "0.6222172", "0.621776", "0.6198486", "0.61848336", "0.618409", "0.61287004", "0.6108813", "0.6063347", "0.60613656", "0.60613656...
0.7715353
0
Get (linked if possible) user name
function getUserName($a_user_id, $a_force_name = false) { $type = ilObject::_lookupType((int) $_GET["ref_id"], true); $ctrl_path = array(); if ($type == "crs") { $ctrl_path[] = "ilobjcoursegui"; } if ($type == "grp") { $ctrl_path[] = "ilobjgroupgui"; } if (strtolower($_GET["baseClass"]) == "ilpersonaldesktopgui") { $ctrl_path[] = "ilpersonaldesktopgui"; } $ctrl_path[] = "ilCalendarPresentationGUI"; $ctrl_path[] = "ilpublicuserprofilegui"; return ilUserUtil::getNamePresentation( $a_user_id, false, true, $this->ctrl->getParentReturn($this), $a_force_name, false, true, false, $ctrl_path); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_user_name() {\n return $this->call('get_user_name', array(), TRUE);\n }", "public function getExternalUserName();", "public function getUserOrProperName()\n {\n $person = $this->getPerson();\n if (strtolower($person->getEmail()) != strtolower($this->username)) {\n r...
[ "0.78639", "0.78243506", "0.78040504", "0.7700495", "0.7644855", "0.7639059", "0.76065373", "0.7542634", "0.74925655", "0.7470896", "0.7470896", "0.7470896", "0.7470896", "0.7470896", "0.74382156", "0.74365723", "0.7368542", "0.73565876", "0.7355273", "0.73503554", "0.7341516...
0.0
-1
Download files from an appointment ( Modals )
function downloadFiles() { $appointment = $this->appointment; //calendar in the sidebar (marginal calendar) if(empty($appointment)) { $entry_id = (int)$_GET['app_id']; $entry = new ilCalendarEntry($entry_id); //if the entry exists if($entry->getStart()) { $appointment = array( "event" => $entry, "dstart" => $entry->getStart(), "dend" => $entry->getEnd(), "fullday" => $entry->isFullday() ); } else { ilUtil::sendFailure($this->lng->txt("obj_not_found"), true); $this->ctrl->returnToParent($this); } } include_once './Services/Calendar/classes/BackgroundTasks/class.ilDownloadFilesBackgroundTask.php'; $download_job = new ilDownloadFilesBackgroundTask($this->user->getId()); $download_job->setBucketTitle($this->lng->txt("cal_calendar_download")." ".$appointment['event']->getTitle()); $download_job->setEvents(array($appointment)); $download_job->run(); $this->ctrl->returnToParent($this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function downloadFile();", "public function download()\n\t{\n\t\tR::selectDatabase('oxid');\n\t\t$files = $this->getFilesByName(Flight::request()->query->file);\n\t\tif (empty($files)) $this->redirect('/');\n\t\t$file = reset($files);\n\t\t$dwnloadDir = substr($file['OXSTOREHASH'], 0, 2);\n\t\t$dwnloadFil...
[ "0.6597378", "0.65054774", "0.64853954", "0.6481185", "0.64392763", "0.6373567", "0.63659817", "0.6301281", "0.6253963", "0.6248563", "0.6192465", "0.61775964", "0.6139654", "0.6127384", "0.60666096", "0.6053498", "0.60405105", "0.60267556", "0.6007248", "0.59849405", "0.5981...
0.7904505
0
Clear object properties when $this is destroyed.
public function __destruct() { $this->data = null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __destruct()\n {\n $vars = get_object_vars($this);\n if (is_array($vars)) {\n foreach ($vars as $key => $val) {\n $this->$key = null;\n }\n }\n\n parent::__destruct();\n }", "public function clear() {\n\t\t$vars = get_object_v...
[ "0.77053636", "0.7522202", "0.733787", "0.72088313", "0.72088313", "0.7208302", "0.71409816", "0.7081025", "0.7078832", "0.7072388", "0.7037601", "0.7029224", "0.701855", "0.697838", "0.68256205", "0.68089914", "0.68046916", "0.67891526", "0.67224145", "0.671505", "0.6706799"...
0.6508619
32
Create an object to handle response from api.
public static function fromCommand(OperationCommand $command) { $data = @unserialize( (string) $command ->getResponse() ->getBody() ); if (is_null($data)) { $data = array(); } return new self( (array) $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function parse_api_response();", "public function get_response_object()\n {\n }", "static function parseResponse(string $data): ApiResponse\n {\n $obj = new static;\n $obj->setData($data);\n return $obj;\n }", "public function createResponse()\n {\n ...
[ "0.7185769", "0.71777177", "0.7118141", "0.7078582", "0.69274795", "0.68896157", "0.6834795", "0.6829799", "0.67860204", "0.6769813", "0.67430514", "0.66455287", "0.6639601", "0.65706694", "0.6562243", "0.65071595", "0.6505292", "0.6487715", "0.6487715", "0.6480839", "0.64800...
0.0
-1
Pass data from api response.
public function __construct(array $data) { $this->data = $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function parse_api_response();", "public function getResponseData();", "public function fromAPI($data);", "public function prepareResponse();", "private function response($data) {\n\t\treturn json_decode($data);\n\t}", "public function getResponse($response) {\r\n\r\n\r\n }", "function api_...
[ "0.6951925", "0.6871588", "0.66494673", "0.6442426", "0.627666", "0.6251916", "0.6206425", "0.6192471", "0.6153437", "0.6153437", "0.6153437", "0.6153437", "0.6153437", "0.61521286", "0.6149554", "0.61207575", "0.6069496", "0.6033674", "0.6033674", "0.6015838", "0.60068434", ...
0.0
-1
Get the current page.
public function getCurrentPage() { return isset($this['info']['page']) ? $this['info']['page'] : 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCurrentPage()\r\n\t{\r\n\t\treturn $this->current_page;\r\n\t}", "public function getCurrentPage();", "public function getCurrentPage();", "public function getCurrentPage();", "public function getCurrentPage()\n {\n return $this->_currentpage;\n }", "function getCurrentPag...
[ "0.8847023", "0.8765536", "0.8765536", "0.8765536", "0.8763776", "0.86920536", "0.8654788", "0.85925245", "0.85766447", "0.85546815", "0.8550184", "0.85201836", "0.846496", "0.8435532", "0.84172547", "0.83792293", "0.8376027", "0.83635056", "0.8354244", "0.82469374", "0.80855...
0.8528796
11
Get the total results count.
public function getTotalResults() { return isset($this['info']['results']) ? (int) $this['info']['results'] : 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTotalResults() : int\n {\n return $this->totalResults;\n }", "public function totalResults()\n {\n\t\treturn (int) $this->totalResultsReturned;\n }", "public function getTotalResults(): int\n {\n return $this->totalResults;\n }", "public function getTotalNum...
[ "0.8893402", "0.8884857", "0.8872842", "0.87649435", "0.8741128", "0.8674973", "0.86277914", "0.8570707", "0.8570707", "0.8527656", "0.847599", "0.8427657", "0.8361371", "0.83166695", "0.82680714", "0.8250403", "0.8212007", "0.82115483", "0.81814116", "0.81425965", "0.8130029...
0.8944239
0
Get the error message from the response object.
public function getError() { return isset($this['error']) ? $this['error'] : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getError()\n {\n\n if (!$this->getResponse()) {\n return null;\n }\n\n if ($this->isOK()) {\n return null;\n }\n\n $message = ($this->getResponse()->getStatusCode() ? $this->getResponse()->getStatusCode() . ' ' : '') .\n ...
[ "0.81947714", "0.73576534", "0.73277676", "0.7265922", "0.7264803", "0.7197107", "0.7172981", "0.71594256", "0.71381795", "0.71135587", "0.7089961", "0.70775896", "0.70765257", "0.7069952", "0.70403314", "0.7039101", "0.7039101", "0.7039101", "0.7039101", "0.7039101", "0.7039...
0.6456764
89
Check if a index from the data array exists.
public function offsetExists($key) { return array_key_exists($key, $this->data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function offsetExists($index);", "public function offsetExists($index)\n {\n }", "public function offsetExists($index) : bool\n {\n return isset($this->samples[$index]);\n }", "public function offsetExists($key){\n return isset($this->data[$key]);\n }", "public function ...
[ "0.7559149", "0.73411554", "0.72237885", "0.72195643", "0.72074515", "0.7186613", "0.7183279", "0.7183202", "0.7175527", "0.71543354", "0.71534973", "0.7130766", "0.71259654", "0.7119464", "0.7119464", "0.71002203", "0.70994794", "0.7088504", "0.70761746", "0.7061529", "0.705...
0.7182617
9
Get an index from the data array.
public function offsetGet($key) { return (array_key_exists($key, $this->data)) ? (array) $this->data[$key] : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIdx()\n {\n return $this->get(self::_IDX);\n }", "function getIndex() ;", "public static function getIndex(): int\n {\n return static::$index;\n }", "abstract protected function getIndex();", "public function offsetGet($index);", "final public function getArra...
[ "0.70701844", "0.6743048", "0.65265036", "0.63313276", "0.6261514", "0.6223711", "0.6153173", "0.6127401", "0.6096573", "0.60831356", "0.6068003", "0.6049266", "0.5988996", "0.5982205", "0.5982205", "0.5982205", "0.59726965", "0.5959033", "0.5950047", "0.59311485", "0.5928332...
0.0
-1
Unset an index in the data array.
public function offsetUnset($key) { if (array_key_exists($key, $this->data)) { unset($this->data[$key]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function offsetUnset($index);", "public function offsetUnset($index)\n {\n }", "public function offsetUnset($index):void {\n\tunset($this->_elArray[$index]);\n\t$this->_elArray = array_values($this->_elArray);\n}", "public function unsetItemArray($index)\n {\n unset($this->itemArray[$...
[ "0.8245711", "0.80493176", "0.77757126", "0.7304811", "0.71038955", "0.7077767", "0.7077767", "0.70621645", "0.70621645", "0.7022848", "0.7022848", "0.70225894", "0.70225894", "0.70225894", "0.7007129", "0.6998982", "0.69857854", "0.69857854", "0.69629085", "0.6962833", "0.69...
0.7037412
9
Set value to an index in the data array.
public function offsetSet($key, $value) { $this->data[$key] = $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set(int $index, $value);", "public function offsetSet($index, $newval);", "public function set($index, $value)\n {\n $value = $this->cube($value);\n parent::set($index, $value);\n }", "#[\\ReturnTypeWillChange]\n public function offsetSet($index, $value)\n {\n }",...
[ "0.78856045", "0.7456961", "0.73021066", "0.7246528", "0.716867", "0.7123965", "0.7079868", "0.7055483", "0.6742065", "0.67026186", "0.6636163", "0.66285694", "0.662837", "0.6597968", "0.6587619", "0.65538555", "0.65538555", "0.6544865", "0.6544865", "0.65380365", "0.64611983...
0.67364246
10
Setter for the request response data.
public function setResult($result) { $this->result = $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setResponse($data)\n {\n $this->data = $data;\n return $this;\n }", "public function setResponse() {\n }", "public function setData( ) {\r\n\t\t\tself::callEvent('response.setData', $this, func_get_args());\r\n\t\t}", "public function setResponseCustomData($value)\n ...
[ "0.7057189", "0.6906759", "0.672676", "0.670948", "0.66523653", "0.6644643", "0.64952546", "0.64920646", "0.64062196", "0.64062196", "0.64062196", "0.64062196", "0.64062196", "0.6326301", "0.6245579", "0.620724", "0.6196949", "0.6165999", "0.6130629", "0.6117045", "0.61064154...
0.0
-1
Getter for the request response data.
public function getResult() { return $this->result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getResponseData()\n {\n return $this->responseData;\n }", "public function getResponseData()\n {\n if($this->getHttpStatusCode() === 200){\n try{\n $resp = $this->getResponse();\n if(isset($resp->data)){\n $this->r...
[ "0.83580416", "0.78542835", "0.78058815", "0.78058815", "0.78058815", "0.78058815", "0.78058815", "0.7741458", "0.76655674", "0.7561207", "0.746805", "0.7322797", "0.72867405", "0.72804654", "0.72486496", "0.72169244", "0.71974903", "0.71782905", "0.71314627", "0.7124275", "0...
0.0
-1
Setter for the error message of the request.
public function setMessage($message) { $this->message = $message; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setErrorMessage($message)\n {\n $this->message = $message;\n }", "public static function setError($message)\n {\n self::put(\"error\", $message);\n }", "public function setErrorMessage($var)\n {\n GPBUtil::checkString($var, True);\n $this->error_messag...
[ "0.70196766", "0.68773913", "0.6723925", "0.6573697", "0.6528886", "0.64550316", "0.64394414", "0.64194375", "0.641526", "0.63873845", "0.6387179", "0.6356192", "0.6323535", "0.63085884", "0.6308522", "0.62914616", "0.62890977", "0.62883675", "0.6284402", "0.6244223", "0.6236...
0.0
-1
Getter for the error message of the request.
public function getMessage() { return $this->message; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_error_message() {\n\t\treturn $this->error_message;\n\t}", "public function getMessage()\n {\n return $this->_error;\n }", "public function getErrorMessage()\n {\n return $this->error_message;\n }", "function get_error_message() {\n return $this->error_msg;\...
[ "0.8135691", "0.8099314", "0.79699486", "0.7960823", "0.79389495", "0.7930202", "0.7919277", "0.7837841", "0.7837841", "0.78227603", "0.77868533", "0.77868533", "0.77868533", "0.77868533", "0.77868533", "0.77868533", "0.77868533", "0.777723", "0.77749425", "0.77377737", "0.76...
0.0
-1
Getter for the request response as JSON.
public function getJsonResult($assoc = false) { return json_decode($this->result, $assoc); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getJsonResponse() {\n return \\Lib\\Format::forge($this->_response)->to_json();\n }", "public function json() {\n return json_encode($this->response);\n }", "private function jsonResponse() {\n return json_format($this->response, $this->pretty);\n }", "public fun...
[ "0.84805304", "0.8468048", "0.84634763", "0.82887495", "0.8213227", "0.82001394", "0.8115699", "0.791851", "0.7824767", "0.7765755", "0.7735122", "0.75751626", "0.75422025", "0.75387865", "0.7479465", "0.74781424", "0.744064", "0.74295664", "0.7382529", "0.73624605", "0.73566...
0.0
-1
Setter for the request response headers.
public function setHeaders($headers) { $this->headers = $headers; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setResponseHeaders($headers)\n { \n // parse the given headers. \n $headers = $this->parseResponseHeaders($headers);\n \n // lowercase all keys in the array.\n $headers = Arrays::normalize($headers);\n if (is_array($this->responseHeaders)) {\n ...
[ "0.7077322", "0.6806114", "0.6771351", "0.6756909", "0.672327", "0.6702502", "0.67018044", "0.6695784", "0.6681595", "0.6608086", "0.6590742", "0.6590528", "0.656844", "0.65461016", "0.65438455", "0.65194446", "0.6497636", "0.6470956", "0.64410096", "0.6436197", "0.64017344",...
0.57106644
97
Returns the http request response code.
public function getCode() { $matches = array(); if (isset($this->headers) && isset($this->headers[0])) preg_match('|HTTP/\d\.\d\s+(\d+)\s+.*|', $this->headers[0], $matches); return isset($matches[1]) ? (int)$matches[1] : 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getResponseHTTPCode()\n {\n return $this->httpCode;\n }", "public function getResponseCode();", "public function getResponseCode();", "function http_headers_get_response_code() {\n\t\treturn $this->http_response_code;\n\t}", "function get_http_response_code()\n\t{\n\t\t//最后一个收到...
[ "0.83842814", "0.83313215", "0.83313215", "0.8315438", "0.8268095", "0.8263525", "0.822558", "0.81907964", "0.8146212", "0.8117727", "0.81101686", "0.8103304", "0.8071433", "0.80207676", "0.80026793", "0.796544", "0.7956017", "0.7929202", "0.7928828", "0.7919654", "0.790013",...
0.76652706
55
Returns the raw http request response status string.
public function getRawStatus() { return (isset($this->headers) && isset($this->headers[0])) ? $this->headers[0] : ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getStatus() {\n\t\treturn http_response_code();\n\t}", "protected function httpStatusLine()\r\n {\r\n return sprintf('HTTP/%s %s', $this->protocol_version, $this->status);\r\n }", "public function getResponseStatus()\n\t\t{\n\t\t\treturn $this->getHeader( \"status\" );\n\t\t...
[ "0.747659", "0.7338915", "0.72885865", "0.7229605", "0.72246015", "0.7130166", "0.7130166", "0.70649326", "0.7020941", "0.70006806", "0.6997883", "0.6986414", "0.69494677", "0.6917115", "0.6915716", "0.68983614", "0.6888168", "0.68615156", "0.68483233", "0.68483233", "0.68483...
0.7926654
0
Muestra ficheros dentro de directorio
public function showList($userId) { $ds = new DataSource(); $array = array($userId); $sql = sprintf("SELECT * from %s where %s=?", self::_TABLE, self::USER); $dirFileList = "<h2>Listado de Reservas</h2>"; foreach ($ds->fetchAll($sql, $array) as $row) { $id = $row['id']; $dirFileList .= "- " . $id . "&nbsp;<a href='" . $_SERVER['PHP_SELF'] . "?section=reserves&delete=".$id." '>Borrar</a>&nbsp;|&nbsp;<a href='" . $_SERVER['PHP_SELF'] . "?section=reserves&watch=$id'>Ver</a>|&nbsp;<a href='" . $_SERVER['PHP_SELF'] . "?section=reserves&edit=$id'>Editar</a><br>"; } $ds->close(); return $dirFileList; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function copiar ($desde, $hasta){ \n mkdir($hasta, 0777); \n $this_path = getcwd(); \n if(is_dir($desde)) { \n chdir($desde); \n $handle=opendir('.'); \n while(($file = readdir($handle))!==false){ \n if(($file != \".\") && ($file != \"..\")){ \n if(is...
[ "0.67081237", "0.6289419", "0.622388", "0.6188249", "0.6159224", "0.61251", "0.60876733", "0.6058366", "0.60258204", "0.60101086", "0.59935665", "0.5954322", "0.594558", "0.59088653", "0.5904281", "0.5892897", "0.58758783", "0.587188", "0.5796606", "0.5776349", "0.5773177", ...
0.0
-1
Loop through `users` table, and find the duplicated. Increment the number after the slug, to keep the first and lastname. The slug is the lookup column.
protected static function boot(){ parent::boot(); static::creating(function($model){ // Make a slug for the user ex: firstname.lastname.xx $slug = $maybe_slug = strtolower(str_slug($model->firstname) . '.' . str_slug($model->lastname)); $next = 2; while (User::where('slug', '=', $slug)->first()) { $slug = "{$maybe_slug}.{$next}"; $next++; } $model->slug = $slug; return true; }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isUserDuplicate(){\n\n\t\t$today = Carbon::today();\n\n\t\t$user = User::on('bk')\n\t\t\t\t\t->where('created_at', '>=', $today)\n\t\t\t\t\t->select('id')\n\t\t\t\t\t->get();\n\n\t\t$str1 = '( ';\n\t\t$str2 = '( ';\n\t\tforeach ($user as $key) {\n\t\t\t// $user_id_arr .= $key->id.\",\";\n\t\t\t$str...
[ "0.59821504", "0.55866885", "0.5552416", "0.5497419", "0.5417848", "0.5415143", "0.53913385", "0.53178173", "0.5302348", "0.52973294", "0.5213175", "0.52051747", "0.51948917", "0.51559395", "0.51239604", "0.50736296", "0.50525063", "0.5051309", "0.5042046", "0.50399995", "0.5...
0.4634077
68
Insted of ID, use the slug column for lookup
public function getRouteKeyName() { return 'slug'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function slugStrategy()\n {\n return 'id';\n }", "function getSlugFromId($id='') {\n\t\tif(!$id) return '';\n\t\t$result = $this->select('slug',\"`store_id` = '\".$this->store_id.\"' AND id = '$id'\");\n\t\tif($result) return $result[0]['slug'];\n\t\treturn '';\n\t}", "public function getSl...
[ "0.7202142", "0.71720445", "0.709589", "0.70832187", "0.6857748", "0.68518704", "0.68518704", "0.684782", "0.6822132", "0.6769565", "0.6769565", "0.6769565", "0.6769565", "0.6730011", "0.6719865", "0.6703005", "0.65604615", "0.6531188", "0.6528298", "0.6528233", "0.65169084",...
0.0
-1
A user has many posts
public function post(){ return $this->hasMany(Post::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function posts(){\n // get all the posts by this user\n return $this->hasMany('cms\\Post');\n }", "public function posts()\n {\n return $this->hasManyThrough(Post::class, User::class);\n }", "public function posts() {\n return $this->hasMany('App\\Post','user_id', 'i...
[ "0.8116754", "0.80539685", "0.7954885", "0.76771873", "0.75815684", "0.75721455", "0.75676996", "0.747593", "0.732506", "0.72226685", "0.7189527", "0.7095446", "0.706392", "0.70137566", "0.70118207", "0.6997965", "0.69483495", "0.69158614", "0.6900541", "0.6861167", "0.683222...
0.6641424
48
A user has many comments
public function comment(){ return $this->hasMany(Comment::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function comments() {\n return $this->hasMany(Comment::class); // this (User) has many instances of the Comment\n }", "public function comment()\n {\n return $this->hasMany('Modules\\Comment\\Model\\Comment','user_id');\n }", "public function comments(){\n return $this->has...
[ "0.77945316", "0.7709733", "0.7692938", "0.7630128", "0.761769", "0.7514656", "0.74429554", "0.7206785", "0.7193547", "0.7144631", "0.71420354", "0.71198976", "0.71171296", "0.71093804", "0.7096177", "0.70413965", "0.70413965", "0.70413965", "0.7040707", "0.7040707", "0.70407...
0.6748788
55
A user has many sign in IP's
public function ip(){ return $this->hasMany(Ip::class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function beLoginLinkIPList() {}", "public function isUserIPAddressAllowedAccess()\n\t{\n\t\ttry\n {\n $IpBin = new IpBin();\n return $IpBin->isUserIPAddressAllowedAccess($this->getSiteUser()->getId());\n }\n catch(\\Whoops\\Example\\Exception $e)\n {\n...
[ "0.62348485", "0.5848797", "0.57623976", "0.5744963", "0.5669535", "0.5661536", "0.55875164", "0.55772877", "0.552688", "0.55173653", "0.546303", "0.54510534", "0.5440554", "0.54095995", "0.5392626", "0.52679634", "0.5262802", "0.521243", "0.52095884", "0.51835513", "0.517007...
0.6326377
0
/ | | Default Home Controller | | | You may wish to use controllers instead of, or in addition to, Closure | based routes. That's great! Here is an example controller method to | get you started. To route to this controller, just add the route: |
public function index() { $roundNo = e(Input::get('round')); $id = e(Route::input('id')); if(strlen($roundNo) == 0) { $roundNo = e(Route::input('round')); if($roundNo == null) $roundNo = 1; } $round = Round::where('EventID', '=', $id)->where('RoundNumber', '=', $roundNo)->firstOrFail(); $roundsForEvent = Round::where('EventID', '=', $id)->orderBy('RoundNumber')->get(); $roundsForEventSelect = array(); foreach($roundsForEvent as $r) { $coursename = $r->course !== null ? $r->course->Name : '[deleted course]'; $roundsForEventSelect[$r->RoundNumber] = $r->RoundNumber . ': ' . $coursename; } $event = CyclingEvent::find($id); $results = DB::table('results') ->select(DB::raw('results.*, duration + timepenalty as TotalTime,divisions.DivisionID,divisions.DivisionName, teams.Name as TeamName,teams.Colour,concat(lower(countries.code), ".png")')) ->leftJoin('eventrider', function($join) { $join->on('results.ridername', '=', 'eventrider.ridername') ->on('results.eventid', '=', 'eventrider.eventid'); }) ->leftJoin('divisions', 'eventrider.divisionid', '=', 'divisions.divisionid') ->leftJoin('teamrider', function($join) { $join->on('results.ridername', '=', 'teamrider.ridername') ->on('results.eventid','=','teamrider.eventid'); }) ->leftJoin('teams', 'teamrider.teamid', '=', 'teams.teamid') ->leftJoin('profiledata', 'profiledata.fullname', '=', 'results.ridername') ->leftJoin('countries', 'countries.name', '=', 'profiledata.country') ->where('roundid', '=', $round->RoundID) ->orderByRaw('Duration + TimePenalty, AvSpeed desc') ->get(); return View::make('results', array('results' => $results, 'event' => $event, 'round' => $round, 'roundsForEvent' => $roundsForEventSelect)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function indexAction()\n\t{\n\t\t//echo 'Hello from the index action in the Home controller!';\n\t\t\n\t\t/*View::render('Home' . DS . 'index.php', [\n\t\t\t\"name\" => \"Laura\",\n\t\t\t\"colours\" => [\"red\", \"green\", \"blue\"]\n\t\t]);*/\n\t\t\n\t\t// View::renderTemplate('Home' . DS . 'index.html', [...
[ "0.7126961", "0.6884877", "0.6857406", "0.68264675", "0.68193334", "0.6802348", "0.6789021", "0.6751206", "0.6751206", "0.6747353", "0.67451143", "0.67434067", "0.67434067", "0.6735617", "0.67169195", "0.6705626", "0.66658235", "0.66505617", "0.664817", "0.664135", "0.6593809...
0.0
-1
echo "sono il costruttore: " . __CLASS__ . " " . __FUNCTION__ . '';
public function __construct() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toString()\n {\n return __CLASS__;\n }", "function getClassName(){\n echo __CLASS__ . \"<br><br>\"; \n }", "public function __toString()\r\n {\r\n return __CLASS__;\r\n }", "public function __toString()\r\n {\r\n return __CLASS__;\r\n }",...
[ "0.7157011", "0.7151732", "0.7116236", "0.7116236", "0.7085101", "0.7085101", "0.7085101", "0.7085101", "0.7085101", "0.7085101", "0.7085101", "0.7085101", "0.7085101", "0.7085101", "0.7085101", "0.7085101", "0.7085101", "0.7085101", "0.7085101", "0.7085101", "0.7085101", "...
0.0
-1
echo "sono il metodo tutti: " . __CLASS__ . " " . __FUNCTION__ . '';
public function tutti() { $utentiDao = new AutoreDao(); $res = $utentiDao->read(); $view = new ViewCore(); echo $view->render( 'gestione_utenti\tutti_gli_utenti.html', ['autori' => $res] ); //print_r($twig); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getClassName(){\n echo __CLASS__ . \"<br><br>\"; \n }", "function classname()\n\t\t{\n\t\t\techo \"</br>constructor with name of class \";\n\t\t\t\n\t\t}", "public function toString()\n {\n return __CLASS__;\n }", "public function __toString()\n\t{\n\t\treturn \"This is ...
[ "0.7082097", "0.6870194", "0.67867225", "0.67241275", "0.6666639", "0.6665208", "0.6636922", "0.66219294", "0.66219294", "0.65779114", "0.65779114", "0.65779114", "0.65779114", "0.65779114", "0.65779114", "0.65779114", "0.65779114", "0.65779114", "0.65779114", "0.65779114", "...
0.0
-1
Run the database seeds.
public function run() { factory(App\Business::class, 25)->create()->each(function ($u) { $faker = Faker\Factory::create(); for ($i=0; $i < 7; $i++) { if ($value = rand(0,3) != 3) { $opening = $faker->time($format = 'H:i:s', $max = '10:00:00'); OperatingHour::create([ 'opening_time' => $opening, 'closing_time' => $faker->time($format = 'H:i:s', $min = $opening), 'day' => $i, 'entry_type' => 'App\Business', 'entry_id' => $u->id, ]); } } for ($j=0; $j < mt_rand(1,4); $j++) { $u->tags()->save(factory(App\Tag::class)->make()); } for ($k=0; $k < mt_rand(1,4); $k++) { $u->menus()->save(factory(App\Menu::class)->make())->each(function ($x) { $faker = Faker\Factory::create(); $menuitem = MenuItem::create([ 'price' => $faker->numberBetween(10, 20), 'discount' => $faker->numberBetween(1, 10), 'name' => $faker->word(), 'description' => $faker->paragraph(), 'category' => 'test-cat', 'image_path' => '739aaf363bbfa91612f09ac9cee380e0', 'menu_id' => $x->id, ]); for ($c=0; $c < 3; $c++) { MenuExtra::create([ 'name' => $faker->word(), 'price' => mt_rand(0, 5), 'menu_item_id' => $menuitem->id, 'menu_extra_category_id' => 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
Add a [oxy_soundcloud] shortcode to WordPress
function add_shortcode( $atts, $content = null, $name = null ) { if ( ! $this->validate_shortcode( $atts, $content, $name ) ) { return ''; } $options = $this->set_options( $atts ); ob_start(); ?><div id="<?php echo esc_attr($options['selector']); ?>" class="<?php echo esc_attr($options['classes']); ?>" <?php do_action("oxygen_vsb_component_attr", $options, $this->options['tag']); ?>><iframe scrolling="no" frameborder="no" src="https://w.soundcloud.com/player/?url=https%3A//api.soundcloud.com/tracks/<?php echo $options["soundcloud_track_id"]; ?>&amp;color=<?php echo urlencode($options["soundcloud_color"]); ?>&amp;auto_play=<?php echo urlencode($options["soundcloud_auto_play"]); ?>&amp;hide_related=<?php echo urlencode($options["soundcloud_hide_related"]); ?>&amp;show_comments=<?php echo urlencode($options["soundcloud_show_comments"]); ?>&amp;show_user=true&amp;show_reposts=false&amp;show_teaser=true&amp;visual=true"></iframe></div><?php return ob_get_clean(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add_oembed_soundcloud(){\n\twp_oembed_add_provider( 'http://soundcloud.com/*', 'http://soundcloud.com/oembed' );\n}", "function sp_soundcloud($url , $autoplay = 'false' ) {\n\treturn '<iframe width=\"100%\" height=\"166\" scrolling=\"no\" frameborder=\"no\" src=\"https://w.soundcloud.com/player/?url='.$...
[ "0.7614931", "0.7126833", "0.6748385", "0.6513087", "0.64038557", "0.6395242", "0.63543874", "0.6254899", "0.6220431", "0.61593246", "0.60787284", "0.60710824", "0.60671663", "0.60114527", "0.59701157", "0.59552765", "0.59158665", "0.5895689", "0.5885345", "0.5867948", "0.584...
0.7011954
2
InviteHistoryHandler::buildConditionQuery() To set sql query condition
public function buildConditionQuery() { $this->sql_condition = ' user_id='.$this->CFG['user']['user_id']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setConditions() {\r\n if( count($this->sqlConditions) ) {\r\n $this->sql .= ' WHERE ' . $this->sqlStrConditions;\r\n }\r\n }", "protected function buildQuery()\n\t{\n\t\t$this->query = count($this->conditions) ? 'WHERE ' . implode(' AND ', $this->conditions) : '';\n...
[ "0.68864834", "0.68085957", "0.680683", "0.6734019", "0.6692721", "0.6644008", "0.6426997", "0.63803226", "0.6374544", "0.6348217", "0.62887436", "0.62869596", "0.6280701", "0.62404245", "0.6223", "0.62116224", "0.62072766", "0.6181086", "0.61724585", "0.61554337", "0.6152544...
0.80201805
0
InviteHistoryHandler::displayHistory() To set display values
public function displayHistory() { $data_arr = array(); $inc = 0; while($row = $this->fetchResultRecord()) { $uDetails = $this->isMemberJoined($row['email']); $statusClass = ''; $status = $this->LANG['invitation_history_email_status_not_joined']; if ($uDetails) { $status = $this->LANG['invitation_history_email_status_joined']; } $data_arr[$inc]['date_added'] = $row['date_added']; $data_arr[$inc]['attempts'] = $row['attempts']; $data_arr[$inc]['email'] = $row['email']; $data_arr[$inc]['class'] = ($uDetails)?'clsJoined':'clsNotJoined';; $data_arr[$inc]['status'] = $status; $data_arr[$inc]['remind_url'] = getUrl('invitationhistory', '?action=remind&id='.$row['invitation_id'].'&start='.$this->fields_arr['start'], '?action=remind&id='.$row['invitation_id'].'&start='.$this->fields_arr['start']); $data_arr[$inc]['delete_url'] = getUrl('invitationhistory', '?action=delete&id='.$row['invitation_id'].'&start'.$this->fields_arr['start'], '?action=delete&id='.$row['invitation_id'].'&start'.$this->fields_arr['start']); $data_arr[$inc]['check_box_value'] = $row['invitation_id']; $inc++; } return $data_arr; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(history $history)\n {\n //\n }", "public function actionHistory()\n {\n $model= User::findOne(['id' => Yii::$app->user->identity->getId()]);\n $orders = Order::find()->where(['id_user' => $model->id])->with('orderProds')->orderBy('date DESC')->all();\n re...
[ "0.66208935", "0.6466929", "0.6424235", "0.6414146", "0.6334227", "0.632705", "0.63133687", "0.6247761", "0.61642486", "0.6122847", "0.61162496", "0.6106598", "0.6073928", "0.6055157", "0.5997709", "0.59951407", "0.59410864", "0.5932784", "0.5884896", "0.5867076", "0.5835536"...
0.7041204
0
InviteHistoryHandler::populateHiddenFormFields() To set the hidden form field values
public function populateHiddenFormFields($form_fields = array()) { $hiddenFormFields = array(); if (is_array($form_fields) and $form_fields) { $inc = 0; while($field = array_shift($form_fields)) { if (isset($this->fields_arr[$field])) { $hiddenFormFields[$inc]['field_name'] = $field; $hiddenFormFields[$inc]['field_value'] = $this->fields_arr[$field]; $inc++; } } return $hiddenFormFields; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function transactionFormGetHiddenFields ();", "function form_init_elements()\r\n {\r\n $this->add_hidden_element(\"swimmeetid\") ;\r\n\r\n // This is used to remember the action\r\n // which originated from the GUIDataList.\r\n \r\n $this->add_hidden_element(\"_action\") ;...
[ "0.65675426", "0.64753735", "0.590473", "0.5890775", "0.5793635", "0.5781936", "0.5767698", "0.57477486", "0.57398087", "0.5706359", "0.5687367", "0.5687367", "0.5663916", "0.5587671", "0.5568866", "0.5547855", "0.55431795", "0.553885", "0.5533969", "0.5517477", "0.5503451", ...
0.6567564
0
InviteHistoryHandler::removeInvitation() Remove the selected id values from the users invitation table
public function removeInvitation($id = 0) { $sql = 'DELETE FROM '.$this->CFG['db']['tbl']['users_invitation']. ' WHERE invitation_id='.$this->dbObj->Param($id); $stmt = $this->dbObj->Prepare($sql); $rs = $this->dbObj->Execute($stmt, array($id)); if (!$rs) trigger_db_error($this->dbObj); return ($this->dbObj->Affected_Rows()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete_invitation($invitation_id){\n if ($stmt = $this->connection->prepare('DELETE FROM device_invitations WHERE id = ?')) {\n $stmt->bind_param('i', $invitation_id);\n $status = $stmt->execute();\n $stmt->close();\n if($status === false){\n ...
[ "0.63812023", "0.63320655", "0.63320655", "0.61196965", "0.61079216", "0.6080901", "0.6058572", "0.5993449", "0.59723175", "0.5952885", "0.5831872", "0.58262736", "0.5737469", "0.5592862", "0.5579184", "0.5575338", "0.55662894", "0.555556", "0.5549032", "0.5542388", "0.553965...
0.7160969
0
InviteHistoryHandler::remindTheseInvitations() To send the reminder mail to selected users
public function remindTheseInvitations($invitation_ids = array()) { $friendHandler = new FriendHandler(); $friendHandler->setDBObject($this->dbObj); $friendHandler->makeGlobalize($this->CFG, $this->LANG); if (is_array($invitation_ids) and $invitation_ids) { for($i=0; $i<sizeof($invitation_ids); $i++) { $id = $invitation_ids[$i]; if (is_numeric($id)) { $friendHandler->remindFriendInvitaion($id); } } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendEmailReminders()\n\t{\n\t\t$now = mktime(date('H'), 0, 0, 1, 1, 1970);\n\t\t$objCalendars = $this->Database->execute(\"SELECT * FROM tl_calendar WHERE subscription_reminders=1 AND ((subscription_time >= $now) AND (subscription_time <= $now + 3600))\");\n\n\t\t// Return if there are no calendars...
[ "0.663524", "0.6576301", "0.6575173", "0.64940906", "0.6465172", "0.64550817", "0.6433844", "0.61871636", "0.6137348", "0.60382515", "0.6014247", "0.59998655", "0.59975594", "0.5991292", "0.5938109", "0.59254724", "0.59186965", "0.59120363", "0.5889213", "0.58774793", "0.5862...
0.6727499
0
InviteHistoryHandler::isMemberJoined() To check whether the user joined or not
public function isMemberJoined($email='') { $sql = 'SELECT user_name, first_name, last_name, user_id'. ' FROM '.$this->CFG['db']['tbl']['users']. ' WHERE email='.$this->dbObj->Param($email). ' AND usr_status=\'Ok\' LIMIT 1'; $stmt = $this->dbObj->Prepare($sql); $rs = $this->dbObj->Execute($stmt, array($email)); if (!$rs) trigger_db_error($this->dbObj); $user_details = array(); if ($rs->PO_RecordCount()) { $user_details = $rs->FetchRow(); } return $user_details; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isMember(): bool\n {\n return !is_null($this->group_id);\n }", "public function testIsMember()\n {\n $this->assertFalse($this->user->isMember());\n\n $subscribed = $this->subscribedUser();\n\n // our subscribed user is a member\n $this->assertTrue($...
[ "0.6442646", "0.6409622", "0.63284385", "0.63198924", "0.6259398", "0.6170694", "0.6145514", "0.61159366", "0.60940576", "0.60573983", "0.60070693", "0.5986187", "0.59171396", "0.5907632", "0.5812757", "0.5812118", "0.57648396", "0.57516885", "0.57339704", "0.57111645", "0.57...
0.67171586
0
Given an array key get it's value if it exists, otherwise return a default value.
public static function get($key, $array, $default = null) { return (isset($array[$key]) && ! empty($array[$key])) ? $array[$key] : $default; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function array_get_value($arr, $key, $default = '')\n {\n if (is_array($arr)) {\n if (key_exists($key, $arr)) {\n return $arr[$key];\n }\n return $default; \n }\n return $arr;\n }", "function array_val($array,$key,$default=null)\n{...
[ "0.84766006", "0.8399143", "0.8166228", "0.8113124", "0.8069086", "0.8053488", "0.8041811", "0.8002532", "0.79955745", "0.7964357", "0.7964357", "0.7964357", "0.79360235", "0.79206514", "0.79191196", "0.7877739", "0.7871097", "0.7864235", "0.7855704", "0.78499514", "0.7815958...
0.7982851
9
Given an array key in "dot notation" get an array value if it exists, otherwise return a default value.
public static function getFromString($keys, $array, $default = null) { foreach (explode('.', $keys) as $key) { if (!is_array($array) or !array_key_exists($key, $array)) { return $default; } $array = $array[$key]; } return $array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function array_get($array, $key, $default = null)\n {\n if (is_null($key)) return $array;\n\n if (isset($array[$key])) return $array[$key];\n\n foreach (explode('.', $key) as $segment)\n {\n if ( ! is_array($array) || ! array_key_exists($segment, $array))\n {\n ...
[ "0.8462378", "0.84363115", "0.84254086", "0.84203297", "0.8412444", "0.8391115", "0.83387995", "0.82678616", "0.82395273", "0.8232309", "0.815754", "0.81545687", "0.8091742", "0.80785656", "0.8069392", "0.80082476", "0.79918724", "0.78972375", "0.7894346", "0.77387637", "0.76...
0.6366631
96
Given an array key in dot notation create and set a value in an array.
public static function setFromString($keys, $value) { $array = $value; foreach (array_reverse(explode('.', $keys)) as $key) { $value = $array; unset($array); $array[$key] = $value; } return $array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function array_dot_set(array $array, $key, $value) {\n\t$final = $array;\n\tif(strpos($key, '.') === false) {\n\t\t$final[$key] = $value;\n\t\treturn $final;\n\t}\n\n\t$target = &$final;\n\t$keys = explode('.', $key);\n\tforeach($keys as $curKey) {\n\t\tif(!array_key_exists($curKey, $target))\n\t\t\t$target[$curKe...
[ "0.8314428", "0.8222349", "0.8076294", "0.7984589", "0.7938528", "0.7880754", "0.7862859", "0.78627837", "0.7769822", "0.7750442", "0.7736818", "0.77244383", "0.76899385", "0.7372823", "0.7319988", "0.7312248", "0.7290036", "0.7254796", "0.71436757", "0.6967944", "0.6831733",...
0.6114699
42
De we have a debugbar instance
public function testInitIsWorking() { $this->assertNotEmpty(DebugBar::getDebugBar()); // Do we have a logger? /* @var $logger SS_ZendLog */ $logger = SS_Log::get_logger(); $found = false; foreach ($logger->getWriters() as $writer) { if ($writer instanceof DebugBarLogWriter) { $found = true; } } $this->assertTrue($found); // Do we have a db proxy if (method_exists('DB', 'get_conn')) { $conn = DB::get_conn(); } else { $conn = DB::getConn(); } $class = get_class($conn); $this->assertContains($class, ['DebugBarDatabaseNewProxy', 'DebugBarDatabaseProxy']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function __construct()\n {\n $this->debugBar = new StandardDebugBar();\n }", "function debug(): DebugBarWrapper\n{\n global $debug;\n return $debug;\n}", "function debugbar()\n {\n return app(\\Barryvdh\\Debugbar\\LaravelDebugbar::class);\n }", "public function __const...
[ "0.69971675", "0.6546478", "0.63992673", "0.6208732", "0.60983825", "0.6001779", "0.6001779", "0.5907528", "0.5895943", "0.5875641", "0.5870005", "0.5863825", "0.5838408", "0.58316535", "0.58316535", "0.5782957", "0.5764537", "0.5711748", "0.57077473", "0.5683816", "0.5679256...
0.0
-1
Display a listing of the resource.
public function index() { // }
{ "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() { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return $this->showForm('create');\n }", "public function create()\n {\n return view('admin.resources.create');\n }", "public function create(){\n\n return view(...
[ "0.75948673", "0.75948673", "0.75863165", "0.7577412", "0.75727344", "0.7500887", "0.7434847", "0.7433956", "0.73892003", "0.73531085", "0.73364776", "0.73125", "0.7296102", "0.7281891", "0.72741455", "0.72424185", "0.7229325", "0.7226713", "0.7187349", "0.7179176", "0.717428...
0.0
-1
Store a newly created resource in storage.
public function store(Request $request) { $user = User::find($request->user); foreach($user->playlists as $playlist) if($playlist->id_playlist === $request->playlist){ $playlist->preview_pic = $request->img; $song = new Song(); $song->id_song = $request->id; $song->album = $request->album; $song->img = $request->img; $song->title = $request->titolo; $song->artists = $request->artisti; $song->length = $request->durata; foreach($playlist->songs as $s) if($request->id === $s->id_song) return; $playlist->songs()->associate($song); $playlist->save(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store($data, Resource $resource);", "public function store()\n {\n /* Check if logged in user is authorized to make this request */\n $this->authorizeAction();\n\n if (method_exists($this, 'storeValidations')) {\n $this->request->validate($this->storeValidations...
[ "0.72865677", "0.7145327", "0.71325725", "0.6640912", "0.66209733", "0.65685713", "0.652643", "0.65095705", "0.64490104", "0.637569", "0.63736665", "0.63657933", "0.63657933", "0.63657933", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.6342437", "0.63424...
0.0
-1
Display the specified resource.
public function show(Song $song) { // }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(Resource $resource)\n {\n // not available for now\n }", "public function show(Resource $resource)\n {\n //\n }", "function Display($resource_name, $cache_id = null, $compile_id = null)\n {\n $this->_smarty->display($resource_name, $cache_id, $compile_id...
[ "0.8233718", "0.8190437", "0.6828712", "0.64986944", "0.6495974", "0.6469629", "0.6462615", "0.6363665", "0.6311607", "0.62817234", "0.6218966", "0.6189695", "0.61804265", "0.6171014", "0.61371076", "0.61207956", "0.61067593", "0.6105954", "0.6094066", "0.6082806", "0.6045245...
0.0
-1
Show the form for editing the specified resource.
public function edit(Song $song) { // }
{ "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, Song $song) { }
{ "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(Song $song) { // }
{ "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
Search strategies are allowed to set cache metadata for better performance. The strategy should return this in an string form, to be attached with any models that wish to use store this cache. Later on, this cache should be provided in the $metadata argument of searchRepository under the 'cache' key.
public function getCacheMetadata(Location $location, $metadata =[]);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setCaching($cache);", "public function getCacheMetadata()\n {\n return $this->_cacheMetadata;\n }", "public function getCache(): string\n {\n return $this->cache;\n }", "public function getCache();", "public function getCacheName();", "private function _getCachePath() {\...
[ "0.623685", "0.62229955", "0.62101084", "0.6176332", "0.5888325", "0.5870171", "0.5842785", "0.58118486", "0.5809004", "0.5794477", "0.57650536", "0.57546", "0.5748604", "0.57267904", "0.57244766", "0.5720375", "0.5715655", "0.5714735", "0.5707705", "0.5707227", "0.56943005",...
0.55384785
45
Parses a locale string into its languag and country components.
public static function parse($locale) { if ($locale instanceof AccessibleCollection) return $locale; if (is_string($locale)) { if (strpos($locale, '-') !== false) { list($language, $country) = explode('-', $locale, 2); $locale = array('language' => $language, 'country' => $country); } else { $locale = array('language' => $locale); } } return is_array($locale) ? new AccessibleCollection($locale) : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function parseLocale($locale)\n {\n return [$this->locale , substr($this->locale, 0, -3), $this->fallback];\n }", "public function testParseCountry(): void\n {\n $result = Parser::parseCountry('ca');\n $this->assertEquals('CA', $result);\n\n $result = Parser::parseC...
[ "0.58504176", "0.5827084", "0.566907", "0.5668104", "0.5606762", "0.5606762", "0.55896735", "0.54911995", "0.5473626", "0.5471633", "0.54609203", "0.54486305", "0.5395649", "0.53829193", "0.535792", "0.5322093", "0.52763873", "0.52690876", "0.52543825", "0.5249343", "0.524377...
0.5772034
2
Returns a translated string for the given original text. Original text is returned if no translation is available.
public function localize($key) { if (!isset($this->_phrases[strtoupper($key)])) return $key; $match = $this->_phrases[strtoupper($key)]; if (func_num_args() == 1) return $match; $args = func_get_args(); $args[0] = $match; return call_user_func_array('sprintf', $args); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function translate($text)\n {\n return $this->l($text);\n }", "public function translate(string $text): string\n {\n // TODO: use translator!\n return $text;\n }", "public function translate($text);", "public function getTranslation($text, $pretrans_src='', $pretrans_...
[ "0.7564392", "0.7328799", "0.72785515", "0.72660846", "0.71504647", "0.70932233", "0.6826912", "0.6738435", "0.66540456", "0.6617744", "0.65670043", "0.6525234", "0.652367", "0.65205866", "0.65205866", "0.6485924", "0.6431638", "0.6421584", "0.6415952", "0.640103", "0.6385207...
0.0
-1
Loads translation resources from specified component.
public function load($name, $type) { $name = strtolower($name); $type = strtolower($type); switch ($type) { case 'application': $path = PU_PATH_BASE . DS . 'application' . DS . 'locales'; $this->_loadPath($path); break; case 'themes': case 'modules': case 'widgets': $path = PU_PATH_BASE . DS . $type . DS . $name . DS . 'locales'; $this->_loadPath($path); break; default: $error = sprintf("Invalid locale resource type: %s", $type); trigger_error($error, E_USER_NOTICE); break; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function loadLocalization() {}", "public function loadTranslations()\n {\n $oTranslation = new Translation($this->sLang, $this->sBundleName);\n $this->aView[\"lang\"] = $this->sLang;\n $this->aView[\"tr\"] = $oTranslation->getTranslations();\n }", "private function load(): ...
[ "0.6667522", "0.6543906", "0.6349443", "0.6121001", "0.6104452", "0.6060815", "0.6040956", "0.600702", "0.5972132", "0.5957592", "0.58738506", "0.58512557", "0.5829094", "0.5825303", "0.57492304", "0.57429975", "0.57082295", "0.5693462", "0.56790996", "0.56370294", "0.5630756...
0.52952635
38
Actual health check logic.
protected function doHealthCheck(HealthBuilder $builder) { try { $version = $this->memcacheInstance->getversion(); } catch (\Exception $e) { $builder->down($e); return; } if ((is_bool($version) && $version === false) || ((is_array($version) && count($version) === 0)) ) { $builder->down(); return; } $builder->up()->withDetail('version', $version); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected abstract function doHealthcheck();", "public function health(): HealthCheck;", "public function health(): bool {\n $_status = $this->fetch([\n 'fetch' => 'Status',\n 'route' => \"/health\",\n ]);\n switch($_status['http_code']) {\n case '200':\n return true;\n case...
[ "0.8885773", "0.7097818", "0.70485365", "0.6966272", "0.6814178", "0.66394126", "0.66311586", "0.6156213", "0.61229926", "0.6037221", "0.5987748", "0.5986302", "0.5871234", "0.5810195", "0.58066326", "0.57886463", "0.57849926", "0.57805187", "0.5753039", "0.5740952", "0.57409...
0.0
-1
Step 3: export default.po file to the relevant directory
function export_language($k,$v,$export_data,$type) { $filename= 'f' . gmdate('YmdHis'); $path = ROOT . DS . $type . DS . 'Locale' . DS; $path .= $v; if (!file_exists($path)){ mkdir($path); } // die; $path .= DS.'LC_MESSAGES'; if (!file_exists($path)) mkdir($path); $file = $path.DS.$filename; if (!file_exists($path)) touch($file); $this->loadModel('Translation'); $file = new File($path.DS.$filename); $tmprec = $export_data; foreach ($tmprec as $rec): $file->write('msgid "' .$rec['msgid'] .'"'."\n"); $file->write('msgstr "'.$rec['msgstr'].'"'."\n"); endforeach; $file->close(); // pr($tmprec); die; if (file_exists($path.DS.'default.po')) rename ($path.DS.'default.po',$path.DS.'default.po.old'.gmdate('YmdHis')); rename ($path.DS.$filename,$path.DS.'default.po'); return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function passo3() {\n $filename= 'f' . gmdate('YmdHis');\n foreach ($this->langarr as $k => $v):\n\n $path = ROOT.DS.'app'.DS.'locale'.DS.$v;\n if (!file_exists($path)) mkdir($path);\n \t$path .= DS.'LC_MESSAGES';\n if (!file_exists($path)) mkdir($path);\n \...
[ "0.6216803", "0.56127864", "0.5544662", "0.5486809", "0.54813135", "0.5459752", "0.54052496", "0.5399836", "0.5373312", "0.5242309", "0.52074015", "0.51964444", "0.5156991", "0.5143614", "0.51185995", "0.51100606", "0.50956076", "0.50733966", "0.50690484", "0.5048539", "0.502...
0.54528886
6
Step 2: translate to all languages defined in $langarr
public function trans($site_id,$k,$v) { $this->layout = false; $this->loadModel('Translation'); $trec = $this->Translation->findAllByLocale('en'); // pr($trec); die; foreach ($trec as $rec){ $tmprec = $this->Translation->find('all',array('conditions' => array('Translation.locale' =>$k,'Translation.msgid LIKE binary "'.addslashes($rec['Translation']['msgid']).'" '))); //pr($tmprec); die; if (count($tmprec) == 0) { $this->Translation->create(); $data['Translation']['msgstr'] = $this->translate($rec['Translation']['msgid'], 'en', $k); $data['Translation']['msgid'] = $rec['Translation']['msgid']; $data['Translation']['locale'] = $k; $data['Translation']['status'] = 'm'; //pr($data); die; $this->Translation->save($data); //$this->render('elements/sql_dump'); } } return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function initializeLanguages() {}", "function doTranslate($file,$languages){\n\techo \"\\n\\n=============================\\n\";\n\techo \"Translating $file\\n\";\n\techo \"=============================\\n\";\n\t$filenamepart=explodeFile($file);\n\t$buffer=file_get_contents($file);\n\t//loop through the l...
[ "0.68789995", "0.65633744", "0.6555829", "0.6542997", "0.6518918", "0.64979404", "0.64657366", "0.6451491", "0.64221305", "0.64221305", "0.64206755", "0.63374895", "0.6297656", "0.6253792", "0.6238477", "0.62067693", "0.62035066", "0.6193935", "0.6192311", "0.6180268", "0.617...
0.0
-1
Step 3: export default.po file to the relevant directory
function export($site_id,$k,$v) { $filename= 'f' . gmdate('YmdHis'); $path = $this->_UploadDirectoryName($site_id,4); $path .= $v; if (!file_exists($path)){ mkdir($path); } // die; $path .= DS.'LC_MESSAGES'; if (!file_exists($path)) mkdir($path); $file = $path.DS.$filename; if (!file_exists($path)) touch($file); $this->loadModel('Translation'); $file = new File($path.DS.$filename); $tmprec = $this->Translation->find('all', array('conditions' => array('Translation.locale' => $k))); foreach ($tmprec as $rec): $file->write('msgid "' .$rec['Translation']['msgid'] .'"'."\n"); $file->write('msgstr "'.$rec['Translation']['msgstr'].'"'."\n"); endforeach; $file->close(); if (file_exists($path.DS.'default.po')) rename ($path.DS.'default.po',$path.DS.'default.po.old'.gmdate('YmdHis')); rename ($path.DS.$filename,$path.DS.'default.po'); return 1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function passo3() {\n $filename= 'f' . gmdate('YmdHis');\n foreach ($this->langarr as $k => $v):\n\n $path = ROOT.DS.'app'.DS.'locale'.DS.$v;\n if (!file_exists($path)) mkdir($path);\n \t$path .= DS.'LC_MESSAGES';\n if (!file_exists($path)) mkdir($path);\n \...
[ "0.6214595", "0.5613027", "0.55432606", "0.548601", "0.54811805", "0.5459091", "0.5450491", "0.54060787", "0.5398861", "0.5372326", "0.5241", "0.52057916", "0.51954955", "0.51420623", "0.5116591", "0.5108181", "0.5094387", "0.50716877", "0.506764", "0.5046198", "0.5023623", ...
0.51551145
13
Set (override) the values to be set
public function set(array $params = array()) { $this->setParams(array())->addSets($params); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function set();", "function setDefaultValues() {}", "function set_values() {\n\t\tparent::set_values();\n\t\t$currency = new currency($this->_currency_id);\n\t\t\n\t\t$this->order_id->value = $this->_order_id;\n\t\t$this->timestamp->value = date(\"j M Y\");\n\t\t$this->total_amount->value = $cu...
[ "0.7335168", "0.7200339", "0.71351856", "0.70473343", "0.7006454", "0.69821185", "0.69365674", "0.69344455", "0.6908085", "0.69017965", "0.6859257", "0.6854544", "0.6852552", "0.67917037", "0.67602116", "0.6756943", "0.6737323", "0.673082", "0.669086", "0.65941584", "0.658274...
0.0
-1
Add the values to be set
public function addSets(array $values = array()) { foreach ($values as $column => $value) { $this->addSet($column, $value); } return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_values($values){\n foreach($values as $value){\n $this->add_value($value);\n }\n }", "public function add_values($values) : void\n {\n foreach($values as $value){\n $this -> add_value($value);\n }\n }", "function set_values() {\n\t\...
[ "0.7250785", "0.69737685", "0.6323317", "0.62667584", "0.6145783", "0.61200553", "0.60915506", "0.60873985", "0.5948566", "0.59265584", "0.5888247", "0.58600384", "0.5845055", "0.5834728", "0.5788722", "0.5757994", "0.572969", "0.5708453", "0.57060665", "0.5705191", "0.569482...
0.0
-1
Add the values to be set
public function addSet($column, $value) { $this->params[$column] = $value; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_values($values){\n foreach($values as $value){\n $this->add_value($value);\n }\n }", "public function add_values($values) : void\n {\n foreach($values as $value){\n $this -> add_value($value);\n }\n }", "function set_values() {\n\t\...
[ "0.7250785", "0.69737685", "0.6323317", "0.62667584", "0.6145783", "0.61200553", "0.60915506", "0.60873985", "0.5948566", "0.59265584", "0.5888247", "0.58600384", "0.5845055", "0.5834728", "0.5788722", "0.5757994", "0.572969", "0.5708453", "0.57060665", "0.5705191", "0.569482...
0.0
-1
The SET query part
public function toSql() { if ($this->isEmpty()) { return ''; } $params = $this->getParams(); $sql = array('SET'); $set = array(); foreach ($params as $column => $value) { $set[] = implode(' = ', array( $column, $this->getBuilder()->getHelper()->toDbValue($value) )); } $sql[] = implode(', ', $set); return implode(' ', $sql); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setValue(string $query, array $data): void;", "abstract public function set();", "function set_row($keys,$sql_set) {\r\n $sql_where = '';\r\n if (count($keys) > 0) {\r\n $sql_wheres = array();\r\n foreach ($keys as $key=>$val) {\r\n if (is_arra...
[ "0.6577078", "0.651119", "0.649975", "0.647158", "0.6420095", "0.639119", "0.63017696", "0.62586385", "0.60579413", "0.6026459", "0.6004224", "0.5979236", "0.5977533", "0.59477216", "0.5939463", "0.58916676", "0.5887042", "0.58489305", "0.5842189", "0.58301145", "0.58284885",...
0.0
-1
Make config publishment optional by merging the config from the package.
public function register() { $this->app->bind('BizimHesapB2b', function($app) { return new BizimHesapB2b(); }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function setupConfig()\n {\n $this->publishes([\n __DIR__ . '/config' => config_path(),\n ], 'config');\n\n $this->mergeConfigFrom(__DIR__ . '/../config/package-blueprint.php', 'package-blueprint');\n }", "private function mergeConfig() {\n\t\t$this->mergeConfigFrom(...
[ "0.61094695", "0.60274494", "0.6017864", "0.59659356", "0.58404577", "0.5834162", "0.5826338", "0.58175045", "0.5806708", "0.57638204", "0.57378227", "0.5734405", "0.57080424", "0.5672454", "0.56511873", "0.56383306", "0.56295055", "0.56264156", "0.5611503", "0.5582038", "0.5...
0.0
-1
Coupons mass delete action
public function execute() { $pool = $this->_initObject(); if (!$pool->getId()) { $this->_forward('noroute'); } $codesIds = $this->getRequest()->getParam('ids'); if (is_array($codesIds)) { $collection = $this->_objectManager->create('Bdcrops\GiftCard\Model\ResourceModel\GiftCard\Collection') ->addFieldToFilter('giftcard_id', ['in' => $codesIds]) ->addFieldToFilter('pool_id', $pool->getId()); foreach ($collection as $giftCard) { $giftCard->delete(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function massDeleteAction() {\n $messageIds = $this->getRequest()->getParam('connector');\n\n if (!is_array($messageIds)) {\n Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select item(s)'));\n } else {\n try {\n ...
[ "0.690476", "0.67048645", "0.67048645", "0.66174", "0.6605027", "0.65473646", "0.6455453", "0.6454292", "0.6434777", "0.6415248", "0.64131916", "0.64126015", "0.63622016", "0.63615674", "0.6359138", "0.63588357", "0.6326267", "0.63261616", "0.63193774", "0.63149166", "0.62988...
0.0
-1
Init plugin options to white list our options
function ajb_options_init(){ register_setting( 'ajb_option_group', 'ajb_options', 'ajb_options_validate' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initOptions()\n {\n }", "function initPlugin()\n {\n $this->getAdminOptions();\n }", "public function options_init() {\n\t\t\tglobal $allowedtags;\n\t\t\t$allowedtags['p'] = array();\n\t\t\t$this->allowedtags = $allowedtags;\n\n\t\t // set options equal to d...
[ "0.8195154", "0.79217416", "0.785508", "0.7719746", "0.75310856", "0.7501629", "0.7243645", "0.7240843", "0.723372", "0.7205982", "0.72027165", "0.7192137", "0.71620595", "0.7143902", "0.7118917", "0.70838684", "0.70469517", "0.70284235", "0.7027191", "0.70163244", "0.7005055...
0.6849884
27
fix the edit_theme_options/manage_options bug using new WP 3.2 filter
function ajb_get_options_page_cap() { return 'edit_theme_options'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function filter_theme_options( $args ) {\r\n $args['settings'] = array_merge($args['settings'], $this->get_theme_option_args());\r\n \r\n return $args;\r\n }", "function bf_update_options() {\r\n\tglobal $bf_options;\r\n\tupdate_option(THEME_ID . '_options', maybe_serializ...
[ "0.7034645", "0.69735634", "0.6917836", "0.686713", "0.680478", "0.6800002", "0.6764749", "0.67034596", "0.6699744", "0.6688453", "0.6661837", "0.6660011", "0.6637654", "0.66300976", "0.6589491", "0.6577982", "0.65754133", "0.65586126", "0.6523037", "0.65218836", "0.65089405"...
0.62851834
48
Load the menu page
function ajb_options_add_page() { add_theme_page( __( 'Homepage Options', 'ajb' ), __( 'Theme Options', 'ajb' ), ajb_get_options_page_cap(), 'ajb_options', 'ajb_options_do_page' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function loadMenu() {\n\t\t$m = array();\n\t\t$menu = new Menu();\t\t\n\t\t$m['menu'] = $menu->getMenu();\n //loadView carrega um view qualquer\n //nesse caso vai ser o view menu\n\t\t$this->loadView(\"menu\", $m);\t\t\n\t}", "public function setLoadControllerMenu()\r\n {\...
[ "0.79517525", "0.78417647", "0.7612577", "0.7512621", "0.74848497", "0.736236", "0.7271628", "0.72449535", "0.7154331", "0.7099905", "0.70819706", "0.7013921", "0.6985644", "0.69646823", "0.6910317", "0.68967056", "0.68950367", "0.6861447", "0.68227625", "0.6799826", "0.67963...
0.0
-1
Create the options page
function ajb_options_do_page() { if ( ! isset( $_REQUEST['settings-updated'] ) ) $_REQUEST['settings-updated'] = false ; ?> <div class="wrap"> <?php screen_icon(); echo "<h2>" . get_current_theme() . __( ' Theme Options', 'ajb' ) . "</h2>"; ?> <?php if ( false !== $_REQUEST['settings-updated'] ) : ?> <div class="updated fade"><p><strong><?php _e( 'Options saved', 'ajb' ); ?></strong></p></div> <?php endif; ?> <form method="post" action="options.php"> <?php settings_fields( 'ajb_option_group' ); ?> <?php $options = get_option( 'ajb_options' ); _e( '<p>The <em>Community is...</em> section shows links to 5 pages. Enter here the information for these links.</p>', 'ajb' ); ?> <table class="form-table"> <?php /** * button link */ for ( $i=1; $i<=5; $i++ ) { ?> <tr valign="top"> <th scope="row"><?php _e( 'Button ' . $i . ' Link', 'ajb' ); ?></th> <td> <input id="ajb_options[button_<?php echo $i; ?>_link]" class="regular-text" type="text" name="ajb_options[button_<?php echo $i; ?>_link]" value="<?php esc_attr_e( $options['button_' . $i . '_link'] ); ?>" /> <label class="description" for="ajb_options[button_<?php echo $i; ?>_link]"><?php _e( 'Link for link button ' . $i . '', 'ajb' ); ?></label> </td> </tr> <?php } ?> </table> <p class="submit"> <input type="submit" class="button-primary" value="<?php _e( 'Save Options', 'ajb' ); ?>" /> </p> </form> </div> <?php }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create_options_page() {\n print '<div class=\"wrap\">';\n screen_icon();\n printf( '<h2>%s</h2>', __( 'Instagram Settings', 'bii-instagram' ) );\n print '<form method=\"post\" action=\"options.php\">';\n settings_fields( 'bii_instagram' );\n do_settings_sections( 'bii-instagram' )...
[ "0.82637507", "0.8026201", "0.7942244", "0.78272265", "0.7682874", "0.7561901", "0.748421", "0.7369787", "0.7361973", "0.73372334", "0.7317128", "0.72846085", "0.72743565", "0.7246895", "0.7227218", "0.72189146", "0.7177125", "0.7172117", "0.7164375", "0.7151519", "0.714475",...
0.0
-1
Sanitize and validate input. Accepts an array, return a sanitized array.
function ajb_options_validate( $input ) { for ( $j=1; $j<=5; $j++) { // home page CSS must be safe text with the allowed tags for posts $input['button_' . $j . '_link'] = wp_filter_post_kses( $input['button_' . $j . '_link'] ); } return $input; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sanitize_array( $array = array(), $sanitize_rule = array() ){\n if ( ! is_array( $array ) || count( $array ) == 0 ) {\n return array();\n }\n\n foreach ( $array as $k => $v ) {\n if ( ! is_array( $v ) ) {\n\n $default_saniti...
[ "0.7774483", "0.75636953", "0.7553188", "0.7404712", "0.7176869", "0.70846635", "0.70500994", "0.7005178", "0.6986065", "0.6976998", "0.6875387", "0.68607193", "0.68546754", "0.6803448", "0.6776442", "0.6763725", "0.6757402", "0.6754562", "0.6707987", "0.6698542", "0.664185",...
0.0
-1
put your code here
public function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n //\n \n }", "public function run()\n\t{\n\t\t//\n\t}", "public function preExecute(){\n\n\t\n\t}", "function script()\n {\n }", "public function run()\n {\n \n }", "public function run()\n {\n \n }", "public...
[ "0.60586566", "0.59289104", "0.5919654", "0.5899511", "0.5838488", "0.5838488", "0.58356965", "0.5814271", "0.5814271", "0.57796824", "0.5701954", "0.5700516", "0.5685669", "0.5684617", "0.5684617", "0.5684617", "0.5639208", "0.563027", "0.56278986", "0.56231225", "0.5620407"...
0.0
-1
Call the Model constructor
function __construct() { parent::__construct(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n {\n $this ->model = $this ->makeModel($this ->model());\n }", "function __construct () {\n\t\t$this->_model = new Model();\n\t}", "function __construct()\n {\n // 呼叫模型(Model)的建構函數\n parent::__construct();\n \n }", "function __construc()...
[ "0.8196736", "0.8080118", "0.8054001", "0.7839992", "0.78184336", "0.78158236", "0.7770901", "0.773286", "0.7704549", "0.7701882", "0.7701882", "0.7701882", "0.7701882", "0.76811564", "0.76426494", "0.75779855", "0.75710344", "0.75621206", "0.7518676", "0.75171185", "0.751711...
0.0
-1
is developer in database?
function isDeveloperInDB($GBID) { $query = $this->db->get_where('developers', array('GBID' => $GBID)); return $query->num_rows() > 0 ? true : false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function is_developer();", "public function hasdeveloper()\n {\n return $this->hasuser() && $this->user()->isdeveloper();\n }", "public function is_developer() {\n\t\treturn $this->user->exists() && in_array(self::DEVELOPER_ROLE_NAME, $this->user->roles);\n\t}", "public func...
[ "0.69465625", "0.65979105", "0.6455591", "0.62925977", "0.62509894", "0.6183475", "0.6033371", "0.60050935", "0.60036093", "0.597374", "0.5920723", "0.58921164", "0.58865565", "0.5883972", "0.5883972", "0.5883972", "0.5860761", "0.5850598", "0.5814999", "0.5812071", "0.579382...
0.61941445
5
get DeveloperID from GBID
function getDeveloperByGBID($GBID) { $query = $this->db->get_where('developers', array('GBID' => $GBID)); if($query->num_rows() == 1) { return $query->first_row(); } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDeveloper_id()\n {\n return $this->developer_id;\n }", "public function getVendorId() {}", "function getDevId()\n {\n return $this->_props['DevId'];\n }", "public function getOGApplicationID();", "public function getDeveloperKey();", "function GET_APP_ID(){\n retur...
[ "0.7028161", "0.6661588", "0.6655852", "0.6622608", "0.6590504", "0.639485", "0.6279953", "0.61893755", "0.6178754", "0.6047877", "0.6044135", "0.60317296", "0.59945005", "0.59556115", "0.59418285", "0.59312385", "0.5926804", "0.5908018", "0.58972555", "0.58352613", "0.582146...
0.6699714
1
returns developer if in db, or adds and returns it if it isn't
function getOrAddDeveloper($gbDeveloper) { // get developer from db $developer = $this->getDeveloperByGBID($gbDeveloper->id); // if developer isn't in db if($developer == null) { // developer was not found, get from Giant Bomb $this->load->model('GiantBomb'); $result = $this->GiantBomb->getMeta($gbDeveloper->id, "company"); // if developer was returned if ($result != null && $result->error == "OK" && $result->number_of_total_results > 0) { // add developer to database $this->addDeveloper($result->results); } else { // developer was not found return false; } // get developer from db $developer = $this->getDeveloperByGBID($gbDeveloper->id); } return $developer; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addDeveloper($developer)\n {\n $data = array(\n 'GBID' => $developer->id,\n 'Name' => $developer->name,\n 'API_Detail' => $developer->api_detail_url,\n 'GBLink' => $developer->site_detail_url,\n 'Image' => is_object($developer->image) ? $develop...
[ "0.6750118", "0.61055195", "0.60061026", "0.5925797", "0.5872146", "0.5800288", "0.5493585", "0.5472753", "0.5423313", "0.54073495", "0.5304799", "0.53044593", "0.5299693", "0.5227754", "0.51487607", "0.50664824", "0.50611484", "0.5041275", "0.5038148", "0.49967074", "0.49835...
0.7040459
0
add developer to database
function addDeveloper($developer) { $data = array( 'GBID' => $developer->id, 'Name' => $developer->name, 'API_Detail' => $developer->api_detail_url, 'GBLink' => $developer->site_detail_url, 'Image' => is_object($developer->image) ? $developer->image->small_url : null, 'ImageSmall' => is_object($developer->image) ? $developer->image->icon_url : null, 'Deck' => $developer->deck ); return $this->db->insert('developers', $data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function registerToDatabase() {\n\t\t\tif ($this->id != null && $this->id != 0) return false;\n\n\t\t\t$this->conn = connectToDb(\"db_avalanche_store\");\n\n\t\t\t$add_query = \"INSERT INTO tbl_dev_info \n\t\t\t(user_id, \n\t\t\t dev_name,\t\n\t\t\t dev_desc) \n\t\t\tVALUES \n\t\t\t('$this->dev_id', \n\t\t\t '$thi...
[ "0.60217", "0.5969905", "0.58614874", "0.57840854", "0.5682054", "0.5603042", "0.55695295", "0.5543228", "0.54279214", "0.5363747", "0.53559154", "0.5355493", "0.5354834", "0.5351193", "0.5330794", "0.53240174", "0.5309294", "0.5276008", "0.527083", "0.5256675", "0.52309", ...
0.7022394
0
get developer by GBID
public function getDevelopers($GBID, $userID) { // check if developer is in database if ($this->isDeveloperInDB($GBID)) { // get developer from database if ($this->getDeveloperFromDatabase($GBID, $userID)) { // developer found return true; } } // developer was not found, get from Giant Bomb $this->load->model('GiantBomb'); $result = $this->GiantBomb->getMeta($GBID, "developer"); // if developer was returned if ($result != null && $result->error == "OK" && $result->number_of_total_results > 0) { // add developer to database $this->addDeveloper($result->results); // get developer from database return $this->getDeveloperFromDatabase($GBID, $userID); } else { // developer was not found return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDeveloperByGBID($GBID)\n {\n $query = $this->db->get_where('developers', array('GBID' => $GBID));\n\n if($query->num_rows() == 1)\n {\n return $query->first_row();\n }\n\n return null;\n }", "public function getDeveloperFromDatabase($GBID, $userID)\...
[ "0.745457", "0.6790662", "0.6525077", "0.62479895", "0.6175166", "0.60971165", "0.6051891", "0.6002118", "0.59929645", "0.58735746", "0.5712", "0.560319", "0.55546635", "0.5546957", "0.54967", "0.53585315", "0.5330587", "0.53078085", "0.5264711", "0.5253704", "0.5240388", "...
0.6084658
6
get developer from database
public function getDeveloperFromDatabase($GBID, $userID) { // get developer from db $this->db->select('developers.DeveloperID, developers.GBID, developers.GBLink, developers.Name, developers.Image, developers.ImageSmall, developers.Deck'); $this->db->from('developers'); if ($userID == null) { $userID = 0; // prevents joining on UserID causing an error } // $this->db->join('collections', 'collections.DeveloperID = developers.DeveloperID AND collections.UserID = ' . $userID, 'left'); // $this->db->join('lists', 'collections.ListID = lists.ListID', 'left'); $this->db->where('developers.GBID', $GBID); $query = $this->db->get(); // if developer returned if ($query->num_rows() == 1) { $result = $query->first_row(); $this->developerID = $result->DeveloperID; $this->GBID = $result->GBID; $this->GBLink = $result->GBLink; $this->name = $result->Name; $this->image = $result->Image; $this->imageSmall = $result->ImageSmall; $this->deck = $result->Deck; return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getDeveloper() \n {\n return $this->_developer;\n }", "public function developer()\n {\n return $this->belongs_to('Developer');\n }", "public function getDeveloper_id()\n {\n return $this->developer_id;\n }", "public function getDeveloper($uuid)\n {\n }",...
[ "0.6846746", "0.6811631", "0.6795779", "0.6535069", "0.6485643", "0.6257134", "0.62479734", "0.6166037", "0.60660034", "0.5952285", "0.59144306", "0.5890355", "0.5744496", "0.5699739", "0.5657502", "0.56133944", "0.5611225", "0.56018335", "0.55920464", "0.55579525", "0.552616...
0.6016552
9
Run the database seeds.
public function run() { DB::table('transactions')->insert([ [ 'bill_id' => 1, 'income' => true, 'amount' => 10000, 'from' => 'Alapítvány', 'description' => 'Ennyi támogatást kaptunk a képzés kezdetére. Mindenről kell számla!!!' ], [ 'bill_id' => 1, 'income' => false, 'amount' => 800, 'from' => 'AnnaKrisz ABC', 'description' => 'Nasi a 2. képzés alkalomra' ], [ 'bill_id' => 1, 'income' => false, 'amount' => 3500, 'from' => 'Gipsz Jakab', 'description' => 'Ennyit basztunk el pólókra' ], [ 'bill_id' => 2, 'income' => false, 'amount' => 500, 'from' => 'Adó', 'description' => 'Lenyúlta a NAV' ], ]); }
{ "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
This method will convert a meeting to an array that can be used for an APIrequest
public function toArrayForApi() { $return = array(); if ($this->getMeeting()) { $return['meeting_id'] = $this->getMeeting(); } if ($this->getContact()) { $return['contact_id'] = $this->getContact(); } return $return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GetMeetingIDArray()\n {\n // phpcs:enable PSR1.Methods.CamelCapsMethodName.NotCamelCaps\n return $this->_meeting_id_array;\n }", "function defineMeetingTime(){\r\n\r\n\t$SQL=\"select * from agenda where event<>'' order by meetingTime\";\r\n\t$agendaArray=get_obj_info($SQL , ar...
[ "0.6517258", "0.61099863", "0.5971747", "0.5840125", "0.57448786", "0.5728306", "0.5682719", "0.5643105", "0.56227374", "0.5603327", "0.55897194", "0.55660146", "0.55634385", "0.55582196", "0.5527764", "0.55059314", "0.54887706", "0.5424365", "0.5383251", "0.53515047", "0.534...
0.6015301
2
Url call for each Exception status
public function indexAction() { $e = $this->getException(); if ($e instanceof \FMUP\Exception\Status) { $this->errorStatus($e->getStatus()); } $this->render(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFailureUrl();", "private function callStatus() {\n try {\n $this->status = $this->client->request('GET', $this->url->full_url, [\n 'allow_redirects' => false\n ]);\n } catch (\\Exception $ex) {\n $this->status = $ex->getResponse();\...
[ "0.6324633", "0.60766774", "0.5993369", "0.598967", "0.5825878", "0.57615757", "0.55993545", "0.5597495", "0.55422497", "0.5528005", "0.5483638", "0.5468769", "0.54636186", "0.545094", "0.54378974", "0.54038054", "0.5400422", "0.53801095", "0.5364332", "0.536274", "0.53522563...
0.5752623
6
Constructor. Initializes a new instance of the Control class.
function Control($name = "") { $this->Name = $name; $this->_state = WEB_CONTROL_CONSTRUCTED; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->setAdapter(new TJuiControlAdapter($this));\n\t}", "public function __construct()\n\t{\n\t\tparent::__construct();\n\t\t$this->setAdapter(new TActiveControlAdapter($this));\n\t}", "public function __construct()\n\t{\n\t\tparent::__constr...
[ "0.73567444", "0.6724498", "0.6724498", "0.66757464", "0.65305096", "0.65044117", "0.64593035", "0.6362783", "0.6345811", "0.6306116", "0.61643845", "0.61347216", "0.6054457", "0.60443056", "0.6039964", "0.6039964", "0.6039964", "0.6031953", "0.59967244", "0.59701306", "0.593...
0.71430963
1
Method Adds the specified Control object to the controls collection.
function AddControl(&$object) { if (!is_object($object)) { return; } //if (is_object($object->Parent)) //$object->Parent->RemoveControl($object); $object->Parent = &$this; $object->Page = &$this->Page; @$this->Controls[$object->Name] = &$object; if ($this->_state >= WEB_CONTROL_INITIALIZED) { $object->initRecursive(); if ($this->_state >= WEB_CONTROL_LOADED) $object->loadRecursive(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addControl(IControl $control): IControl;", "function AddControls($controls)\r\n {\r\n $this->Controls = $controls;\r\n }", "public function addControl(Entities\\Devices\\Controls\\Control $control): void\n\t{\n\t\tif (!$this->controls->contains($control)) {\n\t\t\t// ...and assign i...
[ "0.741929", "0.73306775", "0.7229181", "0.6804962", "0.6348779", "0.60424525", "0.59369045", "0.59005946", "0.58931774", "0.58457613", "0.58347094", "0.578179", "0.56269336", "0.5623284", "0.5597254", "0.5595026", "0.5575268", "0.5546615", "0.55403733", "0.55120975", "0.55113...
0.71817094
3
Method Removes the specified Control object from the controls collection.
function RemoveControl(&$object) { //echo 'here'; if (!is_object($object) || !is_object($this->FindControl($object->Name))) return; unset($object->Parent); unset($this->Controls[$object->Name]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove_control($id)\n {\n }", "public function deleteControl($name);", "public function destroy(backupcontrols $backupcontrols)\n {\n //\n }", "public function remove(LabelTemplate $labelTemplate);", "public function remove()\n {\n $arg = func_get_args()...
[ "0.6533316", "0.62502456", "0.55944717", "0.5424647", "0.5274031", "0.52098316", "0.51489204", "0.50818485", "0.5077212", "0.50703186", "0.50672567", "0.505403", "0.505188", "0.5017671", "0.5017671", "0.5017671", "0.5017671", "0.49994475", "0.49988776", "0.4950321", "0.491549...
0.75417274
0
Method finds control by its name
function &FindControl($controlName) { if (isset($this->Controls[$controlName])) return $this->Controls[$controlName]; if ($this->HasControls()) { $keys = array_keys($this->Controls); for ($i = 0; $i < count($this->Controls); $i++) { @$control = &$this->Controls[$keys[$i]]; if ($control->HasControls()) { @$result = &$control->FindControl($controlName); if (is_object($result)) return $result; } } } return null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getControl($name);", "public function get_control($name)\n\t{\n\t\tif (!array_key_exists($name, $this->controls)) throw new Exception(\"Control '$name' not found\");\n\t\treturn $this->controls[$name];\n\t}", "public function checkControlExists($name);", "public function testFindSimpleControl...
[ "0.7661887", "0.70866567", "0.67597723", "0.6366229", "0.6070919", "0.6061565", "0.5963723", "0.56296945", "0.5626426", "0.56045246", "0.55911255", "0.5561188", "0.54828167", "0.5472097", "0.54472244", "0.54472244", "0.5339303", "0.53190047", "0.53190047", "0.53190047", "0.52...
0.7391364
1
Method checks if Instance has controls
function HasControls() { return (count($this->Controls) > 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function checkControlExists($name);", "static function hasCurrent() {\n\t\treturn is_object(self::$_ctrl);\n\t}", "public function controls()\n {\n }", "public static function checkPreconditions() {\n /**\n * @var $ilCtrl ilCtrl\n * @var $ilPluginAdmin ilPluginAdmi...
[ "0.66844016", "0.6625151", "0.623702", "0.61716133", "0.61647433", "0.6073021", "0.6056189", "0.60411435", "0.60091525", "0.59959954", "0.598452", "0.5909895", "0.5878007", "0.58705086", "0.584485", "0.58116984", "0.5809447", "0.5786876", "0.57811844", "0.5714378", "0.5713354...
0.7874779
0
Method Processes recursive load of control and all of it's children.
function createChildrenRecursive() { $this->CreateChildControls(); if ($this->HasControls()) { $keys = array_keys($this->Controls); $count = count($this->Controls); for ($i = 0; $i < $count; $i++) { @$control = &$this->Controls[$keys[$i]]; $control->createChildrenRecursive(); } } $this->initChildrenRecursive(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadRecursive() {\n $this->ControlOnLoad();\n if ($this->HasControls()) {\n $keys = array_keys($this->Controls);\n $count = count($this->Controls);\n for ($i = 0; $i < $count ; $i++) {\n @$control = &$this->Controls[$keys[$i]];\n ...
[ "0.7851746", "0.69309044", "0.65314066", "0.6447771", "0.61732817", "0.6093573", "0.6043107", "0.5980434", "0.590623", "0.57993656", "0.5759078", "0.5733826", "0.57306117", "0.5597951", "0.5541654", "0.55382365", "0.54745454", "0.5456345", "0.5449586", "0.538659", "0.5330207"...
0.60770184
6
Method Processes recursive set of control data and all of it's children.
function initChildrenRecursive() { $this->initChildControls(); if ($this->HasControls()) { $keys = array_keys($this->Controls); $count = count($this->Controls); for ($i = 0; $i < $count; $i++) { @$control = &$this->Controls[$keys[$i]]; $control->initChildrenRecursive(); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createChildrenRecursive() {\n $this->CreateChildControls();\n if ($this->HasControls()) {\n $keys = array_keys($this->Controls);\n $count = count($this->Controls);\n for ($i = 0; $i < $count; $i++) {\n @$control = &$this->Controls[$keys[$i]];\n...
[ "0.64140695", "0.59088004", "0.57994777", "0.57403564", "0.5670434", "0.5637707", "0.56201553", "0.5600078", "0.5498802", "0.54611886", "0.54364234", "0.5399908", "0.5398974", "0.53924257", "0.5347749", "0.5225833", "0.51961374", "0.51939195", "0.51545787", "0.5148276", "0.51...
0.6321941
1
Method Processes recursive initialization of control and all of it's children.
function initRecursive() { if ($this->HasControls()) { $keys = array_keys($this->Controls); $count = count($this->Controls); for ($i = 0; $i < $count; $i++) { @$control = &$this->Controls[$keys[$i]]; @$control->Page = &$this->Page; $control->initRecursive(); } } $this->_state = WEB_CONTROL_INITIALIZED; $this->ControlOnInit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function initChildrenRecursive() {\n $this->initChildControls();\n if ($this->HasControls()) {\n $keys = array_keys($this->Controls);\n $count = count($this->Controls);\n for ($i = 0; $i < $count; $i++) {\n @$control = &$this->Controls[$keys[$i]];\n...
[ "0.81341165", "0.73886466", "0.70972496", "0.70422703", "0.6903976", "0.68299353", "0.66472375", "0.60718066", "0.60718066", "0.6004551", "0.59578294", "0.5954055", "0.5934141", "0.5878264", "0.5873288", "0.5860215", "0.58510524", "0.58357114", "0.5807293", "0.5804017", "0.57...
0.7962084
1
Method Processes recursive load of control and all of it's children.
function loadRecursive() { $this->ControlOnLoad(); if ($this->HasControls()) { $keys = array_keys($this->Controls); $count = count($this->Controls); for ($i = 0; $i < $count ; $i++) { @$control = &$this->Controls[$keys[$i]]; $control->loadRecursive(); } } $this->_state = WEB_CONTROL_LOADED; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadedChildren()\r\n {\r\n //Calls childrens loaded recursively\r\n reset($this->components->items);\r\n while (list($k,$v)=each($this->components->items))\r\n {\r\n $v->loaded();\r\n }\r\n }", ...
[ "0.69315404", "0.6532891", "0.64469945", "0.6173224", "0.609219", "0.60787094", "0.60412425", "0.5981586", "0.5907624", "0.5798729", "0.5756233", "0.5732483", "0.5731456", "0.5598184", "0.55416304", "0.55388695", "0.5474632", "0.54571885", "0.5452959", "0.5384407", "0.5330753...
0.78501093
0
Method Processes recursive unload of control and all of it's children.
function unloadRecursive() { if ($this->HasControls()) { $keys = array_keys($this->Controls); for ($i = 0; $i < count($this->Controls); $i++) { @$control = &$this->Controls[$keys[$i]]; if(method_exists($control, "unloadRecursive")){ $control->unloadRecursive(); } $control=null; } } $this->ControlOnUnload(); $this->Controls=array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function loadRecursive() {\n $this->ControlOnLoad();\n if ($this->HasControls()) {\n $keys = array_keys($this->Controls);\n $count = count($this->Controls);\n for ($i = 0; $i < $count ; $i++) {\n @$control = &$this->Controls[$keys[$i]];\n ...
[ "0.5949833", "0.58542114", "0.5674282", "0.56486", "0.552239", "0.546008", "0.54356617", "0.54264224", "0.53199714", "0.5303473", "0.52730656", "0.5243749", "0.5230473", "0.52192104", "0.52123576", "0.5171038", "0.5169273", "0.51460487", "0.51393014", "0.5067857", "0.5052398"...
0.797926
0
Method Processes events management of control and all of it's children.
function manageEventsRecursive($Event) { if ($Event) { if (!is_array($Event)) $Event=array($Event); foreach ($Event as $key => $eventName) { $methodName="On".$eventName; if (method_exists($this,$methodName)) { $this->$methodName(); //return true; } if ($this->HasControls()) { $keys = array_keys($this->Controls); $count= count($this->Controls); for ($i = 0; $i < $count; $i++) { @$control = &$this->Controls[$keys[$i]]; if ($control->manageEventsRecursive($eventName)) return true; } } return false; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function controls()\n {\n }", "function CreateChildControls()\n {\n if ($this->debug_mode)\n echo $this->ClassName . \"::CreateChildControls();\" . \"<HR>\";\n if ($this->listSettings->GetCount()) {\n if ($this->listSettings->HasItem(\"MAIN\", \"TABLE\"...
[ "0.56012887", "0.5482056", "0.54510766", "0.54382145", "0.54382145", "0.54213244", "0.5405056", "0.53763425", "0.5334136", "0.5183241", "0.51739675", "0.51544315", "0.5145999", "0.51412684", "0.5098046", "0.5094869", "0.5040122", "0.50085795", "0.5001102", "0.49991113", "0.49...
0.5854552
0
Notifies server controls that use compositionbased implementation to create any child controls they contain in preparation for posting back or rendering.
function CreateChildControls() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function InitChildControls() {\n }", "function RenderChildren() {\n if ($this->HasControls()) {\n foreach($this->Controls as $control) {\n $control->Render();\n }\n }\n }", "function CreateChildControls()\n {\n if ($this->debug_mode)\n ...
[ "0.6940392", "0.68212813", "0.6582931", "0.64314353", "0.63754994", "0.6372557", "0.627751", "0.61483157", "0.6148234", "0.6125975", "0.60619944", "0.59553146", "0.5952499", "0.59170574", "0.5850471", "0.58358806", "0.58178544", "0.5813324", "0.57976645", "0.5747824", "0.5731...
0.7211219
0
Notifies server controls that use compositionbased implementation to set data to child controls they contain in preparation for posting back or rendering.
function InitChildControls() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function RenderChildren() {\n if ($this->HasControls()) {\n foreach($this->Controls as $control) {\n $control->Render();\n }\n }\n }", "public function customize_controls_init()\n {\n }", "public function preRender() {\n\t\tif ($this->hasOwnBo...
[ "0.6147969", "0.59550154", "0.5944235", "0.5923315", "0.5883677", "0.58174306", "0.5667998", "0.5666576", "0.56524956", "0.5648305", "0.55834913", "0.55834633", "0.5551934", "0.5529833", "0.5509607", "0.5473536", "0.5472581", "0.5464047", "0.54015446", "0.5391583", "0.5362316...
0.6371386
0
Handles the OnInit event
function ControlOnInit() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function OnInit() {\r\n }", "protected function onInit() {}", "protected function __onInit()\n\t{\n\t}", "public function onInit($param) {\r\n\t\tPrado::trace(\"onInit\",'System.Web.Services.TPageService');\r\n\t\t$this->raiseEvent('OnInit',$this,$param);\r\n\t}", "public function onInit() {\n ...
[ "0.6955779", "0.6572016", "0.6541836", "0.6521009", "0.6491222", "0.6439261", "0.6368316", "0.6361455", "0.6334942", "0.63027835", "0.6288262", "0.62430054", "0.62430054", "0.62430054", "0.62430054", "0.6226903", "0.6212035", "0.61697626", "0.61537635", "0.6150927", "0.615092...
0.68343866
1