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
End of arraytolower FUNCTION: ARRAY TO UPPER
Конец функции arraytolower: МАССИВ В ВЕРХНИЙ РЕГИСТР
public static function arrayToUpper($array) { foreach ($array AS $key => $value) { if (is_string($value)) { $array[$key] = strtoupper(trim($value)); } } return $array; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function array_lower($a_arr){\n\tarray_walk($a_arr, 'walk_tolower');\n\treturn $a_arr;\n}", "public function returnArrayAsUppercase($array)\n {\n return self::arrayCaseing('strtoupper', $array);\n }", "public function returnArrayAsLowercase($array)\n {\n return self::arrayCaseing('strtol...
[ "0.74154186", "0.6803743", "0.6736671", "0.6715336", "0.6634579", "0.6574079", "0.64950156", "0.6436867", "0.63606644", "0.62955314", "0.62199277", "0.6204161", "0.6185648", "0.6092875", "0.6052009", "0.6039268", "0.59753275", "0.59402484", "0.593853", "0.592306", "0.5878427"...
0.71045417
1
current longest string length
текущая длина самой длинной строки
public static function longestString($array) { $i = 0; foreach ($array as $value) { if (strlen($value) > $i) { $i = strlen($value); } } return $i; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function findLongestWord() {\n\n }", "public function getMaxLength();", "public function getLongestLineLength(): int\n {\n return 0;\n }", "public function getMaxLength() {}", "protected function get_max_length(): int\n\t{\n\t\treturn $this->end < $this->total ? $this->length : -1;\n...
[ "0.7290234", "0.72546154", "0.7157823", "0.7077679", "0.70628035", "0.6611467", "0.657354", "0.65500635", "0.65155953", "0.63129383", "0.63015205", "0.62968457", "0.62823004", "0.62535876", "0.6251569", "0.6224548", "0.6207818", "0.61612296", "0.6156395", "0.61264527", "0.609...
0.7656317
0
Gets a Path Parser for the path strings this adapter uses.
Получает парсер путей для строк путей, которые использует этот адаптер.
function getPathParser();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getPathListParser ()\n {\n return new \\vc\\Parser\\PathList(\n new \\vc\\Parser\\Path\n );\n }", "protected function parsePath() {\n\t}", "protected function getParser()\n {\n if (class_exists(ParserFactory::class)) {\n return (new ParserFact...
[ "0.7668859", "0.60389864", "0.5964984", "0.5926582", "0.58747005", "0.5866124", "0.58408314", "0.5828497", "0.582583", "0.582583", "0.58248913", "0.57237226", "0.5696994", "0.5696994", "0.568695", "0.56149375", "0.5606466", "0.55492425", "0.5548158", "0.5548158", "0.5548158",...
0.7344166
1
Share via Email API.
API для отправки по электронной почте.
public function actionShare() { $postdata = file_get_contents("php://input"); $request = json_decode($postdata); if ($request) { $query = new Query; $query ->from('user') ->where(['id' => $request->to_user_id]) ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function shareEmailAction()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\t$user = Application_Model_User::getAuth();\r\n\r\n\t\t\tif ($user == null)\r\n\t\t\t{\r\n\t\t\t\tthrow new RuntimeException('You are not authorized to access this action');\r\n\t\t\t}\r\n\r\n\t\t\t$id = $this->_request->getPost('id');\r\n\r\n\t...
[ "0.78004485", "0.63655394", "0.6302954", "0.60564405", "0.6048608", "0.60188496", "0.601387", "0.58823216", "0.5781149", "0.57409996", "0.5663024", "0.5621887", "0.5611809", "0.5557929", "0.5535899", "0.55159575", "0.5504777", "0.5497056", "0.54096025", "0.53858244", "0.53778...
0.70383847
1
Get a PcasFactory instance.
Получите экземпляр PcasFactory.
public function getPcasFactory() { if (null === $this->pCasFactory) { $this->pCasFactory = $this->container->get('pcas.pcas_factory'); } return $this->pCasFactory; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFactory()\n {\n return new Factory();\n }", "public static function getFactory()\r\n\t{\r\n\t\treturn self::$factory;\r\n\t}", "public function getFactory()\n {\n return $this->_factory;\n }", "public function getFactory()\n {\n return $this->factory;\n ...
[ "0.6932486", "0.6607037", "0.6554899", "0.65331686", "0.65331686", "0.65331686", "0.65331686", "0.65331686", "0.65331686", "0.65331686", "0.65331686", "0.65277064", "0.6438754", "0.6398697", "0.6375652", "0.62240714", "0.61832416", "0.60019994", "0.60011035", "0.6000878", "0....
0.8783645
0
Implements hook_drush_sql_sync_sanitize(). Custom sqlsync sanitization to alter user's full name.
Реализует hook_drush_sql_sync_sanitize(). Настройка sqlsync для изменения полного имени пользователя.
function policy_drush_sql_sync_sanitize($source) { drush_sql_register_post_sync_op('policy-sanitize-full-name', dt('Reset the full name of all users.'), "UPDATE field_data_field_full_name SET field_full_name_value = CONCAT('user+', entity_id);"); drush_sql_register_post_sync_op('policy-sanitize-full-name-r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function the_champ_sanitize_user($username, $rawUsername, $strict){\r\n\t$username = wp_strip_all_tags($rawUsername);\r\n\t$username = remove_accents($username);\r\n\t$username = preg_replace('|%([a-fA-F0-9][a-fA-F0-9])|', '', $username);\r\n\t$username = preg_replace('/&.+?;/', '', $username);\r\n\t// If strict, ...
[ "0.6684324", "0.6218735", "0.6033551", "0.6027563", "0.59267074", "0.5925123", "0.58967656", "0.5893695", "0.5869229", "0.58497363", "0.584006", "0.58088255", "0.5806543", "0.5782571", "0.57436025", "0.5716318", "0.5652645", "0.56448406", "0.56409675", "0.5637795", "0.5611389...
0.77863336
0
GET REL DOCUMENTOS DE REFERENCIA EXTERNA //
ПОЛУЧИТЬ ДОКУМЕНТЫ С ВНЕШНИХ ИСТОЧНИКОВ ССЫЛКИ //
public function get_rel_referenciasExternas_documentos() { $sql = "SELECT rexDoc.*, dt.sNombre FROM rel_referenciasExternas_documentos AS rexDoc INNER JOIN cat_docTipo dt ON dt.skDocTipo = rexDoc.skDocTipo WHERE rexDoc.skEstatus = 'AC' AND rexDoc.skReferenciaExterna = '" . $this->refex['skReferenciaExterna'] . ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getReferencia()\n {\n return $this->referencia;\n }", "public function getReferencia()\n {\n return $this->referencia;\n }", "public function getRel(): string;", "public function getCedenteDocumento();", "public function getSacadoDocumento();", "public function g...
[ "0.6690165", "0.6690165", "0.6659439", "0.6296111", "0.6295393", "0.62476635", "0.6177978", "0.60995054", "0.6098617", "0.6090457", "0.6083004", "0.5994729", "0.59840435", "0.5961785", "0.5961785", "0.5961785", "0.5961785", "0.5961785", "0.5961785", "0.5961785", "0.5961785", ...
0.7568319
0
Find Class Ancestors (Parents and Parents of Parents)
Найти предков класса (родителей и родителей родителей)
function getAncestors($class) { for ($classes[] = $class; $class = get_parent_class ($class); $classes[] = $class); return $classes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function ancestors() {\n\t\t$ancestors = array();\n\t\tfor ($here = $this ; $here !== NULL ; $here = $here->_parent) {\n\t\t\t$ancestors []= $here;\n\t\t}\n\t\treturn array_reverse($ancestors);\n\t}", "public function getParentClasses(string $class);", "function getAncestors () {\r\n\t\t$ancestors = array ($th...
[ "0.74584365", "0.737507", "0.7334141", "0.7334141", "0.7217158", "0.71588564", "0.70726645", "0.69034153", "0.67967963", "0.67579937", "0.67474896", "0.6718202", "0.6696938", "0.66717553", "0.6657588", "0.65982354", "0.65484035", "0.653257", "0.6507767", "0.6462753", "0.63871...
0.781173
0
Check if $object is valid $class instance
Проверьте, является ли $object допустимым экземпляром $class
function isInstanceOf($object, $class) { return $object instanceof $class; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function validateClass( $object ) {\n return is_object( $object ) &&\n in_array( \n get_class($object),\n ['UKMNorge\\Arrangement\\Program\\Hendelse']\n );\n }", "private function changelog_validate_object () {\n\t\t# set valid objects\n...
[ "0.7520051", "0.7071933", "0.6975598", "0.6825781", "0.6753405", "0.6614498", "0.65975183", "0.658215", "0.6519753", "0.6489262", "0.64381856", "0.64381856", "0.6422122", "0.64010626", "0.6396675", "0.63805896", "0.6357362", "0.63465923", "0.6346261", "0.6318052", "0.6306341"...
0.7226771
1
This function will return true if $str is valid function name (made out of alpha numeric characters + underscore)
Эта функция вернёт true, если $str является корректным именем функции (состоящим из алфавитно-цифровых символов и подчёркивания)
function isValidFunctionName($str) { $check_str = trim($str); if ($check_str == '') { return false; // empty string } $first_char = substr($check_str,0,1); if (is_numeric($first_char)) { return false; // first char can't be number } return (boolean) preg_match("/^([a-zA-Z0-9...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function isUnderscoreName($string)\n {\n // If there are space in the name, it can't be valid.\n if (strpos($string, ' ') !== false) {\n return false;\n }\n\n // Remove the first _ if it exists. This is allowed\n // for very low level \"private\" internal...
[ "0.81218106", "0.78878933", "0.78480315", "0.77481663", "0.75722533", "0.75386846", "0.7368835", "0.70925134", "0.7078189", "0.6999935", "0.69876295", "0.69654095", "0.6963033", "0.6943879", "0.68975663", "0.6856266", "0.6823067", "0.6800558", "0.67804813", "0.6760392", "0.67...
0.84204334
0
Set array of arguments into wrapper.
Задайте массив аргументов в обертку.
public function setWrapperArguments($arguments) { foreach ($arguments as $key => $value) { $this->setWrapperArgument($key, $value); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setArguments(array $arguments);", "public function setArguments(array $args);", "public function setArguments(...$arguments) {\n $this->arguments = $arguments;\n return $this;\n }", "public function setArguments(array $arguments): self\n {\n $this->_arguments = $arg...
[ "0.783956", "0.7632693", "0.7177289", "0.71358746", "0.71240294", "0.7009594", "0.6710322", "0.6699802", "0.66516346", "0.6626585", "0.66044015", "0.65765524", "0.6561862", "0.65577376", "0.6546507", "0.6519264", "0.65167516", "0.64512813", "0.6447463", "0.6370857", "0.635643...
0.80670804
0
Remove single argument from wrapper.
Удалить один аргумент из обертки.
public function removeWrapperArgument($key) { if (isset($this->arguments[$key])) { unset($this->arguments[$key]); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove($parameter);", "public function __unset($name)\n {\n unset($this->_params['args'][$name]);\n }", "public function __unset($name)\n {\n unset($this->_params['args'][$name]);\n }", "public function remove($index) {\n if (isset($this->arguments[$index])) {\n ...
[ "0.64826345", "0.6262225", "0.6262225", "0.6056344", "0.6002948", "0.59318143", "0.59187955", "0.5892894", "0.5891267", "0.5877271", "0.58619076", "0.579234", "0.57742345", "0.5766098", "0.56908643", "0.5677278", "0.5676212", "0.5645367", "0.564413", "0.56171626", "0.55739695...
0.7696034
0
Get a label for the DateInterval
Получить метку для интервала дат
public function getIntervalLabel() { $start = $this->startDatetime->format('U'); $end = $this->endDatetime->format('U'); $startDay = date('d', $start); $startMonth = date('F', $start); $startYear = date('Y', $start); $endDay = date('d', $end); $endMonth = da...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getInterval()\n {\n $time_diff = date_diff($this->created_at, new \\DateTime());\n\n $format = \"Aujourd'hui\";\n if ($time_diff->d == 1) {\n $format = \"Hier\";\n }\n if ($time_diff->d > 1) {\n $format = \"Il y a %d jours\";\n }\n ...
[ "0.6522173", "0.64101386", "0.6334137", "0.6228884", "0.6228884", "0.61506456", "0.6058916", "0.6054828", "0.60119486", "0.60037476", "0.6000635", "0.6000635", "0.6000635", "0.6000635", "0.6000635", "0.6000635", "0.6000635", "0.6000635", "0.6000635", "0.6000635", "0.6000635",...
0.82953525
0
Get working duration label
Получить метку длительности работы
public function getDurationLabel() { return $this->format_duration($this->getWorkingDuration()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_duration();", "public static function get_booking_duration_unit_label( $unit ) {\n switch ( $unit ) {\n case 'month':\n $unit_label = __( 'Month(s)', 'dokan' );\n break;\n case 'day':\n $unit_label = __( 'Day(s)', 'doka...
[ "0.67803913", "0.6685243", "0.6678169", "0.66139215", "0.65363574", "0.6471454", "0.6461013", "0.64099926", "0.640654", "0.63925105", "0.6388968", "0.63736033", "0.6362934", "0.6331815", "0.62719774", "0.62433594", "0.62313765", "0.6220214", "0.6184351", "0.61827266", "0.6150...
0.8319434
0
Create Landing Page Nav Menu for About Us
Создать меню навигации для страницы "О нас"
function createAboutUsMenu () { $menu_name = __('About Us',CARE_TEXTDOMAIN); $menu_exists = wp_get_nav_menu_object( $menu_name ); if( !$menu_exists) { $menu_id = wp_create_nav_menu($menu_name); // Set up default menu items wp_update_nav_menu_item($menu_id, 0, array( 'me...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function artspace_aboutmenu() {\n\n\t$locations = array(\n\t\t'orange' => __( 'Top About Menu', 'text_domain' ),\n\t);\n\tregister_nav_menus( $locations );\n\n}", "function nav_main() {\n\n\techo '\n\t\n\t\t<ul>\n\t\t\t<li><a href=\"index.php?page=home\">Home</a></li>\n\t\t\t<li><a href=\"index.php?page=gallery\...
[ "0.7358513", "0.6885686", "0.6846363", "0.67288005", "0.66459244", "0.6621832", "0.662139", "0.65603834", "0.6514652", "0.6491283", "0.64730656", "0.64678895", "0.6451291", "0.6451186", "0.6447356", "0.6445694", "0.6414173", "0.64095366", "0.6395745", "0.6383492", "0.638251",...
0.74134105
0
Register any application services for local environment.
Регистрируйте любые службы приложения для локальной среды.
protected function registerForLocal() { // IDE Helper Generator from "barryvdh/laravel-ide-helper" package $this->app->register(\Barryvdh\LaravelIdeHelper\IdeHelperServiceProvider::class); // Debug bar from "barryvdh/laravel-debugbar" package $this->app->register(\Barryvdh\Debugbar\S...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function register()\n {\n // Only Environment local\n if ($this->app->environment() !== 'production') {\n foreach ($this->services as $serviceClass) {\n $this->registerClass($serviceClass);\n }\n }\n\n // Register Aliases\n $this->re...
[ "0.72070897", "0.7139578", "0.7020723", "0.7015515", "0.67586905", "0.6724425", "0.6724304", "0.66855484", "0.66767716", "0.66752595", "0.6674208", "0.66629285", "0.66460204", "0.66363573", "0.6633776", "0.66305465", "0.66002", "0.6584015", "0.65735793", "0.65568936", "0.6554...
0.736937
0
/ | | Menampilkan map atau area tertentu | | Parameter $id digunakan untuk menentukan aksi selanjutnya |
| | Показать карту или определенную область | | Параметр $id используется для определения следующего действия |
public function index($id = false) { // Jika terdapat $id if ($id) { // Menjalankan function tertentu pada model $area = $this->guest->getOneArea($id)->row(); // Jika $id ditemukan if (!empty($area)) { $data = [ 'title' => $area->name . ' - Search Map', 'page' => 'draws/view', 'area...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setIdArea($id) {\n $this->_id = $id; \n }", "function add_edit_map($page_id, $id = null) {\n if ($id != null) {\n $map = $this->Map_model->get_map_by_id($page_id, $id);\n $customize_data = json_decode($map[0]->customization);\n $data['id'] = $ma...
[ "0.68872696", "0.6729631", "0.6659868", "0.6594896", "0.6466582", "0.6447621", "0.64464897", "0.6414684", "0.6323346", "0.62505764", "0.62150216", "0.6198982", "0.61897", "0.618739", "0.6166845", "0.6149552", "0.6077602", "0.60759497", "0.60724515", "0.607034", "0.6064694", ...
0.7243727
0
Display view for adding a new member
Вид отображения для добавления нового члена
public function viewAddMember() { $status = Status::all(); return view('members.addMember')->with('status', $status); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addMember(){\n\t\t\t\n\t\t\t$this->load->view('addMember') ;\n\t\t}", "public function create()\n {\n return view('admin.members.add');\n }", "public function studioAddMember() {\n return view('Studio::studioMembers');\n }", "public function create()\n {\n return vi...
[ "0.83262783", "0.8157576", "0.80299395", "0.78487664", "0.7833576", "0.78145945", "0.7804152", "0.7788844", "0.7761189", "0.77541876", "0.76474726", "0.7515781", "0.74909115", "0.7463924", "0.7445836", "0.73557353", "0.73279226", "0.7272769", "0.72669005", "0.7208288", "0.717...
0.82040507
1
This Function Will Check if a User Likes Given Profile
Эта Функция Проверит, Нравится Ли Пользователю Данная Профиль
public function user_liked_profile($user_id, $profile_id) { // Connect To The DataBase $connection = DB::connect(); // Select All Rows From profile_likes Table Where Coditions Are Verified $stmt = "SELECT * FROM profile_likes WHERE user_id = '$user_id' AND profile_id = '$profile_id'"; $result = $conn...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function canMemberLikes() {\n $viewer = Engine_Api::_()->user()->getViewer();\n if (!$viewer || !$viewer->getIdentity()) {\n return false;\n }\n\t\t$like_profile_show = Engine_Api::_()->getApi( 'settings' , 'core' )->getSetting( 'like.profile.show' ) ;\n\t\tif ( empty( $like_profile_show ) ) {...
[ "0.7651203", "0.7373599", "0.7291069", "0.71983105", "0.7172775", "0.7103976", "0.70784867", "0.70771694", "0.7008948", "0.695539", "0.6904688", "0.6901948", "0.6893613", "0.68803", "0.68256015", "0.67756903", "0.6769343", "0.66643405", "0.65395147", "0.6536794", "0.65299207"...
0.8004349
0
Refresh content of folder
Обновить содержимое папки
public function refreshContent() { while ($entry = $this->pointer->read()) { $path = $this->_path . DS . $entry; if (Visio\FileSystem::fileExist($path)) { $this->content[$entry] = new Visio\FileSystem\File($path, false); } else if (Visio\FileSystem::directory...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function refresh() {}", "public function refresh();", "public function refresh();", "public function reload() {\r\n if ($this->pathname) {\r\n $this->contents = file_get_contents($this->pathname);\r\n }\r\n }", "abstract public function refresh();", "public function ref...
[ "0.702858", "0.6971879", "0.6971879", "0.68523014", "0.68106925", "0.65620303", "0.6503429", "0.63460773", "0.6261275", "0.6228971", "0.6213476", "0.6194551", "0.6065768", "0.6065768", "0.6065768", "0.6065768", "0.604941", "0.5976058", "0.5925031", "0.58761525", "0.58706456",...
0.7261948
0
Test moderation of all products of a company
Тестирование модерации всех продуктов компании
public function testModerationByCompany(): void { // Initial state $productSummaryArray = $this->getProductsSummary(); static::assertSame(11, $productSummaryArray[3][ProductApprovalStatus::APPROVED()->getKey()]); static::assertSame(2, $productSummaryArray[3][ProductApprovalStatus::P...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testModerationByProduct(): void\n {\n $productSummaryArray = $this->getProductsSummary();\n static::assertSame(1, $productSummaryArray[4][ProductApprovalStatus::PENDING()->getKey()]);\n\n $this->moderationService->moderateByProduct(17, 'approve');\n $productSummaryArr...
[ "0.7306453", "0.6260293", "0.61510956", "0.60392046", "0.5804306", "0.56789297", "0.56540257", "0.56334025", "0.5582723", "0.55498105", "0.5533987", "0.5517506", "0.55146706", "0.5502656", "0.5478922", "0.54783803", "0.5476076", "0.54711604", "0.5448469", "0.54410046", "0.541...
0.7973108
0
Test moderation of one product
Тестирование умеренности одного продукта
public function testModerationByProduct(): void { $productSummaryArray = $this->getProductsSummary(); static::assertSame(1, $productSummaryArray[4][ProductApprovalStatus::PENDING()->getKey()]); $this->moderationService->moderateByProduct(17, 'approve'); $productSummaryArray = $this-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testModerationByProductException(): void\n {\n static::expectException(UnauthorizedModerationAction::class);\n $this->moderationService->moderateByProduct(1, 'wrong');\n }", "public function testModerationByCompany(): void\n {\n // Initial state\n $productSumm...
[ "0.6684832", "0.662328", "0.6295198", "0.59140646", "0.5803933", "0.5731278", "0.5721786", "0.5671906", "0.56626314", "0.56612676", "0.564358", "0.5635505", "0.5635505", "0.5635505", "0.5635505", "0.5635505", "0.5619181", "0.5606929", "0.55924755", "0.5553793", "0.5485203", ...
0.8002996
0
Returns the array of Parent Nodes for this Link.
Возвращает массив родительских узлов для этой ссылки.
public function getParents() { return $this->parentNodes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_parent_links()\n\t {\n\t\t $parent = array();\n\t\t foreach ($this->get_links() as $link)\n\t\t {\n\t\t\t if (!$link->get_parent_id())\n\t\t\t {\n\t\t\t\t $parent[] = $link;\n\t\t\t }\n\t\t }\n\t\t return $parent;\n\t }", "public function getParents()\n {\n...
[ "0.8049034", "0.75059646", "0.74661845", "0.7403805", "0.72833467", "0.7269625", "0.72127247", "0.72062945", "0.71922123", "0.71610016", "0.7082172", "0.70765", "0.7046345", "0.69570994", "0.6946436", "0.6777379", "0.67704433", "0.67078465", "0.6700249", "0.6644205", "0.66078...
0.8110123
0
Set the max dimension of the attachment in the attachment.php script in your theme
Установите максимальное измерение прикрепления в скрипте attachment.php в вашей теме
function ezp_attachment_max_dims ($max_dims_array) { return array( ezp_standalone_max_width, ezp_standalone_max_height ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function max_attachment_size() {\n\t\treturn apply_filters( 'import_attachment_size_limit', 0 );\n\t}", "function media_upload_max_image_resize()\n {\n }", "function setMaxForThumbSize( $iMaxForThumbSize = 2000 ){\n $this->iMaxForThumbSize = $iMaxForThumbSize;\n }", "function getMaxAttachmentSize()...
[ "0.7919701", "0.68711656", "0.6857568", "0.6851711", "0.6783166", "0.6447666", "0.6411919", "0.6369437", "0.63466686", "0.63348544", "0.63037044", "0.63005346", "0.6289849", "0.6286745", "0.6282649", "0.6227163", "0.6197277", "0.61500907", "0.61102384", "0.6087098", "0.606708...
0.7213928
1
/ Actually it's almost a copy of the original wp_create_thumbnail function. The only changes are : management of the prefix and the suffix management of the dontmagnify effect which allow to present magnifying an image when it is smaller than the standard size
Фактически это почти полная копия оригинальной функции wp_create_thumbnail. Единственные изменения: управление префиксом и суффиксом, а также управление эффектом dontmagnify, который позволяет отображать увеличение изображения, когда оно меньше стандартного размера.
function ezp_create_thumbnail( $file, $max_side, $effect = '', $prefix = "", $suffix = ".post" ) { // 1 = GIF, 2 = JPEG, 3 = PNG $max_width = $max_side; $max_height = ezp_max_resizing_ratio * $max_side; if ( file_exists( $file ) ) { $type = getimagesize( $file ); // if the associated function doesn't exist...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generateThumbnailGD(){\n\t\t\n\t}", "function makethumbnail($image_name,$src,$dest) {\n global $_CONF, $CONF_SE;\n $do_create = 0;\n if ($image_info = @getimagesize($src)) {\n if ($image_info[2] == 1 || $image_info[2] == 2 || $image_info[2] == 3) {\n $do_create = 1;\n ...
[ "0.7295973", "0.7281544", "0.71048284", "0.71048284", "0.7090546", "0.7079853", "0.7017926", "0.6960314", "0.6765924", "0.67634946", "0.6754581", "0.6734658", "0.672081", "0.6681521", "0.66431797", "0.6640645", "0.6629133", "0.66012496", "0.65861607", "0.65817356", "0.6579563...
0.7713248
0
Get the path to the email dir.
Получить путь к директории электронных писем.
private function __getEmailDir() { return $this->_testDir() . 'HMS_Emails/'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSendmailPath() {}", "public function getMailTemplatePath()\n {\n if ($this->_mailTemplatePath === null) {\n $this->_mailTemplatePath = realpath($this->getBasePath() . DIRECTORY_SEPARATOR . 'mails');\n }\n return $this->_mailTemplatePath;\n }", "private f...
[ "0.7836008", "0.74720633", "0.69197726", "0.6646087", "0.6615803", "0.65464437", "0.64952886", "0.6472016", "0.64305073", "0.64304113", "0.6429647", "0.64190733", "0.64115006", "0.6406128", "0.6389632", "0.63874084", "0.6362027", "0.63368744", "0.6329997", "0.6322542", "0.629...
0.82206416
0
Returns TRUE if ordering is enabled for the specified ROW ID.
Возвращает TRUE, если сортировка включена для указанного ROW ID.
public function showOrder($rowId) { if (isset($this->showOrdering[$rowId]) && $this->showOrdering[$rowId] == true) { return true; } else { return false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSortById()\n {\n return ($this->getSortBy() == 'id') ? true : false;\n }", "public function orderable()\n {\n return true;\n }", "public function isOrderable()\n\t{\n\t\treturn $this->orderable;\n\t}", "public function isOrderable(): ?bool {\n\t\treturn Hash::get($...
[ "0.6251838", "0.60019493", "0.5959735", "0.5855644", "0.58530015", "0.5789724", "0.56923354", "0.56598014", "0.5653649", "0.5653649", "0.5653649", "0.56530744", "0.56530744", "0.5651629", "0.5586865", "0.55800647", "0.55765814", "0.55765814", "0.55765814", "0.55765814", "0.54...
0.72449327
0
Gets the column that is being ordered.
Получает столбец, по которому происходит сортировка.
public function getOrderingColumn() { return $this->orderingColumn; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCurrentSortedColumn()\n {\n return $this->_currentSortedColumn;\n }", "public function getSortColumn();", "public function getColumn(): string\n {\n return $this->_column;\n }", "protected function getPositionColumn()\n {\n return $this->positionColumn ?...
[ "0.8363525", "0.80735683", "0.8026699", "0.7997948", "0.79736704", "0.7970029", "0.7970029", "0.7945966", "0.78313744", "0.78146863", "0.77710754", "0.76376086", "0.761494", "0.71929", "0.7168989", "0.71542287", "0.7129158", "0.71044993", "0.70998204", "0.7093202", "0.7062004...
0.8104876
1
Establishes the theme META tags (including SEO options)
Устанавливает тему META-тегов (включая опции SEO)
function business_meta_tags() { ?> <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1" /><?php global $themeslug, $options, $post; //Call global variables if(!$post) return; // in case of 404 page or something $title = get_post_meta($post->ID, 'seo_title' , true); $pagedescription = get_post_meta($post-...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildMetaTags()\n\t{\n\t\t/* Set basic ones */\n\t\t$this->metaTags['og:site_name'] = \\IPS\\Settings::i()->board_name;\n\t\t$this->metaTags['og:locale'] = preg_replace( \"/^([a-zA-Z0-9\\-_]+?)(?:\\..*?)$/\", \"$1\", \\IPS\\Member::loggedIn()->language()->short );\n\t\t\n\t\t/* Add the site name to...
[ "0.72874826", "0.70611995", "0.6801656", "0.6701367", "0.6677532", "0.65510637", "0.6545568", "0.6520978", "0.6505858", "0.6476668", "0.64203566", "0.63981587", "0.63904727", "0.6372517", "0.6360399", "0.6358352", "0.635276", "0.63514787", "0.6345437", "0.6338318", "0.6312709...
0.72110796
1
Header left content (sitename or logo)
Содержимое левого верхнего угла (название сайта или логотип)
function business_header_sitename_content() { global $themeslug, $options; //Call global variables $logo = $options->get($themeslug.'_logo'); //Calls the logo URL from the theme options if ($options->get($themeslug.'_custom_logo') == '1') { ?> <div id="logo"> <a href="<?php echo home_url(); ?>/"><img src="<?php e...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getHeaderPart()\n {\n //$logo_url = ot_get_option('header_logo', 'img/logo.jpg');\n ?>\n <?= $this->version151101() ?>\n <?= $this->getBannerPart() ?>\n <?php\n }", "public function page_header(){\n\t\t$e = $this->Empresa->salida;\n\t\t$this->Empresa->where...
[ "0.7053271", "0.70336723", "0.6966477", "0.69590867", "0.68271536", "0.67144364", "0.6660388", "0.6656285", "0.6622912", "0.6570832", "0.65615547", "0.65578616", "0.65432185", "0.65243053", "0.6510213", "0.64872897", "0.64842683", "0.64840364", "0.6418051", "0.6394018", "0.63...
0.7096789
0
Run the addThis widget. This renders the body part of the assThis widget.
Запустите виджет addThis. Это отображает часть тела виджета assThis.
function run() { // Run parent CWidget run function. parent::run(); // Get this widget id. $id = $this->getId(); // Set this widget id. $this->htmlOptions['id'] = $id; // Set the default 'class' attribute of addThis 'div' otherwise add users custom 'class' attri...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function run()\r\n {\r\n // Run parent CWidget run function.\r\n parent::run();\r\n echo '<!-- AddThis Button BEGIN -->';\r\n echo CHtml::openTag('div', $this->htmlOptions) . \"\\n\";\r\n if ($this->singleButton) {\r\n $img = CHtml::image(\"http://s7.addthis.com/sta...
[ "0.6757272", "0.63748074", "0.6317958", "0.61634123", "0.6127649", "0.59173536", "0.5903379", "0.58928174", "0.5812437", "0.57991683", "0.5787319", "0.57849586", "0.5760575", "0.5730159", "0.57067615", "0.5660631", "0.56580526", "0.5654981", "0.56516516", "0.56169206", "0.561...
0.71326107
0
generate reset password key
сгенерировать ключ сброса пароля
public function generateResetpasswordKey(){ $this->resetpassword_key = $this->passwordGenerator(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function generateResetKey()\n {\n $resetKey = str_random(5) . '_' . str_random(5) . '_' . str_random(5);\n\n return $resetKey;\n }", "public function generatePasswordResetToken()\n {\n $this->password = Yii::$app->security->generateRandomString() . '_' . time();\n }", "p...
[ "0.7845815", "0.77798235", "0.7724744", "0.7699989", "0.76904166", "0.76734424", "0.7640249", "0.7640249", "0.7640249", "0.763585", "0.75652933", "0.75630814", "0.75395215", "0.751529", "0.7513376", "0.7511009", "0.74953574", "0.74953574", "0.74953574", "0.7485473", "0.746498...
0.8803909
0
Check if the city input is within business area
Проверьте, находится ли введенный город в пределах бизнес-зоны
public function check_city() { if (!in_array(ucwords(sanitize_text_field($_POST['billing_city'])), $this->business_area)) { throw new Exception(__('Your city is not within our business area', 'woocommerce')); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testOutsideAnyArea()\n {\n $lat = '37.70772645289051';\n $long = '-124.74426269531249';\n \n // When I query\n $response = $this->call('GET', \"/gatekeeper/here/$lat/$long\");\n $json = json_decode($response->getContent());\n \n // Then I ...
[ "0.61203", "0.61202043", "0.60228634", "0.6007901", "0.59627604", "0.58467096", "0.5785391", "0.5680547", "0.5649549", "0.56361014", "0.55440164", "0.55115885", "0.54995626", "0.54830796", "0.5412878", "0.5404506", "0.54", "0.53599936", "0.5359477", "0.5332912", "0.53292763",...
0.7676817
0
Retrieve value from store info by key
Извлечь значение из информации о хранилище по ключу
private function get_store_info_value($key) { $info = $this->store_info; if ($info) { $result = $info[$key]; return $result ?: ''; } return ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract protected function retrieve($key);", "function kval_fsstore_get_item($key)\n{\n return fsstore_get(kval_fsstore_path(), $key);\n}", "public function getFromStore(string $key): mixed\n {\n return $this->store[$key] ?? null;\n }", "public function getItem($key){}", "public function g...
[ "0.72724587", "0.7233384", "0.7035761", "0.7010436", "0.7005169", "0.7005169", "0.7005169", "0.7005169", "0.7005169", "0.7005169", "0.7005169", "0.7005169", "0.7005169", "0.7005169", "0.7005169", "0.7005169", "0.7005169", "0.7005169", "0.7005169", "0.7005169", "0.7005169", ...
0.7294954
0
Gets the name of the section.
Получает имя раздела.
public function getSectionName(): string { return $this->sectionName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSectionName()\n {\n if(is_array($this->_loadedSection) && count($this->_loadedSection) === 1) {\n $this->_loadedSection = $this->_loadedSection[0];\n }\n return $this->_loadedSection;\n }", "public function get_section_name($section) {\n $section = ...
[ "0.82350504", "0.7685285", "0.7609696", "0.75593835", "0.74404114", "0.73521763", "0.72382456", "0.7155927", "0.6718553", "0.6716467", "0.65426266", "0.65347517", "0.65310276", "0.64599895", "0.64541656", "0.6441721", "0.6437399", "0.64326334", "0.64297044", "0.6395143", "0.6...
0.8733459
0
Gets the name of the parent section.
Получает имя родительского раздела.
public function getParentSectionName(): ?string { return $this->parentSectionName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getParentName()\n {\n return $this->getParentContext()->getName();\n }", "public function getParentName() {\n\t\t\t$parent = new Page();\n\t\t\t$parent->loadByGUID($this->parent);\n\t\t\treturn $parent->name;\n\t\t}", "public function getParentNameAttribute()\n\t{\n\t\treturn $this...
[ "0.765238", "0.74463016", "0.7378809", "0.73410285", "0.71033704", "0.7102538", "0.68406343", "0.68330777", "0.680203", "0.6776987", "0.67094874", "0.6617249", "0.6596919", "0.6512339", "0.6510421", "0.64670235", "0.64631397", "0.6453319", "0.6449335", "0.64318913", "0.641672...
0.815303
0
Sets the name of the parent section.
Устанавливает имя родительского раздела.
public function setParentSectionName(string $sectionName): void { $this->parentSectionName = $sectionName; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setHeaderSectionName(?string $name): void;", "public function setParentSourceName($source) {\n $this->parentSource = $source;\n }", "public function getParentSectionName(): ?string\n {\n return $this->parentSectionName;\n }", "public function setParent($parent) {\n\t\t$...
[ "0.6516339", "0.6364396", "0.6142593", "0.6096266", "0.60654455", "0.60654455", "0.6058891", "0.6026491", "0.6015251", "0.5948355", "0.59076893", "0.5871605", "0.5855571", "0.5806403", "0.570431", "0.56941676", "0.5680733", "0.5663169", "0.56435347", "0.5616024", "0.5613623",...
0.77654064
0
Assert that the Container implements ContainerInterface.
Утверждать, что Container реализует ContainerInterface.
public function testImplementsContainerInterface(): void { $container = new Container(); $this->assertInstanceOf(ContainerInterface::class, $container); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testConstructor() {\n $sut=new Container();\n $this->assertInstanceOf(ContainerInterface::class,$sut);\n }", "public function testMakeInterfaceRequiredDependency()\n {\n // definitions so the parameter resolving must throw an exception.\n\n $this->expectException...
[ "0.73378265", "0.6712658", "0.6650529", "0.6612761", "0.64774543", "0.63435054", "0.63435054", "0.62925756", "0.62858903", "0.61729515", "0.61729515", "0.6166968", "0.61651486", "0.61632293", "0.61247593", "0.60868317", "0.5945245", "0.59449637", "0.593622", "0.5924263", "0.5...
0.83487904
0
Assert that has() will return true for a service that has been set on the container
Утверждать, что has() вернет true для службы, которая установлена в контейнере
public function testHasWillAssertBooleanTrueForRegisteredService(): void { $container = new Container(); $name = \stdClass::class; $service = new \stdClass(); $this->assertFalse($container->has($name)); $container->set($name, $service); $this->assertTrue($containe...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testHasWillAssertBooleanFalseForNonRegisteredService(): void\n {\n $container = new Container();\n\n $name = \\stdClass::class;\n\n $this->assertFalse($container->has($name));\n }", "public function verifyRequiredServices($container);", "public function testHas()\n\t{...
[ "0.773704", "0.6964506", "0.6920686", "0.67528665", "0.6697039", "0.66745377", "0.66489065", "0.6608471", "0.6532459", "0.6412597", "0.6365887", "0.6303261", "0.6282386", "0.626162", "0.6233044", "0.6198632", "0.6194802", "0.61593306", "0.61249024", "0.60844326", "0.60795766"...
0.8272758
0
Assert that has() will return FALSE for a service that has NOT been set on the container
Утверждать, что has() вернет FALSE для службы, которая не была установлена в контейнере
public function testHasWillAssertBooleanFalseForNonRegisteredService(): void { $container = new Container(); $name = \stdClass::class; $this->assertFalse($container->has($name)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testHasWillAssertBooleanTrueForRegisteredService(): void\n {\n $container = new Container();\n\n $name = \\stdClass::class;\n $service = new \\stdClass();\n\n $this->assertFalse($container->has($name));\n\n $container->set($name, $service);\n\n $this->as...
[ "0.77276164", "0.6770052", "0.676967", "0.6729825", "0.6614892", "0.6604832", "0.6549125", "0.64676577", "0.63900167", "0.6353095", "0.62777555", "0.6260812", "0.6239691", "0.6237871", "0.62309957", "0.6219898", "0.6202693", "0.61142576", "0.6022011", "0.6011899", "0.59925973...
0.82811165
0
Assert that calls to get with a registered service alias will return the named service
Убедитесь, что вызовы get с зарегистрированным псевдонимом службы возвращают именованную службу
public function testGetWillReturnAServiceByAliasName(): void { $container = new Container(); $alias = 'foo'; $name = \stdClass::class; $service = new \stdClass(); $container->set($name, $service); $container->setAlias($alias, $name); $this->assertSame($serv...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get($serviceName);", "public function testBuildWillResolveAliasToServiceName(): void\n {\n $container = new Container();\n\n $alias = 'FooAliasName';\n $name = 'FooServiceName';\n\n // Define our service\n $container->setFactory(\n $name,\n ...
[ "0.66964114", "0.6654567", "0.64980423", "0.6385806", "0.6292131", "0.62749964", "0.6224921", "0.62025476", "0.6189817", "0.6150239", "0.6037935", "0.6027562", "0.6016091", "0.58865756", "0.58764094", "0.5848669", "0.5812727", "0.5775887", "0.57751447", "0.57718617", "0.57524...
0.7786003
0
Assert that a ContainerException is thrown when trying to register a service alias for an unregistered service
Утверждать, что при попытке регистрации псевдонима для нерегистрированного сервиса будет выброшено исключение ContainerException
public function testSetAliasWillThrowContainerExceptionIfTheServiceNameAliasedHasNotBeenRegistered(): void { $container = new Container(); $alias = 'FooService'; $name = 'TestService'; $this->expectException(ContainerException::class); $this->expectExceptionMessage( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testExceptionIsThrownWhenRegisteringServiceProviderWithInvalidType()\n {\n $this->setExpectedException('InvalidArgumentException');\n\n $c = new Container;\n\n $c->addServiceProvider(new \\stdClass);\n }", "public function testGetWillThrowNotFoundExceptionIfRequestedSer...
[ "0.7334368", "0.7158683", "0.70579714", "0.70337534", "0.69641757", "0.69516003", "0.68619204", "0.68492204", "0.68295527", "0.66857255", "0.6598649", "0.6572227", "0.65648884", "0.64715654", "0.63942933", "0.638368", "0.63774824", "0.6363046", "0.63612044", "0.63023645", "0....
0.76493
0
Assert that a ContainerException is thrown when trying to register a service alias with a service that has an identical name
Убедитесь, что при попытке регистрации алиаса службы с уже имеющейся службой с таким же именем выбрасывается ContainerException
public function testSetAliasWillThrowContainerExceptionIfTheServiceNameIsIdenticalToTheAlias(): void { $container = new Container(); $alias = 'TestService'; $name = 'TestService'; $container->set($name, new \stdClass()); $this->expectException(ContainerException::class); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testSetAliasWillThrowContainerExceptionIfTheServiceNameAliasedHasNotBeenRegistered(): void\n {\n $container = new Container();\n\n $alias = 'FooService';\n $name = 'TestService';\n\n $this->expectException(ContainerException::class);\n $this->expectExceptionMes...
[ "0.79681146", "0.70427287", "0.6955069", "0.68201274", "0.67915154", "0.67542404", "0.662874", "0.662725", "0.6617809", "0.6527417", "0.6520676", "0.65197366", "0.6483543", "0.64726436", "0.6338878", "0.6309266", "0.62895197", "0.62881845", "0.6263777", "0.6256547", "0.623186...
0.7841684
1
Assert that the container will throw a NotFoundException if the requested service cannot be found.
Убедитесь, что контейнер выбросит исключение NotFoundException, если запрашиваемый сервис не найден.
public function testGetWillThrowNotFoundExceptionIfRequestedServiceIsNotRegistered(): void { $container = new Container(); $name = 'FooService'; $this->expectException(NotFoundException::class); $this->expectExceptionMessage( sprintf('Service \'%s\' could not be found r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testContainerThrowsWhenCannotGetService()\n {\n $this->expectException(NotFoundException::class);\n\n $container = new Container;\n\n $this->assertFalse($container->has(Foo::class));\n\n $container->get(Foo::class);\n }", "public function testGetMethodWithNotFoun...
[ "0.81615466", "0.7734937", "0.7246178", "0.6961453", "0.68933344", "0.6890995", "0.6873854", "0.68603694", "0.6845079", "0.6725106", "0.6712785", "0.66863704", "0.66809666", "0.66477865", "0.6554593", "0.64252275", "0.6417808", "0.64056313", "0.63393164", "0.6308849", "0.6306...
0.8171015
0
Assert that a invalid/noncallable factory class will throw a ContainerException.
Утверждать, что некорректный/неперемещаемый класс фабрики вызовет исключение ContainerException.
public function testGetWillThrowContainerExceptionIfTheRegisteredFactoryIsNotCallable(): void { $container = new Container(); $name = 'FooService'; $factoryClassName = \stdClass::class; $container->setFactoryClass($name, $factoryClassName); $this->expectException(Container...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetWillThrowContainerExceptionForInvalidRegisteredFactoryClassName(): void\n {\n $container = new Container();\n\n $serviceName = 'FooService';\n $factoryClassName = 'Foo\\\\Bar\\\\ClassNameThatDoesNotExist';\n\n // We should be able to add the invalid class witho...
[ "0.8070074", "0.77125823", "0.75455034", "0.7477716", "0.74451447", "0.712082", "0.71026725", "0.7070012", "0.7059247", "0.70420104", "0.6927547", "0.6882057", "0.6875464", "0.6873955", "0.6798611", "0.6713819", "0.6659631", "0.65744394", "0.6572771", "0.65366", "0.6445589", ...
0.8100209
0
Assert that we can pass a factory class name string to setFactory() and the service will be registered
Убедитесь, что мы можем передать строку с именем класса фабрики в setFactory(), и сервис будет зарегистрирован
public function testStringFactoryPassedToSetFactoryIsRegistered(): void { $container = new Container(); $this->assertFalse($container->has('Test')); $container->setFactory('Test', 'ThisIsAFactoryString'); $this->assertTrue($container->has('Test')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFactory() {\n\t\t$this->assertInstanceOf( 'Wikibase\\Api\\WikibaseFactory', $this->factory );\n\t}", "public function testImplementsFactoryInterface(): void\n {\n $factory = new PsrHandlerFactory();\n\n $this->assertInstanceOf(FactoryInterface::class, $factory);\n }", "p...
[ "0.70248204", "0.69886154", "0.6958106", "0.69321966", "0.6822479", "0.6799832", "0.67851263", "0.6777474", "0.6773942", "0.6713314", "0.6674918", "0.6656699", "0.6653517", "0.6580891", "0.6538994", "0.6462975", "0.64517426", "0.64338356", "0.63817585", "0.6359157", "0.633118...
0.78584766
0
Assert that a InvalidArgumentException is thrown if trying to set a nonstring or not callable $factory when calling setFactory().
Убедитесь, что выбрасывается исключение InvalidArgumentException, если попытаться установить нестроковое или не callable значение $factory при вызове setFactory().
public function testSetFactoryWithNonStringOrCallableWillThrowInvalidArgumentException(): void { $container = new Container(); $name = \stdClass::class; $factory = new \stdClass(); $this->expectException(InvalidArgumentException::class); $this->expectExceptionMessage( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetWillThrowContainerExceptionIfTheRegisteredFactoryIsNotCallable(): void\n {\n $container = new Container();\n\n $name = 'FooService';\n $factoryClassName = \\stdClass::class;\n\n $container->setFactoryClass($name, $factoryClassName);\n\n $this->expectExce...
[ "0.70252806", "0.67237526", "0.6413206", "0.6401403", "0.63668585", "0.62716115", "0.6231578", "0.61806685", "0.6174525", "0.6167074", "0.61317897", "0.611665", "0.6099972", "0.6080143", "0.6079267", "0.60778034", "0.5983544", "0.5982977", "0.5969716", "0.59340096", "0.590442...
0.839399
0
Assert that circular dependencies between a service name and it's factory are resolved by throwing a ContainerException
Утверждать, что циклические зависимости между именем службы и её фабрикой решаются путем выброса исключения ContainerException
public function testCircularConfigurationDependencyWithFactoryClassNameWillThrowContainerException(): void { $name = CallableMock::class; $factoryClassName = CallableMock::class; $container = new Container(); $container->setFactoryClass($name, $factoryClassName); $this->exp...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetWillThrowContainerExceptionIfAFactoryDependencyCausesACircularCreationDependency(): void\n {\n $container = new Container();\n\n $factoryA = static function (ContainerInterface $container) {\n $serviceA = new \\stdClass();\n $serviceA->serviceB = $conta...
[ "0.7920142", "0.72136277", "0.6951248", "0.6613416", "0.6552069", "0.6438619", "0.6386252", "0.6248484", "0.62466156", "0.6209392", "0.61670595", "0.6022407", "0.5988246", "0.5971127", "0.5955131", "0.59510374", "0.5914725", "0.5914551", "0.5879079", "0.57869333", "0.5762818"...
0.80193734
0
Assert that the container will throw a ContainerException is the registered factory throws an exception.
Убедитесь, что контейнер выбросит ContainerException, если зарегистрированная фабрика выбросит исключение.
public function testFactoryCreationErrorWillBeCaughtAndRethrownAsContainerException(): void { $container = new Container(); $name = 'FooService'; $exceptionMessage = 'This is another test exception message'; $factory = static function () use ($exceptionMessage): void { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetWillThrowContainerExceptionForInvalidRegisteredFactoryClassName(): void\n {\n $container = new Container();\n\n $serviceName = 'FooService';\n $factoryClassName = 'Foo\\\\Bar\\\\ClassNameThatDoesNotExist';\n\n // We should be able to add the invalid class witho...
[ "0.775079", "0.77130646", "0.76241684", "0.72644556", "0.7255383", "0.72361255", "0.7052465", "0.70067394", "0.6963048", "0.6929192", "0.68994457", "0.6797649", "0.67644924", "0.66577977", "0.66230494", "0.6574699", "0.65559876", "0.6462054", "0.644206", "0.63322383", "0.6284...
0.79400283
0
Assert that an unregistered service, which resolves to the name of a valid class, will be created and registered with the container. Additional calls to the container's get() method should also return the same service
Убедитесь, что не зарегистрированный сервис, который разрешается в имя действительного класса, будет создан и зарегистрирован в контейнере. Дополнительные вызовы метода get() контейнера также должны возвращать тот же сервис.
public function testGetWillCreateAndReturnUnregisteredServiceIfTheNameResolvesToAValidClassName(): void { $container = new Container(); $name = \stdClass::class; $this->assertFalse($container->has($name)); $service = $container->get(\stdClass::class); $this->assertInstanceO...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testHasWillAssertBooleanFalseForNonRegisteredService(): void\n {\n $container = new Container();\n\n $name = \\stdClass::class;\n\n $this->assertFalse($container->has($name));\n }", "public function testThrowsWhenServiceProviderLies()\n {\n $liar = new class e...
[ "0.6928655", "0.668523", "0.6653281", "0.6650625", "0.6497189", "0.6495245", "0.6346451", "0.6325084", "0.6302188", "0.624907", "0.61392367", "0.60583895", "0.60474694", "0.604087", "0.60076916", "0.600171", "0.59998924", "0.58623374", "0.586199", "0.5860318", "0.5854797", ...
0.767458
0
When creating factories with dependencies, ensure we catch any attempts to load services that depend on each other by throwing a ContainerException
При создании фабрик с зависимостями убедитесь, что мы захватываем любые попытки загрузки служб, зависящих друг от друга, выбрасывая ContainerException
public function testGetWillThrowContainerExceptionIfAFactoryDependencyCausesACircularCreationDependency(): void { $container = new Container(); $factoryA = static function (ContainerInterface $container) { $serviceA = new \stdClass(); $serviceA->serviceB = $container->get('S...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCircularConfigurationDependencyWithFactoryClassNameWillThrowContainerException(): void\n {\n $name = CallableMock::class;\n $factoryClassName = CallableMock::class;\n\n $container = new Container();\n $container->setFactoryClass($name, $factoryClassName);\n\n ...
[ "0.74449915", "0.686918", "0.6768634", "0.67307216", "0.668825", "0.6457691", "0.6430075", "0.6291274", "0.6259749", "0.62505925", "0.62338585", "0.6136564", "0.6112072", "0.6075724", "0.6066229", "0.6017201", "0.5972742", "0.5925704", "0.5907063", "0.5852978", "0.58237", "...
0.73578745
1
Assert that if we try to build a service and we cannot resolve a factory from then a NotFoundException is thrown
Утверждать, что если попытаться построить сервис и невозможно разрешить фабрику, то выбрасывается исключение NotFoundException
public function testBuildWillThrowNotFoundExceptionIfTheFactoryCannotBeResolvedFromName(): void { $container = new Container(); $name = 'FooService'; $this->expectException(NotFoundException::class); $this->expectExceptionMessage( sprintf('Unable to build service \'%s\'...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetNotExistingServiceThrowsServiceNotFoundException()\n {\n $this->expectException(NotImplementedException::class);\n $this->factory->TotallyNotExistingService;\n }", "public function testGetWillThrowNotFoundExceptionIfRequestedServiceIsNotRegistered(): void\n {\n ...
[ "0.75777966", "0.7470864", "0.7222297", "0.6852786", "0.68110824", "0.6737961", "0.66932136", "0.6668689", "0.66540194", "0.65817565", "0.65717834", "0.6564234", "0.6562334", "0.65560216", "0.65535283", "0.6507653", "0.6413839", "0.6361634", "0.63572854", "0.6281953", "0.6272...
0.82038146
0
Assert that when creating a service via build(), any previously set service matching the provided $name will be ignored and a new instance will be returned. We additional check that the build also will not modify or change the previous service and calls to get() will return the existing value
Убедитесь, что при создании службы через build() любая ранее заданная служба, совпадающая с предоставленным $name, будет проигнорирована, и будет возвращен новый экземпляр. Мы дополнительно проверяем, что build также не будет модифицировать или изменять предыдущую службу, и вызовы get() будут возвращать существующее зн...
public function testBuildWillIgnorePreviouslySetServiceWhenCreatingViaFactory(): void { $container = new Container(); $serviceName = 'ServiceName'; // Define our service $container->setFactory( $serviceName, static function () { return new \s...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetWillReturnAServiceByName(): void\n {\n $container = new Container();\n\n $name = \\stdClass::class;\n $service = new \\stdClass();\n\n $container->set($name, $service);\n\n $this->assertSame($service, $container->get($name));\n }", "public function ...
[ "0.6342136", "0.62275803", "0.58052987", "0.5801373", "0.57880276", "0.5772007", "0.57693136", "0.5725832", "0.5689724", "0.5657899", "0.5630458", "0.5593104", "0.55112195", "0.5469511", "0.54632884", "0.5410196", "0.53935635", "0.53788275", "0.5373436", "0.5368704", "0.53239...
0.7032839
0
Assert that an alias service name will correctly resolve the the correct service when calling build()
Убедитесь, что имя псевдонима службы корректно разрешается в нужную службу при вызове build()
public function testBuildWillResolveAliasToServiceName(): void { $container = new Container(); $alias = 'FooAliasName'; $name = 'FooServiceName'; // Define our service $container->setFactory( $name, static function () { return new \st...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testRegularImplementation() {\n $this->assertServiceClass('path_alias.manager', AliasManager::class);\n }", "public function testGetWillReturnAServiceByAliasName(): void\n {\n $container = new Container();\n\n $alias = 'foo';\n $name = \\stdClass::class;\n $serv...
[ "0.69771266", "0.6957675", "0.67520344", "0.66474575", "0.62332755", "0.61563045", "0.59856415", "0.59545034", "0.5953305", "0.5889763", "0.5885531", "0.58666056", "0.5822606", "0.5666028", "0.5639665", "0.56196535", "0.55888623", "0.55581915", "0.5479531", "0.5454778", "0.54...
0.7688422
0
Assert that configuration errors will raise a ContainerException
Убедитесь, что ошибки конфигурации вызовут ContainerException
public function testConfigureWillThrowAContainerExceptionIfTheConfigurationFails(): void { $container = new Container(); /** @var ServiceProviderInterface|MockObject $provider */ $provider = $this->getMockForAbstractClass(ServiceProviderInterface::class); $exceptionMessage = 'This ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testContainerDoesntAcceptInvalidConfigType()\n {\n $this->setExpectedException('InvalidArgumentException');\n\n $c = new Container(new \\stdClass());\n }", "public function testBadConfig() {\n unset($this->object);\n $config = new Mock_Config;\n $new_confi...
[ "0.7604401", "0.6883455", "0.6813547", "0.6708025", "0.6620851", "0.66193444", "0.6615695", "0.6495111", "0.64696264", "0.64381075", "0.63976127", "0.6380058", "0.63754255", "0.63189906", "0.6308404", "0.62838584", "0.6277582", "0.6252559", "0.6212162", "0.6145337", "0.614127...
0.74605405
1
Determine whether the config array contains the given key Comments Check the config array to see if the key is set. If it is set return true else return false
Определите, содержит ли массив конфигурации заданный ключ. Комментарии. Проверьте массив конфигурации, чтобы увидеть, задан ли ключ. Если он задан, верните true, иначе верните false.
public function has($key) { if(array_key_exists($key,$this->config_arr)) return true; else return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasConfig(string $key): bool;", "public function hasConfig($key);", "public function has($key)\n {\n return array_key_exists($key, $this->config);\n }", "public function has($key)\n {\n return array_key_exists($key, $this->config);\n }", "public function has($key){...
[ "0.7948589", "0.7894186", "0.77811146", "0.77811146", "0.769987", "0.7662369", "0.7415154", "0.7253832", "0.7246109", "0.72339195", "0.71849424", "0.7114312", "0.71078783", "0.70736206", "0.7015255", "0.7008027", "0.6951512", "0.6918397", "0.6905457", "0.68836874", "0.6846458...
0.8324877
0
Get an item from the config array If the key does not exist the default value should be returned
Получить элемент из массива настроек. Если ключ отсутствует, должен быть возвращен значение по умолчанию
public function get($key, $default = null) { if(array_key_exists($key,$this->config_arr)) return $this->config_arr[$key]; else return $default; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getConfig($item) {\n if (array_key_exists($item, CONFIG)) return CONFIG[$item];\n if (array_key_exists($item, DEFAULTS)) return DEFAULTS[$item];\n}", "function getConfig($key, $default)\n{\n global $config;\n return isset($config[$key])\n ? $config[$key]\n : $default;\n}", "s...
[ "0.77494895", "0.740841", "0.72221214", "0.7219014", "0.71215916", "0.7097822", "0.70696497", "0.7058127", "0.69879884", "0.6957267", "0.6927862", "0.69222033", "0.6920013", "0.6917206", "0.69029444", "0.6881501", "0.68781596", "0.68520904", "0.6832429", "0.6829561", "0.68072...
0.7704968
1
This function should build all of your RabbitMQ exchanges, queues, and bindings.
Эта функция должна создать все ваши RabbitMQ обменники, очереди и связывания.
protected function build() { // Grab some files from the config settings $exchange = $this->exchange; $queue = $this->queue; $routingKey = $this->routingKey; // Determine the DLX queue info $dlxQueue = is_null($this->dlxQueue) ? $queue . '.dlx' : $this->dlxQueue; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function bindExchangesAndQueues()\n {\n $exchanges = static::getConfigurations()['exchanges'];\n\n if (count($exchanges)) {\n\n foreach ($exchanges as $exchangeName => $details) {\n\n foreach ($details['queues'] as $queueName => $routingKeys) {\n\n ...
[ "0.67881054", "0.5657908", "0.5260716", "0.5220812", "0.5219493", "0.5141573", "0.513043", "0.5128943", "0.51040256", "0.50304127", "0.5017108", "0.5014029", "0.49776882", "0.49771854", "0.49537915", "0.49325776", "0.4910285", "0.48749465", "0.4868939", "0.48313206", "0.48148...
0.7054575
0
get variation by common id
получить вариацию по общему идентификатору
public function get_variation_by_common_id($common_id) { $this->db->where('common_id', $common_id); $query = $this->db->get('product_variations'); return $query->result(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function particularvariant($id)\n\t{\n\t\t$getvariant=\"SELECT * from product_variant where ptdvar_id = $id\";\n\t\t$getvariantdata = $this->get_results( $getvariant );\n\n\t\t$getvariant1=\"SELECT * from product_variant_cost where ptdvar_id = $id\";\n\t\t$getvariantdata1 = $this->get_results( $getvariant1 );\n\n\...
[ "0.71358", "0.70494986", "0.6715231", "0.6578457", "0.64262134", "0.63886064", "0.6352191", "0.63088757", "0.617537", "0.61496437", "0.61135596", "0.60820705", "0.6064016", "0.6051277", "0.60400134", "0.600762", "0.5997855", "0.593509", "0.5925886", "0.5854377", "0.5836976", ...
0.7773354
0
get variation by user id
получить вариацию по идентификатору пользователя
public function get_variation_by_user_id($user_id) { $user_id = clean_number($user_id); $this->db->where('user_id', $user_id); $query = $this->db->get('product_variations'); return $query->result(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "static function get_portfolio_by_user($id){\n\t\treturn self::$db->where('user_id',$id)->get('stock')->result();\n\t}", "public function getVariation()\n {\n return $this->db->get($this->product_variant);\n }", "public static function singlevendorData($item_user_id){\n $value = DB::table('users')\n ...
[ "0.628802", "0.61179745", "0.61081105", "0.60715973", "0.5927902", "0.5905848", "0.58852434", "0.5868724", "0.5852811", "0.5809631", "0.5768517", "0.5759838", "0.56788933", "0.5675756", "0.56698185", "0.5663406", "0.56617606", "0.56264085", "0.5611118", "0.55662555", "0.55610...
0.8122352
0
get product variations by lang
получить варианты продукта по языку
public function get_product_variations_by_lang($product_id, $lang_id) { $product_id = clean_number($product_id); $lang_id = clean_number($lang_id); $this->db->where('product_id', $product_id); $this->db->where('lang_id', $lang_id); $this->db->where('visible', 1); $que...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_full_width_product_variations($product_id, $lang_id)\n {\n $product_id = clean_number($product_id);\n $lang_id = clean_number($lang_id);\n $this->db->where('product_id', $product_id);\n $this->db->where('lang_id', $lang_id);\n $this->db->where('visible', 1)...
[ "0.63643265", "0.6149428", "0.6126814", "0.6002589", "0.6002357", "0.5992571", "0.59466356", "0.5872999", "0.5869532", "0.5862262", "0.58404726", "0.57731444", "0.5728751", "0.57040155", "0.56808585", "0.567355", "0.56436396", "0.56154007", "0.5585945", "0.55721885", "0.55692...
0.7359419
0
get full width product variations
получить варианты продукта полной ширины
public function get_full_width_product_variations($product_id, $lang_id) { $product_id = clean_number($product_id); $lang_id = clean_number($lang_id); $this->db->where('product_id', $product_id); $this->db->where('lang_id', $lang_id); $this->db->where('visible', 1); $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_half_width_product_variations($product_id, $lang_id)\n {\n $product_id = clean_number($product_id);\n $lang_id = clean_number($lang_id);\n $this->db->where('product_id', $product_id);\n $this->db->where('lang_id', $lang_id);\n $this->db->where('visible', 1)...
[ "0.6816494", "0.67596114", "0.65450746", "0.6471577", "0.644465", "0.6316362", "0.62283224", "0.6205941", "0.620104", "0.61522317", "0.60943925", "0.6069908", "0.6024242", "0.596352", "0.59469444", "0.5944913", "0.59424114", "0.5921655", "0.58841205", "0.58787364", "0.583576"...
0.7042197
0
get variation options by variation common id
получить варианты по общему идентификатору вариации
public function get_variation_options_by_variation_common_id($variation_common_id) { $this->db->where('variation_common_id', $variation_common_id); $query = $this->db->get('product_variations_options'); return $query->result(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_variation_options_by_option_common_id($option_common_id)\n {\n $this->db->where('option_common_id', $option_common_id);\n $query = $this->db->get('product_variations_options');\n return $query->result();\n }", "public function get_variation_by_common_id($common_id)\...
[ "0.72230256", "0.71655923", "0.6962018", "0.6942519", "0.68083745", "0.67585856", "0.6738486", "0.66507787", "0.6506569", "0.6500902", "0.6380322", "0.6370008", "0.6327226", "0.6312456", "0.60820836", "0.60639733", "0.6032985", "0.602835", "0.6006889", "0.5998176", "0.5949139...
0.7557696
0
get variation options by option common id
получить вариации по общему идентификатору опции
public function get_variation_options_by_option_common_id($option_common_id) { $this->db->where('option_common_id', $option_common_id); $query = $this->db->get('product_variations_options'); return $query->result(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_variation_options_by_variation_common_id($variation_common_id)\n {\n $this->db->where('variation_common_id', $variation_common_id);\n $query = $this->db->get('product_variations_options');\n return $query->result();\n }", "function get_variant_options($id_product, $...
[ "0.7374713", "0.70625097", "0.6899203", "0.6846205", "0.67258775", "0.6637475", "0.6627679", "0.64929044", "0.6449788", "0.6362828", "0.63627005", "0.63301545", "0.6180949", "0.6128367", "0.6087945", "0.60699576", "0.603297", "0.60218656", "0.60097855", "0.5950955", "0.594759...
0.7410011
0
delete variation options by variation common id
удалить варианты опций по общему идентификатору вариации
public function delete_variation_options_by_variation_common_id($variation_common_id) { $options = $this->get_variation_options_by_variation_common_id($variation_common_id); if (!empty($options)) { foreach ($options as $item): if (!empty($item->id)) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fn_giftreg_delete_field_variants($field_id)\n{\n\n $vars = db_get_fields(\"SELECT variant_id FROM ?:giftreg_field_variants WHERE field_id = ?i\", $field_id);\n if (!empty($vars)) {\n db_query(\"DELETE FROM ?:giftreg_descriptions WHERE object_id IN (?a) AND object_type = 'V'\", $vars);\n ...
[ "0.6577196", "0.6536685", "0.64792234", "0.6474559", "0.6411641", "0.63223994", "0.6301222", "0.62881243", "0.6153283", "0.61334056", "0.6120872", "0.61095214", "0.6074038", "0.60726506", "0.6071758", "0.60564834", "0.6044789", "0.59755784", "0.5955651", "0.5949153", "0.59454...
0.72966456
0
Retorna el id del documento digital
Возвращает идентификатор цифрового документа
public function getIdDocumentoDigital( ){ return $this->idDocumentoDigital; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocId()\n {\n return $this->doc_id;\n }", "function getIdDoc() {\r\n return $this->IdDoc;\r\n }", "public function getDocid(): string\n {\n return $this->docid;\n }", "function getDocumentID() {\n\t\treturn $this->iDocumentID;\n\t}", "public function g...
[ "0.75082374", "0.7498765", "0.74360824", "0.71459395", "0.7078044", "0.7030477", "0.7018067", "0.69866455", "0.6949994", "0.6862302", "0.6862302", "0.6672399", "0.65725476", "0.6537071", "0.6536514", "0.6536514", "0.6514042", "0.64613163", "0.6386134", "0.63727295", "0.635145...
0.7990046
0
/ Get scenario denoms by Id
/ Получить деномы сценария по Id
function get_scenario_denoms_by_id($scenario_id) { global $db; global $program; return get_assoc_array_from_sql(' SELECT * FROM ScenDenoms LEFT JOIN Denoms...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get($id)\n {\n return $this->specs->get($id);\n }", "public static function getAcceptanceTest($id){\n $db = DemoDB::getConnection();\n ProjectModel::createViewCurrentIteration($db);\n $sql= \"select description,is_satisfied\n from feature\n INNER J...
[ "0.601261", "0.5751798", "0.56576014", "0.55441606", "0.5398407", "0.5383734", "0.53810024", "0.5288666", "0.5278309", "0.52669275", "0.52645785", "0.525795", "0.5243229", "0.5243229", "0.52361727", "0.52273095", "0.521701", "0.52141774", "0.52141774", "0.5204698", "0.5203242...
0.7605451
0
Static function Create a URL to the current page.
Статическая функция Создает URL текущей страницы.
public static function CurrentURL() { // Create link to current page $refToThisPage = "http"; $refToThisPage .= (@$_SERVER["HTTPS"] == "on") ? 's' : ''; $refToThisPage .= "://"; $serverPort = ($_SERVER["SERVER_PORT"] == "80") ? '' : ":{$_SERVER['SERVER_PORT']}"; $refToTh...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buildCurrentPageURI() {\n $protocol = is_ssl() ? 'https' : 'http';\n $site = $_SERVER['SERVER_NAME'];\n $slug = $_SERVER['REQUEST_URI'];\n\n return urlencode( $protocol . '://' . $site . $slug );\n }", "private function buildCurrentPageURI() {\n $prot...
[ "0.7767644", "0.7737582", "0.7566166", "0.74466467", "0.74268943", "0.73722935", "0.7363335", "0.73627007", "0.7345067", "0.73419964", "0.73419964", "0.73330003", "0.73061913", "0.7262203", "0.7228454", "0.7198715", "0.7165623", "0.7142068", "0.71367943", "0.7106961", "0.7096...
0.78404397
0
/Function:facebook_get_uid Parameters: uid: User's account uid Returns:phpDBOStatement Object author:issiah This function will insert the account data into the database
Функция:facebook_get_uid Параметры: uid: идентификатор учетной записи пользователя Возвращает:phpDBOStatement Объект автор:issiah Эта функция будет вставлять данные учетной записи в базу данных
function facebook_get_uid($uid){ $queryText = 'SELECT facebook_uid FROM facebook_accounts WHERE uid = :uid'; $query = $this->connection->prepare($queryText); $query->execute(array(':uid'=>$uid)); return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract function retrieveSfGuardUserByFacebookUid($facebook_uid);", "abstract function getSfGuardUserByFacebookUid($facebook_uid);", "function get_uid($uid){\n\t\t$this->uid = $uid;\n\t}", "public function findUserByUid($uid){\n $sql = \"SELECT `uid`, `nickname`, `openid` FROM `user` WHERE `uid` = ?\...
[ "0.6705563", "0.65582573", "0.651506", "0.6164416", "0.6005255", "0.59861577", "0.58680755", "0.58432764", "0.5827309", "0.58253056", "0.5816361", "0.58038795", "0.57751775", "0.5763461", "0.57507426", "0.5727061", "0.57117015", "0.56724524", "0.56493723", "0.5643941", "0.564...
0.7477485
0
/Function:user_get_contact Parameters: uid: User's account uid Returns:phpDBOStatement Object author:issiah This function will return the contact information associated with the account uid
Функция: user_get_contact Параметры: uid: идентификатор учетной записи пользователя Возвращает: phpDBOStatement Объект автор: issiah Эта функция вернет информацию о контакте, связанную с идентификатором учетной записи
function user_get_contact($uid){ $queryText = 'SELECT first_name, last_name FROM user_accounts WHERE Uid = :Uid'; $query = $this->connection->prepare($queryText); $query->execute(array(':Uid'=>$uid)); return $query; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_contact($uid) {\n //make sure the uid is set\n if (!isset($uid) || empty($uid)) {\n throw new Zim_Exception_UIDNotSet();\n }\n $q = Doctrine_Query::create()\n ->from('Zim_Model_User user')\n ->where('user.uid = ?', $uid)\n ->limit(1);\n ...
[ "0.79583335", "0.73550653", "0.6677147", "0.63128626", "0.6270778", "0.6227499", "0.6174626", "0.6099191", "0.60901594", "0.60697854", "0.6062753", "0.604947", "0.6012318", "0.60057724", "0.6004", "0.5981233", "0.5975207", "0.5975207", "0.5975207", "0.59597504", "0.59453", ...
0.80055547
0
/Function:user_add_contact Parameters: uid: User's account uid contact_uid: The account uid of the contact to be added Returns:phpDBOStatement Object author:issiah This function will add a contact to a user's contact list
Функция: user_add_contact Параметры: uid: идентификатор учетной записи пользователя contact_uid: идентификатор учетной записи контакта, который необходимо добавить Возвращает: phpDBOStatement Объект автор: issiah Эта функция добавляет контакт в список контактов пользователя
function user_add_contact($uid, $contact_uid){ $queryText = 'INSERT INTO user_contacts (uid, contact_uid) VALUES (:uid, :contact_uid)'; $query = $this->connection->prepare($queryText); $query->execute(array(':uid'=>$uid, ':contact_uid'=>$contact_uid)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addContact($contact)\n {\n\n $url = $this->apiUrl . $this->contactsUrl.'?authtoken=' . $this->authtoken . '&organization_id=' . $this->organizationId;\n\n $data = array(\n 'JSONString' => $contact\n );\n\n //$contact[\"organization_id\"] = $this->org...
[ "0.6628824", "0.6560082", "0.63949513", "0.6390872", "0.62771124", "0.6272732", "0.6268257", "0.61314374", "0.6086817", "0.6063977", "0.6001565", "0.5982934", "0.5932372", "0.5927096", "0.59124917", "0.59031636", "0.58993834", "0.58897305", "0.58545625", "0.58446896", "0.5817...
0.81352055
0
/Function:user_make_account Parameters: name: user's first name last: user's last name email: user's email address Returns:phpDBOStatement Object author:issiah This function will insert the new account data into the database and return its associated uid
Функция: user_make_account Параметры: name: имя пользователя last: фамилия пользователя email: адрес электронной почты пользователя Возвращает:phpDBOStatement Объект автор:issiah Эта функция вставит новые данные учетной записи в базу данных и вернет соответствующий uid
function user_make_account($first_name, $last_name, $email){ $queryText = 'INSERT INTO user_accounts (first_name, last_name, email) VALUES (:first_name, :last_name, :email)'; $query = $this->connection->prepare($queryText); $query->execute(array(':first_name'=>$first_name, ':last_name'=>$last_name, ':email'=>$...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createAccount(){\n\t\t\n\t\t$email = trim($_POST['signupemail']);\n\t\t$uname = trim($_POST['uname']);\n\t\t\n\t\t$v = sha1(time());\n\t\t//check for previous uses of that username\n\t\t$sql = \"SELECT COUNT(uname) AS theCount FROM user where uname=:uname\";\n\t\t\n\t\tif($stmt = $this->_db->prepar...
[ "0.71201926", "0.70074946", "0.68695015", "0.68300664", "0.68254846", "0.67722076", "0.676877", "0.67287505", "0.66855687", "0.665412", "0.6636818", "0.6614303", "0.66010404", "0.659005", "0.65713555", "0.6571063", "0.6563412", "0.6548293", "0.6544229", "0.6498989", "0.647904...
0.8059681
0
/Function:user_get_contacts Parameters: uid: The user's account uid Returns:phpDBOStatement Object author:issiah This function will get all of the user's contacts
Функция: user_get_contacts Параметры: uid: идентификатор учетной записи пользователя Возвращает:phpDBOStatement Объект автор:issiah Эта функция получает все контакты пользователя
function user_get_contacts($uid){ $queryText = 'SELECT user_accounts.first_name, user_accounts.last_name FROM user_accounts INNER JOIN user_contacts ON user_contacts.uid = :uid AND user_contacts.contact_uid = user_accounts.Uid'; $query = $this->connection->prepare($queryText); $query->execute(array(':uid'=>$ui...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getUserContacts()\n\t{\n\t\t$userId = $this->getCurrentUserId();\n\n\t\t$parameters = array();\n\t\t$parameters['format']\t= 'json';\n\t\t$parameters['count'] = 'max';\n\t\t\n\t\t$response = $this->api->get('user/' . $userId . '/contacts', $parameters);\n\n\t\tif ( $this->api->http_code != 200 )\n\t\t{\n\...
[ "0.7930896", "0.73622465", "0.7246683", "0.7138032", "0.7094149", "0.70570743", "0.7007554", "0.69584066", "0.6837653", "0.6690784", "0.6677074", "0.6676787", "0.664827", "0.66344196", "0.66225445", "0.6598956", "0.6596783", "0.657644", "0.65611815", "0.6541273", "0.6500141",...
0.80501544
0
/Function:user_get_notifications Parameters: reciever_uid: The user's account uid, who is recieving the notification tag: The tag that is associated with the notification(notification type) Returns:phpDBOStatement Object author:issiah This function will return the user's notifications of a certain type
Функция: user_get_notifications Параметры: reciever_uid: идентификатор учетной записи пользователя, который получает уведомление tag: метка, связанная с уведомлением (тип уведомления) Возвращает: объект phpDBOStatement автор: issiah Эта функция вернет уведомления пользователя определенного типа
function user_get_notifications($reciever_uid, $tag){ $queryText = 'Select user_notifications.sender_uid, user_notifications.reciever_uid, user_notifications.message, user_notifications.time, user_accounts.first_name as sender_first_name, user_accounts.last_name as sender_last_name FROM user_notifications INNER...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function user_get_all_notifications($reciever_uid){\n\t\t$queryText = 'Select user_notifications.sender_uid, user_notifications.reciever_uid, user_notifications.message_tag, user_notifications.message, user_notifications.time,\n\t\t\tuser_accounts.first_name as sender_first_name, user_accounts.last_name as sender_...
[ "0.73603773", "0.72071284", "0.70913553", "0.6985498", "0.68220085", "0.67682046", "0.6739056", "0.6695726", "0.6691012", "0.6555145", "0.651329", "0.6455152", "0.6449685", "0.63952047", "0.6358723", "0.63193256", "0.6231139", "0.6220596", "0.6148607", "0.60805976", "0.606772...
0.73910415
0
/Function:user_get_all_notifications Parameters: reciever_uid: The user's account uid, who is recieving the notification Returns:phpDBOStatement Object author:issiah This function will return all of the user's notifications
Функция: user_get_all_notifications Параметры: reciever_uid: Уникальный идентификатор учетной записи пользователя, который получает уведомление Возвращает: phpDBOStatement Объект автор: issiah Эта функция вернет все уведомления пользователя
function user_get_all_notifications($reciever_uid){ $queryText = 'Select user_notifications.sender_uid, user_notifications.reciever_uid, user_notifications.message_tag, user_notifications.message, user_notifications.time, user_accounts.first_name as sender_first_name, user_accounts.last_name as sender_last_name ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function GetNotifications($uid=false,$last_notification=false){\n\n\t$query_=$last_notification?\" and `id`> {$last_notification}\":\"\";\n\n\t$notifications = NotificationsModel::model()->findAll(\"`to` =\".helpers::uid($uid).$query_.\" order by `time` desc limit 10\");\n\n\tif($notifications!=NULL){\n\n\t//get u...
[ "0.7871254", "0.77365553", "0.7420604", "0.7383634", "0.7177685", "0.7080196", "0.7077765", "0.7065585", "0.7062134", "0.7060866", "0.7053109", "0.70120203", "0.69093066", "0.68357205", "0.68288165", "0.67853093", "0.67077285", "0.6703921", "0.66670024", "0.6628973", "0.66089...
0.8391512
0
/Function:user_push_notifications Parameters: reciever_uid: The user's account uid, who is recieving the notification Returns:phpDBOStatement Object author:issiah This function will push a notifcation from the sender's account to the reciever's account
Функция: user_push_notifications Параметры: reciever_uid: идентификатор учетной записи получателя уведомления Возвращает: объект phpDBOStatement автор: issiah Эта функция отправляет уведомление от учетной записи отправителя на учетную запись получателя
function user_push_notification($sender_uid, $reciever_uid, $message_tag, $message){ $queryText = 'INSERT INTO user_notifications (sender_uid, reciever_uid, message_tag, message) VALUES (:sender_uid, :reciever_uid, :message_tag, :message)'; $query = $this->connection->prepare($queryText); $query->execute(array...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wp_send_new_user_notifications($user_id, $notify = 'both')\n {\n }", "function user_get_all_notifications($reciever_uid){\n\t\t$queryText = 'Select user_notifications.sender_uid, user_notifications.reciever_uid, user_notifications.message_tag, user_notifications.message, user_notifications.time,\n...
[ "0.66900754", "0.6456965", "0.6431563", "0.63605493", "0.6341811", "0.6229704", "0.6156798", "0.6123559", "0.6027392", "0.6005013", "0.59441775", "0.5898268", "0.58784205", "0.5874628", "0.58678514", "0.58647645", "0.5848452", "0.5809312", "0.57984704", "0.57830685", "0.57769...
0.7144724
0
/Function:user_store_request Parameters: uid: The user's account uid, who is recieving the notification request: The request as a JSON string Returns:phpDBOStatement Object author:issiah This function will store data about any request sent to the server
Функция: user_store_request Параметры: uid: идентификатор учетной записи пользователя, которому отправляется уведомление request: запрос в виде строки JSON Возвращает: объект phpDBOStatement автор: issiah Эта функция будет хранить данные о любом запросе, отправленном на сервер
function user_store_request($uid, $request){ $queryText = 'INSERT INTO requests (sender_uid, request) VALUES (:sender_uid, :request)'; $query = $this->connection->prepare($queryText); $query->execute(array(':sender_uid'=>$uid, ':request'=>$request)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sendRequestToServer($requestedLock, $requestedUser, $registeredUser, $conn) {\n\t$reqLockAdd = $requestedLock['address'];\n\t$reqLockName = $requestedLock['name'];\n\t$reqUserName = $requestedUser['userName'];\n\t$reqFcm = $requestedUser['fcm'];\n\t$reqEmail = $requestedUser['email'];\n\t$reqRMN = $reques...
[ "0.6032005", "0.59442466", "0.5906545", "0.5847135", "0.5636782", "0.562068", "0.551117", "0.54016614", "0.5388054", "0.5382854", "0.5374433", "0.5352412", "0.52737105", "0.5273532", "0.5268624", "0.5251754", "0.5246704", "0.52269113", "0.52053267", "0.5198371", "0.5183298", ...
0.7604311
0
Adds ordered product using name.
Добавляет упорядоченный продукт по имени.
public function addProduct($productName) { $item = urlencode($productName); $this->produkty[] = $item; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function add() {\n\t\tif (True) {\n\n\t\t\t// create an empty product.\n\t\t\t$o =& new ufo_product(0);\n\t\t\t$this->addedObject =& $o;\n\t\t\n\t\t\t// create an entry in the db.\n\t\t\t$o->initialize();\n\t\t\t$o->create();\n\t\t\t$o->edit();\n\n\t\t\t// add it to the product array.\n\t\t\t$this->product[] = $o;...
[ "0.65405494", "0.65004283", "0.6486048", "0.64492536", "0.6436907", "0.64237505", "0.64052975", "0.6403769", "0.6368678", "0.63487095", "0.6337894", "0.62914854", "0.6267217", "0.6229005", "0.62001556", "0.61956316", "0.61820704", "0.6178661", "0.6116578", "0.60918844", "0.60...
0.7175823
0
Sets order attributes within \p email , \p orderId
Устанавливает атрибуты заказа внутри \p email, \p orderId
public function setOrder($orderAttributes) { $this->email = $orderAttributes['email']; $this->orderId = $orderAttributes['orderId']; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function setOrder( $order )\n {\n if ( $this->State_ == \"Dirty\" )\n $this->get( $this->ID );\n\n if ( get_class( $order ) == \"ezorder\" )\n {\n $this->OrderID = $order->id();\n } \n }", "abstract public function setOrder(OrderModel $order);", "functio...
[ "0.7231591", "0.7032813", "0.7003388", "0.6935342", "0.6930198", "0.68833494", "0.6854385", "0.6743221", "0.6743221", "0.6678103", "0.6523403", "0.6441953", "0.6382274", "0.6377629", "0.63412946", "0.63174784", "0.6291678", "0.6248748", "0.6200971", "0.6176501", "0.6172956", ...
0.7863427
0
Adds site from a sitematrix site array to the sitelist
Добавляет сайт из массива sitematrix в список сайтов
protected function addSiteFromSitematrixSite( $site ) { if( array_key_exists( 'url', $site ) ){ $site['url'] = trim( str_replace( array('http://','https://','//'), '', $site['url'] ), '/'); $this->siteList->append( Site::newFromUrl( $site['url'] ) ); $this->addIndexForSitematrixSite( $site ); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addSiteLinks()\n {\n foreach ($this->getSiteLinks() as $item) {\n $this->addArray($item);\n }\n }", "protected function addIndexForSitematrixSite( $site ) {\n\t\t//todo add other indexes such as dbname, code, sitename, localname\n\t\tif( array_key_exists( 'closed', ...
[ "0.73433197", "0.6971068", "0.628365", "0.6203984", "0.6159347", "0.5964534", "0.58014977", "0.57941324", "0.5782684", "0.5668186", "0.5584431", "0.555953", "0.5490803", "0.5446184", "0.5431298", "0.5416181", "0.5339514", "0.53375405", "0.52931094", "0.52857065", "0.5271534",...
0.799697
0
Adds indexs for a given sitematrix site array
Добавляет индексы для заданного массива сайта sitematrix
protected function addIndexForSitematrixSite( $site ) { //todo add other indexes such as dbname, code, sitename, localname if( array_key_exists( 'closed', $site ) ){ $this->siteIndex['closed'][] = $site['url']; } else if( array_key_exists( 'private', $site ) ){ $this->siteIndex['private'][] = $site['url']; ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function addSiteFromSitematrixSite( $site ) {\n\t\tif( array_key_exists( 'url', $site ) ){\n\t\t\t$site['url'] = trim( str_replace( array('http://','https://','//'), '', $site['url'] ), '/');\n\t\t\t$this->siteList->append( Site::newFromUrl( $site['url'] ) );\n\t\t\t$this->addIndexForSitematrixSite( $sit...
[ "0.67011195", "0.6169924", "0.5883463", "0.57935464", "0.5573182", "0.5533266", "0.5492896", "0.5482512", "0.54154056", "0.5276602", "0.5228555", "0.5203136", "0.51501316", "0.505515", "0.50428075", "0.50110435", "0.49607444", "0.49512848", "0.4938424", "0.49266538", "0.49248...
0.7709643
0
Get the list of tag ids associated with the user
Получить список идентификаторов тегов, связанных с пользователем
public function getTagIds() { return $this->tags->lists('id')->toArray(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function tagIDs()\n {\n return $this->tags()->pluck('tag_id');\n }", "public function getIdsForTag($tag);", "public function get_tag_ids()\n {\n $tags = $this->tags->find_all();\n\n $ids = [];\n\n foreach ($tags as $tag) {\n if ($tag->loaded()) {\n ...
[ "0.7590889", "0.7356909", "0.7279436", "0.72754073", "0.7214155", "0.6971522", "0.6971522", "0.6965802", "0.695378", "0.6931563", "0.6905357", "0.6877179", "0.6839942", "0.68270576", "0.6715892", "0.6654947", "0.6603841", "0.64631444", "0.64608157", "0.6460582", "0.6419654", ...
0.7680231
0
Get the list of institution ids associated with the user
Получить список идентификаторов учреждений, связанных с пользователем
public function getInstitutionIds() { return $this->institutions->lists('id')->toArray(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function userInstitutions()\n {\n return DB::table('institution_users')\n ->select(DB::raw('DISTINCT(`institution_id`) as id, name'))\n ->join('institutions','institution_users.institution_id',\n '=','institutions.id')\n ->orderBy('name')\n ...
[ "0.72356546", "0.67992723", "0.6508226", "0.63416815", "0.6311452", "0.6311452", "0.62702024", "0.62517965", "0.6213919", "0.6159344", "0.61204386", "0.61100376", "0.6069192", "0.6059247", "0.6056083", "0.6050615", "0.6013227", "0.5998035", "0.59481394", "0.5942344", "0.59339...
0.7860319
0
Determine if the user is allowed to edit the sig given by $sigId
Определите, разрешено ли пользователю редактировать сигнатуре, указанной $sigId
public function canEditSig($sigId) { return $this->isAdmin() || $this->isSigEditorOf($sigId); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSigEditorOf($sigId)\n {\n return $this->isLeaderOfSig($sigId)\n || $this->isColeaderOfSig($sigId)\n || $this->isKeyPersonnelOfSig($sigId);\n }", "function caldol_can_edit_file($authorID){\n\tglobal $current_user;\n\n\t\n\t//echo $current_user->ID. \", \"...
[ "0.69440717", "0.6623485", "0.66223675", "0.66094357", "0.65793794", "0.65724987", "0.6568536", "0.65577716", "0.65239555", "0.65211976", "0.6498392", "0.6496978", "0.64939076", "0.6481692", "0.6477796", "0.6472678", "0.64674276", "0.6466944", "0.6461138", "0.646094", "0.6439...
0.83640975
0
Determine if the user is a leader of the sig given by $sigId
Определите, является ли пользователь лидером сига, заданного $sigId
public function isLeaderOfSig($sigId) { return $this->sigs()->where('sigs.id', $sigId) ->where('main', 1)->count() > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSigLeader()\n {\n return $this->sigs()->where('main', 1)->count() > 0;\n }", "public function isSigCoLeader()\n {\n return $this->sigs()->where('main', 2)->count() > 0;\n }", "public function isKeyPersonnelOfSig($sigId)\n {\n return $this->sigs()->where('si...
[ "0.6899332", "0.64704454", "0.6319907", "0.6211841", "0.58242416", "0.57882315", "0.5624029", "0.55642873", "0.5553616", "0.5542531", "0.55055845", "0.54936445", "0.5470232", "0.5452651", "0.5444975", "0.53713113", "0.53632945", "0.5355854", "0.5353366", "0.5292059", "0.52883...
0.74534196
0
Determine if the user is the leader of at least one sig.
Определите, является ли пользователь лидером хотя бы одного сига.
public function isSigLeader() { return $this->sigs()->where('main', 1)->count() > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSigCoLeader()\n {\n return $this->sigs()->where('main', 2)->count() > 0;\n }", "public function isSigMember()\n {\n return $this->sigs()->where('main', 0)->count() > 0;\n }", "function isLeader(User $user) {\n return $user instanceof User && $this->object->getLe...
[ "0.7320007", "0.65187466", "0.6291642", "0.6273702", "0.61723876", "0.61634964", "0.605451", "0.5921495", "0.5704051", "0.5596118", "0.55672175", "0.5546808", "0.55338955", "0.5527474", "0.55043584", "0.55000347", "0.54843533", "0.5464844", "0.54631865", "0.54590034", "0.5406...
0.77111393
0
Determine if the user is the coleader of at least one sig.
Определите, является ли пользователь со лидером хотя бы одного сига.
public function isSigCoLeader() { return $this->sigs()->where('main', 2)->count() > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSigLeader()\n {\n return $this->sigs()->where('main', 1)->count() > 0;\n }", "public function isSigKeyPersonnel()\n {\n return $this->sigs()->where('main', 3)->count() > 0;\n }", "public function isthemeleader()\n {\n return $this->hasuser() && $thi...
[ "0.6813847", "0.5965639", "0.5901111", "0.58994603", "0.55565274", "0.5482558", "0.5453722", "0.5384072", "0.5380528", "0.5356637", "0.53261214", "0.52838653", "0.52836525", "0.5280236", "0.5272697", "0.5270489", "0.5241195", "0.52351856", "0.52256966", "0.5218499", "0.516036...
0.73987716
0
Determine if the user is the key personnel of at least one sig.
Определите, является ли пользователь ключевым лицом хотя бы одного сига.
public function isSigKeyPersonnel() { return $this->sigs()->where('main', 3)->count() > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isKeyPersonnelOfSig($sigId)\n {\n return $this->sigs()->where('sigs.id', $sigId)\n ->where('main', 3)->count() > 0;\n }", "public function isSigLeader()\n {\n return $this->sigs()->where('main', 1)->count() > 0;\n }", "public function isSigCo...
[ "0.62698525", "0.6215651", "0.6075218", "0.60330695", "0.59483033", "0.57430077", "0.56460184", "0.5634578", "0.5551569", "0.5495574", "0.54875886", "0.54875886", "0.54338044", "0.5428603", "0.5428603", "0.5406052", "0.5405904", "0.53822094", "0.5379339", "0.5358676", "0.5345...
0.75338143
0
Determine if the user is the member of at least one sig.
Определите, является ли пользователь членом хотя бы одного сига.
public function isSigMember() { return $this->sigs()->where('main', 0)->count() > 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isSigLeader()\n {\n return $this->sigs()->where('main', 1)->count() > 0;\n }", "public function isSigKeyPersonnel()\n {\n return $this->sigs()->where('main', 3)->count() > 0;\n }", "public function isSigCoLeader()\n {\n return $this->sigs()->where('main', 2)-...
[ "0.6620692", "0.6342155", "0.6273279", "0.6117207", "0.60871434", "0.5990145", "0.59561193", "0.58969325", "0.5869672", "0.5802926", "0.57839", "0.5780826", "0.57749176", "0.5752275", "0.57263315", "0.5714872", "0.570964", "0.56835717", "0.5682091", "0.5663969", "0.56205136",...
0.7595884
0
Get the IDs of the SIG for which the user is a leader
Получить ID SIG, для которого пользователь является лидером
public function sigLeadershipsIds() { return $this->sigs()->where('main', 1)->lists('id')->toArray(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sigLeaderships()\n {\n return $this->sigs()->where('main', 1)->get();\n }", "public function get_member_ids() {\n return array_values($this->redscores);\n }", "public function getUserIDs()\n {\n return array_keys($this->userIDs);\n }", "function _getAllexcu...
[ "0.6393658", "0.6389631", "0.6339507", "0.6237045", "0.608357", "0.6047487", "0.5930754", "0.5918312", "0.58063763", "0.5748542", "0.5724789", "0.5715219", "0.5706314", "0.5651491", "0.56335485", "0.56307757", "0.559667", "0.5576963", "0.55590355", "0.55569774", "0.55511963",...
0.7436762
0
Get the SIGs that this user can edit
Получить SIGs, которые этот пользователь может редактировать
public function editableSigs() { $editable = []; foreach ($this->sigs as $sig) { if ($this->canEditSig($sig->id)) { $editable[] = $sig; } } return $editable; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function sigLeaderships()\n {\n return $this->sigs()->where('main', 1)->get();\n }", "public function sigs()\n {\n return $this->belongsToMany('App\\Sig', 'sig_users')\n ->withPivot('main')->withTimestamps();\n }", "public function getSigns();", "public fun...
[ "0.6049313", "0.5922078", "0.5679681", "0.5648847", "0.5566776", "0.5495098", "0.54668903", "0.5399561", "0.52288616", "0.52271444", "0.52166015", "0.5185696", "0.5167408", "0.516315", "0.51589566", "0.5152873", "0.51412964", "0.5138721", "0.5136788", "0.5125998", "0.51214", ...
0.75040805
0
Get the list of institutions linked to users
Получить список учреждений, связанных с пользователями
public static function userInstitutions() { return DB::table('institution_users') ->select(DB::raw('DISTINCT(`institution_id`) as id, name')) ->join('institutions','institution_users.institution_id', '=','institutions.id') ->orderBy('name') ->g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function institutions()\n {\n return $this->belongsToMany('App\\Institution', 'institution_users')\n ->withTimestamps();\n }", "public function institutions()\n {\n return $this->hasMany('App\\Models\\Institution');\n }", "public function index()\n {\n ...
[ "0.67701083", "0.6386508", "0.60762984", "0.60708797", "0.6066354", "0.60553193", "0.6019007", "0.5859846", "0.5859846", "0.5859846", "0.58383214", "0.58377403", "0.578673", "0.5727066", "0.5678992", "0.5677953", "0.5672923", "0.56699175", "0.56643564", "0.565158", "0.564476"...
0.7630362
0
We try to resend the password. Email address will not be found, so we expect a false.
Мы попытаемся повторно отправить пароль. Электронный адрес не будет найден, поэтому ожидаем ложный результат.
function testResendPassword() { $this->assertFalse($this->oObject->resendPassword()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function restore()\n {\n\n $user = User::model()->findByAttributes(array('email' => $this->email));\n if ( null == $user ) {\n $this->addError('email', 'User with this email is not registered');\n return false;\n }\n\n $user->password = substr(md5(time()....
[ "0.74836576", "0.7162307", "0.7051238", "0.7010265", "0.68562704", "0.68319803", "0.6823303", "0.6806203", "0.67822206", "0.67630285", "0.67591894", "0.6735475", "0.6726114", "0.6696503", "0.6666203", "0.66566813", "0.66466206", "0.6635729", "0.6603236", "0.6581912", "0.65790...
0.7676491
0
OneToMany (owning side) Get fkFiscalizacaoAutoFiscalizacoes
OneToMany (сторона, владеющая связью) Получить fkFiscalizacaoAutoFiscalizacoes
public function getFkFiscalizacaoAutoFiscalizacoes() { return $this->fkFiscalizacaoAutoFiscalizacoes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFkArrecadacaoCalculo()\n {\n return $this->fkArrecadacaoCalculo;\n }", "public function getFkArrecadacaoCalculo()\n {\n return $this->fkArrecadacaoCalculo;\n }", "public function fiscales(){\n return $this->hasOne(Fiscal::class);\n }", "public function g...
[ "0.6460958", "0.6460958", "0.644738", "0.64290553", "0.639595", "0.6389959", "0.63583785", "0.6292841", "0.6280887", "0.62412626", "0.6219938", "0.61712843", "0.61676896", "0.6158607", "0.61174715", "0.61134166", "0.6090151", "0.60668504", "0.6066753", "0.6063438", "0.6037974...
0.74071854
0
OneToMany (owning side) Get fkFiscalizacaoNotificacaoTermos
OneToMany (сторона, владеющая связью) Получить fkFiscalizacaoNotificacaoTermos
public function getFkFiscalizacaoNotificacaoTermos() { return $this->fkFiscalizacaoNotificacaoTermos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFkFiscalizacaoNotificacaoFiscalizacao()\n {\n return $this->fkFiscalizacaoNotificacaoFiscalizacao;\n }", "public function getFkTcepeDocumentos()\n {\n return $this->fkTcepeDocumentos;\n }", "public function getFkFiscalizacaoTerminoFiscalizacao()\n {\n retu...
[ "0.6676277", "0.62773496", "0.6246056", "0.59920245", "0.59566474", "0.5899253", "0.5889567", "0.5855424", "0.58445436", "0.58445436", "0.58436537", "0.5834832", "0.58322483", "0.58322483", "0.58322483", "0.58250993", "0.57997984", "0.5793771", "0.5793771", "0.5777415", "0.57...
0.7813939
0
OneToMany (owning side) Get fkFiscalizacaoProcessoFiscalCreditos
OneToMany (сторона, владеющая связью) Получить fkFiscalizacaoProcessoFiscalCreditos
public function getFkFiscalizacaoProcessoFiscalCreditos() { return $this->fkFiscalizacaoProcessoFiscalCreditos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFkFiscalizacaoFiscalProcessoFiscais()\n {\n return $this->fkFiscalizacaoFiscalProcessoFiscais;\n }", "public function getFkFiscalizacaoProcessoFiscalObras()\n {\n return $this->fkFiscalizacaoProcessoFiscalObras;\n }", "public function getFkFiscalizacaoProcessoFiscal...
[ "0.72622114", "0.7127126", "0.69546354", "0.69126153", "0.6829123", "0.6256235", "0.6204707", "0.611218", "0.610587", "0.6070614", "0.6064944", "0.60059524", "0.593895", "0.5912817", "0.59010285", "0.5860695", "0.5847362", "0.58448964", "0.5794956", "0.5794263", "0.57820743",...
0.7677881
0
OneToMany (owning side) Get fkFiscalizacaoProcessoFiscalGrupos
OneToMany (сторона, владеющая связью) Получить fkFiscalizacaoProcessoFiscalGrupos
public function getFkFiscalizacaoProcessoFiscalGrupos() { return $this->fkFiscalizacaoProcessoFiscalGrupos; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFkFiscalizacaoProcessoFiscalObras()\n {\n return $this->fkFiscalizacaoProcessoFiscalObras;\n }", "public function getFkFiscalizacaoProcessoFiscalCreditos()\n {\n return $this->fkFiscalizacaoProcessoFiscalCreditos;\n }", "public function getFkFiscalizacaoFiscalProces...
[ "0.72275186", "0.69498175", "0.68663687", "0.6803899", "0.6482575", "0.6285225", "0.6236021", "0.6120129", "0.61008614", "0.60795677", "0.60283446", "0.6023665", "0.59756106", "0.5917736", "0.58908725", "0.58884776", "0.5881979", "0.5815037", "0.5798308", "0.5790408", "0.5776...
0.7834735
0
OneToMany (owning side) Get fkFiscalizacaoFiscalProcessoFiscais
OneToMany (сторона, владеющая связью) Получить fkFiscalizacaoFiscalProcessoFiscais
public function getFkFiscalizacaoFiscalProcessoFiscais() { return $this->fkFiscalizacaoFiscalProcessoFiscais; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFkFiscalizacaoProcessoFiscalObras()\n {\n return $this->fkFiscalizacaoProcessoFiscalObras;\n }", "public function getFkFiscalizacaoProcessoFiscalCreditos()\n {\n return $this->fkFiscalizacaoProcessoFiscalCreditos;\n }", "public function getFkFiscalizacaoProcessoFisc...
[ "0.72607106", "0.7225972", "0.7122222", "0.70901686", "0.6708933", "0.6468045", "0.6357266", "0.6282524", "0.6276339", "0.62253636", "0.62163746", "0.6201636", "0.6177068", "0.6136469", "0.6108688", "0.61037517", "0.6090842", "0.6066953", "0.6006465", "0.6003596", "0.5999429"...
0.73755467
0
ManyToOne (inverse side) Get fkSwProcesso
ManyToOne (обратная сторона) Получить fkSwProcesso
public function getFkSwProcesso() { return $this->fkSwProcesso; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFkSwProcessos()\n {\n return $this->fkSwProcessos;\n }", "public function getIDSociete_FK()\n {\n return $this->soc_id_fk;\n }", "public function getIdWfProcesso(){\n return $this->_data['id_wf_processo'];\n }", "static public function getParentRelationa...
[ "0.7266046", "0.61526996", "0.6109647", "0.5988394", "0.5973653", "0.59635186", "0.5959383", "0.58380973", "0.5797124", "0.57837474", "0.57537436", "0.57517624", "0.5724606", "0.566258", "0.56519574", "0.56373084", "0.56166905", "0.56166345", "0.55762446", "0.5537898", "0.551...
0.7977217
0
ManyToOne (inverse side) Get fkAdministracaoUsuario
ManyToOne (обратная сторона) Получить fkAdministracaoUsuario
public function getFkAdministracaoUsuario() { return $this->fkAdministracaoUsuario; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFkAdministracaoModulo()\n {\n return $this->fkAdministracaoModulo;\n }", "public function getUsuarioFk()\n {\n return $this->hasOne(UsuarioSistema::class, ['id_usuario' => 'id_usuario_fk']);\n }", "public function getUsuario()\n {\n return $this->hasOne(Us...
[ "0.71235985", "0.7070218", "0.7014832", "0.6931525", "0.684946", "0.6837653", "0.6585141", "0.64000297", "0.6362473", "0.6275676", "0.62135607", "0.61795664", "0.6139945", "0.6139945", "0.6118953", "0.609622", "0.60665387", "0.60601443", "0.6047454", "0.60146224", "0.6000878"...
0.8264483
1