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
Returns compiled notification text.
public function getCompiledText() { return $this->owner->compileText($this->getType(), $this->getData()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function NotificationContent(){\n\t\treturn $this->config()->html_notifications ? $this->NotificationHTML : $this->NotificationText;\n\t}", "function GetNotificationOutput($priority=2) {\n\t\treturn '';\n\t}", "private function _messages ()\n\t{\n\t\t$string = '<!DOCTYPE html>\n\t\t<html>\n\t\t<head>\n\...
[ "0.67754334", "0.64897966", "0.6282054", "0.62654656", "0.6218037", "0.6074245", "0.6065346", "0.6014093", "0.5985696", "0.5916009", "0.5915982", "0.5893237", "0.5888731", "0.5871858", "0.5862266", "0.5849072", "0.58286446", "0.5828159", "0.58036906", "0.5785058", "0.5782644"...
0.63553876
2
Sets current notification ID.
public function setId($id) { $this->id = $id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setID($v)\n { return $this->set('id', $v ? $v : JSONMessage::generateID()); }", "function SetId($value) { $this->id=$value; }", "public function set_current_user_id($id)\n {\n $this->current_user_id = $id;\n }", "private function setID($id) {\r\n\t\t$this->id = $id;\r\n\t}", ...
[ "0.6227426", "0.6172172", "0.60502124", "0.60310405", "0.5957207", "0.59358484", "0.59312576", "0.59150445", "0.59088415", "0.5902174", "0.58997124", "0.58955276", "0.5894064", "0.58874273", "0.5882621", "0.58718556", "0.5867419", "0.58624846", "0.58610904", "0.5844035", "0.5...
0.0
-1
Returns type of this notification.
public function getType() { return $this->type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getType(): string\n {\n return $this->rawData['notificationType'];\n }", "public function get_type()\n\t{\n\t\treturn 'notification.type.pm';\n\t}", "function getType(){\n\t\t\treturn $this->message_type;\n\t\t}", "public function get_type()\n\t{\n\t\treturn 'notification.type.ap...
[ "0.8461923", "0.77300394", "0.7699885", "0.7549481", "0.74040896", "0.7378634", "0.7355518", "0.7346417", "0.73443013", "0.73443013", "0.73443013", "0.73443013", "0.73443013", "0.73443013", "0.73443013", "0.73443013", "0.73443013", "0.73443013", "0.7344112", "0.73385733", "0....
0.0
-1
Returns data for this notification. Which will be used when displaying notification info.
public function getData() { return $this->data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function data()\n {\n return [\n 'MsgType' => $this->type(),\n 'MsgContent' => [\n 'UUID' => $this->UUID,\n 'ImageFormat' => $this->ImageFormat,\n 'ImageInfoArray' => $this->ImageInfoArray,\n ],\n ];\n }", "p...
[ "0.724636", "0.68190444", "0.6643304", "0.6618731", "0.658242", "0.6573311", "0.6568539", "0.6559772", "0.65556735", "0.6540891", "0.6531765", "0.6505748", "0.6505748", "0.6505748", "0.6505748", "0.6505748", "0.6505748", "0.6505748", "0.6505106", "0.64913476", "0.6467621", ...
0.63088864
85
Returns timestamp of this notification.
public function getTimestamp() { return $this->timestamp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTimestamp() {\n return $this->timestamp;\n }", "public function getTimestamp() {\n return $this->timestamp;\n }", "public function getTimestamp() {\n\n return $this->timestamp;\n }", "public function getTimestamp()\n\t{\n\t\treturn $this->getValue('tim...
[ "0.80785197", "0.80785197", "0.80293584", "0.8026936", "0.80030304", "0.7980695", "0.7973116", "0.7969048", "0.7946364", "0.7937652", "0.7936291", "0.7908156", "0.7900119", "0.789132", "0.77912396", "0.7786742", "0.7776296", "0.77078795", "0.7676574", "0.7668925", "0.75983185...
0.80768067
10
Returns whether or not notification is read.
public function isRead() { return $this->isRead; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasRead()\n {\n return ($this->status == NOTIFICATION_VIEWED);\n }", "public function isRead() {\n\t\treturn $this -> data['is_read'] == 1;\n\t}", "public function getWasRead()\n {\n if (!is_null($this->time_read)){\n return true;\n }\n return false;\n ...
[ "0.82238615", "0.7970942", "0.77267706", "0.7702125", "0.7638603", "0.7615032", "0.7557968", "0.7215249", "0.69990945", "0.69514936", "0.694967", "0.6837569", "0.6828434", "0.6631887", "0.65557534", "0.65499055", "0.6476909", "0.6476909", "0.6472224", "0.6454781", "0.64367914...
0.78912127
2
Returns user which owns this notification
public function getUserId() { return $this->userId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOwner() {\n // no need to check whether exist because of database constrain\n return User::getUserById($this->owner_id);\n }", "public function getOwnerId()\n {\n return $this->user_id;\n }", "function getOwner() {\n $user =& Element_Factory::makeElement(...
[ "0.749119", "0.7245172", "0.7202552", "0.7181934", "0.7142098", "0.71329516", "0.7061126", "0.6942792", "0.68789595", "0.6877059", "0.6854885", "0.68400234", "0.6805791", "0.6746872", "0.67325896", "0.67180353", "0.67101884", "0.6694337", "0.66776735", "0.66655445", "0.666468...
0.0
-1
Sets type of this notification.
public function setType($type) { $this->type = $type; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setType($type) {\n $this->type = $type;\n }", "public function setType($type) {\n $this->type = $type;\n }", "public function setType($type) {\n $this->type = $type;\n }", "public function setType($type) {\n $this->type = $type;\n }", "public function setType($type) {\...
[ "0.75659204", "0.75659204", "0.75659204", "0.7539872", "0.7539872", "0.7506071", "0.7483696", "0.7464401", "0.74403375", "0.73750854", "0.73750854", "0.73695564", "0.73648006", "0.73648006", "0.7362101", "0.73600954", "0.73600954", "0.7265226", "0.7259914", "0.72578824", "0.7...
0.7487875
13
Sets data for this notification. Which will be used when displaying notification info.
public function setData($data) { $this->data = $data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function setData($data) {}", "public function setData($data)\n {\n $this->_data = $data;\n }", "function setData($data)\n {\n $this->data = $data;\n }", "function setData($data)\n\t{\n\t\t$this->data = $data;\n\t}", "function setData($data)\n\t{\n\t\t$this->data =...
[ "0.66544855", "0.66422635", "0.66008276", "0.65828735", "0.65828735", "0.65828735", "0.65667105", "0.6550258", "0.65499145", "0.654096", "0.65374076", "0.6483927", "0.6476265", "0.6457619", "0.64489144", "0.64261603", "0.6391054", "0.6381752", "0.63815945", "0.6283336", "0.62...
0.64867765
12
Sets timestamp of this notification
public function setTimestamp($timestamp) { $this->timestamp = $timestamp; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setTimestamp($timestamp) {\r\r\n\t\t$this->timestamp = $timestamp;\r\r\n\t}", "public function setTimestamp($timestamp);", "public function setTimestamp( $timestamp ) {\n\n $this->timestamp = $this->offsetTimestampForWordPressTimezone(\n $timestamp );\n }", "public f...
[ "0.7692352", "0.760684", "0.751946", "0.72841686", "0.7180668", "0.7110282", "0.68556523", "0.67837626", "0.66360265", "0.6632361", "0.6589783", "0.6589783", "0.6589783", "0.6589783", "0.6589783", "0.6589783", "0.6589783", "0.6589783", "0.6589783", "0.6589783", "0.6589783", ...
0.7470387
4
Sets if this notification is read.
public function setRead($isRead) { $this->isRead = $isRead; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setRead() {\n\t\t$statement = Registry::get(\"database\") -> query(\"UPDATE messages SET is_read=1 WHERE id=?\");\n\t\t$statement -> bindParam(1, \t$this -> getId());\n\t\t$statement -> execute();\n\t}", "public function markNotificationAsRead()\n\t{\n\t\t//get current login user\n\t\t$user = $th...
[ "0.74566734", "0.7343013", "0.7148123", "0.69664603", "0.6889458", "0.6863738", "0.68222976", "0.6744735", "0.6719493", "0.66722655", "0.6579511", "0.65353376", "0.64625823", "0.6426486", "0.6418967", "0.6410899", "0.63930506", "0.6361774", "0.63539225", "0.6335364", "0.63115...
0.73228997
2
check if this table is already being processed, and if not, lock it
public function start($exit_when_running = true, $stuck_threshold = 20) { echo $this->_nl, "checking lock on $this->_dbtype $this->_object. at " . date('Y/m/d H:i:s', time()), $this->_nl; try { $q = $this->_conn->prepare("select in_process, case when start_time > finish_time and datediff(minute, start_time, getdate()) > {$stuck_threshold} then 1 else 0 end as is_stuck from sandbox.dbo.daemon where object = :object and dbtype = :dbtype"); $q->bindParam(':object', $this->_object); $q->bindParam(':dbtype', $this->_dbtype); $q->execute(); $rs = $q->fetchAll(PDO::FETCH_ASSOC); } catch (PDOException $e) { echo 'ERROR: ' , $e->getMessage(), $this->_nl; if ($exit_when_running) die(); else return false; } // if no daemon entry for this queue, create one $currently_running = $is_stuck = false; if (empty($rs)) $this->create(); else $currently_running = (bool) $rs[0]['in_process']; $is_stuck = $rs[0]['is_stuck']; if ($is_stuck) { echo "$this->_dbtype $this->_object is stuck.", $this->_nl, $this->_nl; @mail('chris@annieselke.com', "$this->_dbtype $this->_object is stuck", ''); } if ($currently_running) { // do I want to just exit here? or is there something a script would have to do regardless of whether the queue is locked echo "$this->_dbtype $this->_object is currently running: locked.", $this->_nl, $this->_nl; if ($exit_when_running) die(); else return false; } $this->set_process_state(true); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function lock()\n {\n $sql = \"LOCK TABLE $this->_table_name WRITE\";\n try {\n $this->_db->exec($sql);\n } catch ( PDOException $e ) {\n if ( !strpos($e->getMessage(), 'syntax error') )\n throw $e;\n // no lock support, continue\n ...
[ "0.6794703", "0.66241926", "0.64189416", "0.63366914", "0.63359565", "0.6323825", "0.6266688", "0.6252063", "0.6148174", "0.6106333", "0.60411584", "0.59715223", "0.5956528", "0.5924201", "0.5917103", "0.5858529", "0.5838356", "0.5824012", "0.5810789", "0.58081585", "0.580815...
0.0
-1
unlock table, processing is done
public function end() { $this->set_process_state(false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function unlock()\n {\n $sql = \"UNLOCK TABLES\";\n try {\n $this->_db->exec($sql);\n } catch ( PDOException $e ) {\n if ( !strpos($e->getMessage(), 'syntax error') )\n throw $e;\n // no lock support, continue\n }\n }", "...
[ "0.7918392", "0.7655057", "0.7612727", "0.7552042", "0.7232896", "0.7217439", "0.7050222", "0.69996095", "0.6981731", "0.6981731", "0.6981731", "0.6981731", "0.6981731", "0.6979487", "0.6890818", "0.6828629", "0.680204", "0.67444825", "0.6566899", "0.65466195", "0.6506707", ...
0.0
-1
lock or unlock table $object
private function set_process_state($state) { $action = $state === true ? 'lock' : 'unlock'; echo $this->_nl, "{$action}ing $this->_dbtype $this->_object.", $this->_nl; try { $q_string = "update sandbox.dbo.daemon set in_process = :state"; if ($state === true) $q_string .= ", start_time = getdate()"; else $q_string .= ", finish_time = getdate()"; $q_string .= " where object = :object and dbtype = :dbtype"; $q = $this->_conn->prepare($q_string); $q->bindParam(':object', $this->_object); $q->bindParam(':dbtype', $this->_dbtype); $q->bindParam(':state', $state); $success = $q->execute(); } catch (PDOException $e) { echo 'ERROR: ' , $e->getMessage() . $this->_nl, $this->_nl; exit(); } // unable to update lock status if ($success === false) { echo "ERROR: unable to {$action} $this->_dbtype $this->_object.", $this->_nl, $this->_nl; exit(); } echo "$this->_dbtype $this->_object {$action}ed at " . date('Y/m/d H:i:s', time()), $this->_nl, $this->_nl; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _lock_tree_table()\n\t{\n\t\tee()->db->query(\"LOCK TABLE \" .$this->tree_table . \" WRITE\");\n\t}", "protected function lock()\n {\n $sql = \"LOCK TABLE $this->_table_name WRITE\";\n try {\n $this->_db->exec($sql);\n } catch ( PDOException $e ) {\n if ( !s...
[ "0.6816337", "0.6728325", "0.66627455", "0.6658425", "0.6599877", "0.6592038", "0.65149903", "0.6461936", "0.64562607", "0.6401575", "0.6302777", "0.6302484", "0.6267757", "0.6264725", "0.6231645", "0.61779577", "0.6174427", "0.6158007", "0.6148799", "0.6142662", "0.6105473",...
0.0
-1
first time this is run for a given queue, create a new entry
private function create() { try { $q_string = "insert into sandbox.dbo.daemon (object, dbtype) values (:object, :dbtype)"; $q = $this->_conn->prepare($q_string); $q->bindParam(':object', $this->_object); $q->bindParam(':dbtype', $this->_dbtype); $success = $q->execute(); } catch (PDOException $e) { echo 'ERROR: ', $e->getMessage(), $this->_nl; exit(); } // unable to insert new entry if ($success !== true) { echo "ERROR: unable to create new lock entry for $this->_dbtype $this->_object.", $this->_nl, $this->_nl; exit(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createTask( $queue ) {\n\t\t$query = \"SELECT cd.`ticket_id` FROM `\".BIT_DB_PREFIX.\"task_ticket` cd\n\t\t\t\t\t\t WHERE ti.`ticket_ref` BETWEEN TODAY AND TOMORROW AND cd.`room` = $queue + 80\n\t\t\t\t\t\t AND cd.`office` = 1\n\t\t\t\t \t\t ORDER BY cd.`ticket_ref`\";\n\t\t$next = $this->mDb->getOne( $...
[ "0.6319045", "0.6304691", "0.6264562", "0.6219788", "0.6116542", "0.6064413", "0.5987302", "0.58326536", "0.5769485", "0.5599387", "0.55540645", "0.5482267", "0.5481303", "0.5464393", "0.54541105", "0.54472107", "0.5427705", "0.5403099", "0.5390099", "0.53792065", "0.5342842"...
0.5151505
44
get the status of all entries
public function get_status() { try { $q = $this->_conn->prepare("select * from sandbox.dbo.daemon where dbtype = :dbtype order by object asc"); $dbtype = 'live'; $q->bindParam(':dbtype', $dbtype); $q->execute(); $rs = $q->fetchAll(PDO::FETCH_ASSOC); } catch (PDOException $e) { return 'ERRORdd: ' . $e->getMessage(); } return $rs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStatuses() {\n\t}", "abstract public static function getStatuses();", "public static function getStatuses(): array;", "public function getStatusesList(){\n return $this->_get(1);\n }", "abstract protected function getStatusesInfos();", "function monitor_list_statuses() {\n $q...
[ "0.74738586", "0.74416417", "0.71846503", "0.71634465", "0.7060505", "0.7030485", "0.69539213", "0.67999345", "0.67969286", "0.67573196", "0.67398584", "0.6739112", "0.6656269", "0.6650233", "0.66439974", "0.6626768", "0.66034687", "0.6602739", "0.6578752", "0.65700704", "0.6...
0.0
-1
/ ___ _ _ _____ / _ \| \ | | ____| | | | | \| | _| | |_| | |\ | |___ \___/|_| \_|_____| One file site generator.
function page_content($filename = false) { static $cache = array(); $key = crc32($filename); if (isset($cache[$key])) { return $cache[$key]; } if ($filename == false) { $filename = locate_page_file(); if ($filename == false) { $cache[$key] = false; return false; } } if (!is_file($filename)) { $filename = locate_page_file($filename); } $item = str_replace('..', '', $filename); if (is_file($item)) { ob_start(); include ($item); $content = ob_get_clean(); $cache[$key] = $content; return $content; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generate($path)\n {\n $this->newPage();\n $this->makeLetterhead();\n $this->makeTitle();\n $this->makeBeforeInfo();\n $this->makeEntries();\n $this->makeAfterInfo();\n $this->output('F', $path, true);\n }", "private function generateSiteMapMain()\n {\n ...
[ "0.6062174", "0.60565645", "0.5993228", "0.5978365", "0.59348536", "0.5927432", "0.58737856", "0.58288825", "0.58262706", "0.5798565", "0.5753417", "0.5731446", "0.57046425", "0.56972384", "0.56777877", "0.56762123", "0.5660759", "0.56600976", "0.5656785", "0.56182444", "0.56...
0.0
-1
Returns the static model of the specified AR class.
public static function model($className=__CLASS__) { return parent::model($className); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function model()\r\n {\r\n return static::class;\r\n }", "public static function model() {\n return parent::model(get_called_class());\n }", "public static function model($class = __CLASS__)\n {\n return parent::model($class);\n }", "public static function model($cl...
[ "0.74850124", "0.73803526", "0.7154113", "0.71401674", "0.70629025", "0.703232", "0.69285315", "0.69285315", "0.6925706", "0.6902751", "0.6894916", "0.6894916", "0.68900806", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0.68698424", "0....
0.0
-1
Retrieves a list of models based on the current search/filter conditions.
public function search() { // Warning: Please modify the following code to remove attributes that // should not be searched. $criteria=new CDbCriteria; $criteria->compare('id',$this->id); $criteria->compare('username',$this->username,true); $criteria->compare('password',$this->password,true); $criteria->compare('reg_date',$this->reg_date,true); if ($this->filter_online) { if ($this->filter_online == self::STATUS_OFFLINE) $criteria->addCondition('NOW() - last_activity > 5*60 OR last_activity IS NULL'); else $criteria->addCondition('NOW() - last_activity <= 5*60'); } return new CActiveDataProvider($this, array( 'criteria'=>$criteria, )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getModels();", "public function getModels();", "public function findAll($model);", "public function getListSearch()\n {\n //set warehouse and client id\n $warehouse_id = ( !is_numeric(request()->get('warehouse_id')) ) ? auth()->user()->current_warehouse_id : request()->get('w...
[ "0.6743169", "0.6743169", "0.660761", "0.6479806", "0.63798267", "0.63454884", "0.6310211", "0.630157", "0.6253882", "0.62494963", "0.62494963", "0.6111013", "0.6077699", "0.60734916", "0.604629", "0.60349816", "0.60323626", "0.6014135", "0.5981404", "0.5979577", "0.59790176"...
0.0
-1
Get implicitly tagged wrapped element.
public function implicit(int $tag, int $class = Identifier::CLASS_UNIVERSAL): UnspecifiedType;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getWrapperElement();", "public function getWrapTag()\n {\n return $this->wrapTag;\n }", "public function getOpenTagWrapper()\n {\n }", "public function getWrapperElement()\n {\n return $this->config['wrapper'] ?? 'div';\n }", "public function tag() { return $...
[ "0.7120756", "0.6824807", "0.6656835", "0.6388917", "0.61759466", "0.61759466", "0.61759466", "0.61759466", "0.61759466", "0.59846723", "0.59846723", "0.5984364", "0.5974605", "0.59608805", "0.595303", "0.595303", "0.58979744", "0.58972484", "0.58344924", "0.58077514", "0.577...
0.0
-1
Adicionar ao select a tabela TbdMarcacao
function getImagensCategoria($limite, $categoria){ #De modo que: Selecione N marcações (numero de marcacoes = $limit) #As marcações serão referentes as categorias ou subcategorias selecionadas (categorias = $categorias, subcategorias = $subcategorias) $this->db->select('*'); $this->db->from('Tbdimagem'); $this->db->join('imagem_categoria', 'Tbdimagem.idImagem = imagem_categoria.idImagem'); $this->db->where('imagem_categoria.idCategoria', $categoria); $this->db->order_by('rand()'); $this->db->limit($limite); $query = $this->db->get(); return $query->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function selectTable(){\n\t\tView::show(\"user/seleccionaTablas\");\n\t}", "public function SelecionaBanco()\r\n\t\t{\r\n\t\t\tmysql_select_db($this->banco);\r\n\t\t}", "private function ExibirTamanhos(){\r\n $oDadosCamiseta;\r\n $sSql = \"SELECT * FROM tamanho_camiseta\";\r\n $oDa...
[ "0.631368", "0.6264864", "0.6182935", "0.61774856", "0.61525846", "0.6087659", "0.59744745", "0.5956121", "0.5888529", "0.58554995", "0.5823347", "0.58118075", "0.580819", "0.5803332", "0.5776428", "0.57350105", "0.5700218", "0.5698973", "0.5691174", "0.5664526", "0.5664291",...
0.0
-1
Adicionar ao select a tabela TbdMarcacao
function getImagensSubcategoria($limite, $subcategorias){ #De modo que: Selecione N marcações (numero de marcacoes = $limit) #As marcações serão referentes as categorias ou subcategorias selecionadas (categorias = $categorias, subcategorias = $subcategorias) $this->db->select('*'); $this->db->from('Tbdimagem'); $this->db->join('imagem_subcategoria', 'Tbdimagem.idImagem = imagem_subcategoria.idImagem'); $this->db->where('imagem_subcategoria.idSubcategoria', $subcategorias); $this->db->limit($limite); $query = $this->db->get(); return $query->result_array(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function selectTable(){\n\t\tView::show(\"user/seleccionaTablas\");\n\t}", "public function SelecionaBanco()\r\n\t\t{\r\n\t\t\tmysql_select_db($this->banco);\r\n\t\t}", "private function ExibirTamanhos(){\r\n $oDadosCamiseta;\r\n $sSql = \"SELECT * FROM tamanho_camiseta\";\r\n $oDa...
[ "0.6311839", "0.62640345", "0.6181283", "0.61738825", "0.6148754", "0.6083265", "0.59719336", "0.5954116", "0.5885341", "0.5854881", "0.58229345", "0.5812404", "0.5804384", "0.57995105", "0.5773797", "0.57340986", "0.57001346", "0.5696487", "0.56876206", "0.5666154", "0.56643...
0.0
-1
echo microtime(true) $this>startTime ;
public function appEnd() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function haveTime(){\n\t\tif($this->mCallbackHaveTime){\n\t\t\treturn call_user_func_array($this->mCallbackHaveTime, [$this]);\n\t\t}\n\t\treturn microtime(true) - $this->fStartTime < $this->fStepTime;\n\t}", "protected function startTime()\n {\n return microtime(true);\n }", "function time...
[ "0.743465", "0.742375", "0.7216836", "0.7012052", "0.6955496", "0.6895003", "0.6890472", "0.68487126", "0.67893535", "0.6758524", "0.673", "0.668206", "0.6679383", "0.66704965", "0.66228247", "0.66072387", "0.6539482", "0.6525673", "0.65109205", "0.6497634", "0.64783084", "...
0.0
-1
Prepare the closure and reflection objects for parsing
public function parse($closure) { $closure = $this->prepareClosure($closure); $reflection = $closure->getReflection(); // Find the closure defined in the AST $locator = $this->locateClosure($reflection); if (!($ast = $locator->getClosureNode())) { // @codeCoverageIgnoreStart throw new ClosureParsingException('The closure was not found within the abstract syntax tree.'); // @codeCoverageIgnoreEnd } // Do a second traversal through the closure's AST to apply additional transformations $location = $locator->getLocation(); if ($this->options[self::HANDLE_MAGIC_CONSTANTS]) { // Resolve additional nodes by making a second pass through just the closure's nodes $traverser = new \PhpParser\NodeTraverser(); $traverser->addVisitor(new MagicConstantVisitor($location)); $ast = $traverser->traverse(array($ast)); $ast = $ast[0]; } // Get and return closure context data $printer = new \PhpParser\PrettyPrinter\Standard(); $code = $printer->prettyPrint(array($ast)); $variables = $this->determineVariables($ast, $reflection); $binding = $this->options[self::HANDLE_CLOSURE_BINDINGS] ? $closure->getBinding() : null; return new AstClosureContext($code, $variables, $ast, $location, $binding); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initializeReflection() {}", "protected function setUp()\n {\n $this->aClosureObjectParser = new ClosureObjectParser ;\n }", "private function prepare(){\r\n \r\n $autoload = &$this->settings->autoload; \r\n \r\n if(isset($autoload)){\r\n ...
[ "0.57958287", "0.56093675", "0.557424", "0.5516964", "0.5510695", "0.55039346", "0.5418327", "0.5366948", "0.53501725", "0.5193012", "0.51699954", "0.5133964", "0.51286083", "0.51243967", "0.5104854", "0.50821155", "0.5032322", "0.49820358", "0.4978707", "0.4957434", "0.49572...
0.46420676
60
Loads the PHP file, parses the code, and produces an abstract syntax tree (AST) of the code
private function locateClosure(\ReflectionFunction $reflection) { try { $locator = new ClosureLocatorVisitor($reflection); $fileAst = $this->getFileAst($reflection); $fileTraverser = new \PhpParser\NodeTraverser(); if ($this->options[self::HANDLE_CLASS_NAMES]) { $fileTraverser->addVisitor(new \PhpParser\NodeVisitor\NameResolver); } $fileTraverser->addVisitor($locator); $fileTraverser->traverse($fileAst); } catch (\PhpParser\Error $e) { // @codeCoverageIgnoreStart throw new ClosureParsingException('There was an error parsing the file containing the closure.', 0, $e); // @codeCoverageIgnoreEnd } return $locator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getAst($file){\n $fileRes=fopen(\"fileRes.txt\",\"w\");\n $code=file_get_contents($file);\n $parser = (new ParserFactory)->create(ParserFactory::PREFER_PHP7);\n try {\n $ast = $parser->parse($code);\n } catch (Error $error) {\n echo \"Parse error: {$error->getMes...
[ "0.64947814", "0.6165132", "0.59894264", "0.59831554", "0.59117085", "0.5755105", "0.5579643", "0.5512406", "0.5478728", "0.5472912", "0.5437964", "0.5394494", "0.5394494", "0.5348277", "0.5317204", "0.52958345", "0.5268488", "0.52516586", "0.5250226", "0.52483153", "0.524393...
0.0
-1
Returns the variables that in the "use" clause of the closure definition. These are referred to as the "used variables", "static variables", or "closed upon variables", "context" of the closure.
private function determineVariables(ClosureAst $closureAst, \ReflectionFunction $reflection) { // Get the variable names defined in the AST $varNames = array_map(function ($varNode) { return $varNode->var; }, $closureAst->uses); // Get the variable names and values using reflection $varValues = $reflection->getStaticVariables(); // Combine the names and values to create the canonical set of variables $vars = array(); foreach ($varNames as $name) { if (isset($varValues[$name])) { $vars[$name] = $varValues[$name]; } } return $vars; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStaticVariables() {\n if ( $this->reflectionSource instanceof ReflectionFunction ) {\n return $this->reflectionSource->getStaticVariables();\n } else {\n return parent::getStaticVariables();\n }\n }", "public function getVars()\n {\n retu...
[ "0.6252688", "0.6148432", "0.6132887", "0.6088516", "0.5998841", "0.59978366", "0.59801424", "0.59461564", "0.5943696", "0.5943696", "0.5943696", "0.59240055", "0.59240055", "0.59207034", "0.5894506", "0.5881555", "0.583649", "0.5824974", "0.5806611", "0.5806611", "0.5745272"...
0.59997725
4
Converts a byte number into a human readable format Examples: ```php echo Conversions::bytesToHuman(100); // Outputs: "100B" echo Conversions::bytesToHuman(1024); // Outputs: "1KB" echo Conversions::bytesToHuman(1050); // Outputs: "1.02KB" ```
public static function bytesToHuman($bytes, $decimals = 2) { $bytes = max($bytes, 0); $pow = floor(($bytes ? log($bytes) : 0) / log(self::KILOBYTE)); $pow = min($pow, count(self::$byte_units) - 1); $bytes /= pow(self::KILOBYTE, $pow); return self::numberFormat($bytes, $decimals) . self::$byte_units[$pow]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function bytes_to_human($bytes)\n {\n $base = log($bytes) / log(1024);\n\n $suffix = ['', 'KB', 'MB', 'GB', 'TB'];\n\n $f_base = floor($base);\n\n return round(pow(1024, $base - floor($base)), 1).$suffix[$f_base];\n }", "public function bytesToHuman($bytes, $precision = 2)\n ...
[ "0.8265522", "0.7977584", "0.7741816", "0.7310399", "0.7150558", "0.7083132", "0.7081738", "0.70778286", "0.7025095", "0.697673", "0.69443953", "0.68866515", "0.68749595", "0.6867081", "0.68639344", "0.6821851", "0.6795617", "0.67312694", "0.66963583", "0.6688382", "0.6685926...
0.762057
3
Format a number Works exactly like the number_format() function. However, this method does not add decimal places to whole numbers, and trailing 0 are removed. Examples: ```php echo Conversions::numberFormat(1024); // Output: "1,024" echo Conversions::numberFormat(1024.23); // Outputs: "1,024.23" ```
public static function numberFormat($num, $dec_max = 2, $dec_point = ".", $thousands_sep = ",") { if (floor($num) != $num) { $num = trim( number_format($num, $dec_max, $dec_point, $thousands_sep), "0" ); } else { $num = number_format((double)$num, 0, $dec_point, $thousands_sep); } return $num; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function formatNumber($number);", "function do_number_format($number)\n\t{\n\t\tif ( $this->vars['number_format'] != 'none' )\n\t\t{ \n\t\t\treturn number_format($number , 0, '', $this->num_format);\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn $number;\n\t\t}\n\t}", "private function formatNumber($number)\n ...
[ "0.7953258", "0.76451147", "0.74006146", "0.73969805", "0.7356879", "0.72887635", "0.7238511", "0.72229624", "0.71826625", "0.71171105", "0.7104316", "0.7057417", "0.6995231", "0.69218785", "0.6871963", "0.67797023", "0.6663895", "0.6637502", "0.6625402", "0.65992945", "0.658...
0.64737904
27
/ Creating a function to create widget
function wpdocs_theme_slug_widgets_init() { register_sidebar( array( 'name' => __( 'footer 2', 'wordpress' ), 'id' => 'sidebar-1', 'description' => __( 'Widgets in this area will be shown on all posts and pages.', 'wordpress' ), 'before_widget' => '', 'after_widget' => '', 'before_title' => '', 'after_title' => '', ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addWidget()\r\n {\r\n }", "public function getWidget();", "public static function a_widget_init() {\n\t\t\treturn register_widget(__CLASS__);\n\t\t}", "function register_widget_control($name, $control_callback, $width = '', $height = '', ...$params)\n {\n }", "public function ge...
[ "0.7290929", "0.7172733", "0.7070885", "0.69416255", "0.66966385", "0.6663961", "0.66550684", "0.65991414", "0.6563856", "0.6480386", "0.64480805", "0.6398212", "0.63896704", "0.6377068", "0.6377068", "0.63644826", "0.63225794", "0.6297266", "0.62712485", "0.62569016", "0.624...
0.0
-1
/ Creating a function to create our slider
function slider_post_type() { $labels = array( 'name' => _x( 'slider', 'Post Type General Name', 'resturant' ), 'singular_name' => _x( 'slider', 'Post Type Singular Name', 'resturant' ), 'menu_name' => __( 'slider', 'resturant' ), 'parent_item_colon' => __( 'Parent slider', 'resturant' ), 'all_items' => __( 'All slider', 'resturant' ), 'view_item' => __( 'View slider', 'resturant' ), 'add_new_item' => __( 'Add New slider', 'resturant' ), 'add_new' => __( 'Add New', 'resturant' ), 'edit_item' => __( 'Edit slider', 'resturant' ), 'update_item' => __( 'Update slider', 'resturant' ), 'search_items' => __( 'Search slider', 'resturant' ), 'not_found' => __( 'Not Found', 'resturant' ), 'not_found_in_trash' => __( 'Not found in Trash', 'resturant' ), ); $args = array( 'label' => __( 'slider', 'resturant' ), 'description' => __( 'slider news and reviews', 'resturant' ), 'labels' => $labels, 'menu_icon' => 'dashicons-slides ', 'supports' => array( 'title', 'editor', 'excerpt', 'author', 'thumbnail', ), 'taxonomies' => array( 'genres' ), 'hierarchical' => false, 'public' => true, 'show_ui' => true, 'show_in_menu' => true, 'show_in_nav_menus' => true, 'show_in_admin_bar' => true, 'menu_position' => 5, 'can_export' => true, 'has_archive' => true, 'exclude_from_search' => false, 'publicly_queryable' => true, 'capability_type' => 'page', 'taxonomies' => array( 'category' ), ); register_post_type( 'slider', $args ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function lumo_slider(){\n\t\t$slides = new Lumo_Slider_Query();\n\n\t\tif( $slides->have_posts() ) :\n\t\t\t$display = \"\";\n\t\t\techo '<ul id=\"lumo-slider\">';\n\t\t\twhile( $slides->have_posts() ) : $slides->the_post();\n\t\t\t\t$slide_image = get_the_post_thumbnail(get_the_ID(), 'home-slider-image-lowrez');\...
[ "0.69778514", "0.6967482", "0.69644666", "0.6889087", "0.676199", "0.6646441", "0.6580058", "0.6551461", "0.6517696", "0.65076864", "0.6505561", "0.64880407", "0.64714444", "0.6464158", "0.6462297", "0.64509857", "0.6441713", "0.6421771", "0.64214784", "0.64031136", "0.639644...
0.0
-1
Enables the Excerpt meta box in Page edit screen.
function add_excerpt_support_for_pages() { add_post_type_support( 'page', 'excerpt' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gg_add_metabox_excerpt() {\n add_meta_box(\n 'gg_single_excerpt',\n 'Excerpt',\n 'gg_create_field_excerpt',\n 'testowy',\n 'normal',\n 'high'\n );\n }", "public function add_page_excerp...
[ "0.71937954", "0.70432514", "0.6875515", "0.6872793", "0.686957", "0.68686664", "0.6851628", "0.6775768", "0.677413", "0.6732943", "0.6679325", "0.66478676", "0.657382", "0.64732915", "0.64498574", "0.6392019", "0.63688976", "0.63142735", "0.6199261", "0.6159048", "0.61331797...
0.6263546
19
Add Subtitle in admin post
function subtitle( $post ) { if ( ! in_array( $post->post_type, [ 'post', 'page' ], true ) ) { return; } // The subtitle field. $_stitle = sanitize_text_field( get_post_meta( $post->ID, '_subtitle', true ) ); echo '<div class="inside">'; echo '<div id="edit-slug-box" class="hide-if-no-js">'; echo '<label for="subtitle"><strong>' . __( 'Sub Title: ' ) . '</strong></label>'; echo '<input type="text" name="subtitle" id="subtitle" value="' . $_stitle . '" size="30" spellcheck="true" autocomplete="off" />'; echo '</div>'; echo '</div>'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ts_set_custom_title( $title ) {\r\n \r\n\tif (is_single() || is_page())\r\n\t{\r\n\t\t$subtitle = get_post_meta (get_the_ID(), 'subtitle', true);\r\n\t\tif (!empty($subtitle))\r\n\t\t{\r\n\t\t\t$title .= $subtitle.' | ';\r\n\t\t}\r\n\t}\r\n return $title;\r\n}", "function slb_custom_admin_titles($ti...
[ "0.70356274", "0.68737257", "0.687299", "0.6710484", "0.6686851", "0.6658795", "0.6658795", "0.663832", "0.6634327", "0.6602547", "0.6562135", "0.65276784", "0.6512621", "0.65029126", "0.6478026", "0.6423363", "0.641111", "0.6393536", "0.63674873", "0.6332532", "0.63076013", ...
0.7302767
0
show all the invalid properties with reasons.
public function listInvalidProperties() { $invalid_properties = array(); return $invalid_properties; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function listInvalidProperties();", "public function listInvalidProperties()\n {\n $invalid_properties = [];\n $allowed_values = [\"CREDIT_CARD\", \"CASH\", \"THIRD_PARTY_CARD\", \"NO_SALE\", \"SQUARE_WALLET\", \"SQUARE_GIFT_CARD\", \"UNKNOWN\", \"OTHER\"];\n if (!in_array($this->c...
[ "0.788498", "0.7703965", "0.7691127", "0.7683089", "0.7675031", "0.76657593", "0.7652722", "0.7652722", "0.76327837", "0.76316875", "0.76316875", "0.76316875", "0.76316875", "0.76316875", "0.76316875", "0.76251876", "0.76119787", "0.7598507", "0.7598507", "0.7598507", "0.7598...
0.7684766
5
validate all the properties in the model return true if all passed
public function valid() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validate(){\n\t\t$valid = true;\n\t\t$ref = new ReflectionObject($this);\n\t\tforeach($ref->getProperties() as $prop){\n\t\t\tif(isset($this->_atributosMetadata[$prop->getName()])){\n\t\t\t\t$propMetadata = $this->_atributosMetadata[$prop->getName()];\n\t\t\t\tif($propMetadata->needValidate){\n\t\t...
[ "0.7714811", "0.7492581", "0.73749787", "0.72615504", "0.7256669", "0.72510725", "0.7190045", "0.71770793", "0.7157919", "0.7157919", "0.7157919", "0.7157919", "0.7157919", "0.7157919", "0.7157919", "0.7157919", "0.7157919", "0.7157919", "0.7157919", "0.7157919", "0.7157919",...
0.0
-1
Returns true if offset exists. False otherwise.
public function offsetExists($offset) { return isset($this->container[$offset]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function offsetExists($offset): bool\n {\n return false;\n }", "public function hasOffset(){\n return $this->_has(1);\n }", "public function offsetExists($offset): bool;", "public function offsetExists($offset) {\n\t\t$result = false;\n\t\t\n\t\tif($this->_data[$offset]) {\n\t\t\t...
[ "0.8555834", "0.8536144", "0.84876734", "0.8325894", "0.8322583", "0.8300258", "0.821515", "0.81559885", "0.8143132", "0.8143132", "0.81348807", "0.81315136", "0.8130816", "0.8128181", "0.8118165", "0.81153667", "0.81060076", "0.8103301", "0.80874085", "0.80874085", "0.808201...
0.0
-1
Sets value based on offset.
public function offsetSet($offset, $value) { if (is_null($offset)) { $this->container[] = $value; } else { $this->container[$offset] = $value; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set($offset, $value);", "public function set($offset, $value = null);", "function setOffset($value) {\n $this->offset = $value;\n }", "public function offsetSet($offset, $value)\n {\n $this->$offset = $value;\n }", "public function offsetSet($offset, $value)\n {\n $th...
[ "0.8670502", "0.84270954", "0.821386", "0.8191476", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "0.8170767", "...
0.0
-1
Gets the string presentation of the object
public function __toString() { if (defined('JSON_PRETTY_PRINT')) { // use JSON pretty print return json_encode(\Ubo\Client\ObjectSerializer::sanitizeForSerialization($this), JSON_PRETTY_PRINT); } return json_encode(\Ubo\Client\ObjectSerializer::sanitizeForSerialization($this)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __toString() {\r\n\t\treturn $this->getPrint();\r\n\t}", "public function __toString() {\r\n\t\treturn $this->getPrint();\r\n\t}", "public function __toString() {\n\t\treturn $this->getPrint();\n\t}", "public function visualize()\n {\n \n return new StringWrapper('object('.$this->name(...
[ "0.78991926", "0.78991926", "0.7865998", "0.78267187", "0.7798071", "0.77831763", "0.77773", "0.77699673", "0.77430934", "0.7738672", "0.77338606", "0.77338606", "0.77338606", "0.76946604", "0.76782423", "0.76638633", "0.76593435", "0.76323766", "0.76227117", "0.7610615", "0....
0.0
-1
Register User Test. ./vendor/bin/phpunit
public function test_register() { $faker = Factory::create(); // User's data $user = [ 'email' => $faker->email, 'name' => $faker->name, 'password' => 'password', ]; // Send post request $response = $this->json('POST', route('api.register'), $user); // Assert it was successful $response->assertStatus(200)->json(['successfully register test user!']); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRegister()\n {\n $this->visit('/register')\n ->type('Test User', 'name')\n ->type('081233548738', 'phone')\n ->type('Tester', 'occupation')\n ->type('test@test.com', 'email')\n ->type(bcrypt('testing123'), 'password')\n ...
[ "0.83806723", "0.8273252", "0.8236738", "0.7995631", "0.79933095", "0.7941538", "0.7811123", "0.7739545", "0.7726307", "0.7606139", "0.7586911", "0.75855273", "0.75614214", "0.7548537", "0.75220025", "0.7518394", "0.75045407", "0.74813235", "0.74752295", "0.7429607", "0.74290...
0.7809246
7
Add the design elements to the form
protected function _prepareForm() { $model = Mage::getModel('attributeSplash/rule'); $form = new Varien_Data_Form(); $form->setHtmlIdPrefix('rule_'); $form->setFieldNameSuffix('splash'); $renderer = Mage::getBlockSingleton('adminhtml/widget_form_renderer_fieldset') ->setTemplate('promo/fieldset.phtml') ->setNewChildUrl($this->getUrl('*/promo_catalog/newConditionHtml/form/rule_conditions_fieldset')); $fieldset = $form->addFieldset('conditions_fieldset', array( 'legend'=>Mage::helper('catalogrule')->__('Conditions (leave blank for all products)')) )->setRenderer($renderer); $fieldset->addField('conditions', 'text', array( 'name' => 'conditions', 'label' => Mage::helper('catalogrule')->__('Conditions'), 'title' => Mage::helper('catalogrule')->__('Conditions'), 'required' => true, ))->setRule($model)->setRenderer(Mage::getBlockSingleton('rule/conditions')); $form->setValues($this->_getFormData()); $this->setForm($form); return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildForm()\n {\n $this\n ->addMeasureList()\n ->addAscendingList()\n ->addTitles(['class' => 'indicator_title_title_narrative', 'narrative_true' => true])\n ->addDescriptions(['class' => 'indicator_description_title_narrative'])\n ->...
[ "0.73032796", "0.7283289", "0.71298903", "0.7002598", "0.69715345", "0.68959975", "0.6882561", "0.6866493", "0.6820501", "0.6819052", "0.67373186", "0.67331034", "0.67300344", "0.67072266", "0.669307", "0.6660284", "0.6646351", "0.66074127", "0.6582341", "0.65642667", "0.6518...
0.0
-1
Prepare content for tab
public function getTabLabel() { return Mage::helper('attributeSplash')->__('Conditions'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function makeTab($title,$content) {\n\t\t$placeholders = array(\n\t\t\t\"[+title+]\" => $title,\n\t\t\t\"[+tab_content+]\" => $content,\n\t\t);\n\t\treturn str_replace( array_keys( $placeholders ), array_values( $placeholders ), $this->templates[\"tab\"]);\n\t}", "protected function createTabs() {}", "function...
[ "0.6952522", "0.6912797", "0.6694052", "0.6679739", "0.6615526", "0.6513808", "0.6511204", "0.6450648", "0.63813317", "0.6346944", "0.63421804", "0.633378", "0.6329703", "0.62873757", "0.6256779", "0.6246608", "0.61718535", "0.61619717", "0.6145952", "0.6095048", "0.60541433"...
0.0
-1
Prepare title for tab
public function getTabTitle() { return Mage::helper('attributeSplash')->__('Conditions'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function titleTab($title = \"\"){\n \t$title .= \"\";\n \treturn $title;\n }", "public function getTabTitle()\r\n {\r\n return Mage::helper('slideshow')->__('Slide Information');\r\n }", "public function getTabTitle()\n {\n return Mage::helper('lavi_news')->__('News Info...
[ "0.81280273", "0.72819954", "0.7275596", "0.718621", "0.7168587", "0.7132194", "0.71102154", "0.70983636", "0.70758915", "0.70720655", "0.7045234", "0.70391387", "0.70316243", "0.70116305", "0.6996202", "0.69777715", "0.6975736", "0.69642615", "0.69376856", "0.6929819", "0.69...
0.7054877
10
Returns status flag about this tab can be showen or not
public function canShowTab() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function canShowTab() {\r\n return true;\r\n }", "public function canShowTab() {\r\n return true;\r\n }", "public function canShowTab() {\n return true;\n }", "public function canShowTab() {\n return true;\n }", "public function canShowTab()\r\n\t{\r\n\t\treturn true;\r\n...
[ "0.72131264", "0.72131264", "0.7177188", "0.7177188", "0.7150729", "0.71446264", "0.7135569", "0.7135569", "0.7135569", "0.7135569", "0.7135569", "0.7135569", "0.7135569", "0.7135569", "0.7135569", "0.7135569", "0.7135569", "0.7135569", "0.7135569", "0.7135569", "0.7135569", ...
0.7200399
3
Returns status flag about this tab hidden or not
public function isHidden() { return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHiddenFlag() {}", "public function isHidden()\n {\n return $this->is_hidden;\n }", "function is_hidden() {\n return $this->hidden;\n }", "function is_hidden() {\n return $this->hidden;\n }", "function is_hidden() {\n return $this->hidden;\n }", ...
[ "0.71917105", "0.6858247", "0.6856843", "0.6856843", "0.6856843", "0.6804854", "0.6728868", "0.6728868", "0.6728868", "0.6728868", "0.66520506", "0.6642177", "0.66403043", "0.6624169", "0.6620116", "0.6620116", "0.6593707", "0.656507", "0.6564115", "0.65536904", "0.65513283",...
0.65999854
18
Returns the view that displays list of users present in the organisation.
public function index() { $users = $this->userService->all(session('org_id')); $dbRoles = DB::table('role')->whereNotNull('permissions')->orderBy('role', 'desc')->get(); $roles = []; foreach ($dbRoles as $role) { $roles[$role->id] = $role->role; } return view('lite.users.index', compact('users', 'roles')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function index()\n {\n $users = $this->userService->getUserWithPaginate();\n return view('admin.user.list', compact('users'));\n }", "public function list() {\n $users = User::orderBy('name')->paginate(10);\n $repository = new Repository(compact('users'));\n \n ...
[ "0.7630778", "0.7630725", "0.7535559", "0.74612916", "0.743326", "0.7425221", "0.7424249", "0.74077857", "0.7406706", "0.7399565", "0.7389657", "0.73824614", "0.73771065", "0.73644125", "0.73339576", "0.7325637", "0.7321465", "0.73177254", "0.7317648", "0.7315963", "0.7306781...
0.0
-1
Return form to create the user.
public function create() { $form = $this->userForm->form(); $organizationIdentifier = auth()->user()->organization->user_identifier; return view('lite.users.create', compact('form', 'organizationIdentifier')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n {\n $this->generateParams();\n return view('backend.pages.user._form', compact('gender', 'type', 'city'));\n }", "public function create()\n {\n return view(\"users.usersform\");\n }", "public function create()\n {\n return view('users.form'...
[ "0.81066155", "0.80927336", "0.80706894", "0.8062279", "0.80217445", "0.79997617", "0.79997617", "0.7983612", "0.7973048", "0.7965198", "0.79638153", "0.79063886", "0.78895026", "0.7870233", "0.7829156", "0.782604", "0.77807796", "0.7773937", "0.7770224", "0.776783", "0.77614...
0.7664946
36
Stores user details in the database.
public function store(Request $request) { if (!$this->validation->passes($request->all(), self::ENTITY, session('version'))) { return redirect()->back()->with('errors', $this->validation->errors())->withInput($request->all()); } if ($this->userService->save($request->except(['_token', 'password_confirmation']))) { return redirect()->route('lite.users.index')->withResponse(['type' => 'success', 'code' => ['created', ['name' => trans('lite/global.user')]]]); } return redirect()->back()->withResponse(['type' => 'danger', 'code' => ['save_failed', ['name' => trans('lite/global.user')]]]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function store()\n {\n // Save post data in $user var\n $user = $_POST;\n \n // Create a password, set created_by ID and set the date of creation\n $user['password'] = password_hash('Gorilla1!', PASSWORD_DEFAULT);\n $user['created_by'] = Helper::getUserIdFromSess...
[ "0.8169066", "0.78635836", "0.75964403", "0.75511473", "0.7436346", "0.72348166", "0.70863855", "0.7070493", "0.705984", "0.70529515", "0.6999247", "0.69601464", "0.69207853", "0.68873847", "0.68788934", "0.68714774", "0.6853348", "0.6822383", "0.68148804", "0.6784842", "0.67...
0.0
-1
Updates the permission of the user from AJAX Request.
public function updatePermission($id) { if (!in_array($id, $this->organizationManager->getOrganizationUsers(session('org_id')))) { return false; } $permission = Input::get('permission'); $availablePermissions = Role::lists('id')->toArray(); if (in_array($permission, $availablePermissions)) { $this->userService->updatePermission($id, $permission); return 'success'; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function ajax_updateperm() {\n\t\t\t\n\t\t\tif( !isset($_GET['usergroup']) || !isset($_GET['key']) || !isset($_GET['value']) )\n\t\t\t\tdie( \"error\" );\n\t\t\t\t\n\t\t\t$Usergroup = $this->usergroup_model->GetByID( intval( $this->input->get('usergroup') ) );\n\t\t\tif( $Usergroup == false ) die( \"error\"...
[ "0.73524326", "0.6735795", "0.66886437", "0.66673875", "0.63214403", "0.6241689", "0.62406814", "0.61843824", "0.6181951", "0.6155277", "0.61227286", "0.61054236", "0.6022508", "0.60091054", "0.60034186", "0.59918463", "0.5982391", "0.5923434", "0.59201336", "0.59157526", "0....
0.5722423
32
Sent email to the users of the organisation when user identifier is changed.
public function notifyUsernameChanged() { $this->userService->notifyUsernameChanged(session('org_id')); $response = ['type' => 'success', 'code' => ['sent', ['name' => 'Emails']]]; return redirect()->route('lite.settings.edit')->withResponse($response); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sendUserUpdateNotification(): void\n {\n $this->notify(new VerifyAccountNotification());\n }", "public function changeEmail()\n {\n $breadCrumb = $this->userEngine\n ->breadcrumbGenerate('change-email');\n\n $recentEmail = $this->userEngine\...
[ "0.67037", "0.6367923", "0.63246864", "0.63131154", "0.6273172", "0.6230952", "0.6222536", "0.62079465", "0.6203002", "0.6125814", "0.61069214", "0.6101656", "0.60840803", "0.6013226", "0.59596163", "0.5957093", "0.5940295", "0.58981705", "0.5894618", "0.58887446", "0.5883331...
0.68712634
0
Returns a Crawler instance for the given html
public function getCrawler($html) { return new Crawler($html); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function newCrawler()\n {\n return new Crawler;\n }", "public static function create(): CrawlerInterface;", "public function parse() : self\n {\n $this->parsed = new Crawler($this->html);\n\n return $this;\n }", "protected function getCrawler(string $body) : Crawler\n ...
[ "0.73360854", "0.7096998", "0.70868254", "0.70169264", "0.6963565", "0.68020976", "0.673131", "0.66502386", "0.6409645", "0.6311036", "0.6147224", "0.6035871", "0.6006924", "0.5957782", "0.5822971", "0.57692397", "0.57500994", "0.5697311", "0.5643459", "0.5616252", "0.5611346...
0.8848025
0
Filters html using a css selector. Runs the callback over each returned element of the css selector and the method returns an array of all the callback responses
public function filter($html, $selector, callable $closure) { return $this->getCrawler($html)->filter($selector)->each($closure); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findElements($selector = 'all') {\r\n\t\t$attrs = $this->parseSelector($selector);\r\n\t\t$result = array();\r\n\t\tforeach($this->children as $child) {\r\n\t\t\tif ($child->matchSelector($attrs)) {\r\n\t\t\t\t$result[] = $child;\r\n\t\t\t}\r\n\t\t\t$childElements = $child->findElements($selector);...
[ "0.55005926", "0.5419678", "0.5393824", "0.52582014", "0.52054507", "0.516394", "0.50932014", "0.504576", "0.49866563", "0.49652475", "0.4918719", "0.49032167", "0.48923963", "0.48456004", "0.48378077", "0.48273998", "0.4817447", "0.48169622", "0.48013112", "0.47999", "0.4793...
0.6283644
0
this function will check whether in this context, user can perform edit action
public function canEditContest($iContestId, $iUserId = 0) { if(!Phpfox::isUser()) { return false; } if(!$iUserId) { return false; } $aContest = Phpfox::getService('contest.contest')->getContestForCheckingPermission($iContestId); if(!$aContest) { return false; } // no way to edit a Contest in uneditable status if(in_array($aContest['contest_status'], Phpfox::getService('contest.constant')->getUneditableStatus())) { return false; } // if he is the owner and he has permission to edit his own Contest if(($iUserId == $aContest['user_id'] && Phpfox::getUserParam('contest.edit_own_contest')) || Phpfox::getUserParam('contest.edit_user_contest')) { return true; } return false; // // page owner is a big BOSS // if ($aContest['module_id'] == 'pages' && Phpfox::getService('pages')->isAdmin($aContest['item_id'])) // { // return true; // } // return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function canEdit() {}", "public function canEdit()\n {\n if(!Auth::check())\n {\n return false;\n }\n //If the user is active/logged in, return true so that we can display user's specific objects\n if(Auth::user()->id===$this->user_id)\n {\n ...
[ "0.8721974", "0.82822216", "0.82467526", "0.804492", "0.80428416", "0.80101234", "0.80065876", "0.79710704", "0.7946323", "0.7837917", "0.78118604", "0.7730594", "0.7674492", "0.75978494", "0.7586931", "0.7571168", "0.74990517", "0.74599916", "0.7420578", "0.7404507", "0.7351...
0.0
-1
Return a raw query for further data extraction
function query($sql, $arguments = null) { $query = $this->connection->prepare($sql); try { $query->execute($arguments); } catch (Exception $ex) { throw new Exception($ex->getMessage() . " \n" . $sql); } return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function get_query();", "public function rawQuery($query);", "public function getQuery(): string {\n\t\t// Store previous output before changing to temp\n\t\t$output = $this->get('output');\n\t\t\n\t\ttry {\n\t\t\t$this->set('output', SqlAdapter::SQL_QUERY);\n\t\t\t$result = $this->run();\n\t\t...
[ "0.7516332", "0.73904306", "0.72637755", "0.72450346", "0.71253395", "0.70575446", "0.70334584", "0.7026673", "0.7026673", "0.7026673", "0.7026673", "0.7026673", "0.7026673", "0.7026673", "0.7026673", "0.7026673", "0.7012429", "0.6961094", "0.6948483", "0.69324744", "0.692007...
0.0
-1
Return an array of associative arrays
function query_array($sql, $parameters = null) { $query = $this->query($sql, $parameters); return $query->fetchAll(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toArray() {\r\n return $this->associativeArray();\r\n }", "public function toAssociativeArray() {\n // TODO\n }", "public function toAssociativeArray() {\n // TODO\n }", "abstract public function toAssoc(): array;", "public function toArray()\n\...
[ "0.7666401", "0.7527602", "0.7527602", "0.7365434", "0.73491395", "0.7305586", "0.7296502", "0.7219342", "0.7192991", "0.7187884", "0.71866655", "0.70720685", "0.7052379", "0.7033692", "0.7012061", "0.70039487", "0.6995781", "0.69949126", "0.69531137", "0.6918888", "0.6917448...
0.0
-1
Return an array of objects
function query_objects($sql, $parameters = null) { $query = $this->query($sql, $parameters); // This may not be the most optimal way to get an array of objects // from PDO, but it functions properly for now and can be discretely // optimized later. return $query->fetchAll(PDO::FETCH_CLASS); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public abstract function getObjects();", "public static function getAll() : array {\n return self::$objects;\n }", "public function toArray() : array{\n return get_object_vars( $this );\n }", "public function getObjectArray()\n {\n $this->_cache->load($this->_cache_key, $this->_...
[ "0.73555136", "0.7135129", "0.7096606", "0.70870876", "0.70093685", "0.6986791", "0.6901352", "0.68386674", "0.68350196", "0.6827249", "0.6827249", "0.6827249", "0.6827249", "0.6827249", "0.6827249", "0.6827249", "0.6827249", "0.6827249", "0.6806729", "0.6806729", "0.6804488"...
0.0
-1
Return a single value
function query_value($sql, $parameters = null) { $query = $this->query($sql, $parameters); return $query->fetchColumn(0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValue(): mixed;", "public function getValue(): mixed;", "public function getValue()\n {\n return 1;\n }", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}", "public function getValue() {}"...
[ "0.773586", "0.773586", "0.7533902", "0.74860805", "0.74860805", "0.74860805", "0.74860805", "0.74860805", "0.74860805", "0.74860805", "0.74860805", "0.74860805", "0.74860805", "0.74860805", "0.74860805", "0.74860805", "0.74860805", "0.74849313", "0.74849313", "0.74849313", "...
0.0
-1
Return an array of single values, usually a list of ids or names
function query_values($sql, $parameters = null) { $query = $this->query($sql, $parameters); return $query->fetchAll(PDO::FETCH_COLUMN, 0); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getValues(): array;", "public function getValues(): array;", "public function getValues();", "public function getValuesList(){\n return $this->_get(1);\n }", "public function getValues()\r\n {\r\n $values = $this->getValue();\r\n\r\n if (!is_array($values)) {\r\n ...
[ "0.7365303", "0.7365303", "0.7026987", "0.69971454", "0.6968361", "0.69678265", "0.6948893", "0.69192225", "0.6828458", "0.6827112", "0.67558235", "0.67548436", "0.6750289", "0.67357963", "0.6708839", "0.6704814", "0.6704814", "0.6697995", "0.66343874", "0.6624599", "0.660123...
0.0
-1
Saves inmemory state to the persistent storage. It is used to flush inmemory changes to the database between requests/actions.
protected function saveState(): void { $em = $this->getEntityManager(); $em->flush(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function save()\n {\n $this->persist($this->state);\n }", "public function store()\n {\n if( $this->isPersistent() )\n {\n $this->update();\n }\n else\n {\n $this->insert();\n }\n }", "public function persist() {}", "pu...
[ "0.80036056", "0.70927566", "0.69049233", "0.67950064", "0.668239", "0.666752", "0.66617435", "0.66009516", "0.6598909", "0.6588894", "0.65590644", "0.6544981", "0.65260375", "0.6491668", "0.648954", "0.64518416", "0.64183927", "0.6407187", "0.63682103", "0.63417727", "0.6340...
0.75336987
1
over write before save, load file
public function beforeSave() { if (parent::beforeSave()) { $this->last_modified = time(); if ($this->isNewRecord) { Yii::log("new pic uploaded and processed."); if ($this->data!=null) { $this->resizefile(); return true; } else { Yii::log("process pic failed with data = null", "error"); Yii::log("process pic failed with data = null"); return false; } } else { return true; } } else { Yii::log("process pic failed with parent save = null", "error"); Yii::log("process pic failed with parent save = null"); return (false); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private static function save() {\n\t\tif(self::$data===null) throw new Excepton('Save before load!');\n\t\t$fp=fopen(self::$datafile,'w');\n\t\tif(!$fp) throw new Exception('Could not write data file!');\n\t\tforeach (self::$data as $item) {\n\t\t\tfwrite($fp,$item); // we use the __toString() here\n\t\t}\n\t\tfcl...
[ "0.65135854", "0.63704044", "0.6322883", "0.6266109", "0.6250194", "0.6215735", "0.6212859", "0.6170606", "0.6168287", "0.61315745", "0.6122028", "0.611647", "0.610031", "0.60948324", "0.6094399", "0.6074358", "0.6071155", "0.5983432", "0.5968431", "0.59569514", "0.59226376",...
0.0
-1
'co_prioridad'=>'co_prioridad', public $columFiltros = array('co_usuario'=>'co_usuario','co_naturaleza'=>'co_naturaleza','co_modalidad'=>'co_modalidad','co_regimen_lab'=>'co_regimen_lab');
public function convertArrayKeysToUtf88($array1) { $convertedArray1 = array(); $convertedArray = array(); foreach($array1 as $array) { foreach($array as $key => $value) { if(!mb_check_encoding($value, 'UTF-8')) {$value = utf8_encode($value); } $convertedArray[$key] = $value; } $convertedArray1[] = $convertedArray; } return $convertedArray1; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function conf()\n {\n $dato_anio = toba::memoria()->get_parametro('filtro_anio');\n $dato_ua = toba::memoria()->get_parametro('filtro_ua');\n if(isset($dato_anio)){//el anio es filtro obligatorio asi que siempre vuelve con este dato\n $auxiliar['valor']=$dato_...
[ "0.6488054", "0.6164636", "0.6093107", "0.6080668", "0.5973518", "0.5901899", "0.58672994", "0.58649206", "0.5856721", "0.58523655", "0.5807635", "0.5776656", "0.57594126", "0.5663137", "0.5638683", "0.5629808", "0.5593232", "0.5587226", "0.55845433", "0.5580304", "0.55662787...
0.0
-1
/echo ''; $result = mysql_query("SET NAMES 'utf8'", $conex); print_r($usrDocEdo); print_r($Resultados); print_r($condiciones); echo '';
public function actualizar($var2, $condiciones) { //print_r($registro); $var_3 = array_intersect_key($var2, $this->columArt); //print_r($var_3); $oper2 = $this->pdo->_update('c004t_proceso', $var_3, $condiciones); //print_r($var_3); //echo 'hola1'; if($oper2){ return true; } else{ return "Ha ocurrido un error al intentar actualizar los datos del Documento."; //$oper1.$oper2; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function set_charset() {\n\t\t//regresa bool\n\t\t$this->conn->set_charset(\"utf8\");\n\t}", "function conmysql(){\n $con=mysql_connect('localhost','root','');\n if(!$con){\n die('ء¬½ست§°ـ£؛'.mysql_error());\n }\n mysql_set_charset('utf-8');\n mysql_select_db('fnp2p');\n return $...
[ "0.688817", "0.64750934", "0.6376015", "0.63369864", "0.62806016", "0.622724", "0.61923265", "0.6169269", "0.6100985", "0.606473", "0.60547507", "0.6038303", "0.5982114", "0.5971625", "0.5971625", "0.5966117", "0.5950686", "0.59382164", "0.5928948", "0.59113306", "0.58785635"...
0.0
-1
Returns the schema for this data object.
protected function createSchema() { $schema = new ModelSchema("Rental"); $schema->addColumn( new AutoIncrementColumn("RentalID"), new ForeignKeyColumn("ClientID") ); return $schema; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSchema()\n {\n return $this->get(self::SCHEMA);\n }", "public function getSchema()\n {\n return $this->schema;\n }", "public function getSchema()\n {\n return $this->schema;\n }", "public function getSchema()\n {\n return $this->schema;\n ...
[ "0.85943437", "0.85231346", "0.85231346", "0.85231346", "0.85231346", "0.85231346", "0.85231346", "0.8468756", "0.8468756", "0.8468756", "0.845027", "0.8432126", "0.8300413", "0.8176533", "0.81328696", "0.80597353", "0.8050417", "0.80437356", "0.8035311", "0.8002911", "0.7980...
0.0
-1
Store a newly created resource in storage.
public function create(Request $request) { $data = [ 'title' => $request->title, 'sku' => $request->sku, 'warehouses_id' => $request->warehouse_id, 'description' => $request->description ]; Products::create($data); return; }
{ "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
Get the Product for editing.
public function show($id) { return Products::findOrFail($id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function edit($id)\n {\n $product = Product::find($id);\n return $product;\n }", "public function edit(Product $product) {\n //\n }", "public function getEdit(){\n return view(\"admin.product.edit\" );\n }", "public function editproductAction(): object\n {\n ...
[ "0.79136133", "0.78111327", "0.7717192", "0.77160114", "0.7696516", "0.7696516", "0.7696516", "0.7696516", "0.7696516", "0.7696516", "0.7696516", "0.7696516", "0.7696516", "0.7696516", "0.7696516", "0.7696516", "0.7696516", "0.7696516", "0.7696516", "0.7696516", "0.7696516", ...
0.0
-1
Update the Product in storage.
public function updateProduct($id, $request) { $data = [ 'title' => $request->title, 'sku' => $request->sku, 'warehouses_id' => $request->warehouse_id, 'description' => $request->description ]; $item = Products::findOrFail($id); $item->update($data); return; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function updateProduct(Product $product);", "public function updated(Product $producto)\n {\n\n }", "public function update(ProductRequest $request, Product $product)\n {\n $unit = unit::find($request->unit_id);\n $product->name=$request->name;\n $product->stock_alert=$reques...
[ "0.7693959", "0.7109897", "0.7038027", "0.6987092", "0.6936687", "0.692956", "0.691723", "0.68994087", "0.6893607", "0.68926966", "0.6887604", "0.6885928", "0.6875296", "0.6864771", "0.6857832", "0.6853497", "0.6844251", "0.68364376", "0.68275845", "0.6819749", "0.6819256", ...
0.0
-1
Get count of the collection
public function ProductCount() { return Products::count(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function count() {\r\n\t\treturn count($this->collection);\r\n\t}", "public function count()\n {\n return count($this->collection);\n }", "public function count()\n {\n return $this->collection->count();\n }", "public function count()\n {\n return $this->collection-...
[ "0.87680876", "0.8767217", "0.87304306", "0.87304306", "0.87140644", "0.8625013", "0.84952974", "0.82679015", "0.82478017", "0.7915573", "0.79050386", "0.79010373", "0.7877169", "0.7845941", "0.7839773", "0.7835773", "0.78174543", "0.7817121", "0.7813893", "0.7803956", "0.780...
0.0
-1
End: getList Faz uma busca de Usuario
public static function search($login){ $sql = new Sql(); return $sql->select("SELECT * FROM tb_usuarios_dois WHERE deslogin LIKE :SEARCH ORDER BY idusuario", array( ':SEARCH'=>"%".$login."%" )); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getList(){\n\t\t$sql = new sql();\n\n\t\treturn $sql->select(\"SELECT * FROM usuarios ORDER BY email;\");\n\n\t}", "function getList() {\n $this->db->getCursorParameters(self::TABLA);\n $respuesta = array();\n while ($fila = $this->db->getRow()) {\n $objeto ...
[ "0.8054851", "0.7972419", "0.7850569", "0.7838256", "0.7833152", "0.77272445", "0.7544357", "0.7543706", "0.753477", "0.7534705", "0.75337124", "0.7515391", "0.7506416", "0.7493066", "0.7409029", "0.7407475", "0.74017054", "0.7401281", "0.74005026", "0.7396528", "0.7384753", ...
0.0
-1
Determine whether the user can update the flow.
public function update(User $user) { return $user->admin; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(): bool\n {\n return $this->isAllowed(self::UPDATE);\n }", "public function authorize()\n {\n if (auth()->user()->can('update')) {\n return true;\n }\n\t\t\n\t\treturn false;\n }", "protected function canUpdate()\n {\n return $this->h...
[ "0.7821232", "0.7358515", "0.7355931", "0.7321696", "0.7300643", "0.72989434", "0.72538024", "0.72354335", "0.7213674", "0.7137995", "0.712668", "0.70730466", "0.70385355", "0.70106757", "0.69969743", "0.6993346", "0.6989734", "0.6930484", "0.6916799", "0.68949", "0.6883863",...
0.0
-1
Determine whether the user can delete the flow.
public function delete(User $user) { return $user->admin; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function delete(): bool\n {\n return $this->isAllowed(self::DELETE);\n }", "public function canDelete()\n {\n return Auth::user() && ( $this->sender_id === Auth::id() || $this->recipient_id === Auth::id() );\n }", "public function can_delete () {\r\n\r\n return $...
[ "0.7494141", "0.7403055", "0.73354065", "0.73117226", "0.7306132", "0.7175039", "0.71588385", "0.71575725", "0.715621", "0.7146644", "0.70949966", "0.7081669", "0.70721906", "0.7034842", "0.7013619", "0.69893277", "0.6985067", "0.6962062", "0.6839201", "0.6789569", "0.6778776...
0.0
-1
Retrieve the database table column => post_meta mapping.
public function get_postmeta_mapping() { return $this->postmeta_mapping; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPostColumns()\n {\n return array(\n 'post' => 'post', \n 'prefecture' => 'prefecture', \n 'address1' => 'address1', \n 'address2' => 'address2', \n 'tel' => 'tel', \n 'fax' => 'fax',\n...
[ "0.6630238", "0.63588476", "0.624645", "0.59931535", "0.59918094", "0.59838206", "0.59522116", "0.59407735", "0.59362483", "0.5935924", "0.5913532", "0.5907472", "0.5904582", "0.58867764", "0.5882605", "0.58741844", "0.5874088", "0.5861811", "0.5849968", "0.5849872", "0.58446...
0.70662725
0
Create a new order in the database.
public function create( &$order ) { /** * Filter the generated order ID. * * @param string $order_key The uniquely-generated ID for this order. */ $order_key = apply_filters( 'woocommerce_generate_order_key', uniqid( 'order_' ) ); $order->set_order_key( 'wc_' . $order_key ); $this->creating = true; parent::create( $order ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create(Order $order)\n {\n //\n }", "public function creating(Order $Order)\n {\n //code...\n }", "public function create()\n\t{\n\t\t$this->auth->restrict('Purchase_Order.Orders.Create');\n\n\t\tif (isset($_POST['save']))\n\t\t{\n\t\t\tif ($insert_id = $this->save_pur...
[ "0.7726986", "0.76280785", "0.7603774", "0.72889686", "0.72638935", "0.71876585", "0.711252", "0.702796", "0.70068866", "0.69737464", "0.69582343", "0.6922678", "0.68804663", "0.6835975", "0.680529", "0.67847925", "0.6768965", "0.6752184", "0.67420954", "0.67005557", "0.66975...
0.6522131
33
Delete an order from the database.
public function delete( &$order, $args = array() ) { global $wpdb; $order_id = $order->get_id(); parent::delete( $order, $args ); if ( $args['force_delete'] || 0 == $order->get_id() ) { $wpdb->delete( "{$wpdb->prefix}woocommerce_orders", array( 'order_id' => $order_id, ) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function deleteOrder($order_id);", "public function deleting(Order $Order)\n {\n //code...\n }", "function deleteOrder($orderId);", "public function deleted(Order $order)\n {\n //\n }", "public function deleted(Order $order)\n {\n //\n }", "function deleteOrd...
[ "0.80839837", "0.7640994", "0.7444085", "0.7374824", "0.7374824", "0.73580664", "0.7342271", "0.73054206", "0.72994447", "0.72994447", "0.71366346", "0.7110824", "0.70548797", "0.70511264", "0.7041883", "0.69984317", "0.698561", "0.698561", "0.698561", "0.698561", "0.698561",...
0.7150532
10
Retrieve a single order from the database.
public function get_order_data_from_table( $order ) { global $wpdb; return $wpdb->get_row( $wpdb->prepare( "SELECT * FROM {$wpdb->prefix}woocommerce_orders WHERE order_id = %d;", $order->get_id() ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOrderById($id){\n $this->db->query(\"SELECT * FROM orders WHERE id = :id\");\n\n $this->db->bind(':id', $id);\n \n $row = $this->db->single();\n\n return $row;\n }", "static function getOrder(int $OrderID) {\r\n $sqlSelect = \"SELECT * FROM Orders WHERE Or...
[ "0.72100544", "0.7028325", "0.6923297", "0.6895676", "0.6850671", "0.6843163", "0.6797846", "0.6771322", "0.6763425", "0.67399037", "0.67126656", "0.6680664", "0.6680664", "0.6653037", "0.66067356", "0.65943056", "0.65906286", "0.6554422", "0.6547009", "0.6531931", "0.6509113...
0.6064748
55
Helper method that updates all the post meta for an order based on its settings in the WC_Order class.
protected function update_post_meta( &$order ) { global $wpdb; $edit_data = array( 'order_key' => $order->get_order_key( 'edit' ), 'customer_id' => $order->get_customer_id( 'edit' ), 'payment_method' => $order->get_payment_method( 'edit' ), 'payment_method_title' => $order->get_payment_method_title( 'edit' ), 'transaction_id' => $order->get_transaction_id( 'edit' ), 'customer_ip_address' => $order->get_customer_ip_address( 'edit' ), 'customer_user_agent' => $order->get_customer_user_agent( 'edit' ), 'created_via' => $order->get_created_via( 'edit' ), 'date_completed' => $order->get_date_completed( 'edit' ), 'date_paid' => $order->get_date_paid( 'edit' ), 'cart_hash' => $order->get_cart_hash( 'edit' ), 'billing_first_name' => $order->get_billing_first_name( 'edit' ), 'billing_last_name' => $order->get_billing_last_name( 'edit' ), 'billing_company' => $order->get_billing_company( 'edit' ), 'billing_address_1' => $order->get_billing_address_1( 'edit' ), 'billing_address_2' => $order->get_billing_address_2( 'edit' ), 'billing_city' => $order->get_billing_city( 'edit' ), 'billing_state' => $order->get_billing_state( 'edit' ), 'billing_postcode' => $order->get_billing_postcode( 'edit' ), 'billing_country' => $order->get_billing_country( 'edit' ), 'billing_email' => $order->get_billing_email( 'edit' ), 'billing_phone' => $order->get_billing_phone( 'edit' ), 'shipping_first_name' => $order->get_shipping_first_name( 'edit' ), 'shipping_last_name' => $order->get_shipping_last_name( 'edit' ), 'shipping_company' => $order->get_shipping_company( 'edit' ), 'shipping_address_1' => $order->get_shipping_address_1( 'edit' ), 'shipping_address_2' => $order->get_shipping_address_2( 'edit' ), 'shipping_city' => $order->get_shipping_city( 'edit' ), 'shipping_state' => $order->get_shipping_state( 'edit' ), 'shipping_postcode' => $order->get_shipping_postcode( 'edit' ), 'shipping_country' => $order->get_shipping_country( 'edit' ), 'discount_total' => $order->get_discount_total( 'edit' ), 'discount_tax' => $order->get_discount_tax( 'edit' ), 'shipping_total' => $order->get_shipping_total( 'edit' ), 'shipping_tax' => $order->get_shipping_tax( 'edit' ), 'cart_tax' => $order->get_total_tax( 'edit' ), 'total' => $order->get_total( 'edit' ), 'version' => $order->get_version( 'edit' ), 'currency' => $order->get_currency( 'edit' ), 'prices_include_tax' => $order->get_prices_include_tax( 'edit' ), ); $changes = array(); if ( $this->creating ) { $wpdb->insert( "{$wpdb->prefix}woocommerce_orders", array_merge( array( 'order_id' => $order->get_id(), ), $edit_data ) ); // We are no longer creating the order, it is created. $this->creating = false; } else { $changes = array_intersect_key( $edit_data, $order->get_changes() ); if ( ! empty( $changes ) ) { $wpdb->update( "{$wpdb->prefix}woocommerce_orders", $changes, array( 'order_id' => $order->get_id(), ) ); } } $updated_props = array_keys( (array) $changes ); // If customer changed, update any downloadable permissions. if ( in_array( 'customer_user', $updated_props ) || in_array( 'billing_email', $updated_props ) ) { $data_store = WC_Data_Store::load( 'customer-download' ); $data_store->update_user_by_order_id( $order->get_id(), $order->get_customer_id(), $order->get_billing_email() ); } do_action( 'woocommerce_order_object_updated_props', $order, $updated_props ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function backfill_postmeta( &$order ) {\n\t\t$data = $this->get_order_data_from_table( $order );\n\n\t\tif ( is_null( $data ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\tforeach ( $this->get_postmeta_mapping() as $column => $meta_key ) {\n\t\t\tif ( isset( $data->$column ) ) {\n\t\t\t\tupdate_post_meta( $order->get_id...
[ "0.7477523", "0.6846129", "0.67944044", "0.67478037", "0.6576126", "0.65583384", "0.6493488", "0.644619", "0.6434062", "0.6425109", "0.63788086", "0.6378417", "0.63032913", "0.6291431", "0.6273514", "0.6257501", "0.62316877", "0.62316763", "0.6047204", "0.6029002", "0.6000137...
0.7783935
0
Get amount already refunded.
public function get_total_refunded( $order ) { global $wpdb; $total = $wpdb->get_var( $wpdb->prepare( " SELECT SUM( postmeta.meta_value ) FROM $wpdb->postmeta AS postmeta INNER JOIN $wpdb->posts AS posts ON ( posts.post_type = 'shop_order_refund' AND posts.post_parent = %d ) WHERE postmeta.meta_key = '_refund_amount' AND postmeta.post_id = posts.ID ", $order->get_id() ) ); return $total; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAmountRefunded() {\n return $this->item->getAmountRefunded();\n }", "public function getAmountRefunded()\n {\n return $this->amountRefunded instanceof TypedMoneyBuilder ? $this->amountRefunded->build() : $this->amountRefunded;\n }", "public function getBaseAmountRefund...
[ "0.8304545", "0.80116326", "0.7800791", "0.7675217", "0.76170534", "0.7608972", "0.7533391", "0.73523563", "0.72364867", "0.7221443", "0.7206684", "0.70878255", "0.7031655", "0.69614017", "0.69494164", "0.6918775", "0.6889394", "0.6868162", "0.68619907", "0.68150043", "0.6810...
0.62286156
44
Get the total tax refunded.
public function get_total_tax_refunded( $order ) { global $wpdb; $total = $wpdb->get_var( $wpdb->prepare( " SELECT SUM( order_itemmeta.meta_value ) FROM {$wpdb->prefix}woocommerce_order_itemmeta AS order_itemmeta INNER JOIN $wpdb->posts AS posts ON ( posts.post_type = 'shop_order_refund' AND posts.post_parent = %d ) INNER JOIN {$wpdb->prefix}woocommerce_order_items AS order_items ON ( order_items.order_id = posts.ID AND order_items.order_item_type = 'tax' ) WHERE order_itemmeta.order_item_id = order_items.order_item_id AND order_itemmeta.meta_key IN ('tax_amount', 'shipping_tax_amount') ", $order->get_id() ) ); return abs( $total ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getGwTaxAmountRefunded() {\n return $this->item->getGwTaxAmountRefunded();\n }", "public function getBaseTotalRefunded();", "public function getTaxRefunded() {\n return $this->item->getTaxRefunded();\n }", "public function getGwBaseTaxAmountRefunded() {\n return $th...
[ "0.83200455", "0.81456846", "0.80929935", "0.8081876", "0.80330276", "0.79252505", "0.7877898", "0.7870721", "0.78052396", "0.7726598", "0.7700025", "0.7631219", "0.76224965", "0.76179683", "0.7616845", "0.7594877", "0.75917006", "0.7559692", "0.75519043", "0.7496158", "0.749...
0.75932807
16
Get the total shipping refunded.
public function get_total_shipping_refunded( $order ) { global $wpdb; $total = $wpdb->get_var( $wpdb->prepare( " SELECT SUM( order_itemmeta.meta_value ) FROM {$wpdb->prefix}woocommerce_order_itemmeta AS order_itemmeta INNER JOIN $wpdb->posts AS posts ON ( posts.post_type = 'shop_order_refund' AND posts.post_parent = %d ) INNER JOIN {$wpdb->prefix}woocommerce_order_items AS order_items ON ( order_items.order_id = posts.ID AND order_items.order_item_type = 'shipping' ) WHERE order_itemmeta.order_item_id = order_items.order_item_id AND order_itemmeta.meta_key IN ('cost') ", $order->get_id() ) ); return abs( $total ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getShippingRefunded();", "public function getTotalRefundedAmount()\n {\n return $this->total_refunded_amount;\n }", "private function getShippingRefundedQty(): int\n {\n //====================================================================//\n // Walk on Refunds\n...
[ "0.80463195", "0.80019915", "0.77802473", "0.7779485", "0.7773638", "0.7675617", "0.7573201", "0.74979675", "0.7482939", "0.7355568", "0.73028356", "0.7217026", "0.7177416", "0.7173878", "0.7169405", "0.714783", "0.70951885", "0.70906353", "0.7068993", "0.70382714", "0.702274...
0.7455559
9
Finds an order ID based on its order key.
public function get_order_id_by_order_key( $order_key ) { global $wpdb; return $wpdb->get_var( $wpdb->prepare( "SELECT order_id FROM {$wpdb->prefix}woocommerce_orders WHERE order_key = %s", $order_key ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function findById($orderId);", "public static function get_order_id() {\n\t\tglobal $order;\n\n\t\tif ( is_a( $order, 'WC_Order' ) ) {\n\t\t\treturn $order->get_id();\n\t\t}\n\n\t\t$order_id = absint( filter_input( INPUT_GET, 'order_id', FILTER_SANITIZE_NUMBER_INT ) );\n\n\t\tif ( $order_id ) {\n\t\t\treturn $or...
[ "0.62854606", "0.6282295", "0.61924064", "0.61667967", "0.6154146", "0.61028945", "0.6093918", "0.60818785", "0.6077686", "0.6061905", "0.59744024", "0.59649515", "0.59232247", "0.5911671", "0.5907587", "0.5889618", "0.5881896", "0.58385384", "0.57953554", "0.57846344", "0.57...
0.7677417
0
Return count of orders with a specific status.
public function get_order_count( $status ) { global $wpdb; return absint( $wpdb->get_var( $wpdb->prepare( "SELECT COUNT(*) FROM {$wpdb->posts} WHERE post_type = 'shop_order' AND post_status = %s", $status ) ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function check_commission_status( $order, $status ) { \n\n\t\tglobal $wpdb; \n\n\t\t$table_name \t= $wpdb->prefix . \"pv_commission\";\n\n\t\t$order_id \t\t= $order[ 'order_id' ]; \n\t\t$vendor_id \t\t= $order[ 'vendor_id' ]; \n \t$product_id\t\t= $order[ 'product_id' ]; \n\n\t\t$query = \"SELECT ...
[ "0.7232755", "0.7017634", "0.69810367", "0.6761564", "0.67516303", "0.6727714", "0.6505145", "0.6405812", "0.63512236", "0.62337416", "0.62201345", "0.6212407", "0.61802846", "0.61389464", "0.61317515", "0.6085192", "0.605804", "0.60483867", "0.6044908", "0.60436994", "0.6037...
0.80535203
0
Generate meta query for wc_get_orders.
private function get_orders_generate_customer_meta_query( $values, $relation = 'or' ) { $meta_query = array( 'relation' => strtoupper( $relation ), 'customer_emails' => array( 'key' => '_billing_email', 'value' => array(), 'compare' => 'IN', ), 'customer_ids' => array( 'key' => '_customer_user', 'value' => array(), 'compare' => 'IN', ), ); foreach ( $values as $value ) { if ( is_array( $value ) ) { $meta_query[] = $this->get_orders_generate_customer_meta_query( $value, 'and' ); } elseif ( is_email( $value ) ) { $meta_query['customer_emails']['value'][] = sanitize_email( $value ); } else { $meta_query['customer_ids']['value'][] = strval( absint( $value ) ); } } if ( empty( $meta_query['customer_emails']['value'] ) ) { unset( $meta_query['customer_emails'] ); unset( $meta_query['relation'] ); } if ( empty( $meta_query['customer_ids']['value'] ) ) { unset( $meta_query['customer_ids'] ); unset( $meta_query['relation'] ); } return $meta_query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function orders_get_list() {\n\t\t $sql = <<<EOD\n\t\t SELECT\n\t\t \t{$this->wpdb->prefix}topspin_orders.id,\n\t\t \t{$this->wpdb->prefix}topspin_orders.artist_id,\n\t\t \t{$this->wpdb->prefix}topspin_orders.created_at,\n\t\t \t{$this->wpdb->prefix}topspin_orders.subtotal,\n\t\t\t{$this->wpdb->prefix}topsp...
[ "0.61404073", "0.5998684", "0.57909095", "0.57745105", "0.57376784", "0.5713991", "0.5643663", "0.56390125", "0.5618665", "0.5589128", "0.5552518", "0.5502556", "0.5496199", "0.54956275", "0.54696244", "0.5451452", "0.5435705", "0.541846", "0.5409171", "0.540086", "0.5392334"...
0.6132021
1
Get unpaid orders after a certain date.
public function get_unpaid_orders( $date ) { global $wpdb; $unpaid_orders = $wpdb->get_col( $wpdb->prepare( " SELECT posts.ID FROM {$wpdb->posts} AS posts WHERE posts.post_type IN ('" . implode( "','", wc_get_order_types() ) . "') AND posts.post_status = 'wc-pending' AND posts.post_modified < %s ", date( 'Y-m-d H:i:s', absint( $date ) ) ) ); return $unpaid_orders; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getoverdue() {\r\n $today = new DateTime(); \r\n $dueDate = date_modify($today, '-11 months');\r\n $date = $dueDate->format('Y-m-d');\r\n \r\n $db = static::getDB();\r\n $stmt = $db->query(\r\n \"SELECT * FROM lifts \"\r\n ...
[ "0.610975", "0.59874517", "0.5729414", "0.5727679", "0.55674666", "0.5560314", "0.5531941", "0.5531653", "0.54981416", "0.54607594", "0.546021", "0.5448515", "0.54480505", "0.5447236", "0.5440886", "0.5432344", "0.54214364", "0.54068923", "0.5382415", "0.5366837", "0.53535074...
0.7650482
0
Search order data for a term and return ids.
public function search_orders( $term ) { global $wpdb; $order_ids = array(); if ( is_numeric( $term ) ) { $order_ids[] = absint( $term ); } /** * Searches on meta data can be slow - this lets you choose what fields to search. * * WooCommerce 2.7.0 added _billing_address and _shipping_address meta which contains all * address data to make this faster. However, this won't work on older orders unless they * are updated, so search a few others (expand this using the filter if needed). */ $meta_search_fields = array_map( 'wc_clean', apply_filters( 'woocommerce_shop_order_search_fields', array( // While we are searching the custom table, we will also search meta when filtered for backwards compatibility. ) ) ); $postmeta_search = ! empty( $meta_search_fields ) ? $wpdb->get_col( $wpdb->prepare( "SELECT DISTINCT p1.post_id FROM {$wpdb->postmeta} p1 WHERE p1.meta_key IN ('" . implode( "','", array_map( 'esc_sql', $search_fields ) ) . "') AND p1.meta_value LIKE '%%%s%%';", wc_clean( $term ) ) ) : array(); return array_unique( array_merge( $order_ids, $postmeta_search, $wpdb->get_col( $wpdb->prepare( " SELECT order_id FROM {$wpdb->prefix}woocommerce_order_items as order_items WHERE order_item_name LIKE '%%%s%%' ", $term ) ) ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function find(string $term, string $namespace) : array;", "public function loadArrayByCreatedByAgentID($searchTerm) {\n global $connection;\n $returnvalue = array();\n $operator = \"=\";\n // change to a like search if a wildcard character is present\n if (!(strpos($sear...
[ "0.6233762", "0.5996679", "0.59806424", "0.5860475", "0.5846695", "0.58376443", "0.58057004", "0.5802774", "0.578627", "0.578199", "0.5660996", "0.5659146", "0.56335175", "0.558993", "0.55708325", "0.55706227", "0.5568678", "0.5564585", "0.54941046", "0.54929745", "0.5466665"...
0.73761
0
Gets information about whether permissions were generated yet.
public function get_download_permissions_granted( $order ) { $order_id = WC_Order_Factory::get_order_id( $order ); return wc_string_to_bool( get_post_meta( $order_id, '_download_permissions_granted', true ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasPermissions()\n {\n return ! empty($this->permissions);\n }", "public function hasPermissions()\n {\n return $this->permissions !== null;\n }", "public static function uses_permissions(): bool;", "static function hasInitializedPermission()\n {\n $positio...
[ "0.723515", "0.7118613", "0.6985475", "0.6947495", "0.6905761", "0.6901681", "0.6901681", "0.68762946", "0.6749651", "0.67174363", "0.6697164", "0.66802335", "0.66757697", "0.66757697", "0.66757697", "0.66388017", "0.6630216", "0.6627044", "0.66139126", "0.660092", "0.6577201...
0.0
-1
Stores information about whether permissions were generated yet.
public function set_download_permissions_granted( $order, $set ) { $order_id = WC_Order_Factory::get_order_id( $order ); update_post_meta( $order_id, '_download_permissions_granted', wc_bool_to_string( $set ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function SavePermissions()\n\t{\n\t\treturn true;\n\t}", "private function loadPermissions(): void\n {\n $permissions = Cache::get($this->cacheKey());\n\n $this->isPayor = $permissions['isPayor'];\n $this->isAgencyBankAccountSetup = $permissions['isAgencyBankAccountSetup'];\n ...
[ "0.6599483", "0.65391207", "0.65337753", "0.65207773", "0.64220166", "0.6342716", "0.6252472", "0.6203349", "0.619755", "0.619755", "0.617585", "0.617585", "0.617585", "0.617585", "0.617585", "0.61547047", "0.614374", "0.6138273", "0.60604817", "0.60340583", "0.601619", "0....
0.0
-1
Gets information about whether sales were recorded.
public function get_recorded_sales( $order ) { $order_id = WC_Order_Factory::get_order_id( $order ); return wc_string_to_bool( get_post_meta( $order_id, '_recorded_sales', true ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIsSale()\n {\n return $this->get(self::_IS_SALE);\n }", "protected function _usedInSales()\n {\n $rowset = $this->findDependentRowset('\\Ppb\\Db\\Table\\Sales');\n if (count($rowset) > 0) {\n return true;\n }\n\n return false;\n }", "...
[ "0.7109092", "0.6155453", "0.58900994", "0.5883582", "0.5689826", "0.5629183", "0.56205225", "0.5516286", "0.5515808", "0.5499032", "0.54642534", "0.54320824", "0.5405701", "0.5402275", "0.539143", "0.539143", "0.539143", "0.53853106", "0.5380972", "0.5291191", "0.52767235", ...
0.68620837
1
Stores information about whether sales were recorded.
public function set_recorded_sales( $order, $set ) { $order_id = WC_Order_Factory::get_order_id( $order ); update_post_meta( $order_id, '_recorded_sales', wc_bool_to_string( $set ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function _usedInSales()\n {\n $rowset = $this->findDependentRowset('\\Ppb\\Db\\Table\\Sales');\n if (count($rowset) > 0) {\n return true;\n }\n\n return false;\n }", "public function getIsSale()\n {\n return $this->get(self::_IS_SALE);\n }", "...
[ "0.58730555", "0.58640033", "0.58562464", "0.5642739", "0.5597903", "0.55825937", "0.5558339", "0.55536526", "0.5460907", "0.54557705", "0.5451143", "0.53999597", "0.53785414", "0.5346163", "0.5340376", "0.5324606", "0.5320683", "0.52861744", "0.5274085", "0.5254822", "0.5247...
0.62095183
0
Gets information about whether coupon counts were updated.
public function get_recorded_coupon_usage_counts( $order ) { $order_id = WC_Order_Factory::get_order_id( $order ); return wc_string_to_bool( get_post_meta( $order_id, '_recorded_coupon_usage_counts', true ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUpdateStatus() {\n return $this->_statusManager->getStatus ();\n }", "public function updateCount() {\n $query = $this->connection->select($this->mapTable);\n $query->addExpression('COUNT(*)', 'count');\n $query->condition('needs_update', MigrateMap::STATUS_NEEDS_UPDATE);\n ...
[ "0.60697585", "0.599692", "0.59308976", "0.58637315", "0.5819856", "0.5780992", "0.5757495", "0.57232416", "0.5704794", "0.5674301", "0.5669532", "0.565828", "0.5649949", "0.5645605", "0.5632201", "0.5618765", "0.5609321", "0.5582324", "0.55781025", "0.55657196", "0.5561508",...
0.63915557
0
Stores information about whether coupon counts were updated.
public function set_recorded_coupon_usage_counts( $order, $set ) { $order_id = WC_Order_Factory::get_order_id( $order ); update_post_meta( $order_id, '_recorded_coupon_usage_counts', wc_bool_to_string( $set ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_recorded_coupon_usage_counts( $order ) {\n\t\t$order_id = WC_Order_Factory::get_order_id( $order );\n\n\t\treturn wc_string_to_bool( get_post_meta( $order_id, '_recorded_coupon_usage_counts', true ) );\n\t}", "public function handbks_object_counts_update() {\n $this->db->query(\"call h...
[ "0.5816421", "0.57590395", "0.56576604", "0.5510146", "0.54752237", "0.54641944", "0.54360294", "0.54211557", "0.54079664", "0.538146", "0.53621256", "0.5336472", "0.5327004", "0.5316119", "0.52745366", "0.52515197", "0.52458775", "0.52457744", "0.524206", "0.52282023", "0.52...
0.5947093
0
Gets information about whether stock was reduced.
public function get_stock_reduced( $order ) { $order_id = WC_Order_Factory::get_order_id( $order ); return wc_string_to_bool( get_post_meta( $order_id, '_order_stock_reduced', true ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function IsReduced()\n {\n return (bool) $this->getTotalReduction();\n }", "public function inStock()\n {\n return $this->stockCount() > 0;\n }", "public function getQuantite_stock()\r\n {\r\n return $this->quantite_stock;\r\n }", "public function getSold()\n ...
[ "0.6422627", "0.59472054", "0.582819", "0.5803821", "0.5723443", "0.57084095", "0.56384313", "0.56364375", "0.56364375", "0.56364375", "0.56364375", "0.56364375", "0.5621274", "0.56175375", "0.5582235", "0.5565467", "0.5565467", "0.5563948", "0.5550475", "0.5529332", "0.55263...
0.6976673
0
Stores information about whether stock was reduced.
public function set_stock_reduced( $order, $set ) { $order_id = WC_Order_Factory::get_order_id( $order ); update_post_meta( $order_id, '_order_stock_reduced', wc_bool_to_string( $set ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_stock_reduced( $order ) {\n\t\t$order_id = WC_Order_Factory::get_order_id( $order );\n\n\t\treturn wc_string_to_bool( get_post_meta( $order_id, '_order_stock_reduced', true ) );\n\t}", "public function inStock()\n {\n return $this->stockCount() > 0;\n }", "public function check...
[ "0.6294473", "0.58524686", "0.5749633", "0.57312846", "0.5718415", "0.5688479", "0.5665382", "0.56319994", "0.56208813", "0.5610947", "0.5547729", "0.54927313", "0.54523546", "0.5420415", "0.5420415", "0.5420415", "0.5420415", "0.5420415", "0.5417495", "0.5404762", "0.5400088...
0.56972027
5
Get the order type based on Order ID.
public function get_order_type( $order_id ) { return get_post_type( $order_id ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getOrderType();", "public function getOrderType()\n {\n return $this->hasOne(OrderType::className(), ['id' => 'order_type_id']);\n }", "public function getOrderType()\n {\n return $this->order_type;\n }", "public function getOrderType()\n {\n return $this->...
[ "0.753765", "0.7151509", "0.71004546", "0.6984836", "0.68438804", "0.66166794", "0.65854627", "0.6551378", "0.6312523", "0.6275656", "0.6257056", "0.61352444", "0.61197394", "0.6093863", "0.60849905", "0.60683113", "0.6027052", "0.6024699", "0.6021583", "0.6018339", "0.598647...
0.80038726
0
Populate custom table with data from postmeta, for migrations.
public function populate_from_meta( &$order, $save = true, $delete = false ) { $table_data = $this->get_order_data_from_table( $order ); if ( is_null( $table_data ) ) { $original_creating = $this->creating; $this->creating = true; } foreach ( $this->get_postmeta_mapping() as $column => $meta_key ) { $meta = get_post_meta( $order->get_id(), $meta_key, true ); if ( empty( $table_data->$column ) && ! empty( $meta ) ) { switch ( $column ) { case 'prices_include_tax': $order->set_prices_include_tax( 'yes' === $meta ); break; default: $order->{"set_{$column}"}( $meta ); } } } if ( true === $save ) { $this->update_post_meta( $order ); } if ( true === $delete ) { foreach ( $this->get_postmeta_mapping() as $column => $meta_key ) { delete_post_meta( $order->get_id(), $meta_key ); } } $this->creating = $original_creating; return $order; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function up()\n {\n Schema::create(\"posts_meta\", function ($table) {\n $table->integer('post_id')->index();\n $table->string('name')->index();\n $table->text('value');\n });\n }", "function create_table(){\n global $wpdb;\n\n require_onc...
[ "0.606024", "0.60519373", "0.5992187", "0.59794635", "0.5906317", "0.5904465", "0.58768284", "0.586737", "0.5857807", "0.57982165", "0.5773252", "0.5728638", "0.5685537", "0.56637955", "0.561878", "0.56082743", "0.55962753", "0.5549576", "0.5532366", "0.55311036", "0.55283725...
0.0
-1
Populate order postmeta from a custom table, for rolling back.
public function backfill_postmeta( &$order ) { $data = $this->get_order_data_from_table( $order ); if ( is_null( $data ) ) { return; } foreach ( $this->get_postmeta_mapping() as $column => $meta_key ) { if ( isset( $data->$column ) ) { update_post_meta( $order->get_id(), $meta_key, $data->$column ); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function carton_taxonomy_metadata_wpdbfix() {\n\tglobal $wpdb;\n\t$termmeta_name = 'carton_termmeta';\n\t$itemmeta_name = 'carton_order_itemmeta';\n\n\t$wpdb->carton_termmeta = $wpdb->prefix . $termmeta_name;\n\t$wpdb->order_itemmeta = $wpdb->prefix . $itemmeta_name;\n\n\t$wpdb->tables[] = 'carton_termmeta';\n\t$w...
[ "0.63789815", "0.6131994", "0.5977993", "0.5956847", "0.5905463", "0.5741529", "0.5707109", "0.55659497", "0.55400807", "0.55282634", "0.55242443", "0.55106556", "0.5493574", "0.54497427", "0.5447556", "0.5441842", "0.5371397", "0.53396004", "0.5289406", "0.5258317", "0.52580...
0.7320626
0
Query for Orders matching specific criteria.
public function query( $query_vars ) { $args = $this->get_wp_query_args( $query_vars ); if ( ! empty( $args['errors'] ) ) { $query = (object) array( 'posts' => array(), 'found_posts' => 0, 'max_num_pages' => 0, ); } else { $query = new WP_Query( $args ); } $orders = ( isset( $query_vars['return'] ) && 'ids' === $query_vars['return'] ) ? $query->posts : array_filter( array_map( 'wc_get_order', $query->posts ) ); if ( isset( $query_vars['paginate'] ) && $query_vars['paginate'] ) { return (object) array( 'orders' => $orders, 'total' => $query->found_posts, 'max_num_pages' => $query->max_num_pages, ); } return $orders; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchOrders() {\n //\terror_log ( 'addOrder\\n', 3, '/var/tmp/php.log' );\n $request = Slim::getInstance ()->request ();\n\t$criteria = json_decode ( $request->getBody () );\n try {\n $db = new DbOperation();\n $orders = $db->searchOrders ( $criteria );\n if ( $orders != nul...
[ "0.66474754", "0.6312737", "0.6261412", "0.61544096", "0.6093473", "0.6087433", "0.6077853", "0.6017852", "0.59962535", "0.5873788", "0.5867474", "0.58246213", "0.58217263", "0.57930475", "0.57501346", "0.57338935", "0.5728867", "0.5726951", "0.57187754", "0.5705568", "0.5702...
0.0
-1
function that requests whatever url is passed to it using cURL and returns the json encoded response
function getrequest($url){ // gets cURL resource $curl = curl_init(); // Set some options - we are passing in a useragent too here curl_setopt_array($curl, array( CURLOPT_RETURNTRANSFER => 1, CURLOPT_URL => $url, CURLOPT_USERAGENT => 'BenGreenlineApp' )); // Send the request & save response to $resp $resp = curl_exec($curl); // Close request to clear up some resources curl_close($curl); //returns the json encoded response $httpCode = curl_getinfo($handle, CURLINFO_HTTP_CODE); if($httpCode == 404) { $resp[0]= "MetroTransit API gave 404" ; }; return json_decode($resp); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getCurl( $url )\n{\n$curl = curl_init();\ncurl_setopt($curl, CURLOPT_URL, $url);\ncurl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n$res = curl_exec($curl); // execute\n if(curl_error($curl) ) // check for error\n {\n return false; // return false if error\n } else {\n return json_...
[ "0.7720324", "0.74984884", "0.7498166", "0.7485744", "0.7449741", "0.74355775", "0.7363466", "0.72981375", "0.71837544", "0.717369", "0.71515626", "0.70993507", "0.7052525", "0.7037627", "0.7036808", "0.69671476", "0.696463", "0.6962168", "0.6957833", "0.69276434", "0.6920388...
0.7485074
4
This function builds the header and the content. HEADER The header comes from $this>header If the header is a split header (more than one row), ($this>has_split_header()) Then the header object is an array of rows. Each row is an array of objects. Each object has colCount and content as properties $this>header = array($row0 = array(new stdClass(colCount, content), new stdClass(colCount, content)),$row1 = array(...)) Else the header is an array of TH CONTENTS BODY The body comes from $this>data $this>data is an array or rows $this>data = array(row0, row1, row2.....) Each row is an array or cells. $row0 = array(cell0, cell1, cell 2) If cell is an object Then it will take the colspan, content and class properties and create a cell with these Else its a string Its JUST the html content of the TD
function perform_export() { global $CFG; require_once($CFG->dirroot.'/blocks/bcgt/lib.php'); global $CFG, $USER; $name = preg_replace("/[^a-z 0-9]/i", "", $this->get_name()); ob_clean(); header("Pragma: public"); header('Content-Type: application/vnd.ms-excel; charset=utf-8'); header('Content-Disposition: attachment; filename="'.$name.'.xlsx"'); header("Cache-Control: must-revalidate, post-check=0, pre-check=0"); header("Cache-Control: private", false); require_once $CFG->dirroot . '/blocks/bcgt/lib/PHPExcel/Classes/PHPExcel.php'; $objPHPExcel = new \PHPExcel(); $objPHPExcel->getProperties() ->setCreator(fullname($USER)) ->setLastModifiedBy(fullname($USER)) ->setTitle($this->get_name()) ->setSubject($this->get_name()) ->setDescription($this->get_description()); // Remove default sheet $objPHPExcel->removeSheetByIndex(0); $sheetIndex = 0; // Set current sheet $objPHPExcel->createSheet($sheetIndex); $objPHPExcel->setActiveSheetIndex($sheetIndex); $objPHPExcel->getActiveSheet()->setTitle("Report"); $rowNum = 1; // Headers if(isset($this->header)) { if(!$this->has_split_header()) { $col = 0; foreach($this->header AS $head) { $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col, $rowNum, $head); $col++; } $rowNum++; } else { //foreach row foreach($this->header AS $row) { $col = 0; foreach($row AS $rowObj) { $columnCount = $rowObj->colCount; $columnContent = $rowObj->content; //add all the cells, //thenmerge $startCol = $col; for($i=0;$i<$columnCount;$i++) { if($i == 0) { $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col, $rowNum, $columnContent); } else { $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col, $rowNum, ''); } $col++; } $endCol = $col; if($columnCount != 1) { $objPHPExcel->getActiveSheet()->mergeCells(''.PHPExcel_Cell::stringFromColumnIndex($startCol). ''.$rowNum.':'.PHPExcel_Cell::stringFromColumnIndex($endCol - 1).''.$rowNum); } } $rowNum++; } } } //data if(isset($this->data)) { foreach($this->data AS $data) { $col = 0; foreach($data AS $cell) { if(is_a($cell, 'stdClass')) { $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col, $rowNum, $this->build_excell_cell($cell)); $objPHPExcel->getActiveSheet()->getStyle(''.PHPExcel_Cell::stringFromColumnIndex($col).''.$rowNum)->applyFromArray( array( 'fill' => array( 'type' => PHPExcel_Style_Fill::FILL_SOLID, 'color' => $this->get_excell_cell_color($cell) ), 'borders' => array( 'outline' => array( 'style' => PHPExcel_Style_Border::BORDER_THIN, 'color' => array('rgb'=>'cfcfcf') ) ) ) ); if(isset($cell->colspan) && $cell->colspan > 1) { $objPHPExcel->getActiveSheet()->mergeCells(''.PHPExcel_Cell::stringFromColumnIndex($col). ''.$rowNum.':'.PHPExcel_Cell::stringFromColumnIndex($col + ($cell->colspan - 1)).''.$rowNum); $col = $col + ($cell->colspan - 1); } } else { $objPHPExcel->getActiveSheet()->setCellValueByColumnAndRow($col, $rowNum, $cell); } $col++; } $rowNum++; } } // Freeze rows and cols (everything to the left of D and above 2) $objPHPExcel->getActiveSheet()->freezePane($this->get_frozen_panes()); // End $objPHPExcel->setActiveSheetIndex(0); $objWriter = \PHPExcel_IOFactory::createWriter($objPHPExcel, 'Excel2007'); ob_clean(); $objWriter->save('php://output'); exit; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function buildHeader()\n {\n $month_name = $this->monthLabels[$this->month - 1] . ' ' . $this->year;\n $vclass = strtolower($this->view);\n $h = \"<table class='\" . $this->tableClass . \" \" . $vclass . \"'>\";\n $h .= \"<thead>\";\n $h .= \"<tr class='\" . $this->hea...
[ "0.71341455", "0.70779115", "0.7013448", "0.69389945", "0.6789241", "0.633894", "0.62849635", "0.6275131", "0.6246616", "0.6180552", "0.6170492", "0.6157227", "0.61496925", "0.6132502", "0.61114776", "0.61031747", "0.6086093", "0.60797226", "0.6062225", "0.6043987", "0.603749...
0.0
-1
wants to return, for all targetqualids, the possible grades
function get_grade_options($data = null) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function calculateFinalResult($grades);", "function scorm_get_what_grade_array(){\n return array (HIGHESTATTEMPT => get_string('highestattempt', 'scorm'),\n AVERAGEATTEMPT => get_string('averageattempt', 'scorm'),\n FIRSTATTEMPT => get_string('firstattempt', '...
[ "0.58966136", "0.58272326", "0.56131667", "0.55722725", "0.55668163", "0.556094", "0.5555101", "0.5512875", "0.5497926", "0.5493892", "0.5478224", "0.5461942", "0.54542917", "0.5452086", "0.5437226", "0.54304546", "0.5428293", "0.5398376", "0.5385681", "0.538399", "0.5375686"...
0.5308148
23
This function builds the header and the content. HEADER The header comes from $this>header If the header is a split header (more than one row), ($this>has_split_header()) Then the header object is an array of rows. Each row is an array of objects. Each object has colCount and content as properties $this>header = array($row0 = array(new stdClass(colCount, content), new stdClass(colCount, content)),$row1 = array(...)) Else the header is an array of TH CONTENTS BODY The body comes from $this>data $this>data is an array or rows $this>data = array(row0, row1, row2.....) Each row is an array or cells. $row0 = array(cell0, cell1, cell 2) If cell is an object Then it will take the colspan, content and class properties and create a td with these Else its a string Its JUST the html content of the TD
function display_report() { $out = '<div>'; $out .= '<table id="resultsTable">'; $out .= '<thead>'; if(isset($this->header)) { if(!$this->has_split_header()) { $out .= '<tr>'; foreach($this->header AS $head) { $out .= '<th>'.$head.'</th>'; } $out .= '</tr>'; } else { //foreach row foreach($this->header AS $row) { $out .= '<tr>'; foreach($row AS $rowObj) { $columnCount = isset($rowObj->colCount) ? $rowObj->colCount : 1; $columnContent = $rowObj->content; $out .= '<th colspan="'.$columnCount.'">'.$columnContent.'</th>'; } $out .= '</tr>'; } } } $out .= '</thead>'; $out .= '<tbody>'; if(isset($this->data)) { foreach($this->data AS $row) { $out .= '<tr>'; foreach($row AS $cell) { if(is_a($cell, 'stdClass')) { $out .= $this->build_cell($cell); } else { $out .= '<td>'.$cell.'</td>'; } } $out .= '</tr>'; } } //count the last row // $out .= '<tr>'; // for($i=0;$i<count($row);$i++) // { // $out .= '<td class="emptyrow"><div class="emptycell">X</div></td>'; // } // $out .= '</tr>'; $out .= '</tbody>'; $out .= '</table>'; $out .= '</div>'; return $out; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function buildHeader()\n {\n $month_name = $this->monthLabels[$this->month - 1] . ' ' . $this->year;\n $vclass = strtolower($this->view);\n $h = \"<table class='\" . $this->tableClass . \" \" . $vclass . \"'>\";\n $h .= \"<thead>\";\n $h .= \"<tr class='\" . $this->hea...
[ "0.72196996", "0.7174281", "0.7061431", "0.70035684", "0.67965704", "0.6398219", "0.63580745", "0.6276241", "0.6273534", "0.6235406", "0.6232775", "0.6153025", "0.61525357", "0.6145799", "0.6129893", "0.61240304", "0.6113651", "0.6098646", "0.607836", "0.60606176", "0.6057262...
0.59483683
39
Creates a cell for the build report
protected function create_cell($params = array()) { $cellObj = new stdClass(); if($params) { foreach($params AS $name=>$value) { $cellObj->$name = $value; } } return $cellObj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function buildReport();", "public function build_table()\n {\n if (count($this->properties) > 0)\n {\n foreach ($this->properties as $property => $values)\n {\n $contents = array();\n $contents[] = $property;\n \n...
[ "0.6500202", "0.615256", "0.58895713", "0.5836996", "0.5825629", "0.581223", "0.57863814", "0.57828224", "0.5696107", "0.5694339", "0.56219083", "0.5608443", "0.55924875", "0.5535631", "0.55146754", "0.5476028", "0.5475541", "0.54647565", "0.54646266", "0.545714", "0.545316",...
0.5199917
40
Creates a cell object
protected function create_header_cell($content, $collCount) { return $this->create_cell(array('content'=>$content,'colCount'=>$collCount)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCreateCell()\n {\n $object = new \\stdClass();\n $object->title = 'barfoo';\n $cell = $this->createFactory()->createCell('title', PropertyColumn::class, $object, []);\n\n $this->assertInstanceOf(Cell::class, $cell);\n $this->assertEquals('barfoo', $cell->va...
[ "0.7641631", "0.7278254", "0.69648564", "0.6454816", "0.6204502", "0.60486346", "0.60446584", "0.5939064", "0.5904844", "0.58957237", "0.5877901", "0.5830291", "0.5808562", "0.5778044", "0.5772847", "0.5704984", "0.5629285", "0.5624459", "0.5614759", "0.56047297", "0.5582794"...
0.47721666
86
Creates a blank cell/object for the tables/excell
protected function set_up_blank_object() { return $this->create_cell(array('content'=>'','colCount'=>1)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCreateCell()\n {\n $object = new \\stdClass();\n $object->title = 'barfoo';\n $cell = $this->createFactory()->createCell('title', PropertyColumn::class, $object, []);\n\n $this->assertInstanceOf(Cell::class, $cell);\n $this->assertEquals('barfoo', $cell->va...
[ "0.661955", "0.6579929", "0.6475878", "0.64359766", "0.64234424", "0.6166463", "0.6143382", "0.61267924", "0.5845498", "0.579732", "0.5758643", "0.57569206", "0.57472616", "0.5743905", "0.57292324", "0.5712072", "0.5679854", "0.5667306", "0.55989164", "0.5590504", "0.5588566"...
0.84076047
0