query
stringlengths
11
3.13k
ru_query
stringlengths
9
3.91k
document
stringlengths
18
71k
metadata
dict
negatives
listlengths
0
100
negative_scores
listlengths
0
100
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Tests the html head links.
Тестирует ссылки в заголовке html.
public function testHtmlHeadLinks() { $support_ticket = $this->drupalCreateSupportTicket(); $this->drupalGet($support_ticket->urlInfo()); $result = $this->xpath('//link[@rel = "version-history"]'); $this->assertEqual($result[0]['href'], $support_ticket->url('version-history')); $result = $this->x...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _check_head()\n\t{\n\t\tshow_error('debug does not work with the current version of Head library');\n\t\n\t\t$errors = '';\n\t\n\t\t//Check all the links for CSS\n\t\tforeach((array)$this->css as $css)\n\t\t{\n\t\t\t$file = is_array($css) ? $css[0] : $css;\n\t\t\tif ( ! file_exists($this->_get_lin...
[ "0.7185164", "0.69724095", "0.656206", "0.648328", "0.6400312", "0.63409394", "0.6322435", "0.6294879", "0.62626415", "0.6228132", "0.6228064", "0.61980873", "0.6193907", "0.614954", "0.611956", "0.61044776", "0.6080056", "0.60437363", "0.6037081", "0.6028943", "0.6028688", ...
0.78134227
0
Tests that we store and retrieve multibyte UTF8 characters correctly.
Тесты, проверяющие корректное хранение и извлечение многобайтных UTF8-символов.
public function testMultiByteUtf8() { $title = '🐝'; $this->assertTrue(mb_strlen($title, 'utf-8') < strlen($title), 'Title has multi-byte characters.'); $support_ticket = $this->drupalCreateSupportTicket(array('title' => $title)); $this->drupalGet($support_ticket->urlInfo()); $result = $this->xpath(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function test_returns_true_for_utf8_strings() {\n // from http://www.i18nguy.com/unicode-example.html\n $utf8 = $this->get_testdata('utf-8.txt');\n $this->assertTrue(count($utf8) > 3);\n foreach ($utf8 as $string) {\n $this->assertTrue(seems_utf8($string));\n }\n }"...
[ "0.76496893", "0.68847066", "0.68486285", "0.6833621", "0.6806744", "0.6744659", "0.6720361", "0.6569568", "0.6496865", "0.64874697", "0.6466876", "0.64388347", "0.64358455", "0.64244616", "0.6396655", "0.63742805", "0.6335759", "0.63269097", "0.6323076", "0.63185716", "0.629...
0.7180495
1
Sanitize this request's input.
Очистите входные данные этого запроса.
public function sanitize() { $this->sanitizer = \Sanitizer::make($this->input(), $this->filters()); $this->replace($this->sanitizer->sanitize()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sanitize()\n {\n $inputs = $this->all();\n\n foreach ($inputs as $field => $value) {\n $inputs[$field] = filter_var($value, FILTER_SANITIZE_STRING);\n }\n\n $this->replace($inputs);\n }", "function sanitizeInput() {\n\t\t$_GET = filter_input_array(INP...
[ "0.7901133", "0.7617234", "0.75558186", "0.72809184", "0.7217363", "0.7152169", "0.71452767", "0.7108423", "0.70685405", "0.69733936", "0.68336314", "0.68315756", "0.6728299", "0.6728089", "0.67182523", "0.67179614", "0.67059696", "0.6684357", "0.6654827", "0.6645629", "0.664...
0.7764818
1
/ !Get methods Returns the interval's islowerinclusive flag
/ !Get методы Возвращает флаг islowerinclusive интервала
public function getIsLowerInclusive(): bool { return $this->isLowerInclusive; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isLowerInclusive(): bool\n {\n return $this->isLowerInclusive;\n }", "public function includeLowerBound() {\n return $this->lBoundIn;\n }", "public function setLowerInclusive(): self\n {\n $this->isLowerInclusive = true;\n \n return $this;\n }", "pu...
[ "0.7301347", "0.7185736", "0.64984924", "0.64267725", "0.63345647", "0.6296367", "0.6172604", "0.6130451", "0.61063325", "0.61063325", "0.604741", "0.60256374", "0.6006506", "0.59237045", "0.5869266", "0.58648247", "0.5829486", "0.5827955", "0.5827001", "0.5785861", "0.577911...
0.7532276
0
Returns the interval's isupperinclusive flag
Возвращает флаг isupperinclusive интервала
public function getIsUpperInclusive(): bool { return $this->isUpperInclusive; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isUpperInclusive(): bool\n {\n return $this->isUpperInclusive;\n }", "public function isUpperExclusive(): bool\n {\n return ! $this->isUpperInclusive;\n }", "public function includeUpperBound() {\n return $this->uBoundIn;\n }", "public function setUpperInclusive(...
[ "0.76339257", "0.66666996", "0.6320326", "0.62438035", "0.6068827", "0.59835017", "0.5952848", "0.58818007", "0.5852087", "0.5819349", "0.5806875", "0.57966655", "0.5778625", "0.571192", "0.56440514", "0.5557444", "0.555035", "0.55470586", "0.5535742", "0.5476863", "0.5462312...
0.7841785
0
Returns true if the lowerbound is exclusive
Возвращает true, если нижняя граница исключена
public function isLowerExclusive(): bool { return ! $this->isLowerInclusive; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isUpperExclusive(): bool\n {\n return ! $this->isUpperInclusive;\n }", "public function inRange()\n {\n return $this->getNumber() >= $this->minRange && $this->getNumber() <= $this->maxRange;\n }", "public function isLowerBoundValidator(): bool {\n return $this->min ...
[ "0.65931773", "0.64685035", "0.6392864", "0.6377243", "0.62147075", "0.61611307", "0.61542314", "0.61137754", "0.6069121", "0.606069", "0.601594", "0.6004464", "0.6004321", "0.5973708", "0.58616996", "0.5860532", "0.585399", "0.5840067", "0.58296347", "0.5820757", "0.5774316"...
0.7726974
0
Returns true if the upperbound is exclusive
Возвращает true, если верхняя граница исключена
public function isUpperExclusive(): bool { return ! $this->isUpperInclusive; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isLowerExclusive(): bool\n {\n return ! $this->isLowerInclusive;\n }", "public function isUpperBoundValidator(): bool {\n return $this->min < 0 && $this->max > 0;\n }", "public function isUpperInclusive(): bool\n {\n return $this->isUpperInclusive;\n }", "public ...
[ "0.7132193", "0.66208506", "0.6560112", "0.65457606", "0.6543624", "0.64321005", "0.63182956", "0.6306236", "0.6265052", "0.6241442", "0.6228662", "0.61712843", "0.61650246", "0.61234725", "0.6120449", "0.5952524", "0.59221", "0.5894416", "0.58843076", "0.5872974", "0.5830933...
0.75667495
0
Returns true if the upperbound is inclusive
Возвращает true, если верхняя граница включена
public function isUpperInclusive(): bool { return $this->isUpperInclusive; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function inRange()\n {\n return $this->getNumber() >= $this->minRange && $this->getNumber() <= $this->maxRange;\n }", "public function includeUpperBound() {\n return $this->uBoundIn;\n }", "public function includeLowerBound() {\n return $this->lBoundIn;\n }", "public function getI...
[ "0.73519063", "0.6915684", "0.6745426", "0.6721427", "0.6696382", "0.66951203", "0.6670799", "0.6569608", "0.647486", "0.64619946", "0.64450276", "0.6406027", "0.6396808", "0.6396523", "0.63700134", "0.6359953", "0.63559705", "0.6329038", "0.6313878", "0.6300226", "0.6223901"...
0.7077847
1
Parses an interval string
Парсит строку интервала
public function parse(string $string): self { // if the $string is not valid interval, short-circuit $pattern = '/^[\[\(]-?(\d*[\.]?\d+|INF), -?(\d*[\.]?\d+|INF)[\]\)]$/'; if ( ! preg_match($pattern, $string)) { throw new InvalidArgumentException( __METHOD__ . "()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function readInterval($s) {\n $parts = explode(' ', $s);\n if (count($parts) != 2 || !is_numeric($parts[0])) {\n throw new InvalidArgumentException(\"Parameter must be in format '[number] [unit-of-time]'\");\n }\n $unit = strtolower($parts[1]);\n $bigUnits = array('day' => 'D', 'days' => 'D');\n $smallUni...
[ "0.7279617", "0.6553945", "0.633563", "0.63328326", "0.6067124", "0.60508084", "0.59489435", "0.59366065", "0.5857498", "0.5777887", "0.5745532", "0.56518567", "0.5597374", "0.5582767", "0.544582", "0.5423506", "0.54221326", "0.5326376", "0.5214018", "0.51989055", "0.5198703"...
0.7112642
1
Set the cache reset flag.
Установите флаг сброса кэша.
public function setResetCache($resetCache);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function resetCache();", "public function resetCache();", "public function resetEnableCache()\n {\n $this->cacheEnabled = $this->lastCacheEnabled;\n }", "public function resetCache()\n {\n }", "public function shouldResetCache();", "public function reset()\n {\n $this->cac...
[ "0.76884556", "0.76884556", "0.75416726", "0.7502098", "0.7355579", "0.70681876", "0.687162", "0.6729418", "0.66351056", "0.66285634", "0.66241884", "0.65304047", "0.6504155", "0.6504155", "0.6435593", "0.63665026", "0.63504404", "0.632219", "0.63010645", "0.6294903", "0.6292...
0.81999993
0
Should we reset the cache on this request?
Нужно ли сбросить кэш на этом запросе?
public function resetCache();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function shouldResetCache();", "public function resetCache()\n {\n }", "protected function refreshCache()\n {\n if ($this->request->isNoCache() && $this->responseIsCached()) {\n $this->app['cache']->forget($this->cacheKey);\n }\n }", "public function clearCache() {}", ...
[ "0.8403102", "0.7785865", "0.7613404", "0.7373493", "0.7373493", "0.73277414", "0.7300471", "0.7205763", "0.7130112", "0.7092498", "0.7048992", "0.70179856", "0.7014313", "0.699496", "0.6970341", "0.6960508", "0.6960508", "0.69131714", "0.68886656", "0.6885806", "0.6884207", ...
0.7843693
1
Should this request use session authentication?
Нужно ли использовать аутентификацию сессии для этого запроса?
public function useSessionAuth();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function needsSessionDoubleAuthenticationCheck() ;", "public function checkSessionAccess() {\n // Defaults to True; any authentication is handled by the resource itself.\n return true;\n }", "public function canPreserveSessionDataWhenAuthenticating() {}", "public function checkAuthWithSessio...
[ "0.75409037", "0.7296258", "0.72700673", "0.72157234", "0.71775866", "0.6951518", "0.6950835", "0.68410987", "0.6796148", "0.67949486", "0.6777252", "0.676013", "0.6713127", "0.6707142", "0.66514117", "0.66380244", "0.6637398", "0.6634509", "0.6620395", "0.6596185", "0.659526...
0.75396526
1
Listen to bootstrap event. Attaches the module's render listener to the application event manager instance.
Слушайте событие bootstrap. Прикрепляет прослушиватель отрисовки модуля к экземпляру менеджера событий приложения.
public function onBootstrap($e) { $app = $e->getApplication(); $events = $app->getEventManager(); $events->attach('render', [$this, 'onRender'], 100); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function onBootstrap(MvcEvent $event)\n {\n $app = $event->getTarget();\n $events = $app->getEventManager();\n $events->attach(MvcEvent::EVENT_RENDER, array($this, 'onRender'), 100);\n }", "public function onBootstrap(MvcEvent $e)\n {\n /** @var ApplicationInterface $a...
[ "0.7412147", "0.7274157", "0.7202705", "0.68885314", "0.68885314", "0.68885314", "0.68885314", "0.6825447", "0.6719995", "0.6685989", "0.6662744", "0.65900797", "0.65799534", "0.6564925", "0.65242994", "0.6485345", "0.63521487", "0.63193226", "0.63185", "0.62972426", "0.62791...
0.7713895
0
Listen to render event. Attaches the SwaggerViewStrategy to the view event manager instance if a Swagger view model is detected.
Слушайте событие рендера. При обнаружении модели Swagger привязывает SwaggerViewStrategy к экземпляру менеджера событий view.
public function onRender($e) { $model = $e->getResult(); if (! $model instanceof ViewModel) { return; } $app = $e->getApplication(); $services = $app->getServiceManager(); $view = $services->get('View'); $events = $view->getEventManager...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function render()\n {\n $view = $this->event->getView();\n if ($view instanceof View) {\n $this->renderingStrategy->setView($view);\n\n // Setting the rendered view as the response\n $this->event->getResponse()->setBody($this->renderingStrategy->render());\n...
[ "0.63342434", "0.61683255", "0.6125966", "0.5458438", "0.5239636", "0.5153726", "0.51347935", "0.51273584", "0.51114905", "0.508668", "0.5058521", "0.50433934", "0.5013526", "0.4993464", "0.49518505", "0.49439391", "0.4900713", "0.48870766", "0.4878151", "0.48546377", "0.4841...
0.71030486
0
Returns true if the tag is exposed
Возвращает true, если тег отображен
function isExposed() { return $this->exposed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasTags(): bool;", "public function hasTags(): bool;", "public function hasTags() : bool;", "public function isPublic()\n {\n return $this->flagsHas(self::IS_PUBLIC);\n }", "public function isViewable(): bool\n {\n return $this->status != self::STATUS_HIDDEN;\n }",...
[ "0.6871049", "0.6871049", "0.67992646", "0.6616368", "0.6613503", "0.6540294", "0.65110326", "0.64996916", "0.649938", "0.649798", "0.6483404", "0.6469668", "0.64140916", "0.6397022", "0.63799834", "0.6378082", "0.6357228", "0.6309084", "0.62897784", "0.62863064", "0.6277134"...
0.7407866
0
Set the enabled flag of this tag
Установите флаг enabled этого тега
function setEnabled($enabled) { $this->enabled = $enabled; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setEnabled($enable);", "public function setEnabled($enabled);", "function setEnabled($enabled = true);", "protected function setEnabled($enabled) {\n\n\t \t\t \t$this->enabled = $enabled;\n\t }", "public function set_enabled(bool $enabled = \\true)\n {\n }", "public functi...
[ "0.77773696", "0.77651393", "0.76675135", "0.7632741", "0.7600858", "0.7545297", "0.7501311", "0.7475785", "0.7475785", "0.7475785", "0.7336503", "0.72987956", "0.7275066", "0.72528636", "0.7223732", "0.72053576", "0.71782446", "0.71419865", "0.703709", "0.6997093", "0.691697...
0.7852488
0
Returns an array of story states and totals.
Возвращает массив состояний историй и итоговых значений.
public function getStoryStates() { $states = array(); $data = $this->getData('stories'); $total = (int) $data->attributes()->total; // Parse story API data for state count $stories = $data->xpath('/stories/story'); while(list( , $node) = each($stories)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getStates(): array;", "public static function totals()\n {\n return [];\n }", "public function getEpics()\n {\n $data = $this->getData('stories');\n $epic_states = array();\n $formatted = array();\n foreach( $this->epics as $epic ) {\n $epi...
[ "0.60306257", "0.5996237", "0.59729415", "0.58354497", "0.58354497", "0.5820977", "0.5785108", "0.5761071", "0.57529634", "0.5733886", "0.5725187", "0.5663867", "0.5647059", "0.5641737", "0.5552936", "0.5550473", "0.5549096", "0.55384564", "0.55345845", "0.5508866", "0.549948...
0.80171895
0
/ Use the setUp() method to define settings of this meta box.
Используйте метод setUp(), чтобы определить настройки этого мета-ящика.
public function setUp() { /* * Create tabbed sections. */ $this->addSettingSections( array( 'section_id' => 'theatre_tickets', 'title' => 'Ticket', 'collapsible' => array( 'title' => 'Ticket', ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setUp() {\n\n\t\t/*\n\t\t * ( optional ) Adds a contextual help pane at the top right of the page that the meta box resides.\n\t\t */\n\t\t$this->addHelpText( \n\t\t\t__( 'This text will appear in the contextual help pane.', 'legull' ), \n\t\t\t__( 'This description goes to the sidebar of the help ...
[ "0.8237976", "0.7588684", "0.74087864", "0.73782635", "0.7368556", "0.735146", "0.73447883", "0.73181325", "0.7304443", "0.7301227", "0.7283835", "0.725383", "0.7230093", "0.72129554", "0.72114336", "0.72089535", "0.7194675", "0.71881515", "0.71870583", "0.7180607", "0.717905...
0.7631542
1
TODO: Implement isGroup() method.
TODO: Реализовать метод isGroup().
public function isGroup(): bool { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function group();", "public function hasGroup(){\n return $this->_has(1);\n }", "function isMultiGroup()\n\t{\n\t\treturn true;\n\t}", "public function group()\n\t{\n\t}", "public function groups();", "public function groups();", "public function getGroup();", "public function getGroup...
[ "0.79098535", "0.7644274", "0.7507701", "0.74602664", "0.7450829", "0.7450829", "0.7430906", "0.7430906", "0.7430906", "0.7430906", "0.73913103", "0.73913103", "0.72742987", "0.72742987", "0.71984136", "0.7119404", "0.71145827", "0.70986813", "0.7010929", "0.6929105", "0.6869...
0.82438713
0
Return an array of social media platforms.
Вернуть массив социальных сетей.
public function get_social_media_platforms() { return $this->social_media_platforms; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPlatforms()\n {\n return $this->platforms;\n }", "public function GetPlatforms()\n {\n try {\n $platforms = $this->sample['browscap']\n ->map(function ($item, $key) {\n # Cast array into collection\n $item =...
[ "0.74161524", "0.69818336", "0.6908933", "0.6388562", "0.6352483", "0.63330805", "0.62439287", "0.61406595", "0.6004694", "0.5928621", "0.59210527", "0.58994836", "0.58944243", "0.5877151", "0.58234894", "0.5823435", "0.58083296", "0.57641095", "0.57614076", "0.5755976", "0.5...
0.8462566
0
Return an array of social media feeds.
Вернуть массив социальных сетей.
public function get_social_feeds() { return $this->social_feeds; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFeed()\n {\n $feed = $this->getFeedCache();\n if (!$feed) {\n $feed = $this->getFeedUncached();\n $this->extend('updateFeedUncachedData', $feed);\n $this->setFeedCache($feed);\n if (class_exists('AbstractQue...
[ "0.7566835", "0.7546637", "0.73134786", "0.71517694", "0.7103152", "0.7043407", "0.69479185", "0.69311357", "0.68839794", "0.6873913", "0.6836128", "0.6829705", "0.6755717", "0.6751424", "0.67438304", "0.673205", "0.67287403", "0.6711638", "0.6687908", "0.6650157", "0.6648002...
0.78594154
0
Get a social media message depending on platform.
Получить сообщение для социальной сети в зависимости от платформы.
public function get_social_media_message( int $post_id, string $platform ) : string { $message = $this->get_social_media_message_raw( $post_id, $platform ); $message = $this->filter_social_media_message( $message, $post_id, $platform ); // Sanitize the message. return $this->sanitize_social_media_message( $m...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_message();", "public function get_message();", "public static function android()\n {\n return new Message(self::TYPE_ANDROID);\n }", "public function getUserMessage();", "public function getUserMessage();", "protected function get_message() {\n\n\t\t\t$message = $this->me...
[ "0.5854448", "0.5854448", "0.57353693", "0.5672314", "0.5672314", "0.5649747", "0.5504957", "0.5504957", "0.5504957", "0.55039656", "0.5494844", "0.5468244", "0.5459595", "0.5455938", "0.5397317", "0.539074", "0.5381438", "0.5344956", "0.53449047", "0.5324441", "0.53204036", ...
0.70718855
0
Return the user capability string to manage social media.
Верните строку пользовательских возможностей для управления социальными сетями.
public function get_user_cap_manage_string() { return $this->user_cap_manage_social_media; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_user_cap_share_string() {\n\t\treturn self::USER_CAP_SOCIAL_SHARE;\n\t}", "public function get_capability() : string;", "public function get_capability() : string {\n return 'manage_options';\n }", "function metaslider_permissions($capability) {\n $capability = 'administrator...
[ "0.6662557", "0.6485181", "0.64054894", "0.62527245", "0.61690384", "0.61640644", "0.6019747", "0.5927686", "0.5799099", "0.5675818", "0.56514686", "0.56236404", "0.5587976", "0.5583648", "0.5570806", "0.553471", "0.55038387", "0.5482185", "0.5477575", "0.54461807", "0.543587...
0.82257676
0
Return the user capability string to share social media.
Вернуть строку пользовательских возможностей для общей социальной сети.
public function get_user_cap_share_string() { return self::USER_CAP_SOCIAL_SHARE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_user_cap_manage_string() {\n\t\treturn $this->user_cap_manage_social_media;\n\t}", "public function __toString() {\n\t\t// translators: Basic name of the plugin\n\t\treturn sprintf( __( '%s: Social Media', 'wpcampus-social' ), 'WPCampus' );\n\t}", "public function get_capability() : string;...
[ "0.7556454", "0.5981519", "0.5798927", "0.5665007", "0.5635236", "0.5546429", "0.5510206", "0.5472914", "0.54718983", "0.54360825", "0.5358888", "0.53489447", "0.5345732", "0.5331127", "0.5310376", "0.5302815", "0.5298266", "0.5283794", "0.5272559", "0.52675605", "0.5242405",...
0.78455746
0
Creating tweet intent URL.
Создание URL с намерением твита.
public function get_tweet_intent_url( $args ) { // Build arguments. $final_args = array(); if ( ! empty( $args['url'] ) ) { $final_args['url'] = urlencode( trim( strip_tags( $args['url'] ) ) ); } if ( ! empty( $args['via'] ) ) { $final_args['via'] = urlencode( trim( strip_tags( $args['via'] ) ) ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function tweet_intent($text, $url, $twitter = null)\n{\n if (! is_null($twitter)) {\n $text = str_replace('TWITTER_NAME', $twitter, $text);\n }\n\n return 'https://twitter.com/intent/tweet?text='.rawurlencode($text).'&url='.rawurlencode($url);\n}", "public function getTweetUrl()\n {\n r...
[ "0.7270318", "0.6913166", "0.65466297", "0.6431821", "0.6400457", "0.6397411", "0.6325129", "0.6307222", "0.6227301", "0.6216257", "0.6054652", "0.6035848", "0.60230917", "0.60113233", "0.59963375", "0.59593743", "0.5954708", "0.5925143", "0.5918764", "0.58381796", "0.5799441...
0.7313644
0
Get the max message length depending on platform. If no platform is passed, will get max lengths for all platforms.
Получите максимальную длину сообщения в зависимости от платформы. Если не передано ни одной платформы, будут получены максимальные длины для всех платформ.
public function get_max_message_length( $platform = '' ) { if ( ! empty( $platform ) ) { if ( ! empty( $this->max_message_length[ $platform ] ) ) { // If no set length in options, return default length. return (int) $this->max_message_length[ $platform ]; } return 0; } // If no specific plat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMaxMessageLength()\n {\n return $this->maxMessageLength;\n }", "public static function getMaxLength(): int {\n\t\treturn self::$maxLength;\n\t}", "public function getMaximumLength()\n {\n if (array_key_exists(\"maximumLength\", $this->_propDict)) {\n return ...
[ "0.73990875", "0.72409785", "0.7219898", "0.71128666", "0.7076374", "0.70760435", "0.6936059", "0.69320905", "0.6771388", "0.674763", "0.66820127", "0.66622704", "0.65904444", "0.6441376", "0.63880664", "0.6328603", "0.6313195", "0.6240721", "0.62130797", "0.6212102", "0.6187...
0.89572203
0
Will return true if post is an excluded post on a specific platform.
Вернёт true, если пост является исключённым постом на конкретной платформе.
public function is_excluded_post( $post_id, $platform ) { return in_array( $post_id, $this->get_excluded_posts( $platform ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_excluded_posts( $platform ) {\n\t\treturn array();\n\t}", "function rfi_should_stop_post_publishing($post) {\n\t$is_watched_post_type = rfi_is_supported_post_type($post);\n\t$is_after_enforcement_time = rfi_is_in_enforcement_window($post);\n\t$large_enough_image_attached = rfi_post_has_large_...
[ "0.675817", "0.65839165", "0.63558626", "0.61574966", "0.6037555", "0.59935856", "0.59768313", "0.5972748", "0.59710974", "0.59620494", "0.59620494", "0.5924524", "0.5893961", "0.5889082", "0.5843273", "0.5824087", "0.57747406", "0.57531995", "0.57531995", "0.57228696", "0.57...
0.78555655
0
Convert JSON to Array of Flights CONVERTING JSON TO ARRAY OF FLIGHT
Конвертировать JSON в массив рейсов CONVERTING JSON TO ARRAY OF FLIGHT
public function convertToArray($body){ $data = json_decode($body); $data = $data->trips[0]; $flights = []; foreach($data->dates as $key => $value){ foreach($value->flights as $key2 => $value2){ $flight = new Flight(); $flight->setDeparture...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function flights()\n {\n $flights = [];\n foreach ($this->result()->xpath('//air:AirPricingSolution') as $airPricingSolution) {\n $flights[]['flight'] = [\n 'details' => $this->getFlightDetails($airPricingSolution),\n 'pricing' => $this->getFlightPri...
[ "0.6768", "0.5685274", "0.56137866", "0.5538807", "0.53330195", "0.52878916", "0.5286482", "0.52665627", "0.51957595", "0.51919067", "0.5182042", "0.51632905", "0.50566953", "0.5035946", "0.5032948", "0.50323164", "0.5026231", "0.50256485", "0.50158525", "0.5006191", "0.49968...
0.7127231
0
woocommerce_pip_my_orders_action function. Add HTML invoice button to my orders page so customers can view their invoices.
Функция woocommerce_pip_my_orders_action. Добавить кнопку HTML-счета на страницу "Мои заказы", чтобы клиенты могли просмотреть свои счета.
function woocommerce_pip_my_orders_action( $actions, $order ) { if ( in_array( $order->status, array( 'processing', 'completed' ) ) ) { $actions[] = array( 'url' => wp_nonce_url( site_url( '?print_pip_invoice=true&post='.$order->id ), 'client-print-pip' ), 'name' => __( 'View invoice', 'woocommerce-pip' ) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woocommerce_pip_alter_order_actions( $order ) {\n\n\t\t\t?>\n\t\t\t\t<a class=\"button tips pip-link\" data-tip=\"<?php esc_attr_e( 'Print Invoice', 'woocommerce-pip' ); ?>\" href=\"<?php echo wp_nonce_url( admin_url( '?print_pip=true&post='.$order->id.'&type=print_invoice'), 'print-pip' ); ?>\"><img src=...
[ "0.7437382", "0.68170327", "0.67349803", "0.6513923", "0.65096176", "0.65042883", "0.63756204", "0.63732415", "0.63644934", "0.6321169", "0.627622", "0.6232554", "0.6157307", "0.61428475", "0.6089371", "0.60560435", "0.6043712", "0.60381174", "0.6029566", "0.6005625", "0.5959...
0.7761132
0
woocommerce_pip_page function. WordPress Settings Page
Функция woocommerce_pip_page. Страница настроек WordPress
function woocommerce_pip_page() { //Check the user capabilities if ( ! current_user_can( 'manage_woocommerce' ) ) { wp_die( __( 'You do not have sufficient permissions to access this page.', 'woocommerce-pip' ) ); } //Load needed WP resources for media uploader wp_enqueue_media(); //Save the field values if ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function pro6pp_settings_page ()\n {\n if (! current_user_can('manage_woocommerce')) {\n wp_die(\n __(\n 'You do not have sufficient' .\n ' permissions to access this page.',\n ...
[ "0.75846314", "0.72501767", "0.72459376", "0.7049723", "0.6908472", "0.6860766", "0.6773082", "0.6771104", "0.6764996", "0.6725326", "0.67149943", "0.6714908", "0.6710785", "0.6703185", "0.6685194", "0.6682159", "0.6677213", "0.6627483", "0.6626994", "0.66114825", "0.6603958"...
0.7670714
0
woocommerce_pip_add_box function. Add the meta box on the single order page
Функция woocommerce_pip_add_box. Добавление метабокса на странице отдельного заказа
function woocommerce_pip_add_box() { add_meta_box( 'woocommerce-pip-box', __( 'Print invoice/packing list', 'woocommerce-pip' ), 'woocommerce_pip_create_box_content', 'shop_order', 'side', 'default' ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_order_meta_box() {\n\n\t\tadd_meta_box(\n\t\t\t'wc_shipwire_order_meta_box',\n\t\t\t__( 'Shipwire Order Information', 'woocommerce-shipwire' ),\n\t\t\tarray( $this, 'render_order_meta_box'),\n\t\t\t'shop_order',\n\t\t\t'side',\n\t\t\t'high'\n\t\t);\n\t}", "function store_add_cart_meta(){\n \t...
[ "0.8006347", "0.77595025", "0.7754601", "0.7745639", "0.7739097", "0.7715668", "0.7627119", "0.75832903", "0.75742304", "0.75179064", "0.746191", "0.74490714", "0.7440462", "0.74088943", "0.74017954", "0.7396631", "0.7356823", "0.7355198", "0.7335077", "0.7328468", "0.7320058...
0.86216605
0
woocommerce_pip_create_box_content function. Create the meta box content on the single order page
Функция woocommerce_pip_create_box_content. Создание содержимого мета-окна на странице отдельного заказа
function woocommerce_pip_create_box_content() { global $post_id; ?> <table class="form-table"> <?php if ( get_post_meta( $post_id, '_pip_invoice_number', true ) ) { ?> <tr> <td><?php _e( 'Invoice: #', 'woocommerce-pip' ); echo get_post_meta( $post_id, '_pip_invoice_number', true ); ?></td> </tr> <?php }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woocommerce_pip_add_box() {\n\n\tadd_meta_box( 'woocommerce-pip-box', __( 'Print invoice/packing list', 'woocommerce-pip' ), 'woocommerce_pip_create_box_content', 'shop_order', 'side', 'default' );\n}", "function tech_create_meta_box() {\n\tglobal $meta_box;\n\tadd_meta_box($meta_box['id'], $meta_box['t...
[ "0.7756115", "0.7077102", "0.700246", "0.69542503", "0.6942081", "0.6937844", "0.6931036", "0.6881025", "0.6859388", "0.68585294", "0.68522173", "0.68416965", "0.68387324", "0.6824408", "0.681947", "0.6817257", "0.68115306", "0.6810486", "0.68071777", "0.6803376", "0.67670435...
0.75651187
1
woocommerce_pip_alter_order_actions function. Insert buttons to orders page
Функция woocommerce_pip_alter_order_actions. Вставка кнопок на страницу заказов
function woocommerce_pip_alter_order_actions( $order ) { ?> <a class="button tips pip-link" data-tip="<?php esc_attr_e( 'Print Invoice', 'woocommerce-pip' ); ?>" href="<?php echo wp_nonce_url( admin_url( '?print_pip=true&post='.$order->id.'&type=print_invoice'), 'print-pip' ); ?>"><img src="<?php echo woocommer...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wc_get_account_orders_actions($order)\n {\n }", "public function add_order_bulk_actions() {\n\t\tglobal $post_type, $post_status;\n\n\t\tif ( $post_type == 'shop_order' && $post_status != 'trash' ) {\n\t\t\t?>\n\t\t\t\t<script type=\"text/javascript\">\n\t\t\t\t\tjQuery( document ).ready( function...
[ "0.7125076", "0.712278", "0.7047335", "0.700667", "0.6959651", "0.68122387", "0.6764015", "0.67309713", "0.66472346", "0.64080906", "0.63861394", "0.62955207", "0.6291838", "0.6243846", "0.62108207", "0.6197844", "0.61773956", "0.6153738", "0.6149615", "0.61325866", "0.609619...
0.8323474
0
woocommerce_pip_order_items_table function. Output items for display
Функция woocommerce_pip_order_items_table. Вывод элементов для отображения
function woocommerce_pip_order_items_table( $order, $show_price = FALSE ) { $return = ''; foreach( $order->get_items() as $item ) { // get the product; if this variation or product has been deleted, this will return null... $_product = $order->get_product_from_item( $item ); $sku = $variation = ''; if ( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function myc_email_order_items_table( $output, $order ) {\n \tstatic $run = 0;\n\n \t// if we've already run this filter, bail out\n \tif ( $run ) {\n \t\treturn $output;\n \t}\n\n $args = array(\n 'show_sku' => true,\n 'show_image' => false,\n '...
[ "0.72410417", "0.6332113", "0.63251895", "0.6311477", "0.63068706", "0.63020736", "0.6268949", "0.6245759", "0.6215201", "0.62109804", "0.619153", "0.618872", "0.6148176", "0.6144151", "0.61172354", "0.6116874", "0.6041587", "0.6036071", "0.6008412", "0.6000804", "0.5992787",...
0.77402335
0
woocommerce_pip_template function. Get template directory
Функция woocommerce_pip_template. Получение каталога шаблонов
function woocommerce_pip_template( $type, $template ) { $templates = array(); if ( file_exists( trailingslashit( get_stylesheet_directory() ) . 'woocommerce/woocommerce-pip-template/' . $template ) ) { $templates['uri'] = trailingslashit( get_stylesheet_directory_uri() ) . 'woocommerce/woocommerce-pip-template/';...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function template_path()\n {\n return apply_filters('CW_TEMPLATE_PATH', 'codeswholesale-woocommerce/');\n }", "function auxin_woocommerce_template_path(){\n return 'templates/woocommerce/';\n}", "public function template_path(){\n\t\treturn apply_filters( 'wcic_template_path', '/' );\n\t...
[ "0.77598965", "0.7660577", "0.7592057", "0.7429807", "0.73109317", "0.7290803", "0.7283729", "0.72636396", "0.72473705", "0.72284496", "0.72230387", "0.7223022", "0.7215006", "0.71790254", "0.7178665", "0.716081", "0.7153282", "0.7148593", "0.7068757", "0.7054103", "0.7046362...
0.80633664
0
woocommerce_pip_preview function. Output preview if needed
Функция woocommerce_pip_preview. Выводить предварительный просмотр, если это необходимо
function woocommerce_pip_preview() { if ( get_option( 'woocommerce_pip_preview' ) != 'enabled' ) { return 'onload="window.print()"'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function productpreviewmodal() { \n\t\tob_start(); \n\t\tglobal $yith_wcwl, $theme_settings;\n\t\t$productid = $_GET['productid']; \n\t\t$loading_location = $_GET['loading_location']; \n\t\t$temp = $post;\n\t\t$productpost = get_post( $productid );\n\t\tsetup_postdata( $post );\n\t\t$product_sku = get_post_...
[ "0.68315536", "0.678385", "0.66594744", "0.66220164", "0.659892", "0.659141", "0.6547507", "0.654166", "0.6511209", "0.650775", "0.650775", "0.650775", "0.650775", "0.6500137", "0.64942384", "0.6434024", "0.6426141", "0.6372182", "0.6331557", "0.63000345", "0.6298024", "0.6...
0.79446405
0
woocommerce_pip_print_logo function. Output logo if needed
Функция woocommerce_pip_print_logo. Вывод логотипа, если это необходимо
function woocommerce_pip_print_logo() { if ( get_option( 'woocommerce_pip_logo' ) != '' ) { return '<img src="' . get_option( 'woocommerce_pip_logo' ) . '" /><br />'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function outputLogo()\n {\n $configuration = $this->configuration;\n\n if ($this->modifyOutputLogo == false) {\n if (!empty($configuration['custom_logo'])) {\n // Give him his custom logo.\n $logo = $this->mod->logo($this->CDN . '/', $this->CDN . '/'...
[ "0.7042311", "0.70288974", "0.7006704", "0.70014304", "0.689733", "0.6894708", "0.6861725", "0.68311125", "0.6816205", "0.6792968", "0.6787921", "0.67817324", "0.6774807", "0.67696327", "0.67433816", "0.6681306", "0.6660187", "0.66479707", "0.66392374", "0.6620145", "0.658265...
0.8985393
0
woocommerce_pip_print_company_name function. Output company name if needed
Функция woocommerce_pip_print_company_name. Выводить название компании при необходимости
function woocommerce_pip_print_company_name() { if ( get_option( 'woocommerce_pip_company_name' ) != '' ) { return get_option( 'woocommerce_pip_company_name' ) . '<br />'; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woocommerce_pip_print_company_extra() {\n\n\tif ( get_option( 'woocommerce_pip_company_extra' ) != '' ) {\n\t\t return nl2br( stripslashes( get_option( 'woocommerce_pip_company_extra' ) ) );\n\t }\n}", "public function company_name()\n\t{\n\t\treturn $this->customer->company_name;\n\t}", "public funct...
[ "0.72828436", "0.7114076", "0.7111271", "0.7097665", "0.7097665", "0.7097665", "0.7074218", "0.7026494", "0.6984426", "0.6984426", "0.6907229", "0.687638", "0.6870956", "0.6822782", "0.68014705", "0.66316885", "0.6406278", "0.6323963", "0.6323963", "0.6323963", "0.629132", ...
0.9079394
0
woocommerce_pip_print_company_extra function. Output company extra if needed
Функция woocommerce_pip_print_company_extra. Вывод дополнительной информации о компании, если это необходимо
function woocommerce_pip_print_company_extra() { if ( get_option( 'woocommerce_pip_company_extra' ) != '' ) { return nl2br( stripslashes( get_option( 'woocommerce_pip_company_extra' ) ) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woocommerce_pip_print_company_name() {\n\n\tif ( get_option( 'woocommerce_pip_company_name' ) != '' ) {\n\t\treturn get_option( 'woocommerce_pip_company_name' ) . '<br />';\n\t}\n}", "public function export_company_additional() {\n\n $additional_fields = $this->get_company_fields_by_section( 'add...
[ "0.7115399", "0.6653143", "0.60681486", "0.5908668", "0.581418", "0.5674654", "0.5646758", "0.55763507", "0.5541551", "0.5511208", "0.54042834", "0.5396641", "0.5356744", "0.53145486", "0.5304406", "0.52892184", "0.5284251", "0.526566", "0.5263607", "0.5245156", "0.5231996", ...
0.8363369
0
woocommerce_pip_print_return_policy function. Output return policy if needed
Функция woocommerce_pip_print_return_policy. Вывод политики возврата, если это необходимо
function woocommerce_pip_print_return_policy() { if ( get_option( 'woocommerce_pip_return_policy' ) != '' ) { return nl2br( stripslashes( get_option( 'woocommerce_pip_return_policy' ) ) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woocommerce_pip_window() {\n\n\tif ( isset($_GET['print_pip'] ) ) {\n\t\t$nonce = $_REQUEST['_wpnonce'];\n\n\t\t$client = false;\n\t\t// Check that current user has needed access rights.\n\t\tif ( ! wp_verify_nonce( $nonce, 'print-pip' ) || ! is_user_logged_in() || woocommerce_pip_user_access() ) die( 'Yo...
[ "0.6443647", "0.63141865", "0.61625105", "0.6100994", "0.6063424", "0.5832454", "0.57084316", "0.5571052", "0.5571052", "0.55699396", "0.5557613", "0.54589385", "0.5434608", "0.5425917", "0.5408282", "0.5373772", "0.5362841", "0.53514063", "0.532091", "0.5283827", "0.52380395...
0.8531329
0
woocommerce_pip_print_footer function. Output footer if needed
Функция woocommerce_pip_print_footer. Вывод footer, если это необходимо
function woocommerce_pip_print_footer() { if ( get_option( 'woocommerce_pip_footer' ) != '' ) { return nl2br( stripslashes( get_option( 'woocommerce_pip_footer' ) ) ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woocommerce_output_auth_footer()\n {\n }", "function cfct_wp_footer() {\n\techo cfct_get_option('wp_footer');\n}", "function wpex_footer() {\n get_template_part( 'partials/footer/footer-layout' );\n}", "function wcus_amp_footer() {\n\t?>\n\t<footer class=\"page-footer\">\n\t\t<small>&copy;&...
[ "0.7687916", "0.7128028", "0.7018685", "0.7011328", "0.69738835", "0.6973523", "0.6965601", "0.68954587", "0.6894889", "0.686678", "0.6859481", "0.6852378", "0.68458015", "0.6822705", "0.68172896", "0.6816714", "0.6736312", "0.6730286", "0.6717845", "0.6710537", "0.6706773", ...
0.85744286
0
woocommerce_pip_invoice_number function. Output invoice number if needed
Функция woocommerce_pip_invoice_number. Вывод номера счета, если это необходимо
function woocommerce_pip_invoice_number( $order_id ) { $invoice_number = get_option( 'woocommerce_pip_invoice_start', 1 ); if ( add_post_meta( $order_id, '_pip_invoice_number', get_option( 'woocommerce_pip_invoice_prefix' ) . $invoice_number . get_option( 'woocommerce_pip_invoice_suffix' ), true) ) { update_opti...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_invoice_number() {\n\t\treturn $this->invoice_number;\n\t}", "public function invoice_number_callback()\n {\n printf(\n '<input type=\"text\" id=\"invoice_number\" name=\"hbl_option_name[invoice_number]\" value=\"%s\" />',\n isset($this->options['invoice_number...
[ "0.73482877", "0.7143626", "0.7097948", "0.6907359", "0.67078775", "0.6590001", "0.6546367", "0.64396703", "0.63542956", "0.62747127", "0.62382156", "0.62371", "0.6160486", "0.6157898", "0.6137259", "0.6095471", "0.60921806", "0.6064647", "0.6060021", "0.6038626", "0.60281146...
0.8192451
0
woocommerce_pip_order_fees function. Output order fees if needed
Функция woocommerce_pip_order_fees. Выводить сборы за заказ, если это необходимо
function woocommerce_pip_order_fees( $order ) { $print_fees = ''; if ( $fees = $order->get_fees() ) { foreach( $fees as $id => $fee ) { $print_fees .= '<tr><th colspan="2" style="text-align:left; padding-top: 12px;">&nbsp;</th> <th scope="row" style="text-align:right;">' . $fee["name"] . '</th> ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function calculate_fees()\n {\n }", "public function get_fees()\n {\n }", "public function get_fees()\n {\n }", "public static function add_order_fee()\n {\n }", "public function getFees()\n {\n return $this->fees;\n }", "public ...
[ "0.67527866", "0.6701951", "0.67003137", "0.6540119", "0.6529971", "0.6515422", "0.6457328", "0.6457328", "0.641536", "0.6377136", "0.6359855", "0.62359416", "0.6214494", "0.6140636", "0.6102948", "0.6054337", "0.60519403", "0.59735036", "0.59560245", "0.5910496", "0.5879159"...
0.8504394
0
woocommerce_pip_user_access function. Helper function to check access rights. Support for 1.6.6 and 2.0.
Функция woocommerce_pip_user_access. Вспомогательная функция для проверки прав доступа. Поддержка версий 1.6.6 и 2.0.
function woocommerce_pip_user_access() { $access = ( current_user_can( 'edit_shop_orders' ) || current_user_can( 'manage_woocommerce_orders' ) ) ? false : true; return $access; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wc_rest_check_user_permissions($context = 'read', $object_id = 0)\n {\n }", "private function updateAccessAllowed() {\n global $update_free_access, $user;\n\n // Allow the global variable in settings.php to override the access check.\n if (!empty($update_free_access)) {\n ret...
[ "0.7113953", "0.6917137", "0.6845548", "0.68121266", "0.67113566", "0.6674506", "0.6627261", "0.6610495", "0.6610495", "0.6610495", "0.6610495", "0.6608882", "0.6608882", "0.6608882", "0.6608882", "0.6608487", "0.66041106", "0.65955275", "0.65863013", "0.6571974", "0.65712667...
0.8006783
0
woocommerce_pip_window function. Function to output the printing window for single item and bulk printing.
Функция woocommerce_pip_window. Функция для вывода окна печати для отдельного товара и групповой печати.
function woocommerce_pip_window() { if ( isset($_GET['print_pip'] ) ) { $nonce = $_REQUEST['_wpnonce']; $client = false; // Check that current user has needed access rights. if ( ! wp_verify_nonce( $nonce, 'print-pip' ) || ! is_user_logged_in() || woocommerce_pip_user_access() ) die( 'You are not allowed to ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woocommerce_pip_client_window() {\n\tif ( isset($_GET['print_pip_invoice'] ) && isset( $_GET['post'] ) ) {\n\t\t$nonce = $_REQUEST['_wpnonce'];\n\t\t$order_id = $_GET['post'];\n\t\t$order = new WC_Order( $order_id );\n\t\t$current_user = wp_get_current_user();\n\t\t$action = 'print...
[ "0.7482476", "0.61128896", "0.6000484", "0.5943042", "0.5934135", "0.5523278", "0.55012053", "0.54794145", "0.5433566", "0.54252625", "0.5409309", "0.53844994", "0.5364839", "0.5350684", "0.53317875", "0.5314007", "0.5274686", "0.52601665", "0.5248749", "0.5207501", "0.519514...
0.80927664
0
woocommerce_pip_client_window function. Function to output the printing window for single item for customers.
Функция woocommerce_pip_client_window. Функция для вывода окна печати для отдельного товара для клиентов.
function woocommerce_pip_client_window() { if ( isset($_GET['print_pip_invoice'] ) && isset( $_GET['post'] ) ) { $nonce = $_REQUEST['_wpnonce']; $order_id = $_GET['post']; $order = new WC_Order( $order_id ); $current_user = wp_get_current_user(); $action = 'print_invoice'; $client ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woocommerce_pip_window() {\n\n\tif ( isset($_GET['print_pip'] ) ) {\n\t\t$nonce = $_REQUEST['_wpnonce'];\n\n\t\t$client = false;\n\t\t// Check that current user has needed access rights.\n\t\tif ( ! wp_verify_nonce( $nonce, 'print-pip' ) || ! is_user_logged_in() || woocommerce_pip_user_access() ) die( 'Yo...
[ "0.7148968", "0.55125535", "0.5507807", "0.5435086", "0.54224104", "0.54073733", "0.517119", "0.5151297", "0.5146144", "0.51407367", "0.5121745", "0.50992113", "0.5095851", "0.5095352", "0.5086687", "0.5071045", "0.5063289", "0.4998679", "0.49940446", "0.49895534", "0.4967057...
0.7836712
0
woocommerce_pip_order_bulk_action function. Process the new bulk actions for printing invoices and packing lists.
Функция woocommerce_pip_order_bulk_action. Обработка новых bulk-действий для печати счетов и упаковочных списков.
function woocommerce_pip_order_bulk_action() { $wp_list_table = _get_list_table( 'WP_Posts_List_Table' ); $action = $wp_list_table->current_action(); if ( $action == 'print_invoice' || $action=='print_packing' ) { $posts = ''; foreach( $_REQUEST['post'] as $post_id ) { if ( empty( $posts ) ) { $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function process_order_bulk_actions() {\n\t\tglobal $typenow;\n\n\t\tif ( 'shop_order' == $typenow ) {\n\n\t\t\t// get the action\n\t\t\t$wp_list_table = _get_list_table( 'WP_Posts_List_Table' );\n\t\t\t$action = $wp_list_table->current_action();\n\n\t\t\t// return if not processing our actions\n\t\t...
[ "0.8092855", "0.7940028", "0.7134971", "0.7056157", "0.69827443", "0.69605154", "0.68935674", "0.68538636", "0.67978716", "0.6694628", "0.6659671", "0.664118", "0.66050214", "0.6580459", "0.65199286", "0.6503217", "0.64940876", "0.6468511", "0.64237475", "0.64237475", "0.6394...
0.8496925
0
woocommerce_pip_send_email function. Function to send invoice as email
Функция woocommerce_pip_send_email. Функция для отправки счета по электронной почте
function woocommerce_pip_send_email( $order_id ) { if ( get_option( 'woocommerce_pip_send_email' ) == 'enabled' ) { // Build email information $order = new WC_Order( $order_id ); $to = $order->billing_email; $subject = __( 'Order invoice', 'woocommerce-pip' ); $subject = '[' . get_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendinvoice($orderid) {\n $email = new WC_Email_Customer_Invoice();\n $email->trigger($orderid);\n}", "function send_customer_invoice($request) { #API\r\n if(!validate_request($request)) {\r\n return invalid_request_response();\r\n }\r\n \r\n if(!isset($request['orderid']))\r\n return \"...
[ "0.7448659", "0.73390365", "0.7062401", "0.6870464", "0.6855523", "0.6851597", "0.6800982", "0.6787108", "0.67648876", "0.66204417", "0.6594", "0.6570266", "0.6549254", "0.6492535", "0.64895767", "0.64656407", "0.6438955", "0.64311403", "0.6420301", "0.64181757", "0.63867325"...
0.77047646
0
woocommerce_pip_get_plugin_url function. Gets the plugin url without a trailing slash, e.g.
Функция woocommerce_pip_get_plugin_url. Получает URL плагина без последнего слэша, например:
function woocommerce_pip_get_plugin_url() { return untrailingslashit( plugins_url( '/', __FILE__ ) ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function woocommerce_pip_get_plugin_path() {\n\n\treturn untrailingslashit( plugin_dir_path( __FILE__ ) );\n}", "protected function getPluginURL(): string\n {\n return trim(App::getExtension($this->getExtensionClass())->getPluginURL(), '/');\n }", "public function get_plugin_url() {\n\t\tif ( isse...
[ "0.7700563", "0.75723153", "0.7545768", "0.7526102", "0.75137776", "0.75137216", "0.7458966", "0.74484", "0.743688", "0.74199164", "0.74199164", "0.74199164", "0.7396475", "0.7359072", "0.7344821", "0.7333715", "0.7321908", "0.7319161", "0.7278856", "0.72667575", "0.72302735"...
0.8907406
0
Get all restaurants for given city
Получить все рестораны для заданного города
public function index($city){ $count = request('page')*10; if(request('q')){ $data = $this->getRestaurants($city, $count, null, request('q')); } else{ $data = $this->getRestaurants($city, $count); } $result['noMoreData'] = $data['noMoreData']; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function filter($city){\n $page = request('page');\n $count = $page*10;\n $filter_data = json_decode(request('filters'), true);\n\n $filters = $this->createFilters($filter_data);\n\n $data = $this->getRestaurants($city, $count, $filters);\n\n $result['restaurants'] ...
[ "0.68924123", "0.6828987", "0.6799864", "0.66124594", "0.6542584", "0.64303076", "0.6426254", "0.6385128", "0.6327331", "0.63225436", "0.631734", "0.6281431", "0.6274489", "0.62479264", "0.6247716", "0.624195", "0.6203962", "0.61905515", "0.61748016", "0.61630386", "0.612795"...
0.7104763
0
Get average rate for current place
Получить среднюю ставку для текущего места
public function avg_rate($place_id){ $rates = DB::table('rates')->where('place_id', $place_id)->select('mark')->get(); $sum = 0; foreach ($rates as $rate){ $sum = $sum + $rate->mark; } if(count($rates) > 0) return $sum/count($rates); else ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAverageRate(): float\n {\n $sum = 0;\n\n foreach ($this->getCounties() as $county) {\n $sum += $county->getTaxRate();\n }\n\n return $sum > 0 ? ($sum / $this->getCountiesCount()) : 0;\n }", "public function getAverageRating() {\n\t\t$average = 0;\n\...
[ "0.7211532", "0.69178826", "0.6854283", "0.68529594", "0.67901504", "0.6749923", "0.6700974", "0.6671901", "0.667105", "0.6634411", "0.65297085", "0.6525775", "0.6517655", "0.6511077", "0.6493195", "0.6439053", "0.6426072", "0.64050764", "0.6380357", "0.63769925", "0.633424",...
0.82021713
0
get products for given menu
получить продукты для заданного меню
public function products($menu_id){ $products = Product::where('menu_id', $menu_id)->select(['title', 'description', 'price'])->get()->toArray(); return $products; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getProducts() ;", "public function getProducts();", "public function getProducts();", "public function get_products($args = array());", "public function getProducts() {}", "static public function get_products($shopify,$logger){\n\n\t\t$output = $shopify->call('GET','/admin/products.json?fields=i...
[ "0.7425984", "0.71359086", "0.71359086", "0.71298784", "0.698228", "0.6868677", "0.68686396", "0.6789475", "0.66810584", "0.6670295", "0.6657609", "0.6643897", "0.6643897", "0.6633743", "0.6606189", "0.6589287", "0.65813446", "0.6542351", "0.6542351", "0.6542351", "0.653726",...
0.75321215
0
get places by search
поиск мест
public function search(Request $request){ $city_locations = Location::where('city_id', $request->id)->lists('id')->toArray(); $places = Place::whereIn('location_id', $city_locations)->where('name', 'like', '%'.$request->value.'%')->select(['id', 'name', 'address'])->get()->toArray(); return $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function search()\n {\n\n $q = trim(urldecode(Request::get(\"q\")));\n\n $places = Place::search($q)->where('status', 1)->get()->toArray();\n\n return json_encode($places);\n }", "public function searchPlace()\n\t{ \n\t\t$app = \\Slim\\Slim::getInstance();\n\t\t$body = $app->request()-...
[ "0.72165716", "0.6882841", "0.6831964", "0.6712017", "0.6661161", "0.6661161", "0.66240245", "0.6475147", "0.645967", "0.64276975", "0.6411667", "0.6407315", "0.6367694", "0.6323697", "0.631857", "0.6296662", "0.62910146", "0.6261245", "0.62497616", "0.6248021", "0.6220683", ...
0.711586
1
Returns connection name which is used for this builder.
Возвращает имя соединения, используемого для этого строителя.
public function getConnectionName() { return $this->connectionName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getConnectionName() {\n return $this->connection_name;\n }", "public function getConnectionName()\n {\n return $this->connection;\n }", "public function getConnectionName()\n {\n return $this->connection;\n }", "public function getConnectionName()\n {\n ...
[ "0.8165289", "0.8096366", "0.8096366", "0.8096366", "0.771169", "0.76983356", "0.758984", "0.7545964", "0.74453056", "0.7443685", "0.73442936", "0.73398596", "0.73395747", "0.7322763", "0.726659", "0.7221333", "0.71726245", "0.70812935", "0.6992315", "0.69489306", "0.69397515...
0.8098846
1
Checks if value columns or multiple value column has been. If it not set then exception is thrown.
Проверяет, заданы ли значение колонки или несколько значений колонки. Если это не задано, выбрасывается исключение.
private function checkValueColumns() { if (empty($this->valueColumns)) { if ($this->mode !== AbstractBuilder::UPDATE && !empty($this->multipleValueColumns)) { return $this; } throw new ApplicationException('Column with its value are not set.', 2, null, 911...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function checkValuesValidity(): void\n {\n parent::checkValuesValidity();\n if (! $this->value) {\n throw new Exception(\n get_class($this) . ' : Missing $value property. Please use the value() method to set a value.'\n );\n }\n }", "abstr...
[ "0.70301455", "0.6461028", "0.62639874", "0.6246001", "0.6122254", "0.6032868", "0.59841454", "0.59193605", "0.5840347", "0.5815793", "0.5787817", "0.5786418", "0.5781438", "0.576198", "0.570042", "0.564009", "0.5624674", "0.5594943", "0.5590177", "0.55808616", "0.5575952", ...
0.7719056
0
Returns name of cache config which need to be used for storing result into cache.
Возвращает имя конфигурации кэша, которая должна быть использована для хранения результата в кэше.
private function getCacheName() { return Connection::connection($this->connectionName)->getCacheName(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function name(): string\n {\n return 'Configuration is not cached';\n }", "public function nameTheCache()\n {\n return $this->cacheFile;\n }", "protected static function getCacheName() {\n\t\tstatic $strCacheName;\n\t\tif (!isset($strCacheName)) {\n\t\t\t$strCacheName = __CLASS...
[ "0.72885", "0.71308285", "0.7040744", "0.7040744", "0.7040744", "0.69966525", "0.69966525", "0.69966525", "0.69966525", "0.6965702", "0.69609106", "0.69609106", "0.69281816", "0.68923897", "0.6869757", "0.683695", "0.6759788", "0.6738029", "0.6725716", "0.66870767", "0.663866...
0.71600187
1
Stores result into cache.
Хранит результат в кэше.
private function setResultInCache($result) { # No cache key set then no need to set cache, # This cache key can also be set from database connection class if # cache key is prepared from executed query. if (!is_string($this->cacheKey)) { return false; } #...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function saveToCache() {}", "public function saveToCache();", "public function writeCache()\n {\n $this->endResultCache();\n }", "function cache_results( $result, $route, \\WP_REST_Request $request ) {\n\n\t$hash = md5( $request->get_body() );\n\t/**\n\t\t * Note: We are explicitly dis...
[ "0.7204509", "0.7128104", "0.6967836", "0.68838114", "0.6765077", "0.6567342", "0.6542961", "0.6481826", "0.64575684", "0.6393805", "0.635466", "0.63509744", "0.63356656", "0.6317867", "0.630957", "0.62766296", "0.6273311", "0.6239639", "0.62278616", "0.61579466", "0.6135922"...
0.73703283
0
Returns Placeholder parameter name.
Возвращает Имя параметра плейсхолдера.
private function getPlaceholderName() { return 'i' . $this->instanceNumber . 'b' . ($this->bindCount++); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function placeholder($placeholder)\n {\n return str_replace(':name', $this->name, $placeholder);\n }", "public function getPlaceholder(): string\n {\n return $this->placeholder;\n }", "protected function generatePlaceholder() {\n return 'repose_anon_placeholder_' . se...
[ "0.7586813", "0.7559581", "0.7378792", "0.73079115", "0.724635", "0.7226795", "0.72217834", "0.7197311", "0.71839666", "0.717628", "0.7068087", "0.706193", "0.69931906", "0.69003516", "0.68427366", "0.6808375", "0.6806432", "0.6800538", "0.6800538", "0.67655313", "0.6662262",...
0.8006057
0
Combines bind of passed query to this one.
Объединяет привязку переданного запроса с этим.
private function combineBind(Query $query) { $this->binds = array_merge($this->binds, $query->binds); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_combined_query($query, $bind_params)\n\t{\n\t\tif (!is_array($bind_params)) { return false; }\n\t\t$num_params = count($bind_params);\n\t\tif ($num_params > 0) {\n\t\t\tforeach ($bind_params as $key => $param) {\n\t\t\t\t$key = ':' . $key;\n\t\t\t\t$param = \"'{$param}'\";\n\t\t\t\t$pos = strpo...
[ "0.66009116", "0.65122414", "0.62083036", "0.6187525", "0.6137655", "0.61082035", "0.60783416", "0.6033966", "0.5959612", "0.5959112", "0.5932193", "0.5928129", "0.5829186", "0.5824776", "0.5800603", "0.57964826", "0.5736267", "0.5692824", "0.56874853", "0.56567425", "0.56544...
0.7598146
0
Returns true if last result retrieved from cache.
Возвращает true, если последний результат был получен из кэша.
public function isLastResultFromCache() { return $this->isLastResultFromCache; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isLast()\n\t{\n\t\treturn !$this->cacheValid;\n\t}", "public function lastRequestWasFetchedFromCache()\n {\n return $this->fetchedFromCache;\n }", "final public function cache() {\n\t\tif ($this->getCacheEngine()->has($this->_cacheKey)) {\n\t\t\treturn true;\n\t\t}\n\n\t\t$request ...
[ "0.77481425", "0.74352574", "0.74156016", "0.71744484", "0.7127877", "0.69883543", "0.6853999", "0.68282235", "0.6809012", "0.68021894", "0.6779424", "0.67790157", "0.6685593", "0.6637742", "0.6628307", "0.6624591", "0.6552589", "0.6535021", "0.6527742", "0.65275973", "0.6515...
0.87317365
0
Returns last cacheKey used.
Возвращает последний использованный cacheKey.
public function getLastCacheKey() { return $this->lastCacheKey; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCacheKey() {\n return $this->cacheKey;\n }", "public function getLastKey() {\r\n return $this->_lastKey;\r\n }", "public function getLastEvaluatedKey()\n {\n return $this->_last_evaluated_key;\n }", "public function getCacheKey()\n {\n return $thi...
[ "0.76252234", "0.7391444", "0.7383014", "0.7303315", "0.7251127", "0.7244715", "0.71967083", "0.71881056", "0.7104084", "0.7023723", "0.70166624", "0.6991063", "0.6968316", "0.6968316", "0.6965602", "0.69635886", "0.6943917", "0.6903402", "0.6852271", "0.68348587", "0.6816202...
0.86203
0
In this action the asset with the given is loaded. Then it is determined if the asset is a file or a folder. Then a normal listing and a path listing of the folder or file's parent folder is generated.
В этом действии загружается актив с указанным идентификатором. Затем определяется, является ли актив файлом или папкой. Далее генерируются обычный список и список путей для родительской папки файла или папки.
function doAction() { //$uv = new user_var($scrivo_conn, $login_user_id, "last_asset_folder"); $assetId = Request::get("assetId", Request::TYPE_INTEGER, 0); if (!$assetId) { $assetId = $this->context->config->ROOT_FOLDER_ID; } //if ($dirId === 0) { // $dirId = intval($uv->get()); //} $selId = -1; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAssetParentAssets($asset);", "function assets($file = null ,$type=\"/\",$dir = \"assets\"){\n listFolderFiles($dir);\n}", "public static function asset($asset = '')\n\t{\n\n\t\t$parent_theme = self::get_activated_theme_by_role('parent');\n\t\t$child_theme = self::get_activated_theme_by_ro...
[ "0.5903475", "0.5782013", "0.5718758", "0.5662813", "0.53348666", "0.5293335", "0.5270708", "0.5254616", "0.52049154", "0.5203867", "0.5196317", "0.51480526", "0.5131396", "0.4982586", "0.49731335", "0.49624503", "0.49613476", "0.495103", "0.49435458", "0.4925877", "0.4921800...
0.70656365
0
Returns TRUE if the screen name exists in the database.
Возвращает TRUE, если имя экрана существует в базе данных.
function scrname_exists($scrname, $con){ $exists = false; $query = "SELECT * from user where screenName='".$scrname."'"; $result = mysqli_query($con, $query); if (mysqli_num_rows($result)==1) { $exists = true; } return $exists; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasScreenName()\n {\n return (bool) $this->screen_name;\n }", "function exist()\n\t{\n\t\treturn $this->exists(\"`name` = :name\", array('name' => $this->name));\n\t}", "function HasUser($connect, $name) {\n $sql = \"SELECT Username FROM User WHERE Username LIKE '$name'\"...
[ "0.7270972", "0.66559917", "0.6369169", "0.6368063", "0.6357804", "0.63307536", "0.627945", "0.6169594", "0.6137843", "0.6133657", "0.6131625", "0.6120872", "0.6094427", "0.6088074", "0.60738045", "0.607273", "0.6068074", "0.60647947", "0.6028944", "0.6023546", "0.59882635", ...
0.7276171
0
Generate HTML code on the output buffer for the logout button
Создайте HTML-код на выходном буфере для кнопки выхода
private function generateLogoutButtonHTML() { return ' <form method="post" > <p id="' . self::$messageId . '">' . $this->message .'</p> <input type="submit" name="' . self::$logout . '" value="logout"/> </form> '; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function logoutbtn()\n\t{\t\t\n\t\tif(isset($_SESSION['usernameccf5fc0187']) && isset($_SESSION['passwordccf5fc0187']))\n\t\t\t{\n\t\t\t\techo '<li class=\"\">\n <a href=\"index?session_destroy=1\" class=\"dropdown-toggle\">\n <i class=\"icon-logout\...
[ "0.7665925", "0.7651189", "0.7504195", "0.73784447", "0.72560287", "0.720367", "0.7159559", "0.71042025", "0.6990242", "0.69185644", "0.6911891", "0.69067585", "0.69036573", "0.6892284", "0.68685985", "0.68424845", "0.6817147", "0.6793651", "0.67772084", "0.67750394", "0.6770...
0.7924329
0
Get the value of operationVirements
Получить значение операции Virements
public function getOperationVirements() { return $this->operationVirements; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getResult() {\n return $this->lastOperation;\n }", "public function getOperatorValue();", "public function getOperations(){\r\n return $this->operations;\r\n }", "public function operations() {\r\n return $this->operations;\r\n }", "public function getD...
[ "0.6317184", "0.5993497", "0.596361", "0.59287107", "0.5884858", "0.5871906", "0.5863362", "0.5845105", "0.58144933", "0.58036083", "0.5767209", "0.57251847", "0.5725029", "0.5705286", "0.56889033", "0.56889033", "0.56889033", "0.56889033", "0.56889033", "0.5688724", "0.56380...
0.72670555
0
Set the value of operationVirements
Установите значение операции Virements
public function setOperationVirements($operationVirements) { $this->operationVirements = $operationVirements; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function set_operation($value)\n {\n $this->_operation = $value;\n }", "public function setOperations(?array $value): void {\n $this->getBackingStore()->set('operations', $value);\n }", "public function getOperationVirements()\n {\n return $this->operationVirements;\n ...
[ "0.60787666", "0.5942505", "0.5939202", "0.55419546", "0.5472267", "0.5320932", "0.5175371", "0.5109522", "0.49965551", "0.48913592", "0.4880622", "0.4879715", "0.48753735", "0.48699912", "0.484855", "0.4843634", "0.4841923", "0.48177385", "0.48130438", "0.47718364", "0.47560...
0.7012344
0
Called from AJAX. Saves the student code to the database when they press run while completing a question.
Вызывается из AJAX. Сохраняет код студента в базу данных, когда они нажимают «Запустить» при выполнении задания.
public function save_code(){ $success = false; if (isset($_POST['question_id']) && isset($_POST['exam_id']) && isset($_POST['contents']) && isset($_POST['completion_status_id']) && isset($_POST['score_multiplier'])){ require_once('models/exam.php'); require_once('models/section.php'); $exam = Exam::get_fo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function run() {\n \n if ($this->request->post('form_submit') == 'yes') {\n \n $_post = $this->request->get_post();\n $pres = $this->controller->get_context()->get_qa_question_handle();\n \n /** @var tf_auth */\n $auth = core::lib...
[ "0.6161499", "0.6019618", "0.5993755", "0.5867135", "0.5803043", "0.5780262", "0.5780262", "0.5771613", "0.57707393", "0.5761845", "0.5742658", "0.5735068", "0.57297885", "0.5718715", "0.5710462", "0.56996953", "0.5690786", "0.56893617", "0.5666894", "0.5666596", "0.56409925"...
0.7260594
0
Generates an exclude criterion based on contentType identifiers.
Генерирует критерий исключения на основе идентификаторов contentType.
public function generateContentTypeExcludeCriterion( array $excludeContentTypeIdentifiers ) { $excludeCriterion = array(); foreach ( $excludeContentTypeIdentifiers as $contentTypeIdentifier ) { $excludeCriterion[] = new Criterion\LogicalNot( new Criterion\ContentT...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDoktypeExcludeWhere() {}", "function prepareExcludeConditions($exclude, $table_name, $type_field_name = 'type', $id_field_name = 'id') {\n if(is_foreachable($exclude)) {\n $result = array();\n\n foreach($exclude as $type => $ids) {\n if($type && $ids) {\n ...
[ "0.6567023", "0.6461197", "0.641771", "0.607511", "0.60070986", "0.58286875", "0.5768794", "0.5579318", "0.5539116", "0.5480838", "0.5480838", "0.5468544", "0.54504603", "0.54453725", "0.54105", "0.5402287", "0.53741676", "0.5337551", "0.5316405", "0.52609026", "0.52415407", ...
0.74409586
0
Generates an exclude criterion based on locationIds.
Генерирует критерий исключения на основе locationIds.
public function generateLocationIdExcludeCriterion( array $excludeLocations ) { $excludeCriterion = array(); foreach ( $excludeLocations as $location ) { if ( !$location instanceof Location ) { throw new InvalidArgumentType( 'excludeLocations', 'array ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setExcludedIds($excludedIds);", "public function setExcludeIds(array $excludeIds): void;", "private function buildPageExclude()\n {\n $idsWhere = [];\n foreach ($this->excluded as $id) {\n $idsWhere[] = \\sprintf(\"(NOT page.[jcr:uuid] = '%s')\", $id);\n }\n\n...
[ "0.68881994", "0.6646564", "0.64973015", "0.64546204", "0.6386183", "0.6187613", "0.6143778", "0.6093447", "0.5874656", "0.5865086", "0.58038104", "0.5647575", "0.56469244", "0.5645354", "0.56073797", "0.5520934", "0.54570305", "0.5440242", "0.53836083", "0.53836083", "0.5345...
0.80322516
0
The header starts at 'h1' if it's not a header type and increments from there. If the type goes past h6, it will continue, allowing Additional header markers to be set even though they have no effect h7+ is to be treated as p
Заголовок начинается с 'h1', если это не тип заголовка, и увеличивается с этого момента. Если тип превышает h6, он продолжается, позволяя устанавливать дополнительные маркеры заголовка, даже если они не оказывают никакого влияния. h7+ следует рассматривать как p
public function updateHeader() { if (strpos($this->type, 'h') != 0) { $this->type = 'h1'; } else { $count = (int)str_replace('h', '', $this->type); $count++; $this->type = "h$count"; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function makeHeader($pageHeading1) {\n// section including, an h1 heading\n}", "public function headingRow() : int {\n return 1;\n }", "public function headingRow(){\n return 1;\n }", "function before_header(&$rpt, &$hdr){\n $ilTxtSize=10; //\n $ilLeading=0; //\n includ...
[ "0.6563746", "0.6307047", "0.6142493", "0.6093359", "0.6052032", "0.5991679", "0.59901994", "0.5982853", "0.5925268", "0.5916023", "0.59153414", "0.58529425", "0.5852853", "0.5836854", "0.58270574", "0.5763146", "0.57493186", "0.57329947", "0.57266206", "0.57258826", "0.56942...
0.78861433
0
Returns true if source is either true or false.
Возвращает true, если источник либо true, либо false.
public static function isBoolean($source): bool { return \is_bool($source); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isTrue()\n {\n return $this->toNative() === true;\n }", "abstract public function isTrue();", "public function getBooleanValue() {}", "public function returnsBoolean()\n {\n return is_bool($this->evaluate());\n }", "public function hasSource(){\n return $this-...
[ "0.6607644", "0.6444992", "0.63972145", "0.6339716", "0.6280139", "0.6238611", "0.6236522", "0.61848545", "0.6166566", "0.61418104", "0.61363643", "0.6131905", "0.611178", "0.61091566", "0.60768634", "0.60768634", "0.6063805", "0.6014205", "0.5926583", "0.5916285", "0.5913607...
0.74954623
0
Creates an action based on the given action ID. The method first checks if the action ID has been declared in [[actions()]]. If so, it will use the configuration declared there to create the action object. If not, it will look for a controller method whose name is in the format of `actionXyz` where `Xyz` stands for the...
Создает действие на основе заданного идентификатора действия. Метод сначала проверяет, объявлен ли идентификатор действия в [[actions()]]. Если да, то будет использоваться конфигурация, объявленная там, чтобы создать объект действия. Если нет, будет искаться метод контроллера, имя которого имеет формат `actionXyz`, где...
public function createAction($id) { if ($id === '') { $id = $this->defaultAction; } if (preg_match('/^[a-z0-9\\-_]+$/', $id) && strpos($id, '--') === false && trim($id, '-') === $id) { $methodName = 'action' . str_replace(' ', '', ucwords(implode(' ', explode('-', $i...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAction($id)\n {\n return new Model\\Action($this->client, $id);\n }", "public function GetActionByID($id)\n {\n $action = null;\n\n if ($this->IsValidAuthToken() && is_int($id))\n {\n $request = new ZabbixWrapper();\n ...
[ "0.7387539", "0.655826", "0.6405865", "0.6398875", "0.61243343", "0.5998001", "0.5946743", "0.57611734", "0.57426625", "0.57359844", "0.5683264", "0.5632006", "0.5620513", "0.5577962", "0.5530373", "0.55303097", "0.54873717", "0.5418451", "0.5365727", "0.5334686", "0.5320931"...
0.8377364
0
Finds the applicable layout file.
Находит соответствующий файл макета.
public function findLayoutFile() { $path = __DIR__ . '/../views/layouts/' . $this->layout . '.php'; if (!is_file($path)){ throw new \ErrorException('Layout does not exists: ' . $path); } return $path; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findLayoutFile()\n\t{\n\t\tif (!$this->context instanceof Controller || $this->context->layout === false) {\n\t\t\treturn false;\n\t\t}\n\t\t$module = $this->context->module;\n\t\twhile ($module !== null && $module->layout === null) {\n\t\t\t$module = $module->module;\n\t\t}\n\t\tif ($module === nu...
[ "0.6991812", "0.6774049", "0.6546077", "0.65309554", "0.6260778", "0.6216503", "0.6213145", "0.6133124", "0.6129164", "0.6088755", "0.60261226", "0.5990655", "0.5890962", "0.58792126", "0.5818549", "0.58084553", "0.58012664", "0.57532114", "0.5727108", "0.57226175", "0.571531...
0.71765673
0
Deletes any images and/or thumbnails associated with the media
Удаляет любые изображения и/или миниатюры, связанные с медиа
public function deleteImages() { // Delete all fullsize images for this media foreach (glob( MEDIA_IMAGE_PATH . "/" . IMG_TYPE_FULLSIZE . "/" . $this->mediaId . ".*") as $filename) { if ( !unlink( $filename ) ) trigger_error( "Media::deleteImages(): Couldn't delete image file.", E_USER_ERROR ); } ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function removeOldMedia(Collection $mediasForDestroy): void;", "function deleteFiles() {\n unlink(FS_THUMB_DIR.$this->thumbnail);\t\t\t\n unlink(FS_IMG_DIR.$this->image);\n }", "protected function handleMediaDeletion(): void\n {\n if (static::hasGlobalScope(SoftDeletingScope::class...
[ "0.7472603", "0.74676204", "0.7448713", "0.7413888", "0.73695666", "0.732673", "0.73221964", "0.7309081", "0.7295364", "0.7275381", "0.72729504", "0.72721887", "0.7256522", "0.7218407", "0.7216774", "0.7174878", "0.7170642", "0.7141128", "0.7121117", "0.70957065", "0.70532805...
0.82958084
0
Inserts the current Media object into the database, and sets its ID property.
Вставляет текущий объект Media в базу данных и устанавливает его свойство ID.
public function insert() { // Does the Media object already have an ID? if ( !is_null( $this->id ) ) trigger_error ( "Media::insert(): Attempt to insert an Media object that already has its ID property set (to $this->mediaId).", E_USER_ERROR ); // Insert the Media $conn = new PDO( DB_DSN, DB_USERNAM...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function insert()\n { if (!is_null($this->id))\n trigger_error(\"Spectra::insert(): Attempt to insert a Spectrum object that already has its ID property set (to $this->id).\", E_USER_ERROR);\n\n // Insert the Spectra\n $conn = new PDO(DB_DSN, DB_USER, DB_PASS);\n $s...
[ "0.6470179", "0.63826823", "0.62593037", "0.621011", "0.6202005", "0.617762", "0.61696815", "0.6074785", "0.6031904", "0.6008622", "0.6006351", "0.5969584", "0.5954171", "0.59355444", "0.591412", "0.58232075", "0.5811252", "0.5779422", "0.57343525", "0.57311726", "0.5683774",...
0.78401923
0
Updates the current Media object in the database.
Обновляет текущий объект Media в базе данных.
public function update() { // Does the Media object have an ID? if ( is_null( $this->mediaId ) ) trigger_error ( "Media::update(): Attempt to update an Media object that does not have its ID property set.", E_USER_ERROR ); // Update the Media $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function update(Request $request, Media $media)\n {\n //\n }", "public function update(Request $request, Media $media)\n {\n //\n }", "public function update(Request $request, Media $media)\n {\n //\n }", "public function updated(PostMedia $postMedia)\n {\n ...
[ "0.68281376", "0.68281376", "0.68281376", "0.672796", "0.66386235", "0.6601141", "0.6554635", "0.6553862", "0.65402853", "0.6480168", "0.64275813", "0.6302256", "0.62133676", "0.6130829", "0.597197", "0.59664494", "0.5935895", "0.5925252", "0.58861727", "0.587163", "0.5867368...
0.76876104
0
Deletes the current Media object from the database.
Удаляет текущий объект Media из базы данных.
public function delete() { // Does the Media object have an ID? if ( is_null( $this->mediaId ) ) trigger_error ( "Media::delete(): Attempt to delete an Media object that does not have its ID property set.", E_USER_ERROR ); // Delete the Media $conn = new PDO( DB_DSN, DB_USERNAME, DB_PASSWORD ); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function Delete()\n\t{\n\t\ttry\n\t\t{\n\t\t\t\t\t\t\n\t\t\t// TODO: if a soft delete is prefered, change this to update the deleted flag instead of hard-deleting\n\n\t\t\t$pk = $this->GetRouter()->GetUrlParam('idmedia');\n\t\t\t$media = $this->Phreezer->Get('Media',$pk);\n\n\t\t\t$media->Delete();\n\n\t\t\...
[ "0.7648866", "0.71447474", "0.70928013", "0.70002186", "0.6988789", "0.6988789", "0.6988789", "0.6980794", "0.6922912", "0.69145334", "0.6776976", "0.6768075", "0.6733804", "0.6716022", "0.67064166", "0.6665141", "0.6660699", "0.6615898", "0.6615659", "0.66104096", "0.6599634...
0.8496703
0
Story 22c Tests that a RoutePickup can be removed from a route
История 22c Тестирование возможности удаления RoutePickup из маршрута
public function testRemoveRoutePickup(){ //create a route to add the pickup to $route = new Route(); $route->setRouteId(1001); //Get the repository for the route $repository = $this->em->getRepository(Route::class); //Call insert on the repository for the route ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRemoveRoutePickupNonexistant(){\r\n //get the client\r\n $client = static::createClient(array(), array('PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password'));\r\n $client->followRedirects(true);\r\n\r\n //Request a removal of the RoutePickup with the ID of the R...
[ "0.74937534", "0.6898857", "0.6055465", "0.60058606", "0.58994865", "0.58984476", "0.587568", "0.58721316", "0.58551806", "0.5830385", "0.58193517", "0.58129233", "0.5802749", "0.57784605", "0.5749446", "0.57437044", "0.57353497", "0.5715732", "0.57141733", "0.5709928", "0.56...
0.76638144
0
Story 22c Tests that when a Route is removed all the pickups after are decremented
История 22c Тестирование того, что при удалении маршрута все последующие загрузки уменьшаются
public function testRemoveRoutePickupDecrement(){ //create a route to add the pickup to $route = new Route(); $route->setRouteId(1001); //Get the repository for the route $repository = $this->em->getRepository(Route::class); //Call insert on the repository for the...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRemoveRoutePickup(){\r\n //create a route to add the pickup to\r\n $route = new Route();\r\n $route->setRouteId(1001);\r\n\r\n //Get the repository for the route\r\n $repository = $this->em->getRepository(Route::class);\r\n //Call insert on the reposito...
[ "0.70876366", "0.6454048", "0.5890099", "0.57236445", "0.5674631", "0.5663907", "0.5656453", "0.5644116", "0.55136925", "0.5496972", "0.5483289", "0.54764193", "0.54764056", "0.54695666", "0.54176366", "0.5406175", "0.540177", "0.5382916", "0.5372802", "0.5363009", "0.5359548...
0.7073114
1
Story22c Tests that if you try and request a removal of a nonexistant pickup you'll be brought to an error page
Тестирование того, что если вы попытаетесь запросить удаление несуществующего заказа на подбор, вас перенаправят на страницу с ошибкой
public function testRemoveRoutePickupNonexistant(){ //get the client $client = static::createClient(array(), array('PHP_AUTH_USER' => 'admin', 'PHP_AUTH_PW' => 'password')); $client->followRedirects(true); //Request a removal of the RoutePickup with the ID of the RoutePickup to b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRemoveRoutePickup(){\r\n //create a route to add the pickup to\r\n $route = new Route();\r\n $route->setRouteId(1001);\r\n\r\n //Get the repository for the route\r\n $repository = $this->em->getRepository(Route::class);\r\n //Call insert on the reposito...
[ "0.69912064", "0.64708257", "0.6213206", "0.6180552", "0.61767983", "0.609395", "0.60398966", "0.5992722", "0.59861606", "0.5984924", "0.59796506", "0.5958019", "0.5908855", "0.5895845", "0.5858323", "0.5825874", "0.57967705", "0.5719724", "0.5714247", "0.57019174", "0.568945...
0.7550925
0
Run the database seeds. Seeds the database with room names.
Запустите запуск базы данных. Заполняет базу данных именами комнат.
public function run() { DB::table('room')->insert(['room_name' => 'Holcombe']); DB::table('room')->insert(['room_name' => 'Firwood']); DB::table('room')->insert(['room_name' => 'Penny Farthing']); DB::table('room')->insert(['room_name' => 'Exhibition']); DB::table('room')->insert([...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run()\n {\n $inserts = array();\n\n $inserts[] = \n [\n 'id' => 1,\n 'room_number' => 101, \n 'price' => 55.50, \n 'description' => 'Nice one with ocean view',\n 'created_at' => date('Y-m-d H:i:s'...
[ "0.7751952", "0.76578504", "0.76396805", "0.7590245", "0.75695586", "0.7552486", "0.7471805", "0.7462659", "0.744964", "0.7414845", "0.7411177", "0.73681706", "0.7361211", "0.7354322", "0.734048", "0.7307039", "0.72855014", "0.7277097", "0.7237694", "0.7229277", "0.7227155", ...
0.7937174
0
Creates a new PurInfo model. If creation is successful, the browser will be redirected to the 'view' page.
Создает новый объект PurInfo. Если создание успешно, браузер будет перенаправлен на страницу 'view'.
public function actionCreate() { $model = new PurInfo(); $rate = $this->actionExchangeRate(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->pur_info_id]); } return $this->render('create', [ ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new PurInfo();\n\n if ($model->load(Yii::$app->request->post()) && $model->save(false)) {\n return $this->redirect(['view', 'id' => $model->pur_info_id]);\n }\n\n return $this->render('create', [\n 'model' => $model,...
[ "0.87152845", "0.7616404", "0.7306925", "0.7265437", "0.7259194", "0.72545695", "0.72312564", "0.71812534", "0.7143593", "0.71284974", "0.709244", "0.70707136", "0.7057178", "0.70341665", "0.70182973", "0.70008975", "0.6971517", "0.6963006", "0.6946495", "0.6905846", "0.68818...
0.8068425
1
Get the URL generator instance.
Получите экземпляр генератора URL.
public function getUrlGenerator() { return $this->generator; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getUrlGenerator(): UrlGeneratorInterface\n {\n return app('mediable.url.factory')->create($this);\n }", "public function getUrlGenerator()\n {\n return $this->url;\n }", "public function getGenerator(): UrlGeneratorInterface\n {\n if (isset($this->generato...
[ "0.8142245", "0.7779566", "0.77674854", "0.76192194", "0.7287624", "0.7207222", "0.71341586", "0.6879379", "0.6859973", "0.6703773", "0.66956985", "0.66821647", "0.66373396", "0.6521277", "0.6515507", "0.6467309", "0.6456736", "0.6384518", "0.63537", "0.62780267", "0.6253817"...
0.82788694
0
Will init the request parser anew so it can be reused even when being persistent
Инициализируем парсер запроса заново, чтобы он мог быть переиспользован даже при сохранении состояния
public function init() { // Init the query parser $this->getQueryParser()->clear(); // Init request and response $this->getRequest()->init(); $this->getResponse()->init(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function init()\r\n\t{\r\n\t\t$this->normalizeRequest();\r\n\t}", "public function init()\n\t{\n\t\tparent::init();\n\t\t$this->normalizeRequest();\n\t}", "protected function _initRequest()\n {\n $request = new HttpRequest();\n \n $router = $this->bootstrapResource('router');\n ...
[ "0.70965797", "0.6846626", "0.6783279", "0.6705737", "0.6539404", "0.65229416", "0.65009713", "0.6496175", "0.6493339", "0.6407828", "0.63835484", "0.63816327", "0.6334631", "0.6333814", "0.6330122", "0.63280463", "0.6321373", "0.6320894", "0.62846446", "0.6284256", "0.628412...
0.7036537
1
Injects query parser instance
Вставляет экземпляр парсера запросов
public function injectQueryParser(HttpQueryParserInterface $queryParser) { // inject query parser $this->queryParser = $queryParser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getQueryParser()\n {\n return $this->queryParser;\n }", "public function parse($query = '');", "public function __construct($query = '')\n {\n }", "public function __construct(QueryInputParser $parser, QueryGenerator $generator)\n {\n $this->parser = $parser;\n...
[ "0.634946", "0.6281294", "0.6226959", "0.6185633", "0.6123861", "0.61174756", "0.61174756", "0.61174756", "0.61174756", "0.6103382", "0.6090944", "0.5973109", "0.597155", "0.5943803", "0.5903739", "0.5866716", "0.57936597", "0.5749936", "0.57487386", "0.5745954", "0.574131", ...
0.7225512
0
Injects http part implementation
Вставляет реализацию части HTTP
public function injectPart(HttpPartInterface $part) { $this->part = $part; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHttpPartInstance()\n {\n }", "public function getHttpPartInstance();", "function __construct() {\n $this->HTTP = parent::__construct();\n }", "public function getHttpPartInstance()\n {\n return $this->part->getInstance();\n }", "public function httpAdapter() ...
[ "0.66291976", "0.65138566", "0.5861724", "0.57942736", "0.5726752", "0.55964", "0.5591946", "0.5530913", "0.5395501", "0.53392786", "0.53186554", "0.5219736", "0.5202548", "0.51877224", "0.51600915", "0.5136618", "0.5132149", "0.51241", "0.5115442", "0.5113582", "0.5111931", ...
0.74174005
0
Return's the query parser instance
Возвращает экземпляр парсера запросов
public function getQueryParser() { return $this->queryParser; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function query() {\n\n $e = new static();\n return new Query($e, $e->__currentSchema);\n\n }", "public function newQuery()\n {\n return new static($this->connection, $this->grammar, $this->processor);\n }", "public function newQuery()\n {\n return new stati...
[ "0.7204143", "0.711555", "0.70398426", "0.6993218", "0.69488275", "0.6923009", "0.69061166", "0.68683636", "0.68683636", "0.68683636", "0.68246156", "0.6818362", "0.67632264", "0.6746157", "0.6730583", "0.6707995", "0.6706705", "0.6706705", "0.66858995", "0.6671013", "0.66668...
0.85367584
0
Parse multipart form data
Парсинг многокомпонентной формы данных
public function parseMultipartFormData($content) { // get request ref to local function context $request = $this->getRequest(); // grab multipart boundary from content type header preg_match('/boundary=(.+)$/', $this->getRequest()->getHeader(HttpProtocol::HEADER_CONTENT_TYPE), $match...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function parse_raw_http_request($input, array &$a_data)\n{\n \n // grab multipart boundary from content type header\n preg_match('/boundary=(.*)$/', $_SERVER['CONTENT_TYPE'], $matches);\n \n // content type is probably regular form-encoded\n if (!count($matches))\n {\n // we expect regular puts to cont...
[ "0.69967645", "0.6897124", "0.6846032", "0.681503", "0.65799177", "0.63631964", "0.63392323", "0.63194317", "0.6278498", "0.6237328", "0.61922145", "0.61847335", "0.61460215", "0.6063339", "0.60442203", "0.59056556", "0.588972", "0.5860876", "0.5859004", "0.5833768", "0.58071...
0.74854076
0
Get the transaction id matching the order id
Получить идентификатор транзакции, соответствующий идентификатору заказа
public function getTransactionIdByOrderId ($order_id) { $q = $this->db->query( sprintf( "SELECT transaction_id FROM `%1\$smollie_payments` WHERE `order_id` = '%2\$d'", DB_PREFIX, $this->db->escape($order_id) ) ); if ($q->num_rows > 0) { return $q->row["transaction_id"]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get_order_id($order)\n {\n }", "public static function getIdTransactionByIdOrder($idOrder)\n {\n $result = Db::getInstance()->getValue('SELECT `transaction_id` FROM `'._DB_PREFIX_.'payline_token` WHERE `id_order`='.(int)$idOrder);\n if (!empty($result)) {\n ...
[ "0.7456582", "0.7296379", "0.727177", "0.71792465", "0.7137319", "0.7115369", "0.71113825", "0.696729", "0.69478166", "0.6937178", "0.68983126", "0.68983126", "0.68899804", "0.68445045", "0.6837774", "0.6833018", "0.68236524", "0.6805521", "0.6713674", "0.6690056", "0.6686606...
0.7845639
0
Removes all entries for this datasource_id_seq in the mapping table
Удаляет все записи для этого datasource_id_seq в таблице сопоставления
public function removeThisTemp_XToIdMappingTable( $datasource_id_seq ){ // Create request vars to pass into the mapping function $request_vars = new Zend_Controller_Request_Http(); $data['authToken'] = $this->authToken; $data['datasource_id_seq'] = $datasource_id_seq; $request_v...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function clearMappings() {\n self::$ormMappings = [];\n }", "public static function resetMappings();", "public function clear() {\n\t\tif ( ! empty( $this->_map_name ) ) {\n\t\t\tdelete_transient( $this->_map_name );\n\t\t}\n\n\t\t$this->_map_data = null;\n\t\t$this->_dirty = false;\...
[ "0.6620639", "0.6160477", "0.5870823", "0.5780436", "0.57265747", "0.57173616", "0.5644219", "0.56010413", "0.55964017", "0.55955225", "0.5507787", "0.5498555", "0.5497161", "0.54856384", "0.5472143", "0.54675615", "0.545489", "0.5437542", "0.5433815", "0.5401384", "0.5383332...
0.71107805
0
Surcharge de __set pour donner acces aux valeurs sous la forme $e>attribut=val
Сурчардж __set для предоставления доступа к значениям в форме $e>attribut=val
public function __set($_cle, $_val){ if (array_key_exists($_cle, $this->valeurs)) { // La propriete demandee est bien une cle du tableau des valeurs return $this->valeurs[$_cle] = $_val; } elseif (array_key_exists($_cle, static::$relations_elem)) { return static::$relations_elem[...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __set($atributo, $valor){\r\n $this->$atributo = $valor;\r\n }", "public function set();", "public function __set($name, $val){}", "function __set($atributo, $valor){\n $this->$atributo = $valor;\n }", "public function __SET($atributo, $valor){\n $this->$atributo = $...
[ "0.70271647", "0.70077974", "0.69916743", "0.69017357", "0.6744073", "0.6708873", "0.6673893", "0.65930974", "0.6565433", "0.65647715", "0.65352404", "0.64916897", "0.64916897", "0.64810884", "0.64675033", "0.6463679", "0.6455928", "0.6452254", "0.64119625", "0.63844526", "0....
0.7653206
0
Surcharge de __isset pour donner acces aux valeurs sous la forme isset($e>attribut)
Сурчардж __isset для доступа к значениям в виде isset($e>attribut)
public function __isset($_cle) { if (array_key_exists($_cle, $this->valeurs)) { // La propriete demandee est bien une cle du tableau des valeurs return isset($this->valeurs[$_cle]); } elseif (array_key_exists($_cle, static::$relations_elem)) { isset(static::$relations_elem[$_cle]...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function __isset($attr) {\n return isset($this->_attr[$attr]);\n }", "public function __isset($key)\n {\n }", "public function __isset($key)\n {\n }", "public function __isset($key)\n {\n }", "public function __isset($key)\n {\n }", "public function __isset( $key ) {\n\t...
[ "0.6702821", "0.66475606", "0.66475606", "0.66475606", "0.66475606", "0.65937406", "0.6560625", "0.6560625", "0.6559617", "0.6559617", "0.6559617", "0.6559424", "0.6559424", "0.65591556", "0.65591556", "0.65363586", "0.64642334", "0.64429873", "0.64336747", "0.63784635", "0.6...
0.7326018
0
Surcharge de __unset pour donner acces aux valeurs sous la forme unset($e>attribut)
Сурчардж __unset для предоставления доступа к значениям в виде unset($e>attribut)
public function __unset($_cle /** Nom de la propriete */) { if (array_key_exists($_cle, $this->valeurs)) {// La propriete demandee est bien une cle du tableau des valeurs return $this->valeurs[$_cle] = null; } elseif (array_key_exists($_cle, static::$relations_elem)) { unset(stat...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function attr_unset($attr,$key){\n $key = $this->key_prep($key);\n if(is_null($attr)){\n foreach($this->search('ppat',\"{^$key@.+}\") as $ck) unset($this->data[$ck]);\n } else if(is_array($attr)){\n foreach($attr as $ck) unset($this->data[$key . '@' . $ck]);\n } else unset($this->data[$key . ...
[ "0.68367237", "0.6742835", "0.661256", "0.65722716", "0.651329", "0.6508215", "0.6444632", "0.6436731", "0.6434211", "0.6434211", "0.6434211", "0.6434211", "0.6434211", "0.64272636", "0.6413561", "0.640634", "0.6381452", "0.63453245", "0.6328829", "0.6299918", "0.6294031", ...
0.75800914
0
Renames a role (changes the label).
Переименовывает роль (изменяет метку).
public function renameRole($roleId, string $label);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRenameRole() {\n $this->drupalPostForm(\"admin/people/roles/manage/{$this->rid_low}\", array('label' => 'new low'), t('Save'));\n $this->drupalGet('admin/people/permissions');\n $this->assertFieldChecked(\n \"edit-{$this->rid_high}-assign-low-role\",\n t('Permissions are upda...
[ "0.73363686", "0.7111851", "0.66061836", "0.65901506", "0.65901506", "0.644995", "0.62305814", "0.6198419", "0.61719024", "0.6088936", "0.60333467", "0.5979819", "0.5974803", "0.59533054", "0.59400517", "0.59374565", "0.5895142", "0.58795404", "0.5872866", "0.5839893", "0.583...
0.84888524
0
Return the context level associated with the object, for fetching custom fields.
Верните уровень контекста, связанный с объектом, для получения пользовательских полей.
abstract protected function get_field_context_level();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLevel() {}", "public function getContextInfo() {}", "public function getLevel();", "public function getLevel();", "public function getLevel();", "public function getLevel();", "public function getLevel()\n {\n }", "public function getLevel() {\n return $this->get(self:...
[ "0.60792387", "0.6069081", "0.60048324", "0.60048324", "0.60048324", "0.60048324", "0.599567", "0.59292823", "0.59139043", "0.58895236", "0.58827573", "0.58763754", "0.5860698", "0.58442724", "0.5825574", "0.5824983", "0.5809721", "0.5809721", "0.5809721", "0.5808688", "0.580...
0.8228132
0
Converts the data_object a dumb object representation (without associations). This is required when using the Moodle _record functions, or get_string. Overridden to add custom fields.
Преобразует данные_объект в примитивное представление объекта (без ассоциаций). Это необходимо при использовании функций Moodle _record или get_string. Переопределено для добавления пользовательских полей.
public function to_object() { $obj = parent::to_object(); $this->_load_field_data(); foreach ($this->_field_data as $name => $value) { $fieldname = "field_{$name}"; $obj->$fieldname = $value; } return $obj; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function toObject()\r\n\t{\r\n\t\t$value = null;\r\n\t\t\r\n\t\tif(isset($this->dataObject) || !is_null($this->dataObject)) //There is an object behind the data object \r\n\t\t{\r\n\t\t\tKalturaLog::debug(\"Take value from data object [\" . print_r($this->dataObject,true) .\"]\");\r\n\t\t\t$value = $this->d...
[ "0.6797731", "0.67307115", "0.6721225", "0.6706021", "0.64652896", "0.62282354", "0.608047", "0.60445803", "0.60329986", "0.6030954", "0.6030954", "0.6030954", "0.59903556", "0.59892356", "0.59633243", "0.5938706", "0.5927881", "0.5891116", "0.5862084", "0.5826516", "0.582157...
0.70080173
0
Magic Methods Magic get method to returns custom field data when accessed as $this>field_[fieldname], in addition to the parent class' magic getter functionality.
Магические методы Магический метод get для возврата пользовательских данных поля при обращении к нему как $this>field_[fieldname], в дополнение к функциональности магического получателя родительского класса.
public function __get($name) { $prefix_len = strlen(self::CUSTOM_FIELD_PREFIX); if (strncmp($name, self::CUSTOM_FIELD_PREFIX, $prefix_len) == 0) { $this->_load_fields(); $shortname = substr($name, $prefix_len); if (isset(self::$_fields[$this->get_field_context_level()...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __get( $field ) {\n\t\treturn $this->{$field};\n\t}", "public function __get($field){\n if ($field == 'codigo')\n return $this->codigo;\n else \n return $this->fields[$field];\n }", "function get_field() {\n\t\treturn $this->field;\n\t}", "public functio...
[ "0.72999215", "0.72663456", "0.7203015", "0.7149892", "0.7135665", "0.7112115", "0.7106445", "0.7106445", "0.7094841", "0.7052072", "0.70129967", "0.69915134", "0.6984148", "0.69821644", "0.69763035", "0.69472396", "0.69333535", "0.69242346", "0.69209677", "0.69120735", "0.69...
0.7899576
0
Lowlevel methods Ensure that the context is loaded for this record.
Низкоуровневые методы гарантируют, что контекст загружен для этого записи.
private function _load_context() { if (!isset($this->_context) && isset($this->id)) { $ctxclass = context_elis_helper::get_class_for_level($this->get_field_context_level()); $this->_context = $ctxclass::instance($this->id); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function initContextAware()\n {\n $this->initialize();\n }", "protected function ensureLoaded()\n {\n if ($this->config === null)\n {\n $this->loadConfig();\n }\n }", "protected function validateContext() { }", "protected function establishContext(...
[ "0.656227", "0.6173142", "0.6140396", "0.60515374", "0.60482", "0.6045857", "0.5998239", "0.5964568", "0.5895459", "0.584791", "0.58242816", "0.574518", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5741971", "0.5...
0.7142743
0
Ensure that the fields that are defined for the context level. This does not load the field data, just the field definitions. See _load_field_data().
Убедитесь, что поля, определенные для уровня контекста, заданы. Это не загружает данные полей, только их определения. См. _load_field_data().
private function _load_fields() { $contextlevel = $this->get_field_context_level(); if (!isset(self::$_fields[$contextlevel])) { $fields = field::get_for_context_level($contextlevel); if (!is_array($fields)) { $fields = $fields->to_array('shortname'); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function _load_field_data() {\n if (!empty($this->id) && !$this->_fields_loaded) {\n $this->_load_context();\n $this->_load_fields();\n $data = field_data::get_for_context($this->_context);\n foreach (self::$_fields[$this->_context->contextlevel] as $name ...
[ "0.7395008", "0.6419978", "0.641753", "0.64058495", "0.6368504", "0.6360377", "0.6352949", "0.6334571", "0.63203824", "0.62946355", "0.62093157", "0.6200402", "0.6183268", "0.61730736", "0.6165498", "0.6154786", "0.61444575", "0.613229", "0.60770684", "0.60749906", "0.6019037...
0.7598058
0
Reset the cached list of custom fields (mainly for testing purposes)
Сбросить кэшированный список пользовательских полей (в основном для целей тестирования)
public function reset_custom_field_list() { $contextlevel = $this->get_field_context_level(); unset(self::$_fields[$contextlevel]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function resetFields()\n {\n $this->fieldsFillable = '';\n $this->fieldsHidden = '';\n $this->fieldsCast = '';\n $this->fieldsDate = '';\n }", "function acf_reset_local() {\n\tacf_get_local_store( 'fields' )->reset();\n\tacf_get_local_store( 'groups' )->reset();\n}", ...
[ "0.71905494", "0.7060534", "0.7039433", "0.688733", "0.6845265", "0.6791716", "0.67884797", "0.66991884", "0.66739047", "0.6673888", "0.6651193", "0.6647744", "0.6602937", "0.659861", "0.65890074", "0.65760696", "0.65711063", "0.6569374", "0.6569374", "0.6556151", "0.65500104...
0.8102273
0