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
Render My VAT Number content.
Отобразить содержимое моего НДС.
public function render_my_vat_number_content() { $vars = array( 'vat_number' => get_user_meta( get_current_user_id(), 'vat_number', true ), 'show_title' => version_compare( WC()->version, '2.6', '<' ), 'messages' => $this->messages, ); wc_get_template( 'my-account/my-vat-number.php', $vars, '...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show_my_account() {\n\t\tif ( version_compare( WC()->version, '2.6', '<' ) ) {\n\t\t\t$this->render_my_vat_number_content();\n\t\t}\n\t}", "public function getVatNumber():string\n { \n return $this->vatNumber;\n }", "public static function view_order_vat_number( $payment_meta, $use...
[ "0.64638525", "0.6206677", "0.60670614", "0.60541415", "0.5881914", "0.5881415", "0.57807374", "0.57623434", "0.57494485", "0.5609952", "0.55982006", "0.5570081", "0.5517618", "0.55034655", "0.5463621", "0.54595095", "0.54535776", "0.5436739", "0.5408433", "0.5389097", "0.537...
0.8410791
0
Function to save VAT number from the my account form.
Функция для сохранения номера НДС из формы моего аккаунта.
public function save_vat_number() { if ( wp_verify_nonce( $_POST['_wpnonce'], 'woocommerce-edit_vat_number' ) ) { try { $posted_vat = $_POST['vat_number']; $user = get_userdata( get_current_user_id() ); $billing_country = $user->billing_country; self::validate( $posted_vat, $billin...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show_my_account() {\n\t\tif ( version_compare( WC()->version, '2.6', '<' ) ) {\n\t\t\t$this->render_my_vat_number_content();\n\t\t}\n\t}", "public function save()\n {\n $this->save_meta_value('_sim_service_price', $this->service_price);\n $this->save_meta_value('_sim_service_pric...
[ "0.5574708", "0.5456377", "0.5394736", "0.53411895", "0.5299038", "0.5296517", "0.523676", "0.5208337", "0.51825345", "0.51025", "0.5070181", "0.5049349", "0.50403464", "0.50359255", "0.5020119", "0.5000015", "0.4991139", "0.49877152", "0.49862847", "0.49745145", "0.49657947"...
0.7691068
0
Take a form in input and return an error array. it puts global errors into a special globals__ key, see SF\Form error_bubbling option. For each element of the form with a constraint, it determine a path such [formName]_[elementName]=>[errors] form_name=>[errors] form_address=>[errors] form42_mobile=>[errors] ect for ar...
Взять форму из входных данных и вернуть массив ошибок. Она помещает глобальные ошибки в специальный ключ globals__. См. опцию SF\Form error_bubbling. Для каждого элемента формы с ограничением определяется путь такого вида [formName]_[elementName]=>[errors], form_name=>[errors], form_address=>[errors], form42_mobile=>[e...
public function getFormErrors($form) { $errors = []; if ($form instanceof Form) { $name = $form->getName(); $tempErr = []; foreach ($form->getErrors() as $error) { $tempErr[] = $error->getMessage(); } if (count($tempErr)>0)...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getFormErrors(): array\n {\n $errors = [];\n $getPropertyPath = function(FormError $error, FormInterface $form) {\n $path = $error->getCause() && method_exists($error->getCause(), 'getPropertyPath') ? $error->getCause()->getPropertyPath() : null;\n if (is_null...
[ "0.7666327", "0.70034647", "0.69352406", "0.6821903", "0.6730963", "0.66500217", "0.6582847", "0.65053356", "0.64999026", "0.64645046", "0.6436846", "0.6395361", "0.6359948", "0.6323624", "0.63031435", "0.628931", "0.6204331", "0.6200731", "0.6192208", "0.61322343", "0.608498...
0.7387914
1
Return array of the templates to be processed on the event $name.
Вернуть массив шаблонов для обработки на событие $name.
public function getTemplatesForEvent($name) { $result = array(); foreach($this->templates as $tmpl) { foreach($tmpl->getEvents() as $event) { if($event == $name) { $result[] = $tmpl; break; } } } return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTemplate($name){\n if(isset($name)){\n return $this->template[$name]; // $this->envir->loadTemplate($template)\n }\n return $this->template[$this->templace_interator++]; // $this->envir->loadTemplate($template)\n }", "private static function getFilterArray($n...
[ "0.66772765", "0.6591665", "0.63100135", "0.62576073", "0.61272854", "0.6030418", "0.6023487", "0.5989302", "0.5946706", "0.5918474", "0.5877873", "0.5868646", "0.5838344", "0.58317703", "0.5817406", "0.578545", "0.5769778", "0.571945", "0.56954104", "0.5687387", "0.56865036"...
0.8710982
0
Merge other config object to the current.
Объединить другой объект конфигурации с текущим.
public function merge(Config $other) { /* merge variables */ foreach($other->getVars() as $key => $value) { $this->vars[ $key ] = $value; } /* merge templates */ foreach($other->getTemplates() as $one) { $this->templates[] = $one; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function mergeConfig()\n {\n $this->mergeConfigFrom(__DIR__.\"/../config/{$this->name}.php\", $this->name);\n }", "public function merge(array $config): self;", "private function mergeConfig() {\n\t\t$this->mergeConfigFrom(\n\t\t\t__DIR__ . '/../config/config.php', 'sl-upload'\n\t\t);\n\...
[ "0.73209286", "0.7198772", "0.71558946", "0.7103057", "0.68946016", "0.6857082", "0.68275595", "0.67334807", "0.6505461", "0.6440801", "0.63752043", "0.63734853", "0.63621306", "0.6322272", "0.6290263", "0.624776", "0.6188779", "0.61859006", "0.6109648", "0.6042901", "0.59587...
0.7917146
0
Register a Content Area post type.
Регистрация типа поста Content Area.
function tmiCreateContentAreaPost() { $labels = array( 'name' => _x( 'Content Areas', 'post type general name', 'tmi' ), 'singular_name' => _x( 'Content Area', 'post type singular name', 'tmi' ), 'menu_name' => _x( 'Content Areas', 'admin menu', 'tmi' ), 'name_admin_bar' => _x( ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wpbm_register_post_type(){\n include('inc/admin/register/wpbm-register-post.php');\n register_post_type( 'WP Blog Manager', $args );\n }", "public function register_post_type() {\n\t\tadd_action( 'init', array( $this, 'post_registration_callback' ), 0, 0 );\n\t}", "public ...
[ "0.711022", "0.69492435", "0.6903749", "0.68593377", "0.68191385", "0.6779109", "0.67734396", "0.6770635", "0.6767186", "0.6751812", "0.67389923", "0.6716092", "0.6666686", "0.66526425", "0.66496533", "0.6627962", "0.662754", "0.662754", "0.66238", "0.6558013", "0.65503794", ...
0.7303713
0
Check if the product is an ingredient
Проверьте, является ли продукт ингредиентом
public function isIngredient() { $productModel = new ProductModel(); $ing = false; $datas = $productModel->isIngredient($this->id_products); if (count($datas) > 0) { $ing = true; } return $ing; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function is_product() {\n\t\treturn is_singular( array( 'product' ) );\n\t}", "function IsProduct() {\r\n\t\treturn true;\r\n\t}", "protected abstract function isSingleProduct();", "public function hasProduct(){\n return $this->_has(1);\n }", "public function hasProduct(){\n return $this->_has...
[ "0.6408289", "0.6125394", "0.60457677", "0.6005939", "0.6005939", "0.6005939", "0.6005939", "0.6005939", "0.59803486", "0.5949103", "0.5920117", "0.589262", "0.5792801", "0.5729814", "0.5691027", "0.56727964", "0.56491864", "0.56444025", "0.56412375", "0.5637624", "0.5615455"...
0.8344077
0
Get the name (name+extension) of the picture
Получить имя (имя+расширение) изображения
public function getPictureName() { $pictureName = "nopicture.png"; $articleModel = new ArticleModel(); $articles = $articleModel->where("id_products", $this->id_products)->findAll(); if (count($articles) > 0) { if ($articles[0]->getPicture() != null) { $...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getImageName();", "public function getPictureName()\n {\n foreach ($this->getDocuments() as $document) {\n if ($document->getType() === DocumentType::PICTURE) {\n return $document->getFilename();\n }\n }\n }", "protected function imageNam...
[ "0.8410507", "0.7840691", "0.75879395", "0.7569619", "0.73876745", "0.73205936", "0.7308751", "0.720583", "0.7192154", "0.71228254", "0.7072717", "0.6957997", "0.6939863", "0.693252", "0.6927702", "0.6922252", "0.69210124", "0.6918953", "0.6890661", "0.6889838", "0.68787676",...
0.79252785
1
Get the theme featured posts filter name
Получить имя фильтра выделенных постов темы
protected function get_featured_posts_filter() { $theme_support = get_theme_support( 'featured-content' ); if ( isset( $theme_support[0]['featured_content_filter'] ) ) { $theme_support[0]['filter'] = $theme_support[0]['featured_content_filter']; unset( $theme_support[0]['featured_content_filter'] ); } r...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function get_name()\n {\n return 'post-filter';\n }", "public function get_title()\n {\n return __('Post Filter Bar', 'elementor-super-cat');\n }", "public function getName()\n {\n return 'fibe_content_topicfiltertype';\n }", "public static function getFiltername(): stri...
[ "0.7237526", "0.6817231", "0.650355", "0.64855695", "0.6391176", "0.6290104", "0.62301254", "0.61835635", "0.60614693", "0.6051026", "0.60407853", "0.6036739", "0.60327667", "0.60110307", "0.5969027", "0.59661674", "0.5948985", "0.5948761", "0.59464616", "0.5940557", "0.59110...
0.719759
1
Rewrites the function Featured_Content::get_featured_post_ids()
Переписывает функцию Featured_Content::get_featured_post_ids()
public function featured_content_ids( $featured_ids ) { if ( ! $this->is_active() || false !== $featured_ids ) { return $featured_ids; } $settings = Featured_Content::get_setting(); if ( ! $term = wpcom_vip_get_term_by( 'name', $settings['tag-name'], 'post_tag' ) ) { return $featured_ids; } // Get ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_home_featured_posts_ids() {\n if (false === ($featured_post_ids = get_transient('featured_post_ids'))) {\n $featured_args = array(\n 'orderby' => 'date', \n 'order' => 'DESC',\n 'posts_per_page' => 5,\n 'meta_info' => 'featured',\n 'meta_key' => '_thumbnail_id',\n 'po...
[ "0.77189994", "0.6514394", "0.6435437", "0.6422354", "0.6401834", "0.6361139", "0.6361139", "0.63171935", "0.6305999", "0.6213174", "0.6183821", "0.61584294", "0.6133852", "0.61044025", "0.60920966", "0.6085143", "0.60751045", "0.60598975", "0.60281277", "0.60171527", "0.5962...
0.7872025
0
Is the specified data is an option object
Является ли указанная данные объектом опции
protected function isOption($xData) { return ($xData instanceof \Limbonia\Widget\Option); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isOptions(): bool {}", "public function hasOptions();", "public function isOptions()\n\t{\n\t\treturn $this->httpMethod() == self::MethodOptions;\n\t}", "public static function isOptions(): bool {\r\n return static :: isMethod('options');\r\n }", "private function supportData()\n ...
[ "0.71244675", "0.675488", "0.6486322", "0.6419474", "0.6341579", "0.6305684", "0.62513036", "0.6248257", "0.6248257", "0.62460244", "0.6214923", "0.6151837", "0.61097705", "0.6094559", "0.60756475", "0.6062814", "0.6058193", "0.60413855", "0.60375154", "0.6032993", "0.6025718...
0.7471587
0
Helper method to create a RecognitionAudio object from audio data.
Помощь метод для создания объекта RecognitionAudio из аудиоданных.
public function createRecognitionAudio($audio) { return $this->createRecognitionAudioHelper(RecognitionAudio::class, $audio); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function createFromObject(?\\stdClass $data): ?Audio\n {\n if (is_null($data)) {\n return null;\n }\n $object = new Audio(\n $data->file_id,\n $data->duration\n );\n\n $object->performer = $data->performer ?? null;\n $objec...
[ "0.67548674", "0.55654144", "0.5528539", "0.5451106", "0.53717446", "0.53419334", "0.53242564", "0.51928186", "0.51791847", "0.5151576", "0.50567746", "0.5018742", "0.49996912", "0.4959182", "0.49476764", "0.49451092", "0.49118325", "0.48993817", "0.48855844", "0.48556295", "...
0.74835885
0
Replace the target attribute of link tags in processedContent with the target specified by externalLinkTarget and resourceLinkTarget options. Additionally set rel="noopener" for links with target="_blank".
Замените атрибут target элементов link в processedContent на целевой параметр, указанный опциями externalLinkTarget и resourceLinkTarget. Дополнительно установите rel="noopener" для ссылок с target="_blank".
protected function replaceLinkTargets($processedContent) { $noOpenerString = $this->fusionValue('setNoOpener') ? ' rel="noopener"' : ''; $externalLinkTarget = trim($this->fusionValue('externalLinkTarget')); $resourceLinkTarget = trim($this->fusionValue('resourceLinkTarget')); if ($ex...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function replaceLinkTargets(string $processedContent): string\n {\n $noOpenerString = $this->fusionValue('setNoOpener') ? ' rel=\"noopener\"' : '';\n $externalLinkTarget = trim($this->fusionValue('externalLinkTarget'));\n $resourceLinkTarget = trim($this->fusionValue('resourceLink...
[ "0.6687799", "0.591453", "0.508951", "0.49622914", "0.49350896", "0.48436442", "0.48354712", "0.4818528", "0.47697678", "0.4765853", "0.47550932", "0.4685501", "0.46517077", "0.46284357", "0.46188995", "0.46074086", "0.45963228", "0.4584742", "0.4580243", "0.45298657", "0.452...
0.704329
0
/ Controller for user/inbox
/ Контроллер для пользователя/ящик с входящими сообщениями
public function inbox() { $this->page_data['page_name'] = "inbox"; $this->page_data['page_title'] = 'Inbox'; $this->page_data['page_view'] = 'user/inbox'; $this->load->view('index', $this->page_data); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function action_inbox()\n\t{\t\tif ($this->id)\n\t\t\treturn $this->action_inbox_read();\n\n\t\t$messages = ORM::factory('Message')\n\t\t\t->where('recipient_id', '=', $this->user->id)\n\t\t\t->order_by('read', 'asc')\n\t\t\t->order_by('timestamp', 'desc')\n\t\t\t->find_all()\n\t\t\t->as_array();\n\n\t\t$th...
[ "0.78347266", "0.7614929", "0.75222516", "0.7429513", "0.7348983", "0.73475516", "0.72209734", "0.70998824", "0.70812815", "0.7048048", "0.70457834", "0.703324", "0.689117", "0.6890261", "0.6873795", "0.68434393", "0.6816252", "0.6812029", "0.6778355", "0.6740236", "0.6663252...
0.8009066
0
/ Controller for user/notification
/ Контроллер для пользователя/уведомление
public function notification() { $this->page_data['page_name'] = "notification"; $this->page_data['page_title'] = 'notification'; $this->page_data['page_view'] = 'user/notification'; $this->page_data['company_add_request_list'] = $this->corporate_model->get_company_list( "OBJECT", array( 'company_use...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function create()\n\t{\n\t\tlog::info('inside create method of user-notifications controller');\n\t}", "public function createNewUserNotification(){\n return view('user_notification/createUserNotification');\n }", "public function Notification() {\r\n\t\t//$this->template->set_theme('default_...
[ "0.7249686", "0.7230197", "0.7225865", "0.7109801", "0.70991373", "0.7097054", "0.70176595", "0.70036006", "0.7001702", "0.69977343", "0.69472873", "0.68359196", "0.6802158", "0.6802158", "0.6783377", "0.6774495", "0.6741759", "0.67378753", "0.6725646", "0.6690255", "0.668601...
0.7786069
0
/ Controller for user/payment_history
/ Контроллер для пользователя/история_платежей
public function payment_history() { $this->page_data['page_name'] = "payment_history"; $this->page_data['page_title'] = 'Payment history'; $this->page_data['page_view'] = 'user/payment_history'; $this->page_data['payment_info_list'] = $this->crud_model->get_payment_info_list("OBJECT", $this->session->userdata(...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function paymentHistory()\n {\n // if user is not logged in let him logged in or register\n if( ! Session::isLoggedIn() )\n {\n SCMUtility::frontRedirectTo('?page=scmCourseModule&state=Front&action=myAccount');\n return;\n }\n\n // get user's payme...
[ "0.80701417", "0.76368153", "0.6997208", "0.68622404", "0.6569394", "0.6505201", "0.64820236", "0.6383045", "0.6353944", "0.6347968", "0.6245636", "0.62455976", "0.6233622", "0.6215076", "0.62029874", "0.61758524", "0.6175577", "0.61235243", "0.61112773", "0.6093404", "0.6058...
0.8129025
0
/ Controller for user assessment
/ Контроллер для оценки пользователя
public function user_assessment() { $this->page_data['page_name'] = "user_assessment"; $this->page_data['page_title'] = 'User Assessment'; $this->page_data['page_view'] = 'user/user_assessment'; $this->page_data['sub_page_name'] = "user_assessment"; $this->page_data['enrollment_list'] = $this->crud_model->g...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function assessment()\n\t{\n\t\t$this->load->config($this->uri->segments[1].'/'.$this->session->grid);\n\t\t$this->load->library('post');\n\t\t$send = $this->config->item('send');\n\t\t$this->load->model('BaseModel');\n\t\tforeach($send['session'] as $val)\n\t\t{\n\t\t\t$field[$val] =$this->session->{$val};\n\t\t}...
[ "0.6844375", "0.66551995", "0.6516239", "0.6449589", "0.6416076", "0.635515", "0.63147116", "0.6274186", "0.61173195", "0.6094547", "0.60931087", "0.60499054", "0.6019205", "0.6016361", "0.60109806", "0.5996525", "0.5990381", "0.5988184", "0.5987516", "0.59831065", "0.598239"...
0.772693
0
/ Controller for user quiz result
/ Контроллер для результата теста пользователя
public function quiz_result() { $this->page_data['page_name'] = "quiz_result"; $this->page_data['page_title'] = 'Quiz Result'; $this->page_data['page_view'] = 'user/quiz_result'; $this->page_data['sub_page_name'] = "quiz_result"; $this->page_data['enrollment_list'] = $this->crud_model->get_enrollment_info_b...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function view() {\n\t\t$quiz = $this->__quiz;\n\n\t\t// 基本的には自分の履歴を見ようとしていることが前提\n\t\t// 初期表示のテスト一覧から結果を見ようとしている=つまり編集権限は無し、自分のデータを見るパターン\n\t\t$userId = Current::read('User.id');\n\t\t$handleName = Current::read('User.handlename');\n\n\t\t// サマリIDが指定されているときだけが、上記の前提から異なる可能性があるパターン\n\t\t// 成績一覧画面(quiz_result...
[ "0.7303794", "0.7145716", "0.7085684", "0.69783735", "0.6959464", "0.6956878", "0.69477534", "0.69456387", "0.6931691", "0.69306463", "0.6891838", "0.68888825", "0.6885594", "0.6827095", "0.679928", "0.6791965", "0.67824477", "0.6782293", "0.6771942", "0.67640907", "0.6761468...
0.79380304
0
/ Controller for user/my_messages
Контроллер для user/my_messages
public function my_messages() { $this->page_data['page_name'] = "my_messages"; $this->page_data['page_title'] = 'My Messages'; $this->page_data['page_view'] = 'user/my_messages'; $this->page_data['user_message_list'] = $this->user_model->get_user_messages( 'OBJECT', array('id', 'u...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function MyMessages(){\n\n\t\t$headerData = null;\n\t\t$sidebarData = null;\n\t\t$page = 'admin/myMessage';\n\t\t$mainData = array(\n\t\t\t'pagetitle'=> 'Messages',\n\t\t\t'londontec' => $this->setting_model->Get_All('londontec_users'),\n\t\t\t'student' => $this->setting_model->Get_All('students'),\n\t\t\t'...
[ "0.7392292", "0.70685697", "0.6906166", "0.68754977", "0.6783848", "0.6757459", "0.67548454", "0.67497665", "0.67342705", "0.67102486", "0.66998756", "0.6673439", "0.6614799", "0.660269", "0.65960234", "0.6572921", "0.6528531", "0.6527487", "0.65136373", "0.65110797", "0.6501...
0.7763332
0
The captcha fail test
Тест на неудачу капчи
public function test_error_on_missed_captcha() { $response = $this->post('/proposal/store', [ 'name' => 'Test Name', 'title' => 'Test Title'.mt_rand(1, 10000), 'description' => 'Test Description', ]); $response->assertStatus(302); $response->asser...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function checkCaptcha(){\n return true; //for future \n }", "public function validate()\n\t{\n\t\t$arrCaptcha = $this->Session->get('captcha_' . $this->strId);\n\n\t\tif (!is_array($arrCaptcha) || !strlen($arrCaptcha['key']) || !strlen($arrCaptcha['sum']) || \\Input::post($arrCaptcha['key']) != $arrCap...
[ "0.69266057", "0.6890168", "0.6859506", "0.6711065", "0.6676787", "0.66528016", "0.6641811", "0.65859586", "0.6583831", "0.6566123", "0.65184176", "0.6517846", "0.6481294", "0.63946605", "0.63923335", "0.63666946", "0.63666946", "0.6359197", "0.6341423", "0.63371927", "0.6316...
0.7243608
0
The proposal list test example.
Пример теста на список предложений.
public function test_list() { $response = $this->get('/proposal/all'); $response->assertSee('data-js-proposal-cards'); $response->assertSee('card-header'); $response->assertStatus(200); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testListExperts()\n {\n }", "public function testParagraphThenList()\n {\n $result = null;\n\n try {\n $quill = new QuillRender(\n $this->delta_paragraph_then_list,\n OPTIONS::FORMAT_GITHUB_MARKDOWN\n );\n $resu...
[ "0.65766454", "0.6402565", "0.63989544", "0.6238854", "0.6040738", "0.5806804", "0.57944304", "0.57926965", "0.5725455", "0.5725455", "0.56425965", "0.56088305", "0.5606066", "0.55874", "0.5583784", "0.557187", "0.55626005", "0.55608094", "0.5558994", "0.55510175", "0.5543458...
0.7179553
0
Return the type of the callback $callback
Верните тип обратного вызова $callback
function get_callback_type($callback) { if ((is_string($callback) && function_exists($callback)) || (is_object($callback) && (get_class($callback) === 'Closure')) ) { return 'function'; } return 'method'; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCallback(): ?callable;", "protected static function getClassNameFromCallback($callback)\n {\n if (!is_array($callback)) {\n return '';\n }\n $reflectionClass = new \\ReflectionClass($callback[0]);\n return $reflectionClass->getName();\n }", "prote...
[ "0.6558719", "0.6401853", "0.6350732", "0.63452816", "0.62687826", "0.6254238", "0.6238717", "0.6165912", "0.6162994", "0.6122539", "0.6122539", "0.6115446", "0.60435474", "0.6039408", "0.6039408", "0.6039408", "0.6039408", "0.60025454", "0.5968723", "0.5958548", "0.59237057"...
0.8433661
0
Return a copy of the array $parameters sorted according to the parameters of the callable $callback
Вернуть копию массива $parameters, отсортированного в соответствии с параметрами вызываемого объекта $callback
function sort_callback_parameters($callback, $parameters) { $callback_type = get_callback_type($callback); switch ($callback_type) { case 'function': $reflection_callback = new ReflectionFunction($callback); break; case 'method': if...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function sort_callback_params( $callback, $provided ) {\n\t\tif ( is_array( $callback ) ) {\n\t\t\t$ref_func = new ReflectionMethod( $callback[0], $callback[1] );\n\t\t} else {\n\t\t\t$ref_func = new ReflectionFunction( $callback );\n\t\t}\n\n\t\t$wanted = $ref_func->getParameters();\n\t\t$ordered_parame...
[ "0.69323987", "0.6877103", "0.68456167", "0.63250726", "0.6111434", "0.58888465", "0.5874892", "0.5771787", "0.5714812", "0.56235975", "0.55833375", "0.55432576", "0.55177844", "0.5479509", "0.5477928", "0.54541487", "0.544912", "0.5442247", "0.5378777", "0.5369473", "0.53619...
0.77285385
0
Call a callback with an associative array of parameters
Вызовите обратный вызов с ассоциативным массивом параметров
function call_user_func_array_assoc($callback, $parameters) { $sorted_parameters = sort_callback_parameters($callback, $parameters); if ($sorted_parameters === false) { trigger_error('Missing parameter', E_USER_ERROR); } return call_user_func_array($callback, $sorted_parame...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function test(...$params){\n // pass event to callback function\n\n print_r($params[0]);\n print_r(\"EVENT TYPE: \" . $params[1] . PHP_EOL . PHP_EOL);\n\n}", "public function callback();", "static function apply($array,$callback,$parameters = []){\n\t\t$parameters = (array)$parameters;\n\t\t$newArray ...
[ "0.68342805", "0.6738278", "0.66164523", "0.64086723", "0.6362417", "0.62266874", "0.61611015", "0.6113773", "0.6087724", "0.6077186", "0.60672593", "0.6031381", "0.6016555", "0.6000021", "0.5985664", "0.5957023", "0.594539", "0.5942057", "0.586987", "0.5865718", "0.58635426"...
0.74686325
0
/ Find the separator either "," or ";"
Найдите разделитель либо "," либо ";"
private function getSeparator() { if (!$this -> separator) { $this -> separator = ","; $test_line = explode($this -> separator, $this -> fileContents[0]); if (sizeof($test_line) > 1) { return $this -> separator; } $this -> separator = ";"; $test_line = explode($this -> separator, $this -> fileCo...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function _check_separator($sourceFile) {\n $testSeparator = fopen($sourceFile, 'r');\n /*\n * first test if semi-colon or comma separated, based on assumption that\n * it is semi-colon and it should be comma if I only get one record then\n */\n if ($testRow = fgetcsv($testSeparator, 0, ';')) {\n if (!i...
[ "0.71249384", "0.70902646", "0.6940647", "0.69318", "0.6901174", "0.67358285", "0.6706171", "0.652264", "0.64003533", "0.6380211", "0.6341218", "0.6306665", "0.62250054", "0.62096155", "0.6194329", "0.6194329", "0.61908114", "0.61769116", "0.6152945", "0.61418074", "0.6139462...
0.7840566
0
/ Get empty data used for caching of initialization array
/ Получить пустые данные, используемые для кэширования инициализационного массива
private function getEmptyData() { if (!$this -> empty_data) { $this -> empty_data = array(); foreach ($this -> types as $key) { $this -> empty_data[$key] = ""; } unset($this -> empty_data['user_type']); // the default value should never be set to "" unset($this -> empty_data['password']); // the de...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEmptyData(): mixed;", "public function get_init_blank_param() {\n\t\t$r = array_pop( $this->get_saves( $_GET['js_id'] ) );\n\n\t\tif ( !empty( $r ) AND $r['data'] ) {\n\t\t\t$data = json_decode( $r['data'] );\n\t\t\t$data->id = null;\n\t\t\t$data->chemical = null;\n\t\t\t$data->test = [];\n\t\...
[ "0.69916195", "0.67549074", "0.65977556", "0.6431574", "0.64225423", "0.6411008", "0.6361635", "0.63067925", "0.6230386", "0.62150633", "0.62094975", "0.61915606", "0.61749357", "0.61678565", "0.6155841", "0.6151375", "0.6076485", "0.6053073", "0.60420203", "0.6041861", "0.60...
0.7457719
0
/ Split a line to its different strings as they are determined by the separator
Разделите строку на различные строки, как они определяются разделителем
private function explodeBySeparator($line) { if ($this -> separator) { return str_getcsv($this -> fileContents[$line], $this -> separator); } else { return $this -> fileContents[$line]; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function splitLine() {\n $this->words = preg_split('/[\\' \\',\\t]+/', $this->line);\n }", "function _split($lines) {\r\n if (!preg_match_all('/ ( [^\\S\\n]+ | [[:alnum:]]+ | . ) (?: (?!< \\n) [^\\S\\n])? /xs',\r\n implode(\"\\n\", $lines),\r\n ...
[ "0.70607704", "0.6447086", "0.617816", "0.6160525", "0.5917069", "0.5754662", "0.5722295", "0.5688023", "0.55622697", "0.55464125", "0.55344206", "0.5526922", "0.5521765", "0.5476216", "0.544042", "0.5409819", "0.5384486", "0.5382871", "0.5346508", "0.5295638", "0.52799153", ...
0.7219887
0
/ Check whether the file contains the columns that are necessary for this import type
Проверьте, содержит ли файл столбцы, необходимые для этого типа импорта
private function checkImportEssentialField($type) { $mandatoryFields = EfrontImport::getMandatoryFields($type); $not_found = false; foreach ($mandatoryFields as $dbField => $columnName) { if (!isset($this -> mappings[$dbField])) { $not_found = true; break; } } if ($not_found) { $this -> log["...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function hasColumns(){\n return $this->_has(3);\n }", "function tt_validate_upload_columns(csv_import_reader $cir, $stdfields, moodle_url $returnurl) {\n $columns = $cir->get_columns();\n\n if (empty($columns)) {\n $cir->close();\n $cir->cleanup();\n print_error('cannotr...
[ "0.6665095", "0.66290927", "0.65714246", "0.6410217", "0.63430053", "0.6319779", "0.63058954", "0.626887", "0.62051755", "0.61604655", "0.6141985", "0.60876185", "0.6024028", "0.60173637", "0.59955424", "0.5976955", "0.59642416", "0.59102136", "0.5885935", "0.5884038", "0.588...
0.7108338
0
/ Parse line data
/ Парсинг данных строки
private function parseDataLine($line) { $lineContents = $this -> explodeBySeparator($line); $data = $this -> getEmptyData(); foreach ($this -> mappings as $dbAttribute => $fileInfo) { if (strpos($dbAttribute, "timestamp") === false && $dbAttribute != "hired_on" && $dbAttribute != "left_on") { $data[$dbAttr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "abstract public function parse( $line );", "private function lineData($line)\n {\n // replace tab\n $lineStr = str_replace(\"\\t\", \"*****\", $line);\n // explode string to array\n $lineData = explode('*****', $lineStr);\n\n // $data = [\n // 0 => \"460\", ...
[ "0.757063", "0.71073675", "0.6945345", "0.68735224", "0.6769978", "0.6645853", "0.6619579", "0.6559458", "0.64856786", "0.6450572", "0.64323586", "0.63817835", "0.63712764", "0.63691074", "0.6299224", "0.6267804", "0.61396813", "0.61117095", "0.60727936", "0.6060936", "0.5975...
0.72352064
1
Get the last played timestamp, converted to GMT
Получить последний временной метки воспроизведения, преобразованный в GMT
public function getGmLastPlayedStamp() { return $this->getLastPlayedStamp() + (-1 * ($this->getTimeZoneOffset())); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function gmt_time() {\r\n\t\t$now = time ();\r\n\t\t$tz = $this->gmt_timezone ();\r\n\t\t$seconds = 3600 * $tz;\r\n\t\treturn $now - $seconds;\r\n\t}", "public function getLastGetTime()\n {\n return $this->get(self::_LAST_GET_TIME);\n }", "public function getLastUpdateTime()\n\t{\n\t\treturn empty...
[ "0.6963418", "0.6759389", "0.66737634", "0.6628297", "0.6505822", "0.64570254", "0.64211965", "0.6392346", "0.63535845", "0.6319087", "0.62872845", "0.62869775", "0.6274024", "0.6258373", "0.62380457", "0.6190525", "0.6168724", "0.61504495", "0.61007994", "0.60841686", "0.608...
0.76873255
0
Determine which pages should display the right sidebar
Определите, какие страницы должны отображать правую панель
function display_right_sidebar() { static $display; isset($display) || $display = in_array(false, [ // The sidebar will NOT be displayed if ANY of the following return true. // @link https://codex.wordpress.org/Conditional_Tags is_home(), ]); return apply_filters('mytemplate/di...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function display_left_sidebar() {\n static $display;\n\n isset($display) || $display = in_array(false, [\n // The sidebar will NOT be displayed if ANY of the following return true.\n // @link https://codex.wordpress.org/Conditional_Tags\n is_home(),\n ]);\n\n return apply_filters('...
[ "0.68988883", "0.6784268", "0.6577881", "0.6570304", "0.6568293", "0.6540911", "0.6533519", "0.6523902", "0.64720994", "0.6466874", "0.6458054", "0.6457776", "0.64482", "0.6428276", "0.6428276", "0.6420423", "0.6366525", "0.63262516", "0.62954783", "0.6276634", "0.627304", ...
0.74055654
0
Tests Assets constructor. Returns the created Assets instance for use by dependent tests.
Тестирование конструктора Assets. Возвращает созданный экземпляр Assets для использования зависимыми тестами.
public function testConstructAssets() { $assets = new Assets($this->locator, $this->locatorScheme, $this->baseUrl); $this->assertInstanceOf(Assets::class, $assets); return $assets; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function assets(): Assets\n {\n return new Assets($this);\n }", "function assets()\n {\n return new Assets($this->accessToken, $this->spaceId, $this->cacher);\n }", "protected function setUp(): void\n {\n parent::setUp();\n\n $this->assets = conf...
[ "0.6649672", "0.6371668", "0.63632", "0.6300878", "0.61148703", "0.60650104", "0.5905461", "0.58834445", "0.58479387", "0.58451235", "0.5829653", "0.58112556", "0.5805223", "0.5782589", "0.5762958", "0.5718614", "0.5711093", "0.5703517", "0.56924516", "0.56848633", "0.5684358...
0.8220605
0
Test invalid string[] parameter for getAbsoluteUrl.
Тестирование недопустимого параметра string[] для getAbsoluteUrl.
public function testGetAbsoluteUrlWithInvalidStringArray(Assets $assets) { $this->expectException(\BadMethodCallException::class); $assets->getAbsoluteUrl([ 'assets', 'vendor/bootstrap/js/bootstrap.js', 'extra-invalid-entry', ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFeedUrlAreWrongUrlFormat()\n {\n $listUrlStr = 'abc';\n try {\n $retrieveFeedFromUrlCommandHandler = $this->retrieveFeedFromUrlCommandHandler();\n $retrieveFeedFromUrlCommandHandler->handle(\n new RetrieveFeedFromUrlCommand($listUrlStr)\n ...
[ "0.6773507", "0.6465648", "0.6345527", "0.6224144", "0.61299574", "0.6124268", "0.61127317", "0.6103054", "0.60934556", "0.6052164", "0.60436857", "0.60097504", "0.5928077", "0.59231246", "0.5916246", "0.590743", "0.59042245", "0.59003633", "0.5891357", "0.58633876", "0.58541...
0.7063799
0
Test nonexistent asset getAbsoluteUrl.
Тест получения getAbsoluteUrl для несуществующего актива.
public function testGetAbsoluteUrlWithNonExistentFile(Assets $assets) { $this->expectException(FileNotFoundException::class); $assets->getAbsoluteUrl('assets://vendor/bootstrap/js/faker.js'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testUrlError() {\n\t\t$this->Helper->url('nope.js');\n\t}", "public function getAbsoluteSrc();", "public function isAbsolute()\n {\n return !$this->isRelative($this->url);\n }", "public function getAbsoluteURL()\n {\n return null;\n }", "public function isAbsolute(...
[ "0.6757336", "0.6589562", "0.65734166", "0.6557297", "0.6448721", "0.63726866", "0.627897", "0.62173647", "0.6198643", "0.6170683", "0.60881037", "0.6021533", "0.6010162", "0.59873736", "0.59394383", "0.5829182", "0.5818648", "0.579824", "0.5797345", "0.57778317", "0.57483906...
0.7189649
0
Tests getJsBundleAssets with a nonexistant bundle index.
Тесты getJsBundleAssets с несуществующим индексом пакета.
public function testGetJsBundleAssetsOutOfRange(Assets $assets) { $this->expectException(\OutOfRangeException::class); $assets->getJsBundleAssets("i-don't-exist"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetCssBundleAssetsOutOfRange(Assets $assets)\n {\n $this->expectException(\\OutOfRangeException::class);\n $assets->getCssBundleAssets(\"i-don't-exist\");\n }", "public function testListAssets() {\n\n $res = TestAssetsHelper::listAssets($this->directoryAssets);\n ...
[ "0.63120466", "0.57014644", "0.563892", "0.5571703", "0.5505356", "0.54922336", "0.5467003", "0.5463811", "0.545721", "0.5429911", "0.53751385", "0.52644795", "0.5249949", "0.523375", "0.52233154", "0.5213044", "0.51466286", "0.51279825", "0.5008106", "0.49599358", "0.4938027...
0.7112828
0
Tests getCssBundleAssets with a nonexistant bundle index.
Тест getCssBundleAssets с несуществующим индексом пакета.
public function testGetCssBundleAssetsOutOfRange(Assets $assets) { $this->expectException(\OutOfRangeException::class); $assets->getCssBundleAssets("i-don't-exist"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testGetJsBundleAssetsOutOfRange(Assets $assets)\n {\n $this->expectException(\\OutOfRangeException::class);\n $assets->getJsBundleAssets(\"i-don't-exist\");\n }", "public function testNoMinficationAndNoCaching()\n {\n $this->Bundler->config([\n 'cache' => ...
[ "0.66775775", "0.6237512", "0.58216137", "0.57385707", "0.55693394", "0.52072793", "0.5199133", "0.5176277", "0.51748765", "0.51133204", "0.50357074", "0.5032059", "0.5017898", "0.50051075", "0.4991249", "0.49516228", "0.48913893", "0.48795304", "0.4858575", "0.48281953", "0....
0.70235264
0
Generate a random date excluding the ones disallowed for calendar type financial year.
Сгенерировать случайную дату, исключая те, которые запрещены для календарного типа финансового года.
protected function getRandomDateExcludingDisallowedFyCalendarTypeDates(): Carbon { $dateTime = $this->faker->dateTime; // Random Year, Random month, random date in range 1-28. $dateTime->setDate( (int) $dateTime->format('Y'), (int) $dateTime->format('m'), ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getRandomDateExcludingDisallowedFyCalendarTypeDates(): DateTimeInterface\n {\n $randomDateTime = $this->getRandomDateTime();\n\n // Get a random date string with date (day) number that does not include the disallowed dates (29, 30, 31)\n $randomDateString = $randomDateTim...
[ "0.7068314", "0.66605073", "0.6585724", "0.64408827", "0.63741946", "0.6215406", "0.6198631", "0.6182849", "0.6121705", "0.604941", "0.5985693", "0.59071106", "0.5858944", "0.5844613", "0.5823264", "0.5761257", "0.57474405", "0.57184976", "0.57143605", "0.5711977", "0.5686079...
0.70283
1
test unitaire de la class Video
тестирование класса Video
public function testVideo() { $video =new Video(); $video->setPath('test'); $this->assertSame('test', $video->getPath()); $video->setTrick(new Trick()); $this->assertNotEmpty($video->getTrick()); $this->assertEquals(null, $video->getId()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createVideo();", "public function hasVideo() {}", "public function __construct(Video $video)\n {\n $this->video = $video;\n }", "public static function video() {\n return new Media_Video();\n }", "public function can_be_uploaded()\n {\n $this->withoutException...
[ "0.7317766", "0.6841019", "0.669557", "0.65806454", "0.6554628", "0.6538042", "0.6474403", "0.6418933", "0.64160424", "0.64160424", "0.63873714", "0.631373", "0.6276453", "0.6269777", "0.6240936", "0.618465", "0.61701256", "0.61452234", "0.6127602", "0.6126027", "0.60940653",...
0.83908653
0
Generates a service ID somewhat unique and speaking for our project.
Генерирует идентификатор сервиса, который в определенной степени уникален и соответствует нашим проектам.
private function generateUniqueServiceId($serviceClass) { return sprintf( '__%s.%s.%s', strtr($serviceClass, '\\', '.'), $this->getSeed(), ++$this->runningNumber ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function generateId()\n {\n $startHex = dechex((int)$this->startTime);\n $uuid = bin2hex(random_bytes(12));\n\n return \"1-{$startHex}-{$uuid}\";\n }", "static function makeID() {\n return uniqid();\n }", "protected function generateId()\n {\n }", "a...
[ "0.7589672", "0.7125022", "0.70699847", "0.70499563", "0.69648004", "0.6947704", "0.69305617", "0.6854461", "0.6839375", "0.6775392", "0.6774183", "0.66506386", "0.66477627", "0.66398954", "0.66311586", "0.66265315", "0.6624188", "0.6597207", "0.65862995", "0.6581707", "0.655...
0.75407976
1
Returns a random seed to make service IDs unique across instances.
Возвращает случайное число для идентификации, чтобы идентификаторы служб были уникальны в разных экземплярах.
private function getSeed() { if (!isset($this->seed)) { $this->seed = substr(md5(microtime()), 0, 5); } return $this->seed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function seedRand() {\r\n\t\tsrand((int)((($m=microtime(true))-((int)$m))*pow(10,(int)log10(PHP_INT_MAX)))); \r\n\t}", "public static function makeSalt()\n\t\t{\n\n\t\t\treturn uniqid(mt_rand(), true);\n\t\t}", "function generateId($seed = '')\n {\n return Util::uriB64Encode(pack('H*',...
[ "0.6936132", "0.68306816", "0.6789154", "0.66792434", "0.66615784", "0.66391337", "0.65651774", "0.645252", "0.6390363", "0.637684", "0.6361401", "0.63433707", "0.6328206", "0.6312683", "0.6306488", "0.6303781", "0.6283649", "0.62791526", "0.6254393", "0.62419754", "0.6241531...
0.7242131
0
/ Obs.: Because there's no guarantee the logical keys (contract_id, monthrefdate & monthseqnumber) might be repeated in db, this fetch must be taken in TWO steps. See also docstring for fetch_previous_bill()
Примечание: Поскольку нет гарантии, что логические ключи (contract_id, monthrefdate и monthseqnumber) могут повторяться в базе данных, этот запрос должен выполняться в ДВА этапа. См. также документацию функции fetch_previous_bill()
public function fetch_next_bill() { $next_bill = self ::where('contract_id', $this->contract_id) ->where('monthrefdate', '=', $this->monthrefdate) ->where('monthseqnumber', '>', $this->monthseqnumber) ->orderBy('monthseqnumber', 'asc') ->first(); // skip(1) does not make it null if the...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function retrieved(Contract $contract)\n {\n \n // foreach ($contracts as $contract) {\n // $end_date = $contract->data_fine;\n // $start_date = $contract->data_inizio;\n\n // $today = Carbon::today();\n\n // if ($today>= $start_date && $today<=$e...
[ "0.52010006", "0.5127317", "0.49415454", "0.49241948", "0.4861569", "0.48467055", "0.48102346", "0.47997746", "0.47916362", "0.47563395", "0.4736924", "0.47341338", "0.47288853", "0.47274977", "0.47239923", "0.47097433", "0.4668953", "0.46570766", "0.4635652", "0.46051332", "...
0.7132303
0
Returns $prefs property content.
Возвращает содержимое свойства $prefs.
public function dumpPrefs() { return $this->prefs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dumpLocalPrefs()\n\t{\n\t\treturn $this->local_prefs;\n\t}", "public function dumpGlobalPrefs()\n\t{\n\t\treturn $this->global_prefs;\n\t}", "public function getVars()\n {\n return $this->_contents;\n }", "function getConfigContents() {\n\t\treturn $this->configContents;\n\t}", ...
[ "0.6575762", "0.61241937", "0.5933313", "0.5903995", "0.57752234", "0.56775564", "0.56684494", "0.5612689", "0.5583366", "0.5575962", "0.55730313", "0.556474", "0.5563343", "0.5546594", "0.5516704", "0.55116", "0.55050725", "0.5504121", "0.54400074", "0.54400074", "0.543289",...
0.71106553
0
Returns $local_prefs property content.
Возвращает содержимое свойства $local_prefs.
public function dumpLocalPrefs() { return $this->local_prefs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dumpPrefs()\n\t{\n\t\treturn $this->prefs;\n\t}", "public function dumpGlobalPrefs()\n\t{\n\t\treturn $this->global_prefs;\n\t}", "function getLocalisation() {\r\n\t\treturn $this->_localisation;\r\n\t}", "public function getLocalIniContents() {\n\t\tif (@file_exists($this->fullModulePath.'/l...
[ "0.6209736", "0.6046096", "0.5926471", "0.5497985", "0.54458976", "0.53621566", "0.5229121", "0.52260256", "0.52108866", "0.51784194", "0.51370627", "0.5113016", "0.5106371", "0.50891715", "0.5073405", "0.5072129", "0.5043156", "0.5033056", "0.50123405", "0.4999323", "0.49825...
0.77362967
0
Returns $global_prefs property content.
Возвращает содержимое свойства $global_prefs.
public function dumpGlobalPrefs() { return $this->global_prefs; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dumpLocalPrefs()\n\t{\n\t\treturn $this->local_prefs;\n\t}", "public function dumpPrefs()\n\t{\n\t\treturn $this->prefs;\n\t}", "public static function get_template_global_variables()\n {\n return [\n 'FoxyStripe' => 'current_foxystripe_setting',\n ];\n }", "pub...
[ "0.6422381", "0.6218831", "0.6195214", "0.6176051", "0.5941922", "0.59368765", "0.592155", "0.5828167", "0.5756987", "0.5734107", "0.57038087", "0.56787765", "0.56380796", "0.56293505", "0.5551516", "0.55420226", "0.55284256", "0.5483537", "0.54749733", "0.5432755", "0.538505...
0.74942565
0
get cache instance by id
получить экземпляр кэша по идентификатору
public function __get($id) { return $this->getCache($id); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getById($id){\n #If caching is enabled, search in cache first\n if( static::$cachePrefix ){\n $obj = Memc::get(static::$cachePrefix . $id);\n\n #if instance was not found in cache, query MongoDB\n if( !$obj ){\n $obj = static::get...
[ "0.7691039", "0.76231813", "0.76074475", "0.7526222", "0.74939954", "0.73336196", "0.7309869", "0.7237744", "0.7226509", "0.7043117", "0.7013206", "0.70017004", "0.6871433", "0.68059146", "0.680113", "0.6788641", "0.67662174", "0.67614114", "0.67614114", "0.67614114", "0.6761...
0.80306864
0
remove all table prefixes.
удалить все префиксы таблиц.
public function removeTablePrefixes($prefix) { $connection = $this->entityManager->getConnection(); $schemaManager = $connection->getSchemaManager(); $schema = $schemaManager->createSchema(); // remove table prefixes foreach ($this->importTables as $value) { if (!...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function cleanTableNames() {}", "protected function stripPrefix(string $table): string {\n $len = strlen($this->px);\n if (strcasecmp(substr($table, 0, $len), $this->px) === 0) {\n $table = substr($table, $len);\n }\n return $table;\n }", "public static funct...
[ "0.7130258", "0.6819595", "0.67061794", "0.6698459", "0.6646989", "0.66443056", "0.6485357", "0.63856024", "0.6367879", "0.6239421", "0.6188758", "0.6172559", "0.6142893", "0.61332893", "0.6113275", "0.6054126", "0.6046432", "0.6040831", "0.6016892", "0.5994749", "0.5993186",...
0.703434
1
Mark tables for import with import_ prefix
Отметьте таблицы для импорта префиксом import_
public function markTablesForImport($prefix) { $connection = $this->entityManager->getConnection(); // remove table prefixes foreach ($this->importTables as $value) { $sql = 'RENAME TABLE ' . $value . ' TO ' . $prefix . $value; $stmt = $connection->prepare($sql); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function setTablePrefix()\n {\n }", "public function setPrefixFromDB(){\n foreach($this->getTables() as $table){\n $prefix = explode('_', $table);\n if(isset($prefix[1])){\n if($this->prefix==$prefix[0]) break;\n else $this->prefix = $pre...
[ "0.7021065", "0.6698792", "0.63018346", "0.6287234", "0.62357426", "0.6226597", "0.6203745", "0.61475235", "0.6029974", "0.60165715", "0.5985171", "0.59759545", "0.5938453", "0.5911223", "0.5902316", "0.5862697", "0.57899916", "0.5752328", "0.5744276", "0.57218194", "0.566375...
0.75601816
0
Parses the entry search, sort and paging parameters from the request
Парсит параметры поиска, сортировки и пагинации из запроса
public function parse_entry_search_params( $request ) { // Sorting parameters $sorting_param = $request->get_param( 'sorting' ); $sort_key = isset( $sorting_param['key'] ) && ! empty( $sorting_param['key'] ) ? $sorting_param['key'] : 'id'; $sort_dir = isset( $sorting_param['direction'] ) && ! empty( $sorting_p...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function parseRequest(Request $request)\n {\n $this->setRequest($request);\n\n $format = $request->get($this->formatParam, 'html');\n $formats = $this->getFormats();\n\n // set sortable info\n // assuming method retrieves repository by key/object type\n $repo = $...
[ "0.6679941", "0.6387144", "0.63270414", "0.62317616", "0.6011521", "0.59668267", "0.5935984", "0.5909871", "0.5828833", "0.5810113", "0.57965654", "0.5766156", "0.5692918", "0.5687138", "0.56701434", "0.559037", "0.55832547", "0.5580849", "0.5551138", "0.5532808", "0.55300474...
0.80817515
0
JSON encodes list fields in the specified $entry and returns the new $entry
JSON кодирует поля списков в указанном $entry и возвращает новый $entry
public function maybe_json_encode_list_fields( $entry ) { $form_id = $entry['form_id']; $form = GFAPI::get_form( $form_id ); if ( ! empty( $form['fields'] ) && is_array( $form['fields'] ) ) { foreach ( $form['fields'] as $field ) { /* @var GF_Field $field */ if ( $field->get_input_type() == 'list' )...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function maybe_serialize_list_fields( $entry, $form_id = null ) {\n\t\tif ( empty( $form_id ) ) {\n\t\t\t$form_id = $entry['form_id'];\n\t\t}\n\t\t$form = GFAPI::get_form( $form_id );\n\t\tif ( ! empty( $form['fields'] ) && is_array( $form['fields'] ) ) {\n\t\t\tforeach ( $form['fields'] as $field ) {\n\t\t...
[ "0.69196844", "0.6506286", "0.6041247", "0.5880801", "0.5686735", "0.5494051", "0.5434957", "0.5381625", "0.5220394", "0.5199904", "0.5111867", "0.5090791", "0.5076333", "0.5072875", "0.50546175", "0.5015613", "0.5012392", "0.4988053", "0.49860495", "0.49730298", "0.49663857"...
0.8221903
0
Determines if the value of the specified field is stored in JSON format
Определяет, хранится ли значение указанного поля в формате JSON
public function is_field_value_json( $field ) { $input_type = $field->get_input_type(); if ( in_array( $input_type, array( 'multiselect', 'list' ) ) ) { return true; } if ( $input_type == 'fileupload' && $field->multipleFiles ) { return true; } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isFormatJson()\n\t\t\t{\n\t\t\t\treturn $this->getFormat() == self::FORMAT_JSON;\n\t\t\t}", "public function isJson()\n {\n return parent::isJson();\n }", "public function isJson()\n {\n if (!isset($this->str[0])) {\n return false;\n }\n\n json_decode($this->str);\n\...
[ "0.6911932", "0.6864825", "0.6776082", "0.6772545", "0.67369735", "0.6678321", "0.6659931", "0.66565794", "0.6649619", "0.6644176", "0.662226", "0.6599995", "0.65987396", "0.65731156", "0.6561526", "0.64859617", "0.64584565", "0.64573884", "0.6430579", "0.63963157", "0.638440...
0.77244127
0
Serializes list fields in the specified $entry array.
Сериализует поля списков в указанном массиве $entry.
public function maybe_serialize_list_fields( $entry, $form_id = null ) { if ( empty( $form_id ) ) { $form_id = $entry['form_id']; } $form = GFAPI::get_form( $form_id ); if ( ! empty( $form['fields'] ) && is_array( $form['fields'] ) ) { foreach ( $form['fields'] as $field ) { /* @var GF_Field $field */...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function maybe_json_encode_list_fields( $entry ) {\n\t\t$form_id = $entry['form_id'];\n\t\t$form = GFAPI::get_form( $form_id );\n\t\tif ( ! empty( $form['fields'] ) && is_array( $form['fields'] ) ) {\n\t\t\tforeach ( $form['fields'] as $field ) {\n\t\t\t\t/* @var GF_Field $field */\n\t\t\t\tif ( $field->...
[ "0.75101954", "0.5950327", "0.5650808", "0.5405741", "0.5403374", "0.53956586", "0.5222826", "0.5166885", "0.5160115", "0.50964445", "0.50149035", "0.49836832", "0.4973704", "0.4967683", "0.49675107", "0.49596408", "0.49579003", "0.49424616", "0.49207306", "0.49156454", "0.48...
0.7145199
1
JSON encodes appropriate fields in the specified $entry array
JSON кодирует соответствующие поля в указанном массиве $entry
public function maybe_json_encode_applicable_fields( $entry ) { $form = GFAPI::get_form( $entry['form_id'] ); /** @var GF_Field $field */ foreach ( $form['fields'] as $field ) { if ( empty( $entry[ $field->id ] ) ) { continue; } if ( $field->get_input_type() === 'fileupload' && $field->multipleFi...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function maybe_json_encode_list_fields( $entry ) {\n\t\t$form_id = $entry['form_id'];\n\t\t$form = GFAPI::get_form( $form_id );\n\t\tif ( ! empty( $form['fields'] ) && is_array( $form['fields'] ) ) {\n\t\t\tforeach ( $form['fields'] as $field ) {\n\t\t\t\t/* @var GF_Field $field */\n\t\t\t\tif ( $field->...
[ "0.6853631", "0.59788436", "0.59282523", "0.5922537", "0.58394337", "0.5783085", "0.5681272", "0.56684315", "0.56495106", "0.5606906", "0.5582933", "0.55753183", "0.557352", "0.5568376", "0.5559368", "0.55593604", "0.54928535", "0.54787225", "0.54761666", "0.54697347", "0.546...
0.77438354
0
/ Initilisation des anemones avec le nom du fichier .ini en parametres Retourne une liste contenant toutes les anemones
/ Инициализация аноме с именем файла .ini в качестве параметров. Возвращает список, содержащий все аноме
private function initAnemones ($fileName) { $array = Utils::getArrayFromIniAnemone($fileName); $indice = 1; foreach ($array as $key => $value) { $this->anemones[$indice] = new Anemone($key, $value); $indice ++; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getINIEntries()\n {\n }", "public function __construct()\n {\n\t\t$this->ini_array = parse_ini_file(\"config.ini\", true);\n }", "function readcfg() {\r\n // Analizar sin secciones\r\n $arraycfg = parse_ini_file(\"cfg/mysqlinventario.ini\");\r\n //print_r($arraycfg);\...
[ "0.62748635", "0.62436783", "0.5728529", "0.5661959", "0.56175685", "0.5616644", "0.56095695", "0.5518807", "0.54880065", "0.54321706", "0.5431702", "0.53974867", "0.53700215", "0.5251264", "0.5242031", "0.52413994", "0.52396965", "0.5239208", "0.5228893", "0.5200216", "0.518...
0.7199255
0
The cocktail that belong to the ingredient.
Коктейль, который относится к ингредиенту.
public function cocktails() { return $this->belongsToMany('App\Cocktail', 'cki', 'cki_id_ingredient', 'cki_id_cocktail'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getRecipe()\n {\n return $this->recipe;\n }", "public function getCocktail($id){\r\n $cocktails = array();\r\n $con = $this->db->getConnection();\r\n foreach(mysqli_query($con, 'SELECT * FROM cocktail_details WHERE idcoccktail_details='.$id)as $key){\r\n $titel = $k...
[ "0.65488386", "0.6495142", "0.6492887", "0.60968107", "0.60802233", "0.60070425", "0.5937453", "0.59310985", "0.58460367", "0.576582", "0.57128805", "0.5684352", "0.56696874", "0.56630725", "0.5640522", "0.56281674", "0.5606185", "0.5549044", "0.55338955", "0.5519181", "0.549...
0.70241314
0
/ create_options() Create extra options for your field. This is rendered when editing a field. The value of $field['name'] can be used (like bellow) to save extra data to the $field
/ create_options() Создайте дополнительные параметры для вашего поля. Это отображается при редактировании поля. Значение $field['name'] может быть использовано (как ниже), чтобы сохранить дополнительные данные в $field
function create_options( $field ) { // defaults? /* $field = array_merge($this->defaults, $field); */ $field['character_number'] = isset($field['character_number']) ? $field['character_number'] : ''; ?> <tr class="field_option field_option_<?php echo $this->name; ?>"> <td class="label"> <...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function create_options( $field ) {\n\t\t$field = array_merge($this->defaults, $field);\n\t\t$key = $field['name'];\n\t}", "function create_options($field)\n\t{\n\t\t// defaults?\n\t\t$field = array_merge($this->defaults, $field);\n\n\t\t// key is needed in the field names to correctly save the data\n\t\t$key = ...
[ "0.7824167", "0.72657627", "0.7264331", "0.7155147", "0.6919185", "0.68503994", "0.6830645", "0.6781605", "0.6644011", "0.6563191", "0.65611804", "0.6552198", "0.6550464", "0.6518931", "0.65131927", "0.64427906", "0.63358134", "0.6255459", "0.62519985", "0.62430775", "0.62389...
0.73118156
1
/ field_group_admin_enqueue_scripts() This action is called in the admin_enqueue_scripts action on the edit screen where your field is edited. Use this action to add css + javascript to assist your create_field_options() action. $info
/ field_group_admin_enqueue_scripts() Этот действие вызывается в действии admin_enqueue_scripts на экране редактирования, где ваше поле редактируется. Используйте это действие для добавления css + javascript, чтобы помочь вашему действию create_field_options(). $info
function field_group_admin_enqueue_scripts() { // Note: This function can be removed if not used }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_field_settings_js() {\n\n\t\t?>\n\n\t\t<script type=\"text/javascript\">\n\t\t\tjQuery( document ).bind( 'gform_load_field_settings', function ( e, field, form ) {\n\t\t\t\tjQuery( '#field_link_type_preview' ).attr( 'checked', 'preview' === field[ 'linkType' ] );\n\t\t\t\tjQuery( '#field_link_t...
[ "0.74530107", "0.7207184", "0.71200496", "0.6963517", "0.6846064", "0.6834581", "0.6822149", "0.6820227", "0.67630136", "0.67538995", "0.6723255", "0.6670742", "0.6637664", "0.661913", "0.65968865", "0.6591179", "0.6587108", "0.6585474", "0.65840435", "0.6567844", "0.6566653"...
0.74421126
1
/ field_group_admin_head() This action is called in the admin_head action on the edit screen where your field is edited. Use this action to add css and javascript to assist your create_field_options() action.
/ field_group_admin_head() Этот действие вызывается в действии admin_head на экране редактирования, где ваше поле редактируется. Используйте это действие для добавления css и javascript, чтобы помочь вашему действию create_field_options().
function field_group_admin_head() { // Note: This function can be removed if not used }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add_field_settings_js() {\n\n\t\t?>\n\n\t\t<script type=\"text/javascript\">\n\t\t\tjQuery( document ).bind( 'gform_load_field_settings', function ( e, field, form ) {\n\t\t\t\tjQuery( '#field_link_type_preview' ).attr( 'checked', 'preview' === field[ 'linkType' ] );\n\t\t\t\tjQuery( '#field_link_t...
[ "0.6811431", "0.6807244", "0.6720582", "0.66676515", "0.65501106", "0.6474873", "0.64467204", "0.64261353", "0.63890094", "0.6377336", "0.6356206", "0.63554317", "0.63296616", "0.6328682", "0.63279647", "0.632404", "0.63097924", "0.630772", "0.630772", "0.630772", "0.630772",...
0.7333128
0
/ load_value() This filter is appied to the $value after it is loaded from the db
/ load_value() Этот фильтр применяется к $value после того, как он загружается из базы данных
function load_value( $value, $post_id, $field ) { // Note: This function can be removed if not used return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function load_value($value, $post_id, $field)\n {\n }", "function load_value($value, $post_id, $field)\n {\n }", "function load_value($value, $post_id, $field)\n {\n }", "function load_value($value, $post_id, $field)\n {\n }", "function load_value($value, $post_id, $field)\n {\n ...
[ "0.7156002", "0.7156002", "0.7156002", "0.7156002", "0.7156002", "0.7156002", "0.7156002", "0.7156002", "0.7103221", "0.64167655", "0.63678163", "0.6346094", "0.6277628", "0.61753404", "0.60785437", "0.60206336", "0.59981525", "0.5952902", "0.5952493", "0.5894871", "0.5882216...
0.7240726
0
/ format_value_for_api() This filter is appied to the $value after it is loaded from the db and before it is passed back to the api functions such as the_field
/ format_value_for_api() Этот фильтр применяется к значению $value после его загрузки из базы данных и перед тем, как оно передается обратно в функции API, такие как the_field
function format_value_for_api( $value, $post_id, $field ) { // defaults? /* $field = array_merge($this->defaults, $field); */ // perhaps use $field['preview_size'] to alter the $value? // Note: This function can be removed if not used return $value; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function format_value( $value, $post_id, $field )\n {\n return json_decode($value);\n }", "function format_value($value, $post_id, $field)\n {\n }", "function format_value($value, $post_id, $field)\n {\n }", "function format_value($value, $post_id, $field)\n {\n }", "function...
[ "0.74483556", "0.7413701", "0.7413701", "0.7413701", "0.7413701", "0.7413701", "0.7413701", "0.7413701", "0.7413701", "0.7413701", "0.7413701", "0.7413701", "0.7413701", "0.7413701", "0.7413701", "0.7413701", "0.7413701", "0.7413701", "0.7413701", "0.7413701", "0.7413701", ...
0.748076
0
Generate csv file with report
Создать файл csv с отчетом
protected function generateReport() { $path = tempnam(sys_get_temp_dir(), 'businesses-with-local-business-type'); $fp = fopen($path, 'w'); $query = "select b.id,b.name,b.phone,b.street_address,b.city,b.state,b.zip,b.country_code,b.website,b.type,b.organisation " . "from business...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function customerReport()\n {\n $invoiceModel = new InvoiceModel();\n $customersReport = $invoiceModel->getAllInvoicesAmounts();\n\n $csvData = [];\n $csvData[] = [\"Company Name\", \"Total Invoiced Amount\", \"Total Amount Paid\", \"Total Amount Outstanding\"];\n if (...
[ "0.7392163", "0.7288668", "0.72620076", "0.72268474", "0.7208132", "0.70878434", "0.70572466", "0.7050757", "0.7017662", "0.700568", "0.69707006", "0.69519377", "0.68795145", "0.68311685", "0.6759627", "0.6736913", "0.67165905", "0.67147446", "0.6714121", "0.6698259", "0.6692...
0.75529945
0
get detail files by id
получить детальные файлы по идентификатору
function get_detail_files_by_id($params) { $sql = "SELECT * FROM fa_files WHERE data_id = ? AND ref_id = ?"; $query = $this->db->query($sql, $params); if ($query->num_rows() > 0) { $result = $query->row_array(); $query->free_result(); return $result; }...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_detail_files_download_by_id($params) {\n $sql = \"SELECT * FROM fa_files WHERE file_id = ?\";\n $query = $this->db->query($sql, $params);\n if ($query->num_rows() > 0) {\n $result = $query->row_array();\n $query->free_result();\n return $result;\n ...
[ "0.8054128", "0.78830075", "0.7305881", "0.7109854", "0.7089456", "0.7037447", "0.7013463", "0.7009564", "0.699269", "0.6960112", "0.69573736", "0.6930196", "0.6902385", "0.68430406", "0.68356043", "0.6807271", "0.67746747", "0.677345", "0.675725", "0.67293", "0.67047656", ...
0.82070214
0
get detail files by id
получить детальные файлы по идентификатору
function get_detail_files_download_by_id($params) { $sql = "SELECT * FROM fa_files WHERE file_id = ?"; $query = $this->db->query($sql, $params); if ($query->num_rows() > 0) { $result = $query->row_array(); $query->free_result(); return $result; } else ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_detail_files_by_id($params) {\n $sql = \"SELECT * FROM fa_files WHERE data_id = ? AND ref_id = ?\";\n $query = $this->db->query($sql, $params);\n if ($query->num_rows() > 0) {\n $result = $query->row_array();\n $query->free_result();\n return $resu...
[ "0.82070214", "0.78830075", "0.7305881", "0.7109854", "0.7089456", "0.7037447", "0.7013463", "0.7009564", "0.699269", "0.6960112", "0.69573736", "0.6930196", "0.6902385", "0.68430406", "0.68356043", "0.6807271", "0.67746747", "0.677345", "0.675725", "0.67293", "0.67047656", ...
0.8054128
1
Fin de O365 MESSAGES MIME Creer un message dans le brouillon d'un utilisateur. Necessite un id utilisateur valide.
Конец O365 MESSAGES MIME Создать сообщение в черновиках пользователя. Требуется действительный идентификатор пользователя.
public function user_message_create() { $this->onDebug ( __METHOD__, 1 ); if ($this->valide_userid () == false) { return $this; } $message_created = $this->getObjetO365Wsclient () ->jsonPostMethod ( '/users/' . $this->getUserId () . '/messages', $this->getEmailContent () ); $this->onDebug ( $message_cre...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function createMessage(){\n $users = $this->User->find('all');\n $this->set('users', $users);\n }", "public function createMailMessage();", "public function messageOwnerAction() {\r\n\r\n //LOGGED IN USER CAN SEND THE MESSAGE\r\n if (!$this->_helper->requireUser()->isV...
[ "0.65436983", "0.6541163", "0.65338695", "0.6487168", "0.6386116", "0.62316006", "0.61906785", "0.61741394", "0.6161116", "0.6106404", "0.60667515", "0.6026", "0.60248435", "0.60231453", "0.5976044", "0.59599084", "0.5909073", "0.590781", "0.58955246", "0.58715516", "0.584557...
0.778933
0
Lists all Equipment models.
Перечисляет все модели оборудования.
public function actionIndex() { $searchModel = new EquipmentSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAll()\n {\n return DB::table('product_models')->get()->all();\n }", "public function index()\n {\n $allEquipment = Equipment::all();\n return view('equipment.index',compact('allEquipment'));\n }", "public function index(EquipmentRequest $request)\n {\n ...
[ "0.6828858", "0.6805831", "0.67395836", "0.6723647", "0.66008335", "0.65727854", "0.6511863", "0.64216214", "0.63412315", "0.6305627", "0.6253171", "0.6253171", "0.625202", "0.62035745", "0.6174994", "0.61424375", "0.6126859", "0.60964054", "0.6038575", "0.60319984", "0.60243...
0.74571466
0
Creates a new Equipment model. If creation is successful, the browser will be redirected to the 'view' page.
Создает новый модель оборудования. Если создание успешно, браузер будет перенаправлен на страницу 'view'.
public function actionCreate() { $model = new Equipment(); if($model->load(Yii::$app->request->post())) { $max_id = Equipment::find()->max('id'); if ($max_id == 0) $max_id = 1; else $max_id += 1; $equipmentImg = UploadedFile::getInstance($model, 'img'); if(!empty($equ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new JetShopDetails();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id]);\n } else {\n return $this->render('create', [\n 'model' => $...
[ "0.7562038", "0.7306679", "0.7244862", "0.7170103", "0.70911306", "0.70900464", "0.7079787", "0.70714325", "0.7062621", "0.70570016", "0.70332277", "0.6995922", "0.6985194", "0.6960135", "0.6959699", "0.6951589", "0.6940769", "0.6931357", "0.6923845", "0.69208443", "0.6916207...
0.78362316
0
Parses an string and return true if only has alfa numeric chars
Парсит строку и возвращает true, если в ней содержатся только альфа-числовые символы
public static function StringAlphaNumeric($string){ if(empty($string)){ return false; } $chars = str_split($string); foreach($chars as $char){ if(!self::StringAlpha($char) && !self::StringNumeric($char)){ return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function isAlpha($string){\n\tif(preg_match(\"/\\d/\", $string)){\n\t\treturn false;\n\t}\n\treturn true;\n}", "static function isAlnum($str) {\n return ctype_alnum($str);\n }", "function verifyAlphaNum ($testString) {\n\t// Check for letters, numbers and dash, period, space and single quote only. \n...
[ "0.7548465", "0.73939335", "0.73201436", "0.7266505", "0.72575784", "0.7214405", "0.7056114", "0.7050746", "0.70399004", "0.6929356", "0.691386", "0.68682545", "0.68354535", "0.681164", "0.68050724", "0.67721266", "0.67447597", "0.6731354", "0.6720604", "0.6708927", "0.670310...
0.7666208
0
Prune old news items from DB.
Удалить старые элементы новостей из БД.
public function prune() { /* * DELETE FROM `NewsItem` * WHERE pubDate <= DATE_SUB(NOW(), INTERVAL $this->_params->itemLifetime MINUTE); */ $where = $this->getAdapter()->quoteInto('pubDate <= DATE_SUB(NOW(), INTERVAL ? MINUTE)', $this->_params->itemLifetime); return ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function cleanupNews() {\n\n $this->_useCategoryDatasource();\n $this->_useItemDatasource();\n\n // Delete old news items\n $this->_externalNewsItemDatasource->prune();\n\n // Identify non-permanent categories that haven't been updated in a while\n $unusedCategories...
[ "0.71532625", "0.693247", "0.64836836", "0.64029765", "0.63272965", "0.6307719", "0.6289915", "0.607099", "0.6043106", "0.60410655", "0.6001381", "0.5901064", "0.58804774", "0.57629883", "0.5757553", "0.57558686", "0.5750344", "0.5712621", "0.5654014", "0.5650838", "0.5608967...
0.7954666
0
Set rules for update validation.
Установите правила для проверки валидации обновления.
public function setUpdateRules() { $this->validationRules['nic'] = $this->validationRules['nic'] . ',' . $this->id; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setRules() {\n }", "public function getUpdateRules()\n {\n return [\n \"id\" => \"required\"\n ];\n }", "public function setValidationRules(array $create, array $update = null)\n {\n $this->createRules = $create;\n if ($update) {\n $...
[ "0.7199507", "0.70042825", "0.6982103", "0.69577605", "0.6911679", "0.6871551", "0.6771121", "0.6730434", "0.669941", "0.6645992", "0.66356057", "0.66056585", "0.6576513", "0.6575477", "0.65378076", "0.65014404", "0.6463618", "0.64522773", "0.64296544", "0.64024913", "0.63951...
0.8106274
0
Count number of widgets in a sidebar Used to add classes to widget areas so widgets can be displayed one, two, three or four per row
Подсчет количества виджетов в боковой панели. Используется для добавления классов к областям виджетов, чтобы можно было отображать виджеты по одному, двум, трем или четырем на строку
function cththemes_slbd_count_widgets( $sidebar_id ) { // If loading from front page, consult $_wp_sidebars_widgets rather than options // to see if wp_convert_widget_settings() has made manipulations in memory. global $_wp_sidebars_widgets; if ( empty( $_wp_sidebars_widgets ) ) : $_wp_sidebars_...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function wp_store_count_widgets( $sidebar_id ) {\r\n\t\t\t// to see if wp_convert_widget_settings() has made manipulations in memory.\r\n\tglobal $_wp_sidebars_widgets;\r\n\tif ( empty( $_wp_sidebars_widgets ) ) :\r\n\t\t$_wp_sidebars_widgets = get_option( 'sidebars_widgets', array() );\r\n\tendif;\r\n\r\n\t$sideb...
[ "0.77959347", "0.71850234", "0.6871597", "0.66961855", "0.66798973", "0.6622279", "0.6598526", "0.6549282", "0.6430429", "0.6254835", "0.6211075", "0.62093425", "0.61650103", "0.60849684", "0.6080054", "0.60164493", "0.600082", "0.5999137", "0.5988457", "0.59875596", "0.59682...
0.8429196
0
END Function Preps the mod row data, puts it into form array for auto gen update form
Функция END готовит данные строки модуля, помещает их в массив формы для автоматической генерации формы обновления
private function mod_prep($row){ $meta = new dbMeta(); $cols = $meta->get_tabel_columns(); // array w/ all metadata $form_array_mod = $meta->buildFormArray($cols); // make to nice form ready // insert the values to the form array for mod form foreach($row as $k => $v) { ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function make_form_row(){\n\t\t$index = $this->col_index;\n\t\t# remove the * at the start of the first line\n\t\t$this->col_data = preg_replace(\"/^\\*/\",\"\",$this->col_data);\n\t\t# split the lines and remove the * from each. The value in each line goes into the array $values\n\t\t$values = preg_split(\"/\\n\\...
[ "0.6823876", "0.6339963", "0.62817436", "0.6256368", "0.6250289", "0.6125277", "0.6111998", "0.6107498", "0.60813814", "0.5975192", "0.5959263", "0.5923005", "0.5922094", "0.5921677", "0.59140825", "0.58855265", "0.5871524", "0.58684546", "0.5862947", "0.58510256", "0.5846374...
0.8176802
0
unjoin the user from a group
выход из группы пользователя
public function unjoin_group($group_id){ // get the current user and unjoin them from the group $user = Auth::guard('api')->user(); $group = Group::findOrFail($id); // if the user belongs to the group, and unjoin the, or else, just return an error if ($user->groups()->where('group_id', $gr...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function detachGroup($group);", "public function removeUserFromGroup(){\n //Gets the id frim the input\n $removeId = $_GET[\"input\"];\n //This model removes the connection record from the table\n $this->individualGroupModel->removeUserFromTheGroup($removeId);\n }", "public functi...
[ "0.67531246", "0.6710938", "0.6675069", "0.6628816", "0.64197546", "0.63204366", "0.63115346", "0.62867576", "0.62813014", "0.62672377", "0.6251678", "0.6222846", "0.6215258", "0.61581665", "0.6134642", "0.61322576", "0.61227643", "0.6113037", "0.6112018", "0.61017025", "0.60...
0.775954
0
Gets boolean format for query string.
Получает формат булева типа для строки запроса.
public function getBooleanFormatForQueryString(): string { return $this->booleanFormatForQueryString; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function format_bool(mixed $input): string\n{\n return $input ? 'true' : 'false';\n}", "public function toBoolean()\n {\n $key = $this->toLowerCase()->str;\n $map = array(\n 'true' => true,\n '1' => true,\n 'on' => true,\n 'yes' => true,\n 'false' => false,\...
[ "0.6526925", "0.63416404", "0.6199504", "0.59843713", "0.5940842", "0.5889357", "0.58595866", "0.585007", "0.5806508", "0.57692975", "0.5756617", "0.57198364", "0.566729", "0.560823", "0.5603701", "0.5582981", "0.55452627", "0.5530854", "0.55052394", "0.54702055", "0.546287",...
0.8708317
0
Returns an array of host settings
Возвращает массив настроек хоста
public function getHostSettings() { return [ [ "url" => "https://my.sevdesk.de/api/v1", "description" => "Our main application instance which most of our customers work with", ], [ "url" => "https://my.pebesmart.ch/api/v1", ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHostSettings()\n {\n return [\n [\n \"url\" => \"https://sellingpartnerapi-na.amazon.com\",\n \"description\" => \"No description provided\",\n ]\n ];\n }", "public function settings_list()\n {\n return [\n ...
[ "0.7934131", "0.7260114", "0.716785", "0.7020232", "0.69411117", "0.6867824", "0.6864104", "0.68428653", "0.67282254", "0.6710449", "0.6691927", "0.6691302", "0.6682551", "0.6667882", "0.66578907", "0.66257626", "0.6624005", "0.6622233", "0.660566", "0.6601853", "0.6583988", ...
0.82998264
0
ADD method to ServerSoap
Добавить метод ADD к ServerSoap
function AddMethod($server){ $server->register('expose', array('data' => 'xsd:string'), array('return' => 'tns:exposeObject'), 'urn:idu', // namespace '', // soapaction '', // style '', // use 'Copyright by ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function AddMethod($server)\n {\n $server->register(\n 'consultarDocumentoPorNumero',\n array('request' => 'tns:GEDOrequest'),\n array('return' => 'tns:DocumentoPorNumeroObjeto'),\n 'urn:idu', // namespace\n '', // soapaction\n ...
[ "0.7219333", "0.6526851", "0.6366218", "0.63479686", "0.6233004", "0.6223143", "0.61883974", "0.61345553", "0.60828125", "0.6082786", "0.6063557", "0.59916466", "0.59916466", "0.598922", "0.5969948", "0.5893567", "0.5849243", "0.5841421", "0.58342314", "0.5816486", "0.5778838...
0.7515965
0
Create a new collection from an array of field definitions
Создайте новую коллекцию из массива определений полей
public static function factory(array $fields) { $collection = new self(); foreach ($fields as $data) { $field = Field::factory($data); $collection->add($field); } return $collection; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function factory(array $fields)\n\t{\n\t\t$collection = new self();\n\t\tforeach ($fields as $fieldData) {\n\t\t\t$field = new Field();\n\t\t\t$field->setProperties($fieldData);\n\t\t\t$collection->add($field);\n\t\t}\n\t\treturn $collection;\n\t}", "public function setInputFields(array $inputField...
[ "0.7430914", "0.68279475", "0.64447767", "0.642132", "0.6366577", "0.6349258", "0.6026248", "0.5989618", "0.593795", "0.5892947", "0.588484", "0.58797944", "0.5876123", "0.5800759", "0.57946306", "0.5783501", "0.57481885", "0.5744176", "0.5705802", "0.5693574", "0.56909794", ...
0.744138
0
Save a referencing decision.
Сохраните решение о ссылке.
public function save($decision) { $this->_loadSources(); $this->_decisionsDatasource->upsertDecision($decision); $this->_decisionCaveatsDatasource->upsertCaveats($decision); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function SaveReference() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->txtName) $this->objReference->Name = $this->txtName->Text;\n\t\t\t\tif ($this->lstReferenceCategory) $this->objReference->ReferenceCategoryId = $this->lstReferenceCategory->SelectedV...
[ "0.65550154", "0.59374225", "0.58371234", "0.58013463", "0.5738903", "0.56483227", "0.56324995", "0.5628832", "0.55948424", "0.5579121", "0.55440056", "0.5455303", "0.5437998", "0.5435014", "0.5435014", "0.5435014", "0.5435014", "0.5435014", "0.5415584", "0.5407882", "0.54007...
0.70556605
0
Returns very Top (root) XForum category.
Возвращает очень верхний (корневой) раздел XForum.
public function getXForumCategory() { $cat = get_category_by_slug(FORUM_CATEGORY_SLUG); /** * If there is no 'k-forum' post PostType category, then it do the defaults. */ if ( empty($cat) ) { forum()->doDefaults(); $cat = get_category_by_slug(FORUM_C...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function getTopCategories() {\n global $lC_Database, $lC_Language;\n \n $Qcategories = $lC_Database->query('select c.categories_id, cd.categories_name, c.categories_link_target, c.categories_custom_url, c.categories_mode from :table_categories c, :table_categories_description cd where c.pare...
[ "0.68033344", "0.6769883", "0.6709768", "0.6648723", "0.65083086", "0.648611", "0.64591783", "0.6442558", "0.638974", "0.6310108", "0.6301101", "0.62896174", "0.6213873", "0.6194511", "0.6190431", "0.6189095", "0.6188751", "0.6183719", "0.6178602", "0.61725944", "0.6157825", ...
0.76055974
0
Returns the URL of forum submit with the $method. The returned URL will will call the method.
Возвращает URL форума для отправки с помощью $method. Возвращаемый URL вызовет этот метод.
public function urlForumDo($method) { return home_url("?do=$method"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_submitLink() {\n\treturn BASE . 'discussion' . DS . 'submit';\n}", "public function getFormAction()\n {\n return $this->getUrl('faq/index/email');\n }", "public function getSubmitUrl()\n {\n \treturn $this->getUrl('Purchase/Misc/Savepayment');\n }", "public function getForu...
[ "0.687747", "0.65720284", "0.652237", "0.6279352", "0.6265236", "0.6239996", "0.61212295", "0.6055896", "0.60533196", "0.5999074", "0.59192175", "0.5903141", "0.5898316", "0.5835221", "0.58136916", "0.57755435", "0.57751495", "0.57359886", "0.56829095", "0.56520724", "0.56519...
0.7525148
0
This method posts or edits a post.
Этот метод публикует или редактирует пост.
public function post_edit_submit() { $slug = in('slug'); // forum id ( slug ). It is only available on creating a new post. $post_ID = in('post_ID'); // post id. it is only available on updating a post. $title = in('title'); $content = in('content'); if ( empty( $slug ) && empt...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionUpdate()\n {\n\t$this->layout='wide';\n $post=$this->loadPost();\n $post->content=($post->contentbig)?$post->contentbig:$post->contentshort;\n\n if(isset($_POST['Post']))\n {\n $post->attributes=$_POST['Post'];\n if(isset($_POST['previewPos...
[ "0.7295589", "0.7246553", "0.7195797", "0.7195559", "0.71790546", "0.71488935", "0.7137384", "0.7118048", "0.70476604", "0.7041713", "0.69792134", "0.696932", "0.6960883", "0.6951288", "0.69370055", "0.69327873", "0.6823118", "0.68072605", "0.6785875", "0.67712724", "0.676487...
0.7331273
0
Exports posts and its related data as JSON string.
Экспортирует посты и связанные с ними данные в виде строки JSON.
public function export( ) { $slug = in( 'slug' ); $category = get_category_by_slug( $slug ); $term_id = $category->term_id; $posts = get_posts([ 'cat' => $term_id, 'posts_per_page' => -1, ] ); $_posts = []; foreach ( $posts ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function export() {\n\t\t// Are we allowed to do this?\n\t\tif (!$this->mojo->auth->is_admin()) {\n\t\t\tdie('Unauthorised access!');\n\t\t}\n\t\t\n\t\t// Get all the posts\n\t\t$blogs = $this->mojo->blog_model->select(\"DISTINCT(blog)\")->get();\n\t\t$posts = array();\n\t\t\n\t\tforeach ($blogs as $blog) {...
[ "0.69385934", "0.6788145", "0.6255104", "0.62550086", "0.62214553", "0.6208269", "0.6008894", "0.58944213", "0.58909273", "0.5881834", "0.57640606", "0.56844795", "0.5638765", "0.5610217", "0.56088024", "0.5606658", "0.5602701", "0.5594604", "0.5590104", "0.55606836", "0.5549...
0.77708936
0
Creates / Updates a forum.
Создает / Обновляет форум.
public function forum_create() { if ( ! in('slug') ) ferror(-50020, 'category_nicename(Forum ID) is not provided'); if ( ! in('category_description') ) wp_send_json_error(['code'=>-50021,'message'=>'category_description is not provided']); if ( ! in('cat_name') ) wp_send_json_error(['code'=>-50...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function postCreateForum()\n {\n $rules = array(\n 'title' => 'required|max:32',\n 'description' => 'max:255',\n );\n\n // Create a new validator instance from our validation rules\n $validator = Validator::make(Input::all(), $rules);\n\n // ...
[ "0.66695017", "0.66648513", "0.6538178", "0.64930624", "0.6459186", "0.63928473", "0.6383875", "0.6259317", "0.62410384", "0.6233754", "0.6213889", "0.6131282", "0.6065548", "0.6063267", "0.60606134", "0.59987324", "0.5997488", "0.59823763", "0.5977316", "0.59483564", "0.5909...
0.72438675
0
Echoes URL of post edit.
URL редактирования поста.
public function urlEdit( $post_ID ) { echo $this->getUrlEdit( $post_ID ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getUrlEditPost(){\n\t\t\n\t\t$this->validateInited();\n\t\t\n\t\t$urlEdit = get_edit_post_link($this->id);\n\t\t\n\t\treturn($urlEdit);\n\t}", "public function getEditPostAction()\n {\n return $this->getUrl('myblog/myblog/editpost');\n }", "public function get_edit_url() {\n\t\tret...
[ "0.8208502", "0.80862385", "0.7801969", "0.77878857", "0.77675354", "0.7703493", "0.7672302", "0.7528696", "0.75182223", "0.7484058", "0.7403023", "0.73690814", "0.73667794", "0.7242518", "0.71966475", "0.71130913", "0.7111176", "0.708055", "0.70673966", "0.70666456", "0.7066...
0.82668376
0
Loads all meta configuration of the forum into $this>category>config
Загружает всю мета-конфигурацию форума в $this>category>config
private function loadConfig() { $this->category->config = []; $this->loadMeta('admins', 'array'); $this->loadMeta('members', 'array'); $this->loadMeta('template'); $this->loadMeta('category', 'array'); //$this->loadMetaCategory(); $this->loadInitScript(); ...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function load() {\n\t\t$statement = $this -> db -> query(\"SELECT * FROM \" . FORUM_DB . \".forum_settings\");\n\t\twhile($settingData = $statement -> fetch(PDO::FETCH_ASSOC)) {\n\t\t\t$this -> settings[$settingData['key']] = new ForumSetting($settingData['key'], $settingData['value']);\n\t\t}\n\t}", "pri...
[ "0.66095877", "0.6328964", "0.6316189", "0.60510266", "0.59908235", "0.5953802", "0.5903277", "0.5810754", "0.58047605", "0.5769213", "0.57691574", "0.57649374", "0.5759934", "0.5749833", "0.5714051", "0.5699147", "0.5650449", "0.56268615", "0.561877", "0.5598229", "0.5591251...
0.78386766
0
Check user session id and response through json string.
Проверьте идентификатор сеанса пользователя и ответ через строку JSON.
public function user_check_session_id() { if ( user()->check_session_id( in('session_id') ) ) wp_send_json_success(); else wp_send_json_error(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function getSID($username, $password){\n\theader(\"Content-type: application/json\");\n\tif(validate_user($username, $password)){\n\t\tsession_start();\n\t\t//maybe roll getPersonID into validator to \n\t\t//get rid of a db access\n \t$_SESSION[\"personID\"] = getPersonID($username);//primary identifier\n \t...
[ "0.6469763", "0.6468471", "0.63374114", "0.6203675", "0.61779404", "0.6142953", "0.6142495", "0.6078897", "0.6075338", "0.60270315", "0.6012334", "0.60077065", "0.59978", "0.5942617", "0.5871315", "0.5857912", "0.5849761", "0.58457243", "0.58432794", "0.58240426", "0.5761381"...
0.7274886
0
this function handles triggering the after Saving Logic of custom elements after each entry is written to the database values are the element handle>data value pairs that were written to the database entry_id is the entry id that was just written to the database
этот функция обрабатывает запуск логики после сохранения элементов пользовательских элементов после каждого записи в базу данных значения — это пары имен элементов>значений данных, которые были записаны в базу данных entry_id — это идентификатор записи, которая была только что записана в базу данных
function afterSavingLogic($values,$entry_id) { if(isset($GLOBALS['formulize_afterSavingLogicRequired'])) { // elements must declare at the prepDataForWrite stage if they have after saving logic required foreach($GLOBALS['formulize_afterSavingLogicRequired'] as $elementId=>$thisAfterSavingRequestType) { $elementTy...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function post_save($data) {\n\n\t\t// Empty save result\n\t\tif (!$data) {\n\t\t\treturn $data;\n\t\t}\n\n\t\t// Fetch elements\n\t\t$this->_load_elements_lib();\n\t\t$content_elements = $this->EE->elements->fetch_avaiable_elements($this->get_vars2export());\n\n\t\t// Current settings\n\t\tif (!is_array($da...
[ "0.70039207", "0.67160165", "0.6441831", "0.6388285", "0.6253892", "0.6244427", "0.62387973", "0.6214965", "0.62082624", "0.6196686", "0.6191727", "0.6110036", "0.61095524", "0.60944563", "0.60800403", "0.6074963", "0.6063351", "0.60607296", "0.60181546", "0.5971358", "0.5968...
0.737987
0
this function tries to get an integer from a string. if there is no integer then the empty string is returned
этот функция пытается получить целое число из строки. если целое число отсутствует, возвращается пустая строка
public static function getInt( $str ) { return preg_match('/^[0-9]+$/',$str) ? $str : ''; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function get($string)\n\t{\n\t\tif(empty($string))\n\t\t{\n\t\t\t$string = 1;\n\t\t}\n\t\telseif(ctype_digit($string))\n\t\t{\n\t\t\t$string = intval($string);\n\t\t}\n\t\t// Pour tous les autres types\n\t\telse\n\t\t{\n\t\t\t$string = 1;\n\t\t}\n\t\treturn $string;\n\t}", "function getnum($str){\n...
[ "0.7367748", "0.7099639", "0.70415235", "0.69264805", "0.6924494", "0.6856458", "0.6736077", "0.66331834", "0.66078216", "0.6607328", "0.6605179", "0.6446761", "0.64049304", "0.6359787", "0.63238245", "0.6313422", "0.63025504", "0.6246321", "0.61715835", "0.6020676", "0.60098...
0.76410663
0
Get the value of cod_especial
Получить значение cod_especial
public function getCod_especial() { return $this->cod_especial; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCod_especialidad()\n {\n return $this->cod_especialidad;\n }", "public function getCode()\n {\n return $this->values[\"code\"];\n }", "public function GetCode () \r\n\t{\r\n\t\treturn ($Code);\r\n\t}", "public function getCode()\n {\n return $this->getVa...
[ "0.7358844", "0.7027473", "0.6974284", "0.6917835", "0.69120693", "0.69071835", "0.6890393", "0.68850964", "0.684484", "0.6842165", "0.68409175", "0.6807934", "0.67604023", "0.6756908", "0.67487305", "0.67442834", "0.67139345", "0.670744", "0.670744", "0.670744", "0.670744", ...
0.81488824
0
Get the value of nombre_usuario
Получить значение nombre_usuario
public function getNombre_usuario() { return $this->nombre_usuario; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNombreUsuario()\n {\n return $this->nombreUsuario;\n }", "public function getNomUsuario() {\n return $this->nomUsuario;\n }", "function getNombre(){\n //Creamos la consulta\n $sql = \"SELECT nombre FROM usuarios WHERE id_usuario = \".$this->id_user.\";\";...
[ "0.79267365", "0.7873148", "0.7872373", "0.78348213", "0.77926457", "0.76989144", "0.7673521", "0.7664134", "0.7652616", "0.7420884", "0.7364284", "0.7342689", "0.7247465", "0.7213584", "0.71873766", "0.71763164", "0.71043384", "0.69513845", "0.69468576", "0.6924719", "0.6913...
0.81272006
0
Get the value of verificacion
Получить значение верификации
public function getVerificacion() { return $this->verificacion; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function veriCode() {}", "public function getVervangt() {\n\t\treturn $this->vervangt;\n\t}", "public function getVotacion() {\n return $this->votacion;\n }", "public function getVerify()\n {\n return $this->data['fields']['verify'];\n }", "public function getVerificationCode(...
[ "0.6873466", "0.6683543", "0.6453401", "0.6416653", "0.6316254", "0.6253118", "0.62474674", "0.62405366", "0.62024426", "0.6202133", "0.61991185", "0.6192896", "0.61911637", "0.61467487", "0.6141982", "0.6137031", "0.6069059", "0.606105", "0.6057888", "0.5978299", "0.59728545...
0.7924857
0
Get the value of correo_usuario
Получить значение correo_usuario
public function getCorreo_usuario() { return $this->correo_usuario; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getCorreoUsuario(){\n return $this->correoUsuario;\n }", "public function getCuentaUsuario(){\n return $this->cuentaUsuario;\n }", "private function consultar_usuario_por_correo() {\n $sentencia = \"select id,nombrecompleto ,correo,token \"\n . \"from usuar...
[ "0.81673765", "0.758327", "0.7446469", "0.7428011", "0.72392154", "0.7216861", "0.7216861", "0.71784407", "0.7109925", "0.7055152", "0.7054354", "0.7053", "0.70455575", "0.7016026", "0.7016026", "0.7016026", "0.7016026", "0.6951447", "0.69073796", "0.689068", "0.6884833", "...
0.8421653
0
Get the value of tipo_usuario
Получить значение tipo_usuario
public function getTipo_usuario() { return $this->tipo_usuario; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTipoUsuario_idtipoUsuario(){\n return $this->tipoUsuario_idtipoUsuario;\n }", "public function buscarTipoUsuario($tipo)\n {\n $tipouser = \"\";\n switch ($tipo) {\n case 0;\n $tipouser = 'Administrador';\n break;\n case...
[ "0.78496855", "0.7687344", "0.7556056", "0.71166736", "0.6952777", "0.6933082", "0.6874805", "0.68255514", "0.68049866", "0.6799425", "0.6799425", "0.66611737", "0.6642333", "0.66371673", "0.6611789", "0.65676755", "0.6561256", "0.6528016", "0.6505915", "0.6505915", "0.650591...
0.82996285
0
Returns the locales that the site is translated for.
Возвращает локали, для которых переведен сайт.
public function getSiteLocales(): array { Craft::$app->getDeprecator()->log('craft.i18n.getSiteLocales()', 'craft.i18n.getSiteLocales() has been deprecated. Use craft.app.i18n.siteLocales instead.'); return Craft::$app->getI18n()->getSiteLocales(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function getLocales()\n {\n return Strata::i18n()->getLocales();\n }", "public function getLocales()\n {\n return $this->locales;\n }", "function getLocales() {\n\t\t\treturn $this->locales;\n\t\t}", "public function getLocales()\n {\n return $this->_locales;\n ...
[ "0.7957919", "0.7864785", "0.78460264", "0.78248495", "0.7756137", "0.7592798", "0.7587583", "0.7469934", "0.7430225", "0.7295765", "0.7283346", "0.7273673", "0.7271963", "0.72214544", "0.7211074", "0.71416354", "0.71388006", "0.71349496", "0.7119484", "0.70663065", "0.703300...
0.79988754
0
Returns an array of the site locale IDs.
Возвращает массив идентификаторов локалей сайта.
public function getSiteLocaleIds(): array { Craft::$app->getDeprecator()->log('craft.i18n.getSiteLocaleIds()', 'craft.i18n.getSiteLocaleIds() has been deprecated. Use craft.app.i18n.siteLocaleIds instead.'); return Craft::$app->getI18n()->getSiteLocaleIds(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSiteLocales(): array\n {\n Craft::$app->getDeprecator()->log('craft.i18n.getSiteLocales()', 'craft.i18n.getSiteLocales() has been deprecated. Use craft.app.i18n.siteLocales instead.');\n\n return Craft::$app->getI18n()->getSiteLocales();\n }", "protected function getLocales...
[ "0.7541743", "0.7002251", "0.69455224", "0.6905986", "0.6794422", "0.6692481", "0.6607893", "0.6544383", "0.6512301", "0.647509", "0.64472336", "0.6400312", "0.6348221", "0.6340782", "0.6320294", "0.63074017", "0.62973243", "0.6262392", "0.62562346", "0.6230139", "0.6212113",...
0.8679728
0
Returns the site's primary locale.
Возвращает основной язык сайта.
public function getPrimarySiteLocale(): string { Craft::$app->getDeprecator()->log('craft.i18n.getPrimarySiteLocale()', 'craft.i18n.getPrimarySiteLocale() has been deprecated. Use craft.app.i18n.primarySiteLocale instead.'); return Craft::$app->getI18n()->getPrimarySiteLocale(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMainLocale(): string\n {\n return $this->mainLocale;\n }", "public function getPrimaryLanguage() : string {\n return $this->configVars['site']['primary-lang'];\n }", "static function getLocale() {\n\t\treturn self::getRegistry()->get(self::REGISTRY_LOCALE);\n\t}", "p...
[ "0.80358374", "0.7916025", "0.7592086", "0.757352", "0.75297827", "0.7512538", "0.74866605", "0.74674094", "0.74483615", "0.7409268", "0.7400775", "0.73790145", "0.7355146", "0.73537564", "0.7350097", "0.7350097", "0.7309631", "0.72875315", "0.7264067", "0.7242271", "0.723431...
0.8600232
0
Returns a list of locales that are editable by the current user.
Возвращает список языковых вариантов, которые могут редактировать текущий пользователь.
public function getEditableLocales(): array { Craft::$app->getDeprecator()->log('craft.i18n.getEditableLocales()', 'craft.i18n.getEditableLocales() has been deprecated. Use craft.app.i18n.editableLocales instead.'); return Craft::$app->getI18n()->getEditableLocales(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function erp_get_editable_roles (){\n if(! function_exists('get_editable_roles')){\n require_once(ABSPATH . 'wp-admin/includes/user.php');\n }\n $wp_roles = get_editable_roles();\n\n if( !current_user_can( 'administrator' ) ){\n unset( $wp_roles['administrator'] );\n }\n\n $roles =...
[ "0.67457235", "0.66313916", "0.64668614", "0.64076567", "0.63863117", "0.6359436", "0.62147367", "0.61373645", "0.6133536", "0.6052687", "0.60287416", "0.6004101", "0.5993634", "0.5963595", "0.59312606", "0.5896736", "0.5895148", "0.58935565", "0.58728933", "0.5870956", "0.58...
0.7411797
0
Returns an array of the editable locale IDs.
Возвращает массив идентификаторов редактируемых языковых настроек.
public function getEditableLocaleIds(): array { Craft::$app->getDeprecator()->log('craft.i18n.getEditableLocaleIds()', 'craft.i18n.getEditableLocaleIds() has been deprecated. Use craft.app.i18n.editableLocaleIds instead.'); return Craft::$app->getI18n()->getEditableLocaleIds(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getEditableLocales(): array\n {\n Craft::$app->getDeprecator()->log('craft.i18n.getEditableLocales()', 'craft.i18n.getEditableLocales() has been deprecated. Use craft.app.i18n.editableLocales instead.');\n\n return Craft::$app->getI18n()->getEditableLocales();\n }", "public fu...
[ "0.7442028", "0.6702291", "0.66806644", "0.64226454", "0.6202526", "0.61722195", "0.60558766", "0.60422534", "0.60422534", "0.60285556", "0.60169816", "0.60037035", "0.59432286", "0.5933102", "0.58998805", "0.58998805", "0.5895337", "0.58714014", "0.58547115", "0.58198166", "...
0.8780827
0
Returns the jQuery UI Datepicker date format, per the current locale.
Возвращает формат даты jQuery UI Datepicker в соответствии с текущим локалем.
public function getDatepickerJsFormat(): string { Craft::$app->getDeprecator()->log('craft.i18n.getDatepickerJsFormat()', 'craft.i18n.getDatepickerJsFormat() has been deprecated. Use craft.app.locale.getDateFormat(\'short\', \'jui\') instead.'); return Craft::$app->getLocale()->getDateFormat(Locale...
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDateFormat()\n {\n return $this->_localeDate->getDateFormat(\\IntlDateFormatter::SHORT);\n }", "public function getDateFormat()\n {\n return $this->_localeDate->getDateFormat(\\IntlDateFormatter::SHORT);\n }", "public function getDatePickerFormat(string $locale): st...
[ "0.71371436", "0.71371436", "0.6959964", "0.69430596", "0.68652314", "0.68576604", "0.6850539", "0.6845864", "0.67858315", "0.67467004", "0.65481436", "0.6494821", "0.6326057", "0.63249797", "0.6292392", "0.62767124", "0.62767124", "0.62767124", "0.62485033", "0.62193614", "0...
0.7304618
0
A menu has many menu links.
Меню содержит множество ссылок на меню.
public function menuLinks() { return $this->hasMany('MenuLink', 'menu_id'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getMenus() {}", "public function getLinksForMenu() : array\n {\n return $this->db->query(\"SELECT page_title, page_link FROM pages\");\n }", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected function generateMenu() {}", "protected func...
[ "0.7090081", "0.6764821", "0.6735322", "0.6735322", "0.6735322", "0.6735322", "0.6735322", "0.6735322", "0.6705172", "0.6669744", "0.6660835", "0.6654269", "0.6646968", "0.66250455", "0.6623002", "0.66157174", "0.66116124", "0.66114026", "0.6601388", "0.65979517", "0.6575778"...
0.76156765
0
Get the value of nome_ano
Получить значение nome_ano
public function getNome_ano() { return $this->nome_ano; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getAno()\n {\n return $this->ano;\n }", "public function getAno():int{\n\t\treturn $this->ano;\n\t}", "public function getNom();", "public function getNomOpe()\n {\n return $this->nomOpe;\n }", "public function recuperaNome(){\n $nome = \"\";\n if(iss...
[ "0.7403665", "0.6803577", "0.6629721", "0.6618109", "0.6598568", "0.6598231", "0.6568673", "0.65670705", "0.65403324", "0.65296906", "0.65296906", "0.6506665", "0.65020376", "0.6500555", "0.64894646", "0.64648503", "0.64648503", "0.64648503", "0.6463033", "0.6461035", "0.6446...
0.8416851
0
Set the value of nome_ano
Задайте значение nome_ano
public function setNome_ano($nome_ano) { if (!empty($nome_ano) && !is_null($nome_ano)) $this->nome_ano = $nome_ano; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setAno($ano)\n {\n $this->ano = $ano;\n }", "public function set_nome($nome) : void\n {\n try {\n $this->obj_contato_anunciante->set_nome(Validador::Contato_Anunciante()::validar_nome($nome));\n } catch (Exception $e) {\n $th...
[ "0.77402675", "0.73061913", "0.72373205", "0.7097147", "0.69216734", "0.68425536", "0.68299216", "0.68174076", "0.6795047", "0.6779692", "0.6699893", "0.6644315", "0.64625955", "0.6312593", "0.62574", "0.62162393", "0.61704665", "0.6165062", "0.61505014", "0.6119544", "0.6091...
0.80939156
0