query
stringlengths
9
43.3k
document
stringlengths
17
1.17M
metadata
dict
negatives
sequencelengths
0
30
negative_scores
sequencelengths
0
30
document_score
stringlengths
5
10
document_rank
stringclasses
2 values
Test case for cloudPosCheckBumpCourseOnCheck .
public function testCloudPosCheckBumpCourseOnCheck() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCloudPosCheckUpdateCourse()\n {\n }", "public function testCloudPosCheckUpdateCoursesInCheck()\n {\n }", "public function testCloudPosCheckAddCourseToCheck()\n {\n }", "public function testCloudPosCheckBumpCheck()\n {\n }", "public function testCloudPosCheckUpdateItemInCourse()\n {\n }", "public function testCloudPosCheckFastTrackCourse()\n {\n }", "public function testCloudPosCheckCancelCourseInCheck()\n {\n }", "public function testCloudPosCheckFastTrackItemInCourse()\n {\n }", "public function testCloudPosCheckAddPaymentStateToCourse()\n {\n }", "public function testCloudPosCheckAddItemsToCourse()\n {\n }", "public function testCloudPosCheckDeleteCourseFromCheck()\n {\n }", "public function testCloudPosCheckCancelAllCoursesInCheck()\n {\n }", "public function testCloudPosCheckUpdateCheck()\n {\n }", "public function testCloudPosCheckCancelItemInCourse()\n {\n }", "public function testCloudPosCheckAddCheck()\n {\n }", "public function testCloudPosCheckGetCheckByCheckNumber()\n {\n }", "public function testCloudPosCheckAddPaymentStatesToCheck()\n {\n }", "public function testCloudPosCheckFastTrackCheck()\n {\n }", "public function updateCourseStatus( )\n {\n //\n }", "public function test_elis_createorupdate_updates_course() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Create the test course.\n $course = new course(array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'syllabus' => '',\n 'credits' => '0'\n ));\n $course->save();\n\n // Run the course create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'course';\n $record->idnumber = 'testcourseidnumber';\n $record->credits = '5';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('course', $record, 'bogus');\n\n // Validation.\n $this->assertTrue($DB->record_exists(course::TABLE, array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'credits' => 5\n )));\n }", "public function testKycChecksPut()\n {\n }", "public function testGameStatusPointsBelow100()\n {\n $game = new Game();\n $res = $game->checkGameStatus();\n $exp = false;\n $this->assertEquals($exp, $res);\n }", "public function testCloudPosCheckDeleteCheck()\n {\n }", "public function testKycChecksPost()\n {\n }", "private function bump_step()\n {\n }", "public function testVoucherChangeStatus()\n {\n }", "public function test_cla_rollover_pre_process() {\n global $CFG, $DB;\n\n $this->resetAfterTest();\n $this->setAdminUser();\n\n // Create a course.\n $course1 = \\local_connect\\course::get($this->generate_course());\n $course1->create_in_moodle();\n $course1 = $DB->get_record('course', array('id' => $course1->mid));\n $module1 = $this->getDataGenerator()->create_module('cla', array('course' => $course1));\n\n $course2 = \\local_connect\\course::get($this->generate_course());\n $course2->create_in_moodle();\n $course2 = $DB->get_record('course', array('id' => $course2->mid));\n\n // Sanity checks.\n $this->assertEquals(1, $DB->count_records('cla', array(\n 'course' => $course1->id\n )));\n\n $this->assertEquals(1, $DB->count_records('cla_note'));\n\n $this->assertEquals(0, $DB->get_field('cla', 'rolled_over', array(\n 'course' => $course1->id\n )));\n\n $this->assertEquals(0, $DB->get_field('cla', 'rolled_over_inactive', array(\n 'course' => $course1->id\n )));\n\n // Do the rollover.\n \\local_rollover\\Rollover::schedule($CFG->kent->distribution, $course1->id, $course2->id);\n $this->rollover(1);\n\n // The test!\n $this->assertEquals(1, $DB->count_records('course_modules', array(\n 'course' => $course2->id\n )));\n\n $this->assertEquals(1, $DB->count_records('cla', array(\n 'course' => $course2->id\n )));\n\n // Also, it should have added a note, as well as rolling over the previous note.\n $this->assertEquals(3, $DB->count_records('cla_note'));\n }", "private function transitionCourseCheck()\n {\n if ($this->userContext->getPrimarySerialNumber()->hasTransitionCourse()) {\n $code = $this->_getParam(\"code\");\n if ($code) {\n $link = \"/account/new/index/code/$code\";\n $errorMsg = \"That activation code cannot be used with a Transition Course account, but you can use it \".\n \"to <a href='$link'>create a new account</a>.\";\n } else {\n $link = \"/account/new\";\n $errorMsg = \"Transition Course accounts cannot be upgraded, but you can \".\n \"<a href='$link'>create a new account</a>.\";\n }\n $this->displayError($errorMsg);\n return;\n }\n }", "function testTeamUpdate() {\n //========================================= \n \n // To verify update Parlay Team is valid\n //========================================= \n }", "public function testGameStatusPointsPlayer1Over100()\n {\n $game = new Game(101, 0);\n $res = $game->checkGameStatus();\n $exp = true;\n $this->assertEquals($exp, $res);\n }" ]
[ "0.80362284", "0.78334", "0.763836", "0.7604231", "0.7590451", "0.7534633", "0.7459696", "0.7365833", "0.72107804", "0.71562696", "0.70287085", "0.7021344", "0.68727297", "0.68651485", "0.67661035", "0.6403339", "0.6380598", "0.6144567", "0.58732665", "0.563632", "0.563427", "0.5610675", "0.5573454", "0.55543095", "0.54652965", "0.5394322", "0.53739136", "0.53703773", "0.5369988", "0.53537434" ]
0.9214776
0
Test case for cloudPosCheckCancelAllCoursesInCheck .
public function testCloudPosCheckCancelAllCoursesInCheck() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCloudPosCheckCancelCourseInCheck()\n {\n }", "public function testCloudPosCheckCancelItemInCourse()\n {\n }", "public function testCloudPosCheckUpdateCoursesInCheck()\n {\n }", "public function testCloudPosCheckDeleteCourseFromCheck()\n {\n }", "public function testCloudPosCheckAddCourseToCheck()\n {\n }", "public function testCloudPosCheckUpdateCourse()\n {\n }", "public function testCloudPosCheckBumpCourseOnCheck()\n {\n }", "public function testCloudPosCheckAddPaymentStateToCourse()\n {\n }", "public function testCloudPosCheckAddItemsToCourse()\n {\n }", "public function testCloudPosCheckUpdateItemInCourse()\n {\n }", "public function testCancelAllDunningPending()\n {\n }", "public function testCloudPosCheckFastTrackItemInCourse()\n {\n }", "public function testCloudPosCheckFastTrackCourse()\n {\n }", "function hasCancelledCourses(){\n\t\t\treturn count($this->cancelledCourses) > 0;\t\t\t\n\t\t}", "public function testCancelCharge()\n {\n }", "public function cancelWithoutChecks(): void {\n\t\t$this->cancelled = true;\n\t}", "public function testGetAllCourses() {\n $courses = getAllCourses();\n $this->assertNotEmpty($courses);\n }", "public function testCancelTransaction()\n {\n }", "public function testCancelSettleLater()\n {\n }", "public function testCancelInvoice()\n {\n }", "public function testV1walletwithdrawcancelled()\n {\n\n }", "public function testPostingAPIGetPostingCrossborderCancelReasonList()\n {\n\n }", "public function getCancelContestAction(){\n \n $objContestModel = Application_Model_Contests::getInstance();\n $objUserLineupModel = Application_Model_UserLineup::getInstance();\n $objUserAccountModel = Application_Model_UserAccount::getInstance();\n $objUserTransactionsModel = Application_Model_UserTransactions::getInstance();\n $objNotificationModel = Application_Model_Notification::getInstance();\n $objContestTransactionModel = Application_Model_ContestTransactions::getInstance();\n $currTime = date('Y.m.d H:i:s');\n \n if($this->getRequest()->isPost()){\n \n $contestIds = array();\n $cancelContestIds = array();\n \n $contestIds = $this->getRequest()->getParam('conId');\n \n if(!empty($contestIds)){\n \n foreach($contestIds as $ckey=>$cval){\n \n $response = $objContestModel->getContestsById($cval);\n \n if($response){ \n \n if(isset($response['play_limit']) && $response['play_limit'] != 0){ // check entry limit is unlimited\n \n if(isset($response['start_time']) && date('Y.m.d H:i:s' ,strtotime($response['start_time'])) <= $currTime /* && $response['start_time'] >= $subTime */){ //cancel contest just before 5 minutes of start time\n \n if($response['total_entry'] < $response['play_limit']){ //echo $response['total_entry'].\"--\".$response['play_limit'].\"--\".$response['contest_id'].\"--\".$response['start_time'].\"-start-\".$currTime; die;\n \n if(isset($response['con_type_id']) && $response['con_type_id'] != 1){ // check contest is gauranteed(gauranteed contest can not be cancelled)\n \n $objContestModel->updateCancelContestStatus($response['contest_id']); \n \n $lineupResponse = $objUserLineupModel->getLineupsByContestId($response['contest_id']);\n \n if(isset($lineupResponse) && !empty($lineupResponse)){ \n \n foreach($lineupResponse as $lkey=>$lvalue){\n \n if(isset($response['entry_fee']) && $response['entry_fee'] != \"\" && isset($lvalue['created_by']) && $lvalue['created_by'] != \"\"){\n// \n $amtRefund = $response['entry_fee'] - $lvalue['bonus']; \n \n $objUserAccountModel->updateBalance($lvalue['created_by'],$amtRefund);\n $objUserAccountModel->addUserBonusAmount($lvalue['created_by'],$lvalue['bonus']);\n \n if(isset($amtRefund) && $amtRefund > 0){\n \n $transactions['user_id'] = $lvalue['created_by'];\n $transactions['transaction_type'] = 'Refund';\n $transactions['transaction_amount'] = $amtRefund;\n $transactions['confirmation_code'] = 'N/A';\n $transactions['description'] = 'Amount credit';\n $transactions['status'] = '1';\n $transactions['request_type'] = '4'; \n $transactions['transaction_date'] = date('Y-m-d');\n\n $transactionId = $objUserTransactionsModel->insertUseTransactions($transactions); //enter transaction to user transaction table\n \n if(isset($transactionId)){\n //changes for contest details in transaction history (vivek 3rdOct15)\n $contestTxData['transaction_id'] = $transactionId;\n $contestTxData['contest_id'] = $response['contest_id'];\n $contestTxData['user_id'] = $lvalue['created_by'];\n\n \n $objContestTransactionModel->insertConTransaction($contestTxData);\n //end\n }\n } //send notification to the entered user about contest cancellation\n \n $notifyData = array();\n $notifyData['send_to'] = $lvalue['created_by'];\n $notifyData['sent_on'] = date('Y-m-d H:i:s');\n $notifyData['message'] = 'Your contest has been cancelled !'.$response['contest_name'].\"( \".$response['start_time'].\" ) & Entry fee ($ \".$response['entry_fee'].\") is refunded in your account\";\n $objNotificationModel->insertNotification($notifyData);\n }\n }\n }\n array_push($cancelContestIds, $response['contest_id']);\n }\n// array_push($cancelContestIds, $response['contest_id']);\n }\n }\n }\n }\n }\n }\n if(!empty($cancelContestIds)){\n echo json_encode($cancelContestIds);\n }else{\n echo \"0\";\n }\n }\n }", "public function testCloudPosCheckAddPaymentStatesToCheck()\n {\n }", "protected function cancel(){\n $temp = explode(',', $_POST['cancel']);\n $caseProgress = Case_ProgressModel::model()->findOne('id = ' . $temp[0]);\n TransitionModel::model()->returnTokens($temp[1], $temp[2], $caseProgress->id);\n $caseProgress->delete();\n header('Location:' . ENTRY_SCRIPT_URL . 'task/listAll', TRUE, 301);\n }", "private function checkForCancellingRunningTransaction(){\n\t\tif ($this->isCreationOfPendingOrderActive() && self::$cancellingCheckIsRunning === false) {\n\t\t\tself::$cancellingCheckIsRunning = true;\n\t\t\t$controller = strtolower(Tools::getValue('controller'));\n\t\t\tif (($controller == 'order' || $controller == 'orderopc') && isset($this->context->cart) && !Configuration::get('PS_CATALOG_MODE') &&\n\t\t\t\t\t !$this->context->cart->checkQuantities()) {\n\t\t\t\t$originalCartId = $this->context->cart->id;\n\t\t\t\tBarclaycardCw_Util::getDriver()->beginTransaction();\n\t\t\t\t$cancelledTransactions = 0;\n\t\t\t\ttry {\n\t\t\t\t\t$transactions = BarclaycardCw_Entity_Transaction::getTransactionsByOriginalCartId($originalCartId, false);\n\t\t\t\t\tforeach ($transactions as $transaction) {\n\t\t\t\t\t\tif ($transaction->getAuthorizationStatus() == Customweb_Payment_Authorization_ITransaction::AUTHORIZATION_STATUS_PENDING) {\n\t\t\t\t\t\t\t$transaction->forceTransactionFailing();\n\t\t\t\t\t\t\t$cancelledTransactions++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tBarclaycardCw_Util::getDriver()->commit();\n\t\t\t\t}\n\t\t\t\tcatch (Exception $e) {\n\t\t\t\t\t$this->context->controller->errors[] = $e->getMessage();\n\t\t\t\t\tBarclaycardCw_Util::getDriver()->rollBack();\n\t\t\t\t}\n\t\t\t\tif ($cancelledTransactions > 0) {\n\t\t\t\t\t$this->context->controller->errors[] = $this->l(\n\t\t\t\t\t\t\t\"It seems as you have not finished the payment. We have cancelled the running payment.\");\n\t\t\t\t}\n\t\t\t}\n\t\t\tself::$cancellingCheckIsRunning = false;\n\t\t}\n\t}", "public function testCloudPosCheckDeleteCheck()\n {\n }", "public function testCloudPosCheckGetCheckByCheckNumber()\n {\n }", "public function testCloudPosCheckAddCheck()\n {\n }", "public function testCheckStatusOnOrderCancel()\n {\n /** @var \\Magento\\Sales\\Model\\Order $order */\n $order = $this->objectManager->create(\\Magento\\Sales\\Model\\Order::class);\n $order->loadByIncrementId('100000001');\n\n $orderItems = $order->getAllItems();\n $items = array_values($orderItems);\n /** @var \\Magento\\Sales\\Model\\Order\\Item $orderItem */\n $orderItem = array_shift($items);\n\n /** Canceling order to reproduce test case */\n $order->setState(\\Magento\\Sales\\Model\\Order::STATE_CANCELED);\n $order->save();\n\n /** @var \\Magento\\Downloadable\\Model\\ResourceModel\\Link\\Purchased\\Item\\Collection $linkCollection */\n $linkCollection = $this->objectManager->create(\n \\Magento\\Downloadable\\Model\\ResourceModel\\Link\\Purchased\\Item\\CollectionFactory::class\n )->create();\n\n $linkCollection->addFieldToFilter('order_item_id', $orderItem->getId());\n\n /** Assert there are items in linkCollection to avoid false-positive test result. */\n $this->assertGreaterThan(0, $linkCollection->count());\n\n /** @var \\Magento\\Downloadable\\Model\\Link\\Purchased\\Item $linkItem */\n foreach ($linkCollection->getItems() as $linkItem) {\n $this->assertEquals(\n \\Magento\\Downloadable\\Model\\Link\\Purchased\\Item::LINK_STATUS_EXPIRED,\n $linkItem->getStatus()\n );\n }\n }" ]
[ "0.85068244", "0.80635303", "0.76974887", "0.7320975", "0.7083786", "0.6923802", "0.6862095", "0.6705007", "0.6674325", "0.6587675", "0.65621215", "0.6234646", "0.615245", "0.60784364", "0.6066987", "0.6011936", "0.5932962", "0.5874217", "0.583477", "0.5817705", "0.5722617", "0.57144606", "0.5676726", "0.56218714", "0.5615184", "0.5570726", "0.5550466", "0.5505568", "0.5490856", "0.54895955" ]
0.92441666
0
Test case for cloudPosCheckCancelCourseInCheck .
public function testCloudPosCheckCancelCourseInCheck() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCloudPosCheckCancelAllCoursesInCheck()\n {\n }", "public function testCloudPosCheckCancelItemInCourse()\n {\n }", "public function testCloudPosCheckDeleteCourseFromCheck()\n {\n }", "public function testCloudPosCheckAddCourseToCheck()\n {\n }", "public function testCloudPosCheckUpdateCoursesInCheck()\n {\n }", "public function testCloudPosCheckUpdateCourse()\n {\n }", "public function testCloudPosCheckAddPaymentStateToCourse()\n {\n }", "public function testCloudPosCheckBumpCourseOnCheck()\n {\n }", "public function testCloudPosCheckUpdateItemInCourse()\n {\n }", "public function testCloudPosCheckAddItemsToCourse()\n {\n }", "public function testCloudPosCheckFastTrackItemInCourse()\n {\n }", "public function testCloudPosCheckFastTrackCourse()\n {\n }", "public function testCancelCharge()\n {\n }", "public function testCancelInvoice()\n {\n }", "public function testV1walletwithdrawcancelled()\n {\n\n }", "public function testCancelSettleLater()\n {\n }", "public function testCancelAllDunningPending()\n {\n }", "public function testCloudPosCheckAddPaymentStatesToCheck()\n {\n }", "public function testCancelTransaction()\n {\n }", "public function cancelWithoutChecks(): void {\n\t\t$this->cancelled = true;\n\t}", "public function test_that_unauthroized_user_cannot_view_courses()\n {\n\n }", "public function testCloudPosCheckGetCheckByCheckNumber()\n {\n }", "public function test_plan_cancel_review_request() {\n $data = $this->setup_workflow_data();\n $dg = $data['dg'];\n $lpg = $data['lpg'];\n $user = $data['user'];\n $reviewer = $data['reviewer'];\n $otheruser = $data['otheruser'];\n $plan = $data['plan'];\n $tplplan = $data['tplplan'];\n\n // Set waiting for review.\n $tplplan->set('status', plan::STATUS_WAITING_FOR_REVIEW);\n $tplplan->update();\n $plan->set('status', plan::STATUS_WAITING_FOR_REVIEW);\n $plan->update();\n\n // Foreign user cannot do anything.\n $this->setUser($otheruser);\n try {\n api::plan_cancel_review_request($plan);\n $this->fail('The user can not read the plan.');\n } catch (required_capability_exception $e) {\n $this->assertEquals('nopermissions', $e->errorcode);\n }\n\n // Can not change a plan based on a template.\n $this->setUser($user);\n try {\n api::plan_cancel_review_request($tplplan);\n $this->fail('The plan is based on a template.');\n } catch (coding_exception $e) {\n $this->assertRegExp('/Template plans cannot be reviewed./', $e->getMessage());\n }\n\n // Can not cancel review request when not waiting for review.\n $this->setUser($user);\n $plan->set('status', plan::STATUS_DRAFT);\n try {\n api::plan_cancel_review_request($plan);\n $this->fail('The plan cannot be sent for review at this stage.');\n } catch (coding_exception $e) {\n $this->assertRegExp('/The plan review cannot be cancelled at this stage./', $e->getMessage());\n }\n\n // Can not cancel review request when not waiting for review.\n $this->setUser($user);\n $plan->set('status', plan::STATUS_IN_REVIEW);\n try {\n api::plan_cancel_review_request($plan);\n $this->fail('The plan review cannot be cancelled at this stage.');\n } catch (coding_exception $e) {\n $this->assertRegExp('/The plan review cannot be cancelled at this stage./', $e->getMessage());\n }\n\n // Can not cancel review request when not waiting for review.\n $this->setUser($user);\n $plan->set('status', plan::STATUS_ACTIVE);\n try {\n api::plan_cancel_review_request($plan);\n $this->fail('The plan review cannot be cancelled at this stage.');\n } catch (coding_exception $e) {\n $this->assertRegExp('/The plan review cannot be cancelled at this stage./', $e->getMessage());\n }\n\n // Can not cancel review request when not waiting for review.\n $this->setUser($user);\n $plan->set('status', plan::STATUS_COMPLETE);\n try {\n api::plan_cancel_review_request($plan);\n $this->fail('The plan review cannot be cancelled at this stage.');\n } catch (coding_exception $e) {\n $this->assertRegExp('/The plan review cannot be cancelled at this stage./', $e->getMessage());\n }\n\n // Cancelling as a reviewer.\n $this->setUser($reviewer);\n $plan->set('status', plan::STATUS_WAITING_FOR_REVIEW);\n try {\n api::plan_cancel_review_request($plan);\n $this->fail('The user can not cancel a review request.');\n } catch (required_capability_exception $e) {\n $this->assertEquals('nopermissions', $e->errorcode);\n }\n\n // Cancelling review request.\n $this->setUser($user);\n api::plan_cancel_review_request($plan);\n $plan->read();\n $this->assertEquals(plan::STATUS_DRAFT, $plan->get('status'));\n\n // Cancelling review request by ID.\n $plan->set('status', plan::STATUS_WAITING_FOR_REVIEW);\n $plan->update();\n api::plan_cancel_review_request($plan->get('id'));\n $plan->read();\n $this->assertEquals(plan::STATUS_DRAFT, $plan->get('status'));\n }", "public function testCloudPosCheckAddCheck()\n {\n }", "private function transitionCourseCheck()\n {\n if ($this->userContext->getPrimarySerialNumber()->hasTransitionCourse()) {\n $code = $this->_getParam(\"code\");\n if ($code) {\n $link = \"/account/new/index/code/$code\";\n $errorMsg = \"That activation code cannot be used with a Transition Course account, but you can use it \".\n \"to <a href='$link'>create a new account</a>.\";\n } else {\n $link = \"/account/new\";\n $errorMsg = \"Transition Course accounts cannot be upgraded, but you can \".\n \"<a href='$link'>create a new account</a>.\";\n }\n $this->displayError($errorMsg);\n return;\n }\n }", "function cancel_test()\n\t{\n\t\techo 'cancelled';\n\t}", "public function testCloudPosCheckDeleteCheck()\n {\n }", "function cancel($paymecheckoutOrderId);", "public function testCancelPeriod()\n {\n \t$lesson = $this->createLesson(EnumLessonStatus::IN_PROGRESS);\n \t$inProgressPeriod = $this->createPeriod($lesson, EnumLessonStatus::IN_PROGRESS);\n\n \t$endPeriodService = new EndPeriodService();\n \t$canCancel = $endPeriodService->canCancelPeriod($inProgressPeriod);\n \t$this->assertNotTrue($canCancel);\n\n \t$pendingPeriodInTime = $this->createPeriod($lesson, EnumLessonStatus::PENDING);\n \t$canCancel = $endPeriodService->canCancelPeriod($pendingPeriodInTime);\n \t$this->assertNotTrue($canCancel);\n\n\n\t\t\n\n \t$pendingPerioOutOfTime = Mockery::mock(Period::class);\n\t\t$this->app->instance(Period::class, $pendingPerioOutOfTime);\n\n\t\t$minutes = Config::get('lesson.confirm_time');\n\n\t\t$pendingPerioOutOfTime->shouldReceive('getAttribute')\n\t\t\t\t\t\t\t ->andReturn(\n\t\t\t\t\t\t\t \t\tEnumLessonStatus::PENDING, \n\t\t\t\t\t\t\t \t\tCarbon::now()\n\t\t\t\t\t\t\t \t\t\t ->subMinutes(($minutes+2))\n\t\t\t\t\t\t\t \t);\n\t\t\n\t\t$canCancel = $endPeriodService->canCancelPeriod($pendingPerioOutOfTime);\n\t\t$this->assertTrue($canCancel);\n }", "function request_course($course){\n\t\t\t$tid = $_SESSION['T_ID'];\n\n\t\t\t$query = \"SELECT COUNT(C_ID) FROM course WHERE C_ID = '$course'\";\n\t\t\t$result = mysqli_query($GLOBALS['conn'],$query);\n\t\t\t$row = mysqli_fetch_row($result);\n\t\t\tif ($row[0]>0){\n\t\t\t\t$query = \"SELECT COUNT(Request_ID) FROM request_course WHERE (T_ID = '$tid' and Status = 'PENDING' and C_ID = '$course')\";\n\t\t\t\t$result = mysqli_query($GLOBALS['conn'],$query);\n\t\t\t\t$row = mysqli_fetch_row($result);\n\t\t\t\tif ($row[0]==0){\n\t\t\t\t\tinsert(array('C_ID','T_ID'),array($course,$tid),'request_course');\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t}" ]
[ "0.86405194", "0.85069823", "0.7676193", "0.75643086", "0.7563752", "0.74669874", "0.73734283", "0.7373321", "0.7065345", "0.6905591", "0.67509294", "0.6727121", "0.6472207", "0.6356896", "0.6192046", "0.6146847", "0.6096578", "0.60699743", "0.60484904", "0.58116025", "0.5774593", "0.5772652", "0.5757583", "0.57439625", "0.57222074", "0.5718698", "0.57024866", "0.5693619", "0.5648077", "0.5646262" ]
0.90843236
0
Test case for cloudPosCheckCancelItemInCourse .
public function testCloudPosCheckCancelItemInCourse() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCloudPosCheckCancelCourseInCheck()\n {\n }", "public function testCloudPosCheckCancelAllCoursesInCheck()\n {\n }", "public function testCloudPosCheckUpdateItemInCourse()\n {\n }", "public function testCloudPosCheckAddItemsToCourse()\n {\n }", "public function testCloudPosCheckDeleteCourseFromCheck()\n {\n }", "public function testCloudPosCheckFastTrackItemInCourse()\n {\n }", "public function testCloudPosCheckAddCourseToCheck()\n {\n }", "public function testCloudPosCheckUpdateCoursesInCheck()\n {\n }", "public function testCloudPosCheckAddPaymentStateToCourse()\n {\n }", "public function testCloudPosCheckUpdateCourse()\n {\n }", "public function testCloudPosCheckBumpCourseOnCheck()\n {\n }", "public function testCancelInvoice()\n {\n }", "public function testCancelCharge()\n {\n }", "public function testPeppolInboxItemConfirm()\n {\n }", "public function testV1walletwithdrawcancelled()\n {\n\n }", "public function testCheckStatusOnOrderCancel()\n {\n /** @var \\Magento\\Sales\\Model\\Order $order */\n $order = $this->objectManager->create(\\Magento\\Sales\\Model\\Order::class);\n $order->loadByIncrementId('100000001');\n\n $orderItems = $order->getAllItems();\n $items = array_values($orderItems);\n /** @var \\Magento\\Sales\\Model\\Order\\Item $orderItem */\n $orderItem = array_shift($items);\n\n /** Canceling order to reproduce test case */\n $order->setState(\\Magento\\Sales\\Model\\Order::STATE_CANCELED);\n $order->save();\n\n /** @var \\Magento\\Downloadable\\Model\\ResourceModel\\Link\\Purchased\\Item\\Collection $linkCollection */\n $linkCollection = $this->objectManager->create(\n \\Magento\\Downloadable\\Model\\ResourceModel\\Link\\Purchased\\Item\\CollectionFactory::class\n )->create();\n\n $linkCollection->addFieldToFilter('order_item_id', $orderItem->getId());\n\n /** Assert there are items in linkCollection to avoid false-positive test result. */\n $this->assertGreaterThan(0, $linkCollection->count());\n\n /** @var \\Magento\\Downloadable\\Model\\Link\\Purchased\\Item $linkItem */\n foreach ($linkCollection->getItems() as $linkItem) {\n $this->assertEquals(\n \\Magento\\Downloadable\\Model\\Link\\Purchased\\Item::LINK_STATUS_EXPIRED,\n $linkItem->getStatus()\n );\n }\n }", "public function testCancelSettleLater()\n {\n }", "public function testCancelTransaction()\n {\n }", "public function testCloudPosCheckFastTrackCourse()\n {\n }", "public function testCancelAllDunningPending()\n {\n }", "function cancel($paymecheckoutOrderId);", "public function isCanceled()\n {\n \n }", "function cancelPurchase(){\n\t\t$resultMsg = \"\"; // String to accumulate result message\n\n\t\t// Condition 1: Check whether the cart is empty\n\t\t// CASE 1: Cart is empty\n\t\tif(!isset($_SESSION[\"cart\"]) || empty($_SESSION[\"cart\"]) ){\n\t\t\t$resultMsg .= \"<p class='errMsgBox'><strong>Warning:</strong><span class='errMsg'> Cart is already Empty.</span></p>\";\n\t\t} // CASE 2: Cart is not empty\n\t\telse {\n\t\t\t// STEP 1: Update the XML file\n\t\t\t$updateXMLResultArray = updateItemCatalogue3(\"cancel\");\n\n\t\t\t// XML UPDATE was either a \"SUCCESS\" or \"FAILURE\" \n\t\t\t$updateXMLResult = $updateXMLResultArray[\"result\"]; \n\n\t\t\t// Store SUCCESS/FAILURE Message related to XML UPDATE\n\t\t\t$updateXMLMsg = $updateXMLResultArray[\"msg\"];\n\n\t\t\t// STEP 2: Clear the cart when there are no update errors in XML file\n\t\t\t// Case 1: goods.xml was updated with success\n\t\t\tif($updateXMLResult == \"SUCCESS\"){\n\t\t\t\t$_SESSION['cart'] = array();\n\t\t\t\t$resultMsg .= \"<p class='succesMsgBox'> $updateXMLMsg </p>\\r\\n\";\n\t\t\t} // Case 2: goods.xml was not updated (failure)\n\t\t\telse {\n\t\t\t\t$resultMsg .= \"<p class='errMsgBox'><strong>Error: </strong> <span class='errMsg'> Unable to Cancel Purchase</span><br/> $updateXMLMsg </p>\\r\\n\";\n\t\t\t}\n\n\n\t\t}\n\n\t\treturn $resultMsg;\n\t}", "public function testCloudPosCheckAddPaymentStatesToCheck()\n {\n }", "public function testCancelCashOnDeliveryOrder(FunctionalTester $I): void\n {\n $order = $this->generateCashOnDeliveryOrder($I);\n\n /* login as admin */\n $I->loginAsAdmin();\n\n /* go to order view page */\n $I->amOnPage(route('admin.sales.orders.view', $order->id));\n $I->seeCurrentRouteIs('admin.sales.orders.view');\n\n /* now test cancel order */\n $I->see('Cancel', Locator::href(route('admin.sales.orders.cancel', $order->id)));\n $I->click('Cancel', Locator::href(route('admin.sales.orders.cancel', $order->id)));\n $I->seeCurrentRouteIs('admin.sales.orders.view');\n $I->see(\"0.00\", '#due-amount-on-cancelled');\n }", "public function testPostingAPIGetPostingCrossborderCancelReasonList()\n {\n\n }", "public function testCloudPosCheckDeleteCheck()\n {\n }", "public function cancelRequest( Request $request ){\n try{\n $companyUser = $request->user();\n if(!$companyUser || !$companyUser->hasRole('company'))\n throw new Exception(\"You need to logged in as company\");\n if( !$request->input('solder_request_id'))\n throw new Exception(\"Must be need request ID\");\n $currentRequest = SolderItemRequest::find( $request->input('solder_request_id'));\n if( !$currentRequest )\n throw new Exception(\"Sorry didn't find your request data\");\n $currentRequest->status = 3;\n $currentRequest->save();\n $actionItem = SolderKits::find( $currentRequest->solder_kit_id );\n $actionItem->status = 3; // cancel and re-usable\n $actionItem->save();\n $actionItem->soldier_device_id = User::find($actionItem->user_id)->device_id;\n\n return ['success'=>true ,'message'=>'Item request cancel!', 'data'=>$actionItem];\n }catch (Exception $e){\n return ['success'=>false, 'message'=>$e->getMessage()];\n }\n }", "public function testCatalogueLearnv1catalogitemsbatch()\n {\n\n }", "function hasCancelledCourses(){\n\t\t\treturn count($this->cancelledCourses) > 0;\t\t\t\n\t\t}" ]
[ "0.8353904", "0.80397105", "0.7530869", "0.7239026", "0.7185035", "0.71100044", "0.6932127", "0.6896811", "0.68882173", "0.68395424", "0.6658369", "0.64164877", "0.6274086", "0.6173977", "0.6125519", "0.60910374", "0.6060142", "0.6052667", "0.60063404", "0.59217304", "0.58891517", "0.58132976", "0.5769998", "0.5746604", "0.572201", "0.5702498", "0.56376785", "0.560334", "0.55993253", "0.55960083" ]
0.90432876
0
Test case for cloudPosCheckDeleteCheck .
public function testCloudPosCheckDeleteCheck() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCloudPosCheckDeleteCourseFromCheck()\n {\n }", "public function testKycChecksDelete()\n {\n }", "public function testDeleteLook()\n {\n }", "public function testDeleteKeokProcessed()\n {\n }", "public function testDelete16()\n {\n }", "public function testCloudPosCheckAddCheck()\n {\n }", "public function testDeleteOrderItemUsingDELETE()\n {\n }", "public function testCloudPosCheckUpdateCheck()\n {\n }", "public function testDeleteNexus()\n {\n }", "public function testVoucherDeleteDocument()\n {\n }", "public function testSpacesProjectsDelete()\n {\n }", "public function testDeleteAssocation()\n {\n }", "function testTeamDelete() {\n //========================================= \n \n // To verify delete Parlay Team is valid\n //========================================= \n }", "public function testDeleteUE()\n {\n }", "public function testDeleteNexusParameters()\n {\n }", "public function delete() {\n\t\t// skip;\n\t}", "public function testDeleteVoucher()\n {\n }", "protected function _delete()\n\t{\n\t}", "public function testDeleteObjectItem()\n {\n }", "public function testDeleteNexusParameter()\n {\n }", "public function testDeleteEntity()\n {\n }", "function testCategoryDelete() {\n //========================================= \n \n // To verify delete Parlay Category is valid\n //========================================= \n }", "public function testDelete()\n {\n $service = new ProjectDeleteService(\n $this->projectRepo,\n $this->commissionDeleteService\n );\n $result = $service->delete(1);\n\n $this->assertTrue($result);\n }", "public function Delete() {\n\t\t$this->assertEquals(0, News::Delete(123094527034098,$this->db));\n\t}", "public function testPingTreeTargetDeleteTarget()\n {\n }", "public function testCloudPosCheckGetCheckByCheckNumber()\n {\n }", "public function testDeleteReply()\n {\n }", "public function testOfficesDelete()\n {\n }", "public function testDeleteObjectTemplate()\n {\n }", "public function testDeleteDevice()\n {\n }" ]
[ "0.77199405", "0.7459834", "0.7086364", "0.70628965", "0.70360464", "0.6899468", "0.6860704", "0.6852994", "0.6740477", "0.66781205", "0.6617122", "0.661653", "0.65877783", "0.6556921", "0.6543269", "0.65315706", "0.65163815", "0.65085846", "0.65034837", "0.6490072", "0.6466833", "0.64618474", "0.6447955", "0.6444998", "0.6440389", "0.643619", "0.6415942", "0.64050865", "0.64016074", "0.63636374" ]
0.90355426
0
Test case for cloudPosCheckDeleteCourseFromCheck .
public function testCloudPosCheckDeleteCourseFromCheck() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCloudPosCheckCancelCourseInCheck()\n {\n }", "public function testCloudPosCheckCancelAllCoursesInCheck()\n {\n }", "public function testCloudPosCheckCancelItemInCourse()\n {\n }", "public function testCloudPosCheckDeleteCheck()\n {\n }", "public function testCloudPosCheckAddCourseToCheck()\n {\n }", "public function testCloudPosCheckUpdateCourse()\n {\n }", "public function testCloudPosCheckUpdateCoursesInCheck()\n {\n }", "public function testDeleteCourse()\n {\n $data = ['id' => 'PRJG5'];\n $course = factory(Course::class)->create($data);\n Course::destroy('PRJG5');\n $this->assertDatabaseMissing('courses', $data);\n }", "public function testCloudPosCheckUpdateItemInCourse()\n {\n }", "public function testCloudPosCheckBumpCourseOnCheck()\n {\n }", "public function testCloudPosCheckAddItemsToCourse()\n {\n }", "public function testDeleteCourseById() {\n $test_course = DB::run(\"SELECT * FROM courses WHERE name LIKE 'test course'\")->fetch(PDO::FETCH_ASSOC);\n $test_course_id = $test_course['course_id'];\n $recordExists = DB::run(\"SELECT COUNT(1) FROM courses WHERE course_id = ?\", [$test_course_id])->fetchColumn();\n\n $this->assertEquals(1, $recordExists);\n deleteCourseById($test_course_id);\n\n $recordExists = DB::run(\"SELECT COUNT(1) FROM courses WHERE course_id = ?\", [$test_course_id])->fetchColumn();\n $this->assertEquals(0, $recordExists);\n }", "public function testKycChecksDelete()\n {\n }", "public function testCloudPosCheckAddPaymentStateToCourse()\n {\n }", "function deleteCourse(int $course_id): void{\n\n\n $pdo = getPdo();\n\n $delete = $pdo->prepare(\"DELETE FROM courses WHERE id = :course_id\");\n\n $delete->execute(['course_id' => $course_id]);\n\n \n}", "function testDelete()\n {\n //Arrange\n $name = \"MTH321\";\n $id = 1;\n $number = 5235235;\n $test_course = new Course($name, $id, $number);\n $test_course->save();\n\n $name2=\"Bojana\";\n $id2 = 2;\n $date='1909-09-08 12:00:00';\n $test_student = new Student($name2, $id2, $date);\n $test_student->save();\n\n\n //Act\n $test_course->addStudent($test_student);\n\n $test_course->delete();\n var_dump($test_student->getCourses());\n //Assert\n $this->assertEquals([], $test_student->getCourses());\n }", "public function testDeleteAssocation()\n {\n }", "public function delete() {\n $this -> removeLessons(array_keys($this -> getCourseLessons()));\n $courseUsers = eF_getTableDataFlat(\"users_to_courses\", \"users_LOGIN\", \"courses_ID=\".$this -> course['id']);\n $this -> removeUsers($courseUsers[\"users_LOGIN\"]);\n $this -> deleteCourseInstances();\n $this -> removeCourseSkills();\n $this -> deleteUniqueLessons();\n calendar::deleteCourseCalendarEvents($this);\n eF_deleteTableData(\"courses\", \"id=\".$this -> course['id']);\n $modules = eF_loadAllModules();\n foreach ($modules as $module) {\n $module -> onDeleteCourse($this -> course['id']);\n }\n EfrontSearch :: removeText('courses', $this -> course['id'], '');\n }", "public function testCloudPosCheckFastTrackItemInCourse()\n {\n }", "public function testAcquisitionAssignmentsDelete()\n {\n }", "function deleteCourse($code){\n\t\t\t\t$delete=delete_course($code);\n\t\t\t\treturn $delete;\n}", "public function testCloudPosCheckFastTrackCourse()\n {\n }", "public function testSpacesProjectsDelete()\n {\n }", "public function test_question_delete_course($feedback) {\n global $DB;\n $this->resetAfterTest(true);\n $this->setAdminUser();\n\n list($category, $course, $quiz, $qcat, $questions) = $this->setup_quiz_and_questions('course');\n\n // Test that the feedback works.\n if ($feedback) {\n $this->expectOutputRegex('|'.get_string('unusedcategorydeleted', 'question').'|');\n }\n question_delete_course($course, $feedback);\n\n // Verify category deleted.\n $criteria = array('id' => $qcat->id);\n $this->assertEquals(0, $DB->count_records('question_categories', $criteria));\n\n // Verify questions deleted or moved.\n $criteria = array('category' => $qcat->id);\n $this->assertEquals(0, $DB->count_records('question', $criteria));\n }", "function testTeamDelete() {\n //========================================= \n \n // To verify delete Parlay Team is valid\n //========================================= \n }", "public function testSystemSkillsIdDelete()\n {\n\n }", "function testCategoryDelete() {\n //========================================= \n \n // To verify delete Parlay Category is valid\n //========================================= \n }", "function testScheduleDelete() {\n //========================================= \n \n // To verify delete Parlay Schedule is valid\n //========================================= \n }", "public function testDeleteUE()\n {\n }", "public function testDeleteLook()\n {\n }" ]
[ "0.7851436", "0.7636395", "0.75433105", "0.7492093", "0.7481371", "0.7431181", "0.73637736", "0.71719295", "0.71481854", "0.7102001", "0.7101951", "0.7020887", "0.6996156", "0.67690355", "0.66858405", "0.6661008", "0.6656459", "0.6575983", "0.6548384", "0.6501072", "0.64931375", "0.6463201", "0.6354134", "0.6352172", "0.6346658", "0.6304323", "0.6272105", "0.62634856", "0.6228268", "0.6227622" ]
0.9133419
0
Test case for cloudPosCheckFastTrackCheck .
public function testCloudPosCheckFastTrackCheck() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCloudPosCheckFastTrackCourse()\n {\n }", "public function testCloudPosCheckFastTrackItemInCourse()\n {\n }", "public function testCloudPosCheckAddCheck()\n {\n }", "public function testCloudPosCheckUpdateCheck()\n {\n }", "public function testCloudPosCheckBumpCheck()\n {\n }", "public function testCloudPosCheckGetCheckByCheckNumber()\n {\n }", "public function testCloudPosCheckDeleteCheck()\n {\n }", "public function testCloudPosCheckBumpCourseOnCheck()\n {\n }", "public function testCloudPosCheckUpdateCourse()\n {\n }", "public function testTrackEvent()\n {\n }", "public function testPingTreeTargetGetCurrentCounts()\n {\n }", "public function testCloudPosCheckAddCourseToCheck()\n {\n }", "public function testCloudPosCheckUpdateItemInCourse()\n {\n }", "public function testCloudPosCheckAddPaymentStatesToCheck()\n {\n }", "public function track();", "abstract public function runCheck();", "public function testGetKeokProcessed()\n {\n }", "public function testGameStatusPointsBelow100()\n {\n $game = new Game();\n $res = $game->checkGameStatus();\n $exp = false;\n $this->assertEquals($exp, $res);\n }", "function checkSpotAvaliability($spot,$currentTime,$beginTime,$endTime){\r\n\t\r\n\t$currentTime=strtotime($currentTime);\r\n\t$beginTime = strtotime($beginTime);\r\n\t$endTime = strtotime($endTime);\r\n\t$p1 = ($beginTime-$currentTime)/1800;\r\n\t$p2 = ($endTime-$currentTime)/1800;\r\n\tif($p1>32){//if both larger than 32, check second future state only\r\n\t\t$p1 = $p1-32;\r\n\t\t$p2 = $p2-32;\r\n\t\t$checkBits = ((1<<$p2)-1)&(1<<($p1-1));\r\n\t\tif($checkBits&$spot['futurestate2']){//if result is 0, then available\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\t\t\t\r\n\t}\r\n\t\r\n\telse if($p2>32){//if only p2 larger than 32, needs to check second future state\r\n\t\t$checkBits1 = (0-1)<<($p1-1);\r\n\t\t$checkBits2 = (1<<($p2-31)-1);\r\n\t\tif( ($checkBits1&$spot['futurestate1'])|| ($checkBits2&$spot['futurestate2']) ){\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}\r\n\telse{//check futurestate1 only\r\n\t\t$checkBits = ((1<<$p2)-1)&(1<<($p1-1));\r\n\t\tif($checkBits&$spot['futurestate1']){//if result is 0, then available\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\t\t\t\r\n\t}\r\n}", "public function testCloudPosCheckCancelCourseInCheck()\n {\n }", "private function no_cover($track, $playlist_track, $arguments = NULL)\n\t{\n\t\t$table = $this->nocover_album_table;\n\t\t\n\t\tforeach($table as $phrase)\n\t\t{\n\t\t\t$is_cover = stripos($track->album->name, $phrase);\n\t\t\t$is_intended_cover = stripos($playlist_track['album'], $phrase);\n\t\t\t\n\t\t\tif($is_cover !== FALSE && $is_intended_cover === FALSE)\n\t\t\t{\n\t\t\t\treturn 'track is a cover because \"'.$phrase.'\" was found in the album name \"'.$track->album->name.'\" and it was not an intentional cover'; \n\t\t\t}\n\t\t}\n\t\t\n\t\t//Second is the check on artist and title\n\t\t$table = $this->nocover_title_table;\n\t\t\n\t\t//In case a track has more than one artist listed, we need to glue them together\n\t\t$artists_spotify = '';\n\t\tforeach($track->artist as $artist)\n\t\t{\n\t\t\t$artists_spotify .= $artist->name;\n\t\t}\n\t\t\n\t\t//Glue together a string of artist and title so it is easier to check for presence of the phrase in both of them at once\n\t\t$artist_and_title_spotify = $artists_spotify.' '.$track->name;\n\t\t$artist_and_title_original = $playlist_track['artist'].' '.$playlist_track['title'];\n\t\t\n\t\tforeach($table as $phrase)\n\t\t{\n\t\t\t$phrase = str_ireplace(array('%artist%', '%title%'), array($playlist_track['artist'], $playlist_track['title']), $phrase);\n\t\t\t$is_cover = stripos($artist_and_title_spotify, $phrase);\n\t\t\t$is_intended_cover = stripos($artist_and_title_original, $phrase);\t\t\t\n\n\t\t\tif($is_cover !== FALSE && $is_intended_cover === FALSE)\n\t\t\t{\n\t\t\t\treturn 'track is a cover because \"'.$phrase.'\" was found in the track name \"'.$artist_and_title_spotify.'\" and it was not an intentional cover'; \n\t\t\t}\n\n\t\t}\n\t\t\n\t\treturn TRUE; //survived the cover filter\n\t}", "public function testCloudPosCheckUpdateCoursesInCheck()\n {\n }", "public function testSensitivityAnalysis()\n {\n }", "public function testCloudPosCheckAddItemsToCourse()\n {\n }", "public function testCloudPosCheckDeleteCourseFromCheck()\n {\n }", "public function testCreateKeokProcessed()\n {\n }", "public function delete_pos($track) {\n\n $args = array('command'=>'pl_delete','&id'=>$track);\n $results = $this->sendCommand('status.xml?',$args);\n if (is_null($results)) { return null; }\n\n return true;\n\n }", "public function testGameStatusPointsPlayer1Over100()\n {\n $game = new Game(101, 0);\n $res = $game->checkGameStatus();\n $exp = true;\n $this->assertEquals($exp, $res);\n }", "public function testFastTrackDeletion()\n\t{\n\t\ttestpack( 'Test fast-track deletion' );\n\n\t\t$ghost = R::dispense( 'ghost' );\n\t\t$house = R::dispense( 'house' );\n\n\t\tR::associate( $house, $ghost );\n\n\t\tModel_Ghost_House::$deleted = FALSE;\n\n\t\tR::unassociate( $house, $ghost );\n\n\t\t// No fast-track, assoc bean got trashed\n\t\tasrt( Model_Ghost_House::$deleted, TRUE );\n\n\t\tModel_Ghost_House::$deleted = FALSE;\n\n\t\tR::unassociate( $house, $ghost, TRUE );\n\n\t\t// Fast-track, assoc bean got deleted right away\n\t\tasrt( Model_Ghost_House::$deleted, FALSE );\n\t}", "function cb_reached($current)\n{\n echo \"Current is greater than 1A: \" . $current / 1000.0 . \"\\n\";\n}" ]
[ "0.797233", "0.7501273", "0.7098379", "0.69140255", "0.68493843", "0.66542226", "0.61950105", "0.6018819", "0.5500141", "0.54045004", "0.53761876", "0.53621554", "0.5246606", "0.52158743", "0.52141917", "0.51743567", "0.51739544", "0.5164083", "0.51096135", "0.50441545", "0.501106", "0.50094926", "0.5005417", "0.49706864", "0.49640858", "0.49384", "0.49078935", "0.48905042", "0.4858761", "0.48555616" ]
0.92380214
0
Test case for cloudPosCheckFastTrackCourse .
public function testCloudPosCheckFastTrackCourse() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCloudPosCheckFastTrackItemInCourse()\n {\n }", "public function testCloudPosCheckFastTrackCheck()\n {\n }", "public function testCloudPosCheckBumpCourseOnCheck()\n {\n }", "public function testCloudPosCheckAddCourseToCheck()\n {\n }", "public function testCloudPosCheckUpdateCourse()\n {\n }", "public function testCloudPosCheckCancelCourseInCheck()\n {\n }", "public function testCloudPosCheckUpdateCoursesInCheck()\n {\n }", "public function testCloudPosCheckUpdateItemInCourse()\n {\n }", "public function testCloudPosCheckAddItemsToCourse()\n {\n }", "public function testCloudPosCheckDeleteCourseFromCheck()\n {\n }", "public function testCloudPosCheckAddPaymentStateToCourse()\n {\n }", "public function testCloudPosCheckCancelItemInCourse()\n {\n }", "public function testCloudPosCheckCancelAllCoursesInCheck()\n {\n }", "public function testCloudPosCheckAddCheck()\n {\n }", "public function testCloudPosCheckGetCheckByCheckNumber()\n {\n }", "public function testCloudPosCheckUpdateCheck()\n {\n }", "public function testCloudPosCheckBumpCheck()\n {\n }", "public function testCloudPosCheckDeleteCheck()\n {\n }", "public function testCovid19()\n {\n }", "public function testCatalogueLearnv1catalogbatch()\n {\n\n }", "public function testCloudPosCheckAddPaymentStatesToCheck()\n {\n }", "public function testCatalogueLearnv1catalog()\n {\n\n }", "function checkCourseStatus($creditPointsObtained, $coursePoints, $failedUnits,$failedUnitCount)\n {\n // Check if the student has completed more than 66% of the course.\n $completedAvg = ($creditPointsObtained / $coursePoints)*100;\n $completion = ($completedAvg > 66.6 ? true : false );\n\n // Check if student has failed a single unit and is eligible for a supp assessment or conceded pass.\n if(count($failedUnits) == 1)\n {\n foreach ($failedUnits as $unitCode => $unitMark) \n {\n if($unitMark >= 40 && $unitMark <= 45 && $completion)\n {\n return \"Unit ID: <strong>\" . $unitCode . \"</strong> has been given a <strong>Supplementary Assessment</strong><br/>\";\n }\n\n elseif($unitMark >= 46 && $unitMark <= 49 && $completion)\n {\n return \"Unit ID: <strong>\" . $unitCode . \"</strong> has been given a <strong>Conceded Pass</strong><br/>\";\n }\n }\n }\n\n foreach ($failedUnitCount as $unitCode => $attempts) \n {\n if($attempts > 2)\n {\n return \"<strong>EXCLUDED FROM COURSE! </strong><br/>\";\n }\n }\n\n // If obtained more points than the required points, indicate course complete. Else, calculate the number of\n // credit points required for the student to complete the course.\n if($creditPointsObtained > $coursePoints)\n {\n return \"<strong>SUCCESSFULLY COMPLETED! </strong></br>\";\n }\n\n else\n {\n $CPForCompletion = $coursePoints - $creditPointsObtained;\n return \"<strong>$CPForCompletion CP</strong> Required for Completion</br>\";\n }\n }", "function check30004000Courses($studentProfile)\n {\n $courses = array();\n foreach($studentProfile->get(\"courses\") as $course){\n if ($course->get(\"courseNumber\") >= 3000)\n {\n $department = $course->get(\"department\");\n $courseNumber = $course->get(\"courseNumber\");\n if(($department != \"ADCS\" && $department != \"CDEV\"&& $department != \"CRED\"\n && $department != \"EDUC\" && $department != \"HLSC\" && $department != \"MGT\"\n && $department != \"NURS\" && $department != \"PUBH\" && $department != \"MUSE\"\n && $department != \"PHAC\") || ($department==\"HLSC\" && $courseNumber == 3450) || ($department==\"MGT\" && $courseNumber == 3780))\n {\n $courses[] = $course->toArray();\n }\n }\n }\n return array(\n \"result\" => count($courses) >= 15,\n \"reason\" => $courses\n );\n }", "public function test_countalphasearch() {\n $this->load_csv_data();\n $result = track_assignment_count_records(1, null, \"alpha\");\n $this->assertEquals(2, (int)$result);\n }", "public function testKycChecksGet()\n {\n }", "function check1000Courses($studentProfile)\n {\n $courses = array();\n foreach($studentProfile->get(\"courses\") as $course){\n if($course->get(\"courseNumber\") < 2000){\n // exclude activity courses\n if($course->get(\"department\") != \"PHAC\" &&\n $course->get(\"department\") != \"MUSE\"){\n $courses[] = $course->toArray();\n }\n }\n }\n \n return array(\n \"result\" => count($courses) <= 12,\n \"reason\" => $courses\n );\n }", "public function testCatalogueLearnv1catalogitemsbatch()\n {\n\n }", "public function testGameStatusPointsBelow100()\n {\n $game = new Game();\n $res = $game->checkGameStatus();\n $exp = false;\n $this->assertEquals($exp, $res);\n }", "public function testCatalogueLearnv1catalogcatalogId()\n {\n\n }" ]
[ "0.8565041", "0.77980196", "0.77541715", "0.7751211", "0.77473575", "0.732637", "0.72231233", "0.7046113", "0.70284045", "0.69838315", "0.6838242", "0.67919636", "0.67787695", "0.6726953", "0.6650663", "0.63271385", "0.58113706", "0.57478577", "0.57254165", "0.57171637", "0.56995654", "0.5655075", "0.5584036", "0.55707985", "0.5546216", "0.554008", "0.55277634", "0.5521265", "0.5476478", "0.5412696" ]
0.91111916
0
Test case for cloudPosCheckFastTrackItemInCourse .
public function testCloudPosCheckFastTrackItemInCourse() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCloudPosCheckFastTrackCourse()\n {\n }", "public function testCloudPosCheckUpdateItemInCourse()\n {\n }", "public function testCloudPosCheckCancelItemInCourse()\n {\n }", "public function testCloudPosCheckAddItemsToCourse()\n {\n }", "public function testCloudPosCheckFastTrackCheck()\n {\n }", "public function testCloudPosCheckBumpCourseOnCheck()\n {\n }", "public function testCloudPosCheckUpdateCourse()\n {\n }", "public function testCloudPosCheckAddCourseToCheck()\n {\n }", "public function testCloudPosCheckCancelCourseInCheck()\n {\n }", "public function testCloudPosCheckUpdateCoursesInCheck()\n {\n }", "public function testCloudPosCheckGetCheckByCheckNumber()\n {\n }", "public function testCloudPosCheckDeleteCourseFromCheck()\n {\n }", "public function testCloudPosCheckAddPaymentStateToCourse()\n {\n }", "public function testCloudPosCheckCancelAllCoursesInCheck()\n {\n }", "public function testCloudPosCheckAddCheck()\n {\n }", "public function testCatalogueLearnv1catalogitemsbatch()\n {\n\n }", "public function testCloudPosCheckUpdateCheck()\n {\n }", "public function testCloudPosCheckAddPaymentStatesToCheck()\n {\n }", "public function testCloudPosCheckDeleteCheck()\n {\n }", "public function checkItem($item);", "function vu_course_index_is_b3intake($node) {\n $course_code = field_get_items('node', $node, 'field_unit_code', $node->language);\n if (!empty($course_code[0]['value'])) {\n $delivery = vu_course_index_get_course_intake_list($course_code[0]['value']);\n return $delivery->commencementDateNext() ? 1 : 0;\n }\n\n return false;\n}", "public function testCloudPosCheckBumpCheck()\n {\n }", "public function testKycChecksGet()\n {\n }", "public function testexerciseThree(){\n $items =[8, 4];\n $output = $this->Receipt->exerciseThree($items);\n\n $this->assertEquals(\n 6,\n $output,\n 'False'\n );\n }", "public function test_itemQuantity2()\n {\n // on the plane\n // Train execute only after all other builds and upgrades\n // \"data\" should contain max 5 items (1 for each factory)\n $ConstructUnits = [\n [\n \"min_energy\" => 1000000,\n \"min_planets\" => 1,\n \"min_level\" => 1,\n \"data\" => [\n UnitType::Hornet => 1,\n UnitType::Javeline => 1,\n UnitType::Excalibur => 1,\n UnitType::Valkyrie => 1\n ]\n ],\n ];\n $is_capital = false;\n\n $unitType = UnitType::Hornet;\n $userEnergy = 1;\n $userLevel = 1;\n $userPlanets = 1;\n $value = GalaxyHelper::GetItemQuantity($ConstructUnits, $unitType, $userEnergy, $userLevel, $userPlanets, $is_capital);\n $this->assertEquals(0, $value);\n\n $unitType = UnitType::Hornet;\n $userEnergy = 1000000;\n $userLevel = 1;\n $userPlanets = 1;\n $value = GalaxyHelper::GetItemQuantity($ConstructUnits, $unitType, $userEnergy, $userLevel, $userPlanets, $is_capital);\n $this->assertEquals(1, $value);\n\n $unitType = UnitType::Hornet;\n $userEnergy = 1000000;\n $userLevel = 0;\n $userPlanets = 1;\n $value = GalaxyHelper::GetItemQuantity($ConstructUnits, $unitType, $userEnergy, $userLevel, $userPlanets, $is_capital);\n $this->assertEquals(0, $value);\n\n $unitType = UnitType::Hornet;\n $userEnergy = 1000000;\n $userLevel = 1;\n $userPlanets = 0;\n $value = GalaxyHelper::GetItemQuantity($ConstructUnits, $unitType, $userEnergy, $userLevel, $userPlanets, $is_capital);\n $this->assertEquals(0, $value);\n\n }", "public function testCatalogueLearnv1catalogbatch()\n {\n\n }", "function check30004000Courses($studentProfile)\n {\n $courses = array();\n foreach($studentProfile->get(\"courses\") as $course){\n if ($course->get(\"courseNumber\") >= 3000)\n {\n $department = $course->get(\"department\");\n $courseNumber = $course->get(\"courseNumber\");\n if(($department != \"ADCS\" && $department != \"CDEV\"&& $department != \"CRED\"\n && $department != \"EDUC\" && $department != \"HLSC\" && $department != \"MGT\"\n && $department != \"NURS\" && $department != \"PUBH\" && $department != \"MUSE\"\n && $department != \"PHAC\") || ($department==\"HLSC\" && $courseNumber == 3450) || ($department==\"MGT\" && $courseNumber == 3780))\n {\n $courses[] = $course->toArray();\n }\n }\n }\n return array(\n \"result\" => count($courses) >= 15,\n \"reason\" => $courses\n );\n }", "function quality_check($item)\n{\n $c = new Checker;\n $messages = [];\n $product = $item->product;\n\n// check slug whitespace\n if ($c::check_whitespace($product->slug)) {\n $messages[] = 'There are no whitespaces around slug string.';\n } else {\n $messages[] = 'There are whitespaces around slug string.';\n }\n// check if product has related images.\n\n if ($c::check_images($product)) {\n $messages[] = 'The product has images.';\n } else {\n $messages[] = 'The product has no images.';\n }\n\n// check required fields\n $required_fields = $c->check_required_fields($product);\n foreach ($required_fields as $key => $msg) {\n $messages[] = array_push($messages, $msg);\n }\n\n return $messages;\n\n}", "abstract protected function doCheck();", "public function testGameStatusPointsBelow100()\n {\n $game = new Game();\n $res = $game->checkGameStatus();\n $exp = false;\n $this->assertEquals($exp, $res);\n }" ]
[ "0.8188265", "0.76088405", "0.7412266", "0.725685", "0.7252642", "0.71636134", "0.7052991", "0.7030809", "0.6885486", "0.67498046", "0.6611539", "0.65165114", "0.64801604", "0.63419336", "0.63355935", "0.61032736", "0.59950507", "0.563174", "0.5539655", "0.55126005", "0.54813033", "0.5416336", "0.52800554", "0.52386343", "0.5177561", "0.51643986", "0.51477736", "0.5145827", "0.5135584", "0.5131518" ]
0.9021927
0
Test case for cloudPosCheckGetCheckByCheckNumber .
public function testCloudPosCheckGetCheckByCheckNumber() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCloudPosCheckAddCheck()\n {\n }", "public function testCheckNumber()\n\t{\n\t\t\n\t\t$this->object->setApartmentId(1);\n\t\t$this->object->setNumber('ABC');\n\t\t$this->object->setUnitModelId(1);\n\t\t$this->object->setIsAvailable(1);\n\t\t$this->object->setYearBuilt(2000);\n\t\t$this->object->setYearRenovated(2000);\n\n\t\t$result = $this->object->checkNumber(); // abc - loaded from file\n\t\t$this->assertEquals(false,$result);\n\t}", "public function testKycChecksGet()\n {\n }", "public function testCloudPosCheckAddPaymentStatesToCheck()\n {\n }", "abstract protected function doCheck();", "public function testCloudPosCheckBumpCheck()\n {\n }", "public function testCloudPosCheckFastTrackCheck()\n {\n }", "public function testCloudPosCheckUpdateCheck()\n {\n }", "abstract public function runCheck();", "public function testCloudPosCheckBumpCourseOnCheck()\n {\n }", "public function check();", "public function check();", "public function check();", "public function check();", "public function check();", "public function check();", "public function getCheck()\n {\n return $this->check;\n }", "public function testCloudPosCheckFastTrackCourse()\n {\n }", "public function testCloudPosCheckDeleteCheck()\n {\n }", "public function testCloudPosCheckFastTrackItemInCourse()\n {\n }", "public function getCheckId()\n {\n return $this->checkId;\n }", "public function checkNumber()\n {\n $json = file_get_contents('php://input');\n $data = json_decode($json);\n\n if (!@$data->instance_key) {\n $response = [\"success\" => false, \"message\" => \"instance_key empty\"];\n } else if (!@$data->jid) {\n $response = [\"success\" => false, \"message\" => \"jid empty\"];\n } else {\n $datasetting = $this->setting_model->getSetting();\n $cekstatus = $this->whatsva->instancecData($data->instance_key, $datasetting->panel_key);\n $cekstatus = json_decode($cekstatus);\n\n if ($cekstatus) {\n if ($cekstatus->success) {\n if ($cekstatus->data->instance_status) {\n $response = $this->whatsva->checkNumber($data->instance_key, $data->jid);\n $response = json_decode($response);\n if ($response) {\n if ($response->success) {\n $response = [\"success\" => true, \"message\" => $response->message];\n }\n } else {\n $response = [\"success\" => false, \"message\" => \"cant connect to server\"];\n }\n\n } else {\n $response = [\"success\" => false, \"message\" => \"your instance/ device is disconnect\"];\n }\n } else {\n $response = [\"success\" => false, \"message\" => $cekstatus->message];\n }\n } else {\n $response = [\"success\" => false, \"message\" => \"can't connect server \"];\n }\n\n }\n echo json_encode($response);\n }", "public function verifychain($checklevel = 3, $nblocks = 6) {\n\n $args = $this->args;\n $args[ \"method\" ] = __FUNCTION__;\n $args[ \"params\" ] = [ $checklevel, $nblocks ];\n\n $res = $this->call($args);\n if ($res)\n return $res[ \"result\" ];\n }", "abstract public function check();", "abstract public function check();", "abstract public function check();", "public static function TKO($check) {\n\t\techo '<pre>';\n\t\tprint_r($check);\n\t\texit;\n\t}", "function get_checks_data ($adv_code, $arr_adv_checks, $i) {\n\t $arr_data_val = explode(\"#\",$arr_adv_checks[$adv_code]);\n\t return $arr_data_val[$i];\n}", "public function get_check($url, $source = 'cayl') {\n return $this->get_item($url, 'cayl_check');\n }", "public function getValue($hardCheck = false);" ]
[ "0.6549866", "0.6028882", "0.5961044", "0.5826557", "0.5816949", "0.57752323", "0.5716773", "0.5670659", "0.5652826", "0.5615055", "0.5544082", "0.5544082", "0.5544082", "0.5544082", "0.5544082", "0.5544082", "0.5526125", "0.5482573", "0.54668367", "0.5445334", "0.54303294", "0.5398939", "0.53863996", "0.5384474", "0.5384474", "0.5384474", "0.5353852", "0.5337419", "0.5326404", "0.5292221" ]
0.9077992
0
Test case for cloudPosCheckUpdateCheck .
public function testCloudPosCheckUpdateCheck() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCloudPosCheckBumpCheck()\n {\n }", "public function testCloudPosCheckAddCheck()\n {\n }", "public function testCloudPosCheckUpdateItemInCourse()\n {\n }", "public function testCloudPosCheckFastTrackCheck()\n {\n }", "public function testCloudPosCheckBumpCourseOnCheck()\n {\n }", "public function testCloudPosCheckDeleteCheck()\n {\n }", "public function testCloudPosCheckUpdateCourse()\n {\n }", "public function testCloudPosCheckGetCheckByCheckNumber()\n {\n }", "function test_update_existing() {\n\t}", "public function testCloudPosCheckUpdateCoursesInCheck()\n {\n }", "function test_update_new() {\n\t}", "public function testCloudPosCheckFastTrackItemInCourse()\n {\n }", "public function testCloudPosCheckFastTrackCourse()\n {\n }", "public function testCloudPosCheckAddPaymentStatesToCheck()\n {\n }", "function testTeamUpdate() {\n //========================================= \n \n // To verify update Parlay Team is valid\n //========================================= \n }", "function checkUpdate()\n {\n\n return false;\n }", "public function testSpaceUpdate()\n {\n }", "public function action_update_check()\n\t{\n\t \tUpdate::add( $this->info->name, $this->info->guid, $this->info->version );\n\t}", "public function for_update();", "public function testCloudPosCheckAddItemsToCourse()\n {\n }", "public function testUpdateKeokProcessed()\n {\n }", "public function testCloudPosCheckAddCourseToCheck()\n {\n }", "abstract public function update(): bool;", "public function checkUpdate() {\n $this->log('Checking for a new update. . .');\n\n if( $this->licensekey != null ) {\n $updateFile = $this->updateUrl.'/'.$this->updateIni.'?license-key='.urlencode($this->licensekey).'&domain='.urlencode(site_url()).'&channel='.urlencode($this->updateChannel);\n } else {\n $updateFile = $this->updateUrl.'/'.$this->updateIni;\n }\n\n //$update = @file_get_contents($updateFile);\n $update = $this->_file_get_contents_curl($updateFile);\n if ($update === false) {\n $this->log('Could not retrieve update file `'.$updateFile.'`!');\n return false;\n } else {\n\n if( !function_exists('parse_ini_string') ) {\n $this->log('parse_ini_string is not supported your PHP Version is '.phpversion());\n return false;\n }\n\n $versions = parse_ini_string($update, true);\n if (is_array($versions)) {\n $keyOld = 0;\n $latest = 0;\n $update = '';\n $changelog = null;\n\n foreach ($versions as $key => $version) {\n if ($key > $keyOld) {\n $keyOld = $key;\n $latest = $version['version'];\n $update = $version['url'];\n $changelog = $version['changelog'];\n }\n }\n\n $this->log('New version found `'.$latest.'`.');\n $this->latestVersion = $keyOld;\n $this->latestVersionName = $latest;\n $this->latestUpdate = $update;\n $this->latestChangelog = $changelog;\n\n return $keyOld;\n }\n else {\n $this->log('Unable to parse update file!');\n return false;\n }\n }\n }", "private function check_updates() {\n\t\t// Retrieve license key\n\t\t$license_key = trim( get_option( 'ratesync_license_key' ) ); \n\t\t\n\t\t// Instantiate updater\n\t\t$edd_updater = new EDD_SL_Plugin_Updater( RS_SL_STORE_URL, __FILE__, array(\n\t\t\t'version' => $this->version,\n\t\t\t'license' => $license_key,\n\t\t\t'item_id' => RS_SL_ITEM_ID,\n\t\t\t'author' => 'WC RateSync',\n\t\t\t'url'\t => home_url(),\n\t\t 'beta' => false,\n\t\t) );\n\t}", "function bbp_is_update()\n{\n}", "public function testCustomFieldsUpdate()\n {\n }", "public function testKycChecksPut()\n {\n }", "public function test_blfound_find()\n {\n $ims = new IMSDocsUpdate(\"EGLV020100155566\",\"target_gatepass\",\"2021-06-10\",\"JEROME\");\n $this->assertEquals( $ims->handle() , 1);\n }", "public function testStatusUpdate(): void\n {\n Queue::fake();\n $checkpoints = [];\n $snapshot = \\factory(Snapshot::class)->create();\n $checkpoints[] = \\factory(Checkpoint::class)->create([\n 'snapshot_id' => $snapshot->id,\n 'name' => 'one',\n 'image_status' => Checkpoint::IMAGE_STATUS_AVAILABLE,\n 'approval_status' => Checkpoint::APPROVAL_STATUS_UNKNOWN,\n 'diff_status' => Checkpoint::DIFF_STATUS_DIFFERENT,\n ]);\n $checkpoints[] = \\factory(Checkpoint::class)->create([\n 'snapshot_id' => $snapshot->id,\n 'name' => 'one',\n 'image_status' => Checkpoint::IMAGE_STATUS_AVAILABLE,\n 'approval_status' => Checkpoint::APPROVAL_STATUS_UNKNOWN,\n 'diff_status' => Checkpoint::DIFF_STATUS_DIFFERENT,\n ]);\n\n // Processing status is waiting if there's unknown checkpoints.\n $snapshot->updateStatus();\n $this->assertEquals(Snapshot::STATUS_UNKNOWN, $snapshot->status);\n $this->assertEquals(Snapshot::PROCESSING_STATUS_PENDING, $snapshot->processing_status);\n $this->assertEquals(Snapshot::RUN_STATUS_DONE, $snapshot->run_status);\n\n // Should stay at unknown as long as there's unknown checkpoints.\n $checkpoints[0]->approval_status = Checkpoint::APPROVAL_STATUS_APPROVED;\n $checkpoints[0]->save();\n\n $snapshot->updateStatus();\n $this->assertEquals(Snapshot::STATUS_UNKNOWN, $snapshot->status);\n $this->assertEquals(Snapshot::PROCESSING_STATUS_PENDING, $snapshot->processing_status);\n $this->assertEquals(Snapshot::RUN_STATUS_DONE, $snapshot->run_status);\n\n // Should pass when all checkpoints are either approved or ignored\n $checkpoints[1]->approval_status = Checkpoint::APPROVAL_STATUS_IGNORED;\n $checkpoints[1]->save();\n\n $snapshot->updateStatus();\n $this->assertEquals(Snapshot::STATUS_PASSED, $snapshot->status);\n $this->assertEquals(Snapshot::PROCESSING_STATUS_DONE, $snapshot->processing_status);\n $this->assertEquals(Snapshot::RUN_STATUS_DONE, $snapshot->run_status);\n\n // Run status should be pending as long as there's active batches.\n $batch = \\factory(Batch::class)->create(['snapshot_id' => $snapshot->id]);\n\n $snapshot->updateStatus();\n $this->assertEquals(Snapshot::STATUS_UNKNOWN, $snapshot->status);\n $this->assertEquals(Snapshot::PROCESSING_STATUS_DONE, $snapshot->processing_status);\n $this->assertEquals(Snapshot::RUN_STATUS_PENDING, $snapshot->run_status);\n\n $batch->delete();\n\n // Or pending Checkpoints.\n $checkpoints[1]->approval_status = Checkpoint::APPROVAL_STATUS_UNKNOWN;\n $checkpoints[1]->image_status = Checkpoint::IMAGE_STATUS_PENDING;\n $checkpoints[1]->save();\n\n $snapshot->updateStatus();\n $this->assertEquals(Snapshot::STATUS_UNKNOWN, $snapshot->status);\n $this->assertEquals(Snapshot::PROCESSING_STATUS_PENDING, $snapshot->processing_status);\n $this->assertEquals(Snapshot::RUN_STATUS_PENDING, $snapshot->run_status);\n\n // Or Checkpoints needing diff, but only if it has both image and baseline.\n $checkpoints[1]->image_status = Checkpoint::IMAGE_STATUS_AVAILABLE;\n $checkpoints[1]->diff_status = Checkpoint::DIFF_STATUS_UNKNOWN;\n $checkpoints[1]->image_url = 'url';\n $checkpoints[1]->baseline_url = 'url';\n $checkpoints[1]->save();\n\n $snapshot->updateStatus();\n $this->assertEquals(Snapshot::STATUS_UNKNOWN, $snapshot->status);\n $this->assertEquals(Snapshot::PROCESSING_STATUS_PENDING, $snapshot->processing_status);\n $this->assertEquals(Snapshot::RUN_STATUS_PENDING, $snapshot->run_status);\n\n // Else run status should be done.\n $checkpoints[1]->image_url = null;\n $checkpoints[1]->baseline_url = null;\n $checkpoints[1]->save();\n\n $snapshot->updateStatus();\n $this->assertEquals(Snapshot::STATUS_UNKNOWN, $snapshot->status);\n $this->assertEquals(Snapshot::PROCESSING_STATUS_PENDING, $snapshot->processing_status);\n $this->assertEquals(Snapshot::RUN_STATUS_DONE, $snapshot->run_status);\n\n // Should fail if there's rejected checkpoints.\n $checkpoints[1]->image_status = Checkpoint::IMAGE_STATUS_AVAILABLE;\n $checkpoints[1]->diff_status = Checkpoint::DIFF_STATUS_DIFFERENT;\n $checkpoints[1]->approval_status = Checkpoint::APPROVAL_STATUS_REJECTED;\n $checkpoints[1]->save();\n\n $snapshot->updateStatus();\n $this->assertEquals(Snapshot::STATUS_FAILED, $snapshot->status);\n $this->assertEquals(Snapshot::PROCESSING_STATUS_DONE, $snapshot->processing_status);\n $this->assertEquals(Snapshot::RUN_STATUS_DONE, $snapshot->run_status);\n\n // Rejected trumps unknown.\n $checkpoints[0]->approval_status = Checkpoint::APPROVAL_STATUS_UNKNOWN;\n $checkpoints[0]->save();\n\n $snapshot->updateStatus();\n $this->assertEquals(Snapshot::STATUS_FAILED, $snapshot->status);\n $this->assertEquals(Snapshot::PROCESSING_STATUS_PENDING, $snapshot->processing_status);\n $this->assertEquals(Snapshot::RUN_STATUS_DONE, $snapshot->run_status);\n }" ]
[ "0.7893309", "0.77455723", "0.7295171", "0.7172904", "0.71557015", "0.7147886", "0.71107966", "0.69721246", "0.6912022", "0.6789491", "0.6540961", "0.6482922", "0.6469793", "0.6469473", "0.63368136", "0.6296245", "0.62608975", "0.62158304", "0.6140785", "0.6107524", "0.60219765", "0.60065377", "0.60010684", "0.60001194", "0.5998538", "0.5942235", "0.59415925", "0.5899305", "0.58910835", "0.5849139" ]
0.9068481
0
Test case for cloudPosCheckUpdateCourse .
public function testCloudPosCheckUpdateCourse() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCloudPosCheckUpdateCoursesInCheck()\n {\n }", "public function testCloudPosCheckUpdateItemInCourse()\n {\n }", "public function testCloudPosCheckBumpCourseOnCheck()\n {\n }", "public function testCloudPosCheckAddCourseToCheck()\n {\n }", "public function testCloudPosCheckCancelCourseInCheck()\n {\n }", "public function testCloudPosCheckAddItemsToCourse()\n {\n }", "public function testCloudPosCheckAddPaymentStateToCourse()\n {\n }", "public function testCloudPosCheckDeleteCourseFromCheck()\n {\n }", "public function testCloudPosCheckCancelItemInCourse()\n {\n }", "public function testCloudPosCheckCancelAllCoursesInCheck()\n {\n }", "public function testCloudPosCheckFastTrackCourse()\n {\n }", "public function testCloudPosCheckFastTrackItemInCourse()\n {\n }", "public function test_elis_createorupdate_updates_course() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Create the test course.\n $course = new course(array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'syllabus' => '',\n 'credits' => '0'\n ));\n $course->save();\n\n // Run the course create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'course';\n $record->idnumber = 'testcourseidnumber';\n $record->credits = '5';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('course', $record, 'bogus');\n\n // Validation.\n $this->assertTrue($DB->record_exists(course::TABLE, array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'credits' => 5\n )));\n }", "public function updateCourseStatus( )\n {\n //\n }", "public function testUpdateValidCourse()\n {\n $data = factory(Course::class)->create(['id' => 'PRJG5']);\n $course = Course::find('PRJG5');\n $course->id = 'DONG5';\n $course->save();\n $other = Course::find('DONG5');\n $this->assertEquals('DONG5', $other->id);\n }", "public function test_auth_user_can_update_course()\n {\n $this->actingAs($this->user);\n $course = factory('App\\Course')->create(['description' => 'old_description']);\n $courseData = $course->toArray();\n $courseData['description'] = $this->faker->sentence;\n $start = (Carbon::parse($courseData['start_date'])->format('d/m/Y'));\n $end = (Carbon::parse($courseData['end_date'])->format('d/m/Y'));\n $courseData['start_date'] = $start;\n $courseData['end_date'] = $end;\n $this->json('PUT', route('courses.update', $course->id), $courseData);\n\n $this->assertEquals($courseData['description'], $course->fresh()->description);\n }", "public function testCloudPosCheckUpdateCheck()\n {\n }", "public function testEditCourse() {\n $test_course = DB::run(\"SELECT * FROM courses WHERE name LIKE 'test course'\")->fetch(PDO::FETCH_ASSOC);\n $test_course_id = $test_course['course_id'];\n $this->assertEquals(\"test course\", $test_course['name']);\n editCourse($test_course_id, \"edited course\");\n $test_course = DB::run(\"SELECT * FROM courses WHERE course_id = ?\", [$test_course_id])->fetch(PDO::FETCH_ASSOC);\n $this->assertEquals(\"edited course\", $test_course['name']);\n }", "public function test_elis_createorupdate_creates_course() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Run the course create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'course';\n $record->name = 'testcoursename';\n $record->idnumber = 'testcourseidnumber';\n $record->credits = '0';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('course', $record, 'bogus');\n\n // Validation.\n $this->assertTrue($DB->record_exists(course::TABLE, array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'credits' => '0'\n )));\n }", "public function updatecourses ($id_course , $description , $lecture_id ) {\n return ($this -> restfullDAO -> updatecourses ($id_course , $description , $lecture_id ));\n }", "function courses($data){\n if(check_token($data['crf_code'],'check')){\n $data = clean_security($data);\n \n if (!empty($data['id'])) {\n // update \n mysqli_query_(\"UPDATE `courses` set course='{$data['course']}', cost='{$data['cost']}', duration='{$data['duration']}' where id={$data['id']} \"); \n return 'ok'; \n\n }else{\n mysqli_query_(\"INSERT INTO `courses`(`course`,`cost`, `duration`) VALUES('{$data['course']}','{$data['cost']}','{$data['duration']}')\");\n } \n \n // remove_crf\n check_token($data['crf_code'],''); \n\n return 'ok'; \n \n }else{\n return 'login';\n }\n}", "public function test_update() {\n $rowid = \\tool_carcastc\\tool_carcastc_model::save_row((object)[\n 'courseid' => $this->course->id,\n 'name' => 'Row test 1',\n 'completed' => 1,\n 'priority' => 0\n ]);\n\n \\tool_carcastc\\tool_carcastc_model::save_row((object)[\n 'id' => $rowid,\n 'courseid' => $this->course->id,\n 'name' => 'Row test 2',\n 'completed' => 1,\n 'priority' => 0,\n 'descriptionformat' => 0,\n 'description' => 'Description update 1'\n ]);\n\n $row = \\tool_carcastc\\tool_carcastc_model::get_row(['id' => $rowid]);\n $this->assertEquals($this->course->id, $row->courseid);\n $this->assertEquals('Row test 2', $row->name);\n $this->assertEquals('Description update 1', $row->description);\n }", "public function update($course)\n {\n $changed = $course != $this? true : false;\n\n // Check whether any of the descProperties have changed\n foreach ($this->descProperties as $descProperty)\n {\n //print(\"Checking \".$descProperty.\"\\n\");\n if ($this->$descProperty != $course->$descProperty)\n {\n $this->descMod = time();\n $this->$descProperty = $course->$descProperty;\n }\n }\n\n // Check whether any assignments have changed\n if ($this->assignments != $course->assignments)\n {\n $this->assignments = $course->assignments;\n $this->outcomesMod = time();\n }\n\n if ($this->sampleAssignments != $course->sampleAssignments)\n {\n $this->sampleAssignments = $course->sampleAssignments;\n $this->assignMod = time();\n }\n\n // check whether courseABETOutcomes changed\n if ($this->courseABETOutcomes != $course->courseABETOutcomes)\n {\n $this->courseABETOutcomes = $course->courseABETOutcomes;\n $this->outcomesMod = time();\n }\n\n // don't replace, merge\n // this assumes that courses are only being added, not removed from programs\n if ($this->reqForProgram != $course->reqForProgram)\n {\n foreach ($course->reqForProgram as $progID=>$reqType)\n $this->reqForProgram[$progID] = $reqType;\n }\n\n return $changed;\n }", "public function testCloudPosCheckAddCheck()\n {\n }", "public function updatediplomatecourse($updatedata) \n\t{\n\t\tlog_message('info' ,'updatediplomatecourse Function Start');\n\t\t\n\t\t$returnMessage =\"\";\n\t\t$this->db->trans_begin();\n\t\tif($updatedata[\"SURVEY_DETAILS\"])\n\t\t{\n\t\t$this->db->insert_batch('user_course_survey',$updatedata[\"SURVEY_DETAILS\"]);\n\t\tlog_message(\"info\",\"Survey inserted\");\n\t\t}\n\t\t\n\t\tif($updatedata[\"COMPLETED_COURSE_UPDATE\"])\n\t\t{\n\t\t$this->db->update('user_course',$updatedata[\"COMPLETED_COURSE_UPDATE\"],\n\t\t\t\t\t\t\t\t\t$updatedata[\"COMPLETED_COURSE_ID\"]);\n\t\t}\n\t\t\n\t\t\n\t\tif($updatedata[\"CERTIFICATE_ARRAY\"])\n\t\t{\n\t\t$this->db->insert('user_course_certificate',$updatedata[\"CERTIFICATE_ARRAY\"]);\n\t\t}\n\t\t\n\t\tif ($updatedata[\"INPROGRESS_ID\"] && $updatedata[\"INPROGRESS_WHERE\"])\n\t\t{\n\t\t$this->db->update('user_course',$updatedata[\"INPROGRESS_ID\"],$updatedata[\"INPROGRESS_WHERE\"]);\t\t\n\t\t}\n\t\t\n\t\tif($updatedata[\"DIP_DETAIL_CERTIFICATE\"])\n\t\t{\n\t\t$this->db->update('user_diplomate_detail',$updatedata[\"DIP_DETAIL_CERTIFICATE\"],\t\tarray(\"USER_ID\"=>$updatedata[\"USER_ID\"]));\n\t\t}\n\t\t\n\t\tif ($this->db->trans_status() === FALSE)\n\t\t{\n\t\t\t$this->db->trans_rollback();\n\t\t\t$returnMessage = \"Error\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->db->trans_commit();\n\t\t\t$returnMessage =\"Success\";\n\t\t}\n\t\t\n\t\tlog_message('info' ,'updatediplomatecourse Function End');\n\t\treturn $returnMessage;\n\t}", "public function update($course){\n $statement = $this->db->prepare(\"UPDATE courses SET Name = ?, Progression = ?, Code = ?, Coursesyllabus = ? WHERE Id = ?\");\n $statement->bind_param(\"sssss\",$course->name,$course->progression,$course->code,$course->courseSyllabus,$course->id);\n $statement->execute();\n }", "function testTeamUpdate() {\n //========================================= \n \n // To verify update Parlay Team is valid\n //========================================= \n }", "function testScheduleUpdate() {\n //========================================= \n \n // To verify update Parlay Schedule is valid\n //========================================= \n }", "function testCounterpartyUpdate($ref) {\n\t\t$result = $this->np->model('Counterparty')->update(array(\n\t\t\t'Ref' => $ref,\n\t\t\t'CounterpartyProperty' => 'Recipient',\n\t\t\t// City code of 'Андреевка (Харьков)'\n\t\t\t'CityRef' => 'a9280688-94c0-11e3-b441-0050568002cf',\n\t\t\t'CounterpartyType' => 'PrivatePerson',\n\t\t\t'FirstName' => 'Петр',\n\t\t\t'MiddleName' => 'Сидорович',\n\t\t\t'LastName' => 'Иванович',\n\t\t\t'Phone' => '380501112234',\n\t\t));\n\t\t$this->assertTrue($result['success']);\n\t}", "public function updateCourseInfo(Request $request){\n $courseId = $request->input('courseId');\n\n $userId = Auth::user()->id;\n $course = Course::where('id', $courseId)->first();\n $department = $course->department;\n $deptAdminCourseMap = DeptAdminDeptMap::where('user_id', $userId)\n ->where('department_id', $department->id)->first();\n $convenorCourseMap = ConvenorCourseMap::where('user_id', $userId)\n ->where('course_id', $courseId)->first();\n\n if(!$courseId || !$course ||\n ((($deptAdminCourseMap && $deptAdminCourseMap->status ==0) ||\n ($convenorCourseMap && $convenorCourseMap->status==0)) && Auth::user()->role_id != 6)){\n throwException();\n }\n $course->name = $request->input('name');\n $course->code = $request->input('code');\n $course->type_id = CourseType::where('name', $request->input('type'))->first()->id;\n $course->description = $request->input('description');\n $course->start_date = $request->input('startDate');\n $course->end_date = $request->input('endDate');\n $course->term_number = $request->input('term');\n $course->save();\n }" ]
[ "0.8597516", "0.8497815", "0.8428192", "0.81947994", "0.78428674", "0.77786136", "0.766976", "0.7594599", "0.746361", "0.7419737", "0.7343437", "0.7300158", "0.7162447", "0.7158458", "0.7085559", "0.70041513", "0.6916279", "0.6637398", "0.6495204", "0.63318944", "0.62556535", "0.6232743", "0.6134849", "0.6129525", "0.60448086", "0.5997601", "0.5990762", "0.59855956", "0.5959293", "0.592824" ]
0.8924552
0
Test case for cloudPosCheckUpdateCoursesInCheck .
public function testCloudPosCheckUpdateCoursesInCheck() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCloudPosCheckUpdateCourse()\n {\n }", "public function testCloudPosCheckCancelAllCoursesInCheck()\n {\n }", "public function testCloudPosCheckUpdateItemInCourse()\n {\n }", "public function testCloudPosCheckBumpCourseOnCheck()\n {\n }", "public function testCloudPosCheckAddCourseToCheck()\n {\n }", "public function testCloudPosCheckCancelCourseInCheck()\n {\n }", "public function testCloudPosCheckAddItemsToCourse()\n {\n }", "public function testCloudPosCheckDeleteCourseFromCheck()\n {\n }", "public function testCloudPosCheckCancelItemInCourse()\n {\n }", "public function testCloudPosCheckAddPaymentStateToCourse()\n {\n }", "public function testCloudPosCheckFastTrackItemInCourse()\n {\n }", "public function updateCourseStatus( )\n {\n //\n }", "public function testCloudPosCheckFastTrackCourse()\n {\n }", "public function testCloudPosCheckUpdateCheck()\n {\n }", "public function test_elis_createorupdate_updates_course() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Create the test course.\n $course = new course(array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'syllabus' => '',\n 'credits' => '0'\n ));\n $course->save();\n\n // Run the course create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'course';\n $record->idnumber = 'testcourseidnumber';\n $record->credits = '5';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('course', $record, 'bogus');\n\n // Validation.\n $this->assertTrue($DB->record_exists(course::TABLE, array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'credits' => 5\n )));\n }", "public function testUpdateValidCourse()\n {\n $data = factory(Course::class)->create(['id' => 'PRJG5']);\n $course = Course::find('PRJG5');\n $course->id = 'DONG5';\n $course->save();\n $other = Course::find('DONG5');\n $this->assertEquals('DONG5', $other->id);\n }", "public function test_auth_user_can_update_course()\n {\n $this->actingAs($this->user);\n $course = factory('App\\Course')->create(['description' => 'old_description']);\n $courseData = $course->toArray();\n $courseData['description'] = $this->faker->sentence;\n $start = (Carbon::parse($courseData['start_date'])->format('d/m/Y'));\n $end = (Carbon::parse($courseData['end_date'])->format('d/m/Y'));\n $courseData['start_date'] = $start;\n $courseData['end_date'] = $end;\n $this->json('PUT', route('courses.update', $course->id), $courseData);\n\n $this->assertEquals($courseData['description'], $course->fresh()->description);\n }", "public function testCloudPosCheckAddCheck()\n {\n }", "public function testCloudPosCheckAddPaymentStatesToCheck()\n {\n }", "public function testGetAllCourses() {\n $courses = getAllCourses();\n $this->assertNotEmpty($courses);\n }", "function courses($data){\n if(check_token($data['crf_code'],'check')){\n $data = clean_security($data);\n \n if (!empty($data['id'])) {\n // update \n mysqli_query_(\"UPDATE `courses` set course='{$data['course']}', cost='{$data['cost']}', duration='{$data['duration']}' where id={$data['id']} \"); \n return 'ok'; \n\n }else{\n mysqli_query_(\"INSERT INTO `courses`(`course`,`cost`, `duration`) VALUES('{$data['course']}','{$data['cost']}','{$data['duration']}')\");\n } \n \n // remove_crf\n check_token($data['crf_code'],''); \n\n return 'ok'; \n \n }else{\n return 'login';\n }\n}", "public function updatecourses ($id_course , $description , $lecture_id ) {\n return ($this -> restfullDAO -> updatecourses ($id_course , $description , $lecture_id ));\n }", "public function test_elis_createorupdate_creates_course() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Run the course create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'course';\n $record->name = 'testcoursename';\n $record->idnumber = 'testcourseidnumber';\n $record->credits = '0';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('course', $record, 'bogus');\n\n // Validation.\n $this->assertTrue($DB->record_exists(course::TABLE, array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'credits' => '0'\n )));\n }", "public function testEditCourse() {\n $test_course = DB::run(\"SELECT * FROM courses WHERE name LIKE 'test course'\")->fetch(PDO::FETCH_ASSOC);\n $test_course_id = $test_course['course_id'];\n $this->assertEquals(\"test course\", $test_course['name']);\n editCourse($test_course_id, \"edited course\");\n $test_course = DB::run(\"SELECT * FROM courses WHERE course_id = ?\", [$test_course_id])->fetch(PDO::FETCH_ASSOC);\n $this->assertEquals(\"edited course\", $test_course['name']);\n }", "public static function verifyCoursesList($coursesList) {\n is_array($coursesList) OR $coursesList = array($coursesList);\n\n $newCoursesList = array();\n foreach ($coursesList as $course) {\n ($course instanceof EfrontCourse) OR $course = new EfrontCourse($course);\n $newCoursesList[$course -> course['id']] = $course;\n }\n return $newCoursesList;\n }", "public function updateUserCourseDetailsByUserPurchaseItems() {\n try {\n $status = FALSE;\n $message = '';\n if ($this->request->is('post')) {\n $req_data = $this->request->data;\n if (!isset($req_data['user_id'])) {\n $message = 'user_id not found';\n throw new Exception($message);\n }\n if (empty($req_data['user_id'])) {\n $message = 'user id can not be empty';\n throw new Exception($message);\n }\n $payment_controller = new PaymentController();\n $purchase_detail_curl['url'] = Router::url('/', true) . 'users/getUserPurchaseDetails/' . $req_data['user_id'] . '/0/1';\n $purchase_detail_curl['return_transfer'] = 1;\n $purchase_detail_curl['post_fields'] = array();\n $purchase_detail_curl_response = $payment_controller->sendCurl($purchase_detail_curl);\n if ($purchase_detail_curl_response['status'] == TRUE && !empty($purchase_detail_curl_response['curl_exec_result'])) {\n $purchase_details = json_decode($purchase_detail_curl_response['curl_exec_result'], TRUE);\n if ($purchase_details['status'] == TRUE && !empty($purchase_details['response'])) {\n $purchase_details_response = $purchase_details['response'];\n if ($purchase_details_response['paid_status'] == 1) {\n $data['user_id'] = $purchase_details_response['user_id'];\n $data['course_ids'] = array();\n foreach ($purchase_details_response['purchase_detail'] as $detail) {\n $data['course_ids'][] = $detail['course_id'];\n }\n $delete_user_courses_curl['url'] = Router::url('/', true) . 'courses/deleteUserAllCourses';\n $delete_user_courses_curl['return_transfer'] = 1;\n $delete_user_courses_curl['post_fields'] = array('user_id' => $data['user_id']);\n $delete_user_courses_curl['json_post_fields'] = TRUE;\n $delete_user_courses_curl['curl_post'] = 1;\n $delete_user_courses_curl_response = $payment_controller->sendCurl($delete_user_courses_curl);\n if ($delete_user_courses_curl_response['status'] == TRUE && !empty($delete_user_courses_curl_response['curl_exec_result'])) {\n $delete_user_courses = json_decode($delete_user_courses_curl_response['curl_exec_result'], TRUE);\n if ($delete_user_courses['status'] == TRUE || $delete_user_courses['record_found'] == 0) {\n $set_user_courses_curl['url'] = Router::url('/', true) . 'courses/setUserCourse';\n $set_user_courses_curl['return_transfer'] = 1;\n $set_user_courses_curl['post_fields'] = $data;\n $set_user_courses_curl['json_post_fields'] = TRUE;\n $set_user_courses_curl['curl_post'] = 1;\n $set_user_courses_curl_response = $payment_controller->sendCurl($set_user_courses_curl);\n if ($set_user_courses_curl_response['status'] == TRUE && !empty($set_user_courses_curl_response['curl_exec_result'])) {\n $set_user_courses = json_decode($set_user_courses_curl_response['curl_exec_result'], TRUE);\n if ($set_user_courses['status'] == TRUE) {\n $status = TRUE;\n } else {\n $message = 'Unable to set user new courses';\n throw new Exception($message);\n }\n } else {\n $message = 'Unable to get curl response from set courses for users';\n throw new Exception($message);\n }\n } else {\n $message = 'Unable to delete courses for users';\n throw new Exception($message);\n }\n } else {\n $message = 'Unable to get curl response from delete courses for users';\n throw new Exception($message);\n }\n } else {\n $message = 'user has not purchased the courses yet';\n throw new Exception($message);\n }\n } else {\n $message = 'Unable to get info about purchase details';\n throw new Exception($message);\n }\n } else {\n $message = 'Unable to get curl response';\n throw new Exception($message);\n }\n }\n } catch (Exception $ex) {\n $this->log($ex->getMessage() . '(' . __METHOD__ . ')');\n }\n $this->set([\n 'status' => $status,\n 'message' => $message,\n '_serialize' => ['status', 'message']\n ]);\n }", "function testTeamUpdate() {\n //========================================= \n \n // To verify update Parlay Team is valid\n //========================================= \n }", "public function update(Request $request, Courses $courses)\n {\n //\n }", "function update_grade_items_by_course($course_id)\n{\n $grade_items = grade_item::fetch_all(array('courseid' => $course_id, 'needsupdate' => 1));\n foreach ($grade_items as $item) {\n if ($item->needsupdate === 1) {\n $item->regrading_finished();\n }\n }\n return '1';\n}", "public function test_update() {\n $rowid = \\tool_carcastc\\tool_carcastc_model::save_row((object)[\n 'courseid' => $this->course->id,\n 'name' => 'Row test 1',\n 'completed' => 1,\n 'priority' => 0\n ]);\n\n \\tool_carcastc\\tool_carcastc_model::save_row((object)[\n 'id' => $rowid,\n 'courseid' => $this->course->id,\n 'name' => 'Row test 2',\n 'completed' => 1,\n 'priority' => 0,\n 'descriptionformat' => 0,\n 'description' => 'Description update 1'\n ]);\n\n $row = \\tool_carcastc\\tool_carcastc_model::get_row(['id' => $rowid]);\n $this->assertEquals($this->course->id, $row->courseid);\n $this->assertEquals('Row test 2', $row->name);\n $this->assertEquals('Description update 1', $row->description);\n }" ]
[ "0.8341569", "0.81531805", "0.81069446", "0.810561", "0.7876258", "0.782718", "0.7583708", "0.73380566", "0.7314054", "0.72894317", "0.6939096", "0.6812764", "0.68121487", "0.6644445", "0.6523385", "0.6316379", "0.62930536", "0.61219585", "0.59847826", "0.59843975", "0.5937844", "0.59190446", "0.5912707", "0.5849614", "0.5766814", "0.5750307", "0.57307124", "0.5724906", "0.5721452", "0.5719205" ]
0.9116512
0
Test case for cloudPosCheckUpdateItemInCourse .
public function testCloudPosCheckUpdateItemInCourse() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testCloudPosCheckUpdateCourse()\n {\n }", "public function testCloudPosCheckAddItemsToCourse()\n {\n }", "public function testCloudPosCheckCancelItemInCourse()\n {\n }", "public function testCloudPosCheckUpdateCoursesInCheck()\n {\n }", "public function testCloudPosCheckFastTrackItemInCourse()\n {\n }", "public function testCloudPosCheckBumpCourseOnCheck()\n {\n }", "public function testCloudPosCheckAddCourseToCheck()\n {\n }", "public function testCloudPosCheckCancelCourseInCheck()\n {\n }", "public function testCloudPosCheckAddPaymentStateToCourse()\n {\n }", "public function testCloudPosCheckDeleteCourseFromCheck()\n {\n }", "public function testCloudPosCheckUpdateCheck()\n {\n }", "public function testCloudPosCheckCancelAllCoursesInCheck()\n {\n }", "public function testCloudPosCheckFastTrackCourse()\n {\n }", "function update_grade_items_by_course($course_id)\n{\n $grade_items = grade_item::fetch_all(array('courseid' => $course_id, 'needsupdate' => 1));\n foreach ($grade_items as $item) {\n if ($item->needsupdate === 1) {\n $item->regrading_finished();\n }\n }\n return '1';\n}", "public function updateCourseStatus( )\n {\n //\n }", "public function testCloudPosCheckAddCheck()\n {\n }", "public function test_update() {\n $rowid = \\tool_carcastc\\tool_carcastc_model::save_row((object)[\n 'courseid' => $this->course->id,\n 'name' => 'Row test 1',\n 'completed' => 1,\n 'priority' => 0\n ]);\n\n \\tool_carcastc\\tool_carcastc_model::save_row((object)[\n 'id' => $rowid,\n 'courseid' => $this->course->id,\n 'name' => 'Row test 2',\n 'completed' => 1,\n 'priority' => 0,\n 'descriptionformat' => 0,\n 'description' => 'Description update 1'\n ]);\n\n $row = \\tool_carcastc\\tool_carcastc_model::get_row(['id' => $rowid]);\n $this->assertEquals($this->course->id, $row->courseid);\n $this->assertEquals('Row test 2', $row->name);\n $this->assertEquals('Description update 1', $row->description);\n }", "public function checkItem($item);", "public function testUpdateValidCourse()\n {\n $data = factory(Course::class)->create(['id' => 'PRJG5']);\n $course = Course::find('PRJG5');\n $course->id = 'DONG5';\n $course->save();\n $other = Course::find('DONG5');\n $this->assertEquals('DONG5', $other->id);\n }", "public function test_elis_createorupdate_updates_course() {\n global $CFG, $DB;\n require_once($CFG->dirroot.'/elis/program/lib/data/course.class.php');\n\n // Set up initial conditions.\n set_config('createorupdate', 1, 'rlipimport_version1elis');\n\n // Create the test course.\n $course = new course(array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'syllabus' => '',\n 'credits' => '0'\n ));\n $course->save();\n\n // Run the course create action.\n $record = new stdClass;\n $record->action = 'update';\n $record->context = 'course';\n $record->idnumber = 'testcourseidnumber';\n $record->credits = '5';\n\n $importplugin = rlip_dataplugin_factory::factory('rlipimport_version1elis');\n $importplugin->fslogger = new silent_fslogger(null);\n $importplugin->process_record('course', $record, 'bogus');\n\n // Validation.\n $this->assertTrue($DB->record_exists(course::TABLE, array(\n 'name' => 'testcoursename',\n 'idnumber' => 'testcourseidnumber',\n 'credits' => 5\n )));\n }", "public function test_auth_user_can_update_course()\n {\n $this->actingAs($this->user);\n $course = factory('App\\Course')->create(['description' => 'old_description']);\n $courseData = $course->toArray();\n $courseData['description'] = $this->faker->sentence;\n $start = (Carbon::parse($courseData['start_date'])->format('d/m/Y'));\n $end = (Carbon::parse($courseData['end_date'])->format('d/m/Y'));\n $courseData['start_date'] = $start;\n $courseData['end_date'] = $end;\n $this->json('PUT', route('courses.update', $course->id), $courseData);\n\n $this->assertEquals($courseData['description'], $course->fresh()->description);\n }", "public function testCloudPosCheckAddPaymentStatesToCheck()\n {\n }", "public function testUpdateObjectItem()\n {\n }", "function test_update_existing() {\n\t}", "public function updateUserCourseDetailsByUserPurchaseItems() {\n try {\n $status = FALSE;\n $message = '';\n if ($this->request->is('post')) {\n $req_data = $this->request->data;\n if (!isset($req_data['user_id'])) {\n $message = 'user_id not found';\n throw new Exception($message);\n }\n if (empty($req_data['user_id'])) {\n $message = 'user id can not be empty';\n throw new Exception($message);\n }\n $payment_controller = new PaymentController();\n $purchase_detail_curl['url'] = Router::url('/', true) . 'users/getUserPurchaseDetails/' . $req_data['user_id'] . '/0/1';\n $purchase_detail_curl['return_transfer'] = 1;\n $purchase_detail_curl['post_fields'] = array();\n $purchase_detail_curl_response = $payment_controller->sendCurl($purchase_detail_curl);\n if ($purchase_detail_curl_response['status'] == TRUE && !empty($purchase_detail_curl_response['curl_exec_result'])) {\n $purchase_details = json_decode($purchase_detail_curl_response['curl_exec_result'], TRUE);\n if ($purchase_details['status'] == TRUE && !empty($purchase_details['response'])) {\n $purchase_details_response = $purchase_details['response'];\n if ($purchase_details_response['paid_status'] == 1) {\n $data['user_id'] = $purchase_details_response['user_id'];\n $data['course_ids'] = array();\n foreach ($purchase_details_response['purchase_detail'] as $detail) {\n $data['course_ids'][] = $detail['course_id'];\n }\n $delete_user_courses_curl['url'] = Router::url('/', true) . 'courses/deleteUserAllCourses';\n $delete_user_courses_curl['return_transfer'] = 1;\n $delete_user_courses_curl['post_fields'] = array('user_id' => $data['user_id']);\n $delete_user_courses_curl['json_post_fields'] = TRUE;\n $delete_user_courses_curl['curl_post'] = 1;\n $delete_user_courses_curl_response = $payment_controller->sendCurl($delete_user_courses_curl);\n if ($delete_user_courses_curl_response['status'] == TRUE && !empty($delete_user_courses_curl_response['curl_exec_result'])) {\n $delete_user_courses = json_decode($delete_user_courses_curl_response['curl_exec_result'], TRUE);\n if ($delete_user_courses['status'] == TRUE || $delete_user_courses['record_found'] == 0) {\n $set_user_courses_curl['url'] = Router::url('/', true) . 'courses/setUserCourse';\n $set_user_courses_curl['return_transfer'] = 1;\n $set_user_courses_curl['post_fields'] = $data;\n $set_user_courses_curl['json_post_fields'] = TRUE;\n $set_user_courses_curl['curl_post'] = 1;\n $set_user_courses_curl_response = $payment_controller->sendCurl($set_user_courses_curl);\n if ($set_user_courses_curl_response['status'] == TRUE && !empty($set_user_courses_curl_response['curl_exec_result'])) {\n $set_user_courses = json_decode($set_user_courses_curl_response['curl_exec_result'], TRUE);\n if ($set_user_courses['status'] == TRUE) {\n $status = TRUE;\n } else {\n $message = 'Unable to set user new courses';\n throw new Exception($message);\n }\n } else {\n $message = 'Unable to get curl response from set courses for users';\n throw new Exception($message);\n }\n } else {\n $message = 'Unable to delete courses for users';\n throw new Exception($message);\n }\n } else {\n $message = 'Unable to get curl response from delete courses for users';\n throw new Exception($message);\n }\n } else {\n $message = 'user has not purchased the courses yet';\n throw new Exception($message);\n }\n } else {\n $message = 'Unable to get info about purchase details';\n throw new Exception($message);\n }\n } else {\n $message = 'Unable to get curl response';\n throw new Exception($message);\n }\n }\n } catch (Exception $ex) {\n $this->log($ex->getMessage() . '(' . __METHOD__ . ')');\n }\n $this->set([\n 'status' => $status,\n 'message' => $message,\n '_serialize' => ['status', 'message']\n ]);\n }", "public function testCloudPosCheckGetCheckByCheckNumber()\n {\n }", "public function testCartUpdateSuccess()\n {\n $this->demoUserLoginIn();\n $cart = CartItem::create([\n 'users_id' => '2',\n 'sku_id' => '1',\n 'amount' => '1',\n ]);\n $response = $this->call('PATCH', '/cart/1/update', [\n 'users_id' => '10',\n 'sku_id' => '10',\n 'amount' => '10',\n ]);\n $this->assertEquals(302, $response->status());\n }", "public function testEditCourse() {\n $test_course = DB::run(\"SELECT * FROM courses WHERE name LIKE 'test course'\")->fetch(PDO::FETCH_ASSOC);\n $test_course_id = $test_course['course_id'];\n $this->assertEquals(\"test course\", $test_course['name']);\n editCourse($test_course_id, \"edited course\");\n $test_course = DB::run(\"SELECT * FROM courses WHERE course_id = ?\", [$test_course_id])->fetch(PDO::FETCH_ASSOC);\n $this->assertEquals(\"edited course\", $test_course['name']);\n }", "function update_grades_moodle($userid, $itemid, $finalgrade, $courseid)\n{\n if (!$grade_item = grade_item::fetch(array('id' => $itemid, 'courseid' => $courseid))) { // we must verify course id here!\n return false;\n }\n\n if ($grade_item->update_final_grade($userid, $finalgrade, 'gradebook', false, FORMAT_MOODLE)) {\n $resp = new stdClass;\n $resp->nota = true;\n return $resp;\n } else {\n\n $resp = new stdClass;\n $resp->nota = false;\n\n return $resp;\n }\n\n}", "public function _update_current_user_course_expired() {\n\t\tglobal $wpdb, $post;\n\t\t$user_id = get_current_user_id();\n\t\tif ( empty( $wpdb->learnpress_user_items ) ) {\n\t\t\treturn;\n\t\t}\n\n\t\t$query = $wpdb->prepare( \"\n\t\t\tSELECT * \n\t\t\tFROM ( \n\t\t\t\tSELECT * \n\t\t\t\tFROM {$wpdb->learnpress_user_items}\n\t\t\t\tWHERE item_type = %s\n\t\t\t\tAND user_id = %d AND status = %s\n\t\t\t\tAND end_time = %s\n\t\t\t\tAND start_time <> %s\n\t\t\t\tORDER BY item_id, user_item_id DESC \n\t\t\t) X \n\t\t\tGROUP BY item_id\n\t\t\tLIMIT 0, 10\n\t\t\", LP_COURSE_CPT, $user_id, 'enrolled', '0000-00-00 00:00:00', '0000-00-00 00:00:00' );\n\n\t\t$results = $wpdb->get_results( $query );\n\n\t\tif ( ! empty( $results ) ) {\n\t\t\t$course_ids = wp_list_pluck( $results, 'item_id' );\n\t\t\t$order_ids = wp_list_pluck( $results, 'ref_id' );\n\n\t\t\tLP_Helper_CURD::cache_posts( array_merge( $course_ids, $order_ids ) );\n\n\t\t\tforeach ( $results as $row ) {\n\t\t\t\t$course = learn_press_get_course( $row->item_id );\n\n\t\t\t\tif ( ! $course ) {\n\t\t\t\t\t// Delete data from table user-items if the course does not exist.\n\t\t\t\t\tif ( get_post_type( $row->item_id ) !== LP_COURSE_CPT ) {\n\t\t\t\t\t\tLP_Repair_Database::instance()->remove_user_items_by_user_item_id( $row->user_item_id );\n\t\t\t\t\t}\n\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\n\t\t\t\t$check_args = array(\n\t\t\t\t\t'start_time' => strtotime( $row->start_time )\n\t\t\t\t);\n\n\t\t\t\t$expired = $course->is_expired( $row->user_id, $check_args );\n\t\t\t\tif ( $expired && 0 >= $expired ) {\n\n\t\t\t\t\t$user = learn_press_get_user( $row->user_id );\n\t\t\t\t\tif ( ! $user ) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\t$this->_update_user_course_items_expired( $course, $user );\n\t\t\t\t\t$user_course = $user->get_course_data( $course->get_id() );\n\t\t\t\t\t$item_meta_id = $user_course->finish();\n\t\t\t\t\tif ( $item_meta_id ) {\n\t\t\t\t\t\tlearn_press_update_user_item_meta( $item_meta_id, 'finishing_type', 'automation' );\n\t\t\t\t\t\tdo_action( 'learn_press_user_finish_course_automation', $course->get_id(), $item_meta_id, $user->get_id() );\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}" ]
[ "0.8060354", "0.8001855", "0.79887927", "0.7943241", "0.7772524", "0.77597517", "0.7311244", "0.723864", "0.71463406", "0.70067567", "0.6962093", "0.68061733", "0.6543139", "0.63657606", "0.62112266", "0.6210258", "0.6200597", "0.619525", "0.61761504", "0.61588013", "0.6129894", "0.61113244", "0.6082332", "0.6056101", "0.60271543", "0.59624475", "0.593851", "0.5927184", "0.5917191", "0.59051347" ]
0.90240085
0
Open file with given flags
public static function open($filePath, $flags = 'r') { $file = static::ensureFileObject($filePath); $createMode = FileHelper::permissionsAsString(static::$fileCreateMode); return $file->open($flags, $createMode); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function openFile($path, $mode = 'w');", "abstract protected function open($file);", "public function open($mode = \"r\") {\n\n global $filelogger;\n\n if(Validator::isa($mode,\"string\") \n && Validator::matches($mode,\"/^(r|w|a|x|c)\\+{0,1}$/\"))\n $this->fres = fopen($this->file, $mode); \n\n if(!Validator::isa($filelogger,\"null\")) \n $filelogger->log(\"mode=%, fres=%, isres=%, match=%\", \n array($mode,$this->fres,is_resource($this->fres),\n Validator::matches($mode,\"/(r|w|a|x|c)[+]/\")));\n\n return (is_resource($this->fres) ? true : false);\n\n }", "function ot_file_open( $handle, $mode ) {\n\n $func = 'f' . 'open';\n return @$func( $handle, $mode );\n \n}", "function file ($filename, $flags = 0, $context = null) {}", "public function open($fileName = null);", "function open( $mode = 'r' )\r\n\t{\r\n\t\t$this->_handler = fopen( $this->path , $mode);\r\n\t\t$this->_handler_opened = true;\t\t\r\n\t}", "abstract public function open();", "function fopen ($filename, $mode, $use_include_path = false, $context = null) {}", "function bzopen($file, $mode)\n{\n}", "public function open($file, $flags = 0)\n {\n return new FileReader(\n $file,\n $flags,\n $this->getPathBuilderFactory(),\n $this->getNodeBuilderFactory()\n );\n }", "public function open(StreamMode $mode);", "function stream_open($path, $mode, $options, &$opened_path) {\n return true;\n }", "function open($filename = '', $mode = 'w') {\n\t\tif ('' == $filename) return false;\n\t\tif ($this->gzip()) {\n\t\t\t$fp = @gzopen($filename, $mode);\n\t\t} else {\n\t\t\t$fp = @fopen($filename, $mode);\n\t\t}\n\t\treturn $fp;\n\t}", "public function stream_open($path, $mode, $options = NULL, &$opened_path = NULL, Manager $magic_stream = null) {\n // so there is no need to take care of the reference.\n return $this->delegate(__FUNCTION__, func_get_args());\n }", "public function fopen($mode) {\n\t\t$this->handle = fopen($this->fullpath, $mode);\n\t\treturn $this->handle;\n\t}", "public function open();", "public function open();", "public function open();", "public function openFile() {\n\t\t$name = $this->step->site->rootDir .\n\t\t\t'/' . $this->step->rawUrl .\n\t\t\t'/' . $this->tag . '.php';\n\t\treturn @fopen($name, \"r\");\n\t}", "function stream_open($path, $mode, $options, &$opened_path) {\n $this->uniqueid_array_update_time = time(); // set to current time\n $this->journey_daycount = 1;\n $this->load_uniqueid_array();\n return true;\n }", "#[Pure]\n #[TentativeType]\n public function file(\n #[LanguageLevelTypeAware(['8.0' => 'string'], default: '')] $filename,\n #[LanguageLevelTypeAware(['8.0' => 'int'], default: '')] $flags = FILEINFO_NONE,\n $context = null\n ): string|false {}", "public static function open(string $path)\n {\n return fopen($path, 'r');\n }", "public function setFlags($flags)\n {\n if (false === filter_var($flags, FILTER_VALIDATE_INT, ['options' => ['min_range' => 0]])) {\n throw new InvalidArgumentException('you should use a `SplFileObject` Constant');\n }\n\n $this->flags = $flags|SplFileObject::READ_CSV|SplFileObject::DROP_NEW_LINE;\n\n return $this;\n }", "public function setFlags($flags)\n {\n if (false === filter_var($flags, FILTER_VALIDATE_INT, ['options' => ['min_range' => 0]])) {\n throw new InvalidArgumentException('you should use a `SplFileObject` Constant');\n }\n\n $this->flags = $flags|SplFileObject::READ_CSV|SplFileObject::DROP_NEW_LINE;\n\n return $this;\n }", "public function open($mode = self::MODE_APPEND) {\n\n\n if ($this->_handle = @fopen($this->getName(), $mode)) {\n return true;\n } else {\n $this->_error_message = 'Can\\'t open file';\n }\n }", "private function openFileForRead()\n {\n $this->isOpenForRead = true;\n $this->fileResource = fopen($this->path, 'r');\n $sFirstLine = fgets($this->fileResource);\n $sFirstLine = str_replace(array(\"\\n\", \"\\r\"), '', $sFirstLine);\n $this->columnTitles = explode($this->separator, $sFirstLine);\n $this->currentRowNumber = 0;\n }", "public function stream_open(string $path, string $mode, int $options, string &$opened_path = null): bool;", "public function open($descriptionFile);", "#[LanguageLevelTypeAware(['8.1' => 'finfo|false'], default: 'resource|false')]\nfunction finfo_open(int $flags = 0, ?string $magic_database = null) {}" ]
[ "0.68339765", "0.6598139", "0.6483213", "0.64384156", "0.64292765", "0.6422861", "0.63603884", "0.6198474", "0.6125268", "0.6111406", "0.60611963", "0.6034903", "0.6027311", "0.6001305", "0.5905119", "0.58813024", "0.5845756", "0.5845756", "0.5845756", "0.5790293", "0.57838935", "0.57773894", "0.5774216", "0.5773141", "0.5773141", "0.57539266", "0.57446915", "0.5694554", "0.5630024", "0.5627819" ]
0.6898661
0
Get promise of unlocking file
public static function onUnlock($filePath) { $filePath = FileHelper::normalizePath($filePath); if (!static::isLocked($filePath)) { return resolve(true); } $deferred = new Deferred(); if (!isset(static::$_lockedFilesQueue[$filePath])) { static::$_lockedFilesQueue[$filePath] = []; } static::$_lockedFilesQueue[$filePath][] = $deferred; return $deferred->promise(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function unlock();", "public function unlock()\n {\n $originalFile = VideoFileOriginal::where('video_id', $this->video_id)->first();\n if (!$originalFile) {\n // Create original file\n $originalFile = new VideoFileOriginal();\n $originalFile->video_id = $this->video_id;\n $originalFile->path = $this->path;\n }\n $originalFile->status = 'Complete';\n $originalFile->save();\n\n VideoProcessingEvent::fire('unlock', $this, 'success');\n }", "public function unlocked();", "public function greenSemaphore() {\n $result = $this->doFileExist();\n if($result)\n unlink(TRACK_SEMAPHORE_FILEPATH);\n return $result;\n }", "function file_lock_and_get(string $path) {\n\t$ret = '';\n\n\tclearstatcache();\n\t$fp = fopen($path, 'r');\n\n\tif ($fp === FALSE) {\n\t\tthrow new IntException('Failed to open file for reading.');\n\t}\n\tif (flock($fp, LOCK_SH)) {\n\t\t$fs = filesize($path);\n\t\tif ($fs === 0) { return ''; }\n\n\t\t$ret = fread($fp, $fs);\n\t\tflock($fp, LOCK_UN);\n\t} else {\n\t\tfclose($fp);\n\t\tthrow new IntException('Failed to lock file.');\n\t}\n\tfclose($fp);\n\treturn $ret;\n}", "public function unlock()\r\n {\r\n }", "public function unlock()\n {\n\n }", "public function unlock() {\n \n }", "public function unlock(): void\n {\n $dir = $this->getDir();\n\n if ($this->filesystem->exists($dir . '.lock')) {\n $this->filesystem->remove($dir . '.lock');\n }\n }", "protected function lock_process() {\n\t\t$this->fp = fopen(dirname( __FILE__ ) . '/../lockfile', \"r+\");\n\t\t\n\t\tif (flock($this->fp, LOCK_EX | LOCK_NB)) { // acquire an exclusive lock\n\t\t\t$this->log( 'Acquired file lock' );\n\t\t\treturn parent::lock_process();\n\t\t} else {\n\t\t\tfclose($this->fp);\n\t\t\tthrow new \\Exception ( 'Couldn\\'t get the lock. Possible the queue is already running?' );\n\t\t}\n\t}", "protected function unlock_process() {\n\t\tparent::unlock_process();\n\t\t$this->log( 'Released file lock' );\n\t\tflock($this->fp, LOCK_UN);\n\t\tfclose($this->fp);\n\t\t$this->fp = null;\n\t\treturn $this;\n\t}", "function flock ($handle, $operation, &$wouldblock = null) {}", "protected static function processUnlockQueue($filePath) {\n if (empty(static::$_lockedFilesQueue[$filePath])) {\n return;\n }\n while (!empty(static::$_lockedFilesQueue[$filePath])) {\n if (static::isLocked($filePath)) {\n break;\n }\n /** @var Deferred $deferred */\n $deferred = array_shift(static::$_lockedFilesQueue[$filePath]);\n $deferred->resolve(true);\n }\n }", "static public function unlock()\n {\n if (!isset(aTools::$lockService))\n {\n /**\n * It is not an error to call with no locks\n */\n return;\n }\n aTools::$lockService->unlock();\n }", "function unlock_sqlite3_access() {\n\tglobal $DB;\n\n\tsem_release($DB['SEM_ID']);\n}", "public function testLockAndUnlock() {\n\t\t$this->object->open('r');\n\n\t\t$this->assertTrue($this->object->lock());\n\t\t$this->assertFalse($this->temp->lock());\n\n\t\t$this->assertTrue($this->object->unlock());\n\t\t$this->assertFalse($this->temp->unlock());\n\n\t\t$this->object->close();\n\t}", "private function getFileHandle()\n {\n $handle = @fopen($this->fileName, 'wb');\n\n if ($handle === false) {\n throw new MutexException('Failed to open the mutex file.');\n }\n\n return $handle;\n }", "private function unlockResource($name)\n\t\t{\n\t\t\t$query_str = \"UPDATE system_resources SET locked = 0 WHERE local_name = '\".$name.\"'\";\n\t\t\t$query = $this->db->prepare($query_str);\n\t\t\t$result = $query->execute();\n\n\t\t\treturn $result;\n\t\t}", "protected function _getLockedFileName() {\n return realpath(APPLICATION_PATH . '/../tmp') . '/' . self::LOCK_FILE_NAME;\n }", "public function lock_file($controller_name, $function_name, $file_to_lock) {\n $real_path = $_SERVER['DOCUMENT_ROOT'];\n $basename = $_SERVER['PHP_SELF'];\n $fullpath = $real_path . $basename;\n $cmd_path = substr($fullpath, 0, strrpos($fullpath, \"index.php\"));\n // echo \"in lock_file \".$trans_id.' '.$pid.' '.$start_val.' '.$limit;\n $this->Cmd_path = $cmd_path . \"index.php \" . $controller_name . \" \";\n $job_path = \"/usr/bin/php \" . $this->Cmd_path . $function_name;\n\n $upload_path = uploads_path();\n $lockFilePath = realpath(\"./\") . \"/\" . $upload_path;\n $lock_file = $lockFilePath . $file_to_lock;\n $filehandle = fopen($lock_file, \"a+\");\n if ($filehandle === False) { //echo \"File Open Failed\\n\";\n die();\n }\n if (flock($filehandle, LOCK_EX | LOCK_NB)) {\n ftruncate($filehandle, 0);\n fputs($filehandle, getmypid());\n $out_array = array();\n exec($job_path, $out_array);\n print_r($out_array); //Gets the out put from executed file\n flock($filehandle, LOCK_UN); // don't forget to release the lock\n } else {\n // throw an exception here to stop the next cron job\n exec(\"ps auxwww|grep $controller_name |grep -v grep|grep $function_name\", $pslist);\n if (count($pslist) >0){\n // already some process is running wait until it is completed\n write_to_file(\"already some process is running wait until it is completed\");\n }else{\n //it means no process is running release the lock\n write_to_file(\"no process is running release the lock\");\n flock($filehandle, LOCK_UN);\n }\n }\n fclose($filehandle);\n }", "public function acquire($exclusive = TRUE) {\r\n\t\t$isAcquired = FALSE;\r\n\t\r\n\t\tswitch ($this->method) {\r\n\t\t\tcase 'flock':\r\n\t\t\t\tif (($this->filepointer = fopen($this->resource, 'w+')) == FALSE) {\r\n\t\t\t\t\tthrow new \\RuntimeException('Lock file could not be opened', 1294586099);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tif ($exclusive) {\r\n\t\t\t\t\tif (flock($this->filepointer, LOCK_EX) == TRUE) { // exclusive lock\r\n\t\t\t\t\t\t$isAcquired = TRUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tif (flock($this->filepointer, LOCK_SH) == TRUE) { // shared lock\r\n\t\t\t\t\t\t$isAcquired = TRUE;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'semaphore':\r\n\t\t\t\tif (sem_acquire($this->resource)) {\r\n\t\t\t\t\t// Unfortunately it seems not possible to find out if the request was blocked, so we return FALSE in any case to make sure the operation is tried again.\r\n\t\t\t\t\t$isAcquired = TRUE;\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\tcase 'disable':\r\n\t\t\t\t$isAcquired = TRUE;\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\r\n\t\t$this->isAcquired = $isAcquired;\r\n\t\t\r\n\t\treturn $this->isAcquired;\r\n\t}", "public function get_lock_fileinfo() {\n return $this->lockfileinfo;\n }", "public function stream_lock($operation) {\n return flock($this->handle, $operation);\n }", "protected function releaseLock()\n {\n if ($this->lockFileDescriptor) {\n $fp = $this->lockFileDescriptor;\n $this->lockFileDescriptor = null;\n ftruncate($fp, 0);\n flock($fp, LOCK_UN);\n fclose($fp);\n }\n }", "public function unlock()\n {\n fhread_mutex_unlock($this->mutex);\n }", "function YSI_Lock($name)\n{\n\tglobal $YSI_gLockHandle;\n\t// Use flock (disk-based).\n\t$YSI_gLockHandle[$name] = fopen('./tmp/' . $name . '.tmp', 'c');\n\tflock($YSI_gLockHandle[$name], LOCK_EX);\n}", "public function walletlock() {\n\n $args = $this->args;\n $args[ \"method\" ] = __FUNCTION__;\n\n $res = $this->call($args);\n if ($res)\n return $res[ \"result\" ];\n }", "protected function provision()\n {\n $file = @fopen($this->root . '/' . static::MANAGEMENT_LOCK . static::LOCK_EXTENSION, 'c');\n\n // if we lacked rights to open the file, bail\n if ($file === false) {\n throw new Exception(\n 'Unable to open client pool management lock, this likely indicates file permission problems'\n );\n }\n\n $lock = flock($file, LOCK_EX | LOCK_NB);\n\n // if another process is already managing; can't provision bail out\n if (!$lock) {\n flock($file, LOCK_UN);\n fclose($file);\n return false;\n }\n\n // get the workspace list now that we have a lock to take an accurate counts\n $locks = glob($this->root . '/' . $this->prefix . '*' . static::LOCK_EXTENSION);\n unset($locks[array_search($this->root . '/' . static::MANAGEMENT_LOCK . static::LOCK_EXTENSION, $locks)]);\n\n // if we now appear to be at/above max just release lock and return failure\n if ($this->max && count($locks) >= $this->max) {\n flock($file, LOCK_UN);\n fclose($file);\n usleep(5000);\n return false;\n }\n\n // generate a new client identifier and touch the lock to define it\n $id = $this->prefix . new Uuid;\n touch($this->root . '/' . $id . static::LOCK_EXTENSION);\n\n // release our management lock and return success\n flock($file, LOCK_UN);\n fclose($file);\n return true;\n }", "public function clear(): void\n {\n \\file_put_contents($this->file, '', \\LOCK_EX);\n }", "public function getCompleteCacheFile();" ]
[ "0.66686505", "0.6478532", "0.61797905", "0.6154663", "0.61190623", "0.60041916", "0.5973471", "0.589063", "0.5749836", "0.5519843", "0.5517923", "0.5513199", "0.551193", "0.5480976", "0.5457315", "0.5340362", "0.53306806", "0.53148633", "0.5253568", "0.5242668", "0.5220225", "0.5207175", "0.51870203", "0.513569", "0.51145977", "0.5110482", "0.5080729", "0.507634", "0.5058003", "0.50504744" ]
0.6880541
0
Convert octal permissions to string
public static function permissionsAsString($modeOctal) { return FileHelper::permissionsAsString($modeOctal); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function fileperms_as_octal($filename)\n {\n return (string)substr(sprintf('%o', fileperms($filename)), -4);\n }", "public static function toOctalPermissions($rwx_permissions) {\n $mode = 0;\n if ($rwx_permissions[0] == 'r')\n $mode += 0400;\n if ($rwx_permissions[1] == 'w')\n $mode += 0200;\n if ($rwx_permissions[2] == 'x')\n $mode += 0100;\n else if ($rwx_permissions[2] == 's')\n $mode += 04100;\n else if ($rwx_permissions[2] == 'S')\n $mode += 04000;\n\n if ($rwx_permissions[3] == 'r')\n $mode += 040;\n if ($rwx_permissions[4] == 'w')\n $mode += 020;\n if ($rwx_permissions[5] == 'x')\n $mode += 010;\n else if ($rwx_permissions[5] == 's')\n $mode += 02010;\n else if ($rwx_permissions[5] == 'S')\n $mode += 02000;\n\n if ($rwx_permissions[6] == 'r')\n $mode += 04;\n if ($rwx_permissions[7] == 'w')\n $mode += 02;\n if ($rwx_permissions[8] == 'x')\n $mode += 01;\n else if ($rwx_permissions[8] == 't')\n $mode += 01001;\n else if ($rwx_permissions[8] == 'T')\n $mode += 01000;\n\n return $mode;\n }", "public function permsToString($val)\r\n\t{\r\n\t\t$perms = 'rwxrwxrwx';\r\n\t\t$mask = 0x100;\r\n\r\n\t\tfor ($i = 0; $i < 9; $i++)\r\n\t\t{\r\n\t\t\tif (($mask & $val) == 0) $perms[$i] = '-';\r\n\t\t\t$mask = $mask >> 1;\r\n\t\t}\r\n\t\treturn $perms;\r\n\t}", "public static function permissionsAsOctal($modeStr) {\n return FileHelper::permissionsAsOctal($modeStr);\n }", "public static function getDefaultPermissionsOctal() {\n return self::toOctalPermissions(self::$defaultPermissionsRwx);\n }", "function fileperms_to_string($perms)\n {\n return is_string($perms) ? $perms : sprintf(\"%04o\", $perms);\n }", "public static function toRwxPermissions($octal_permissions) {\n $info = \"\";\n\n // Owner\n $info .= (($octal_permissions & 0x0100) ? 'r' : '-');\n $info .= (($octal_permissions & 0x0080) ? 'w' : '-');\n $info .= (($octal_permissions & 0x0040) ?\n (($octal_permissions & 0x0800) ? 's' : 'x' ) :\n (($octal_permissions & 0x0800) ? 'S' : '-'));\n\n // Group\n $info .= (($octal_permissions & 0x0020) ? 'r' : '-');\n $info .= (($octal_permissions & 0x0010) ? 'w' : '-');\n $info .= (($octal_permissions & 0x0008) ?\n (($octal_permissions & 0x0400) ? 's' : 'x' ) :\n (($octal_permissions & 0x0400) ? 'S' : '-'));\n\n // World\n $info .= (($octal_permissions & 0x0004) ? 'r' : '-');\n $info .= (($octal_permissions & 0x0002) ? 'w' : '-');\n $info .= (($octal_permissions & 0x0001) ?\n (($octal_permissions & 0x0200) ? 't' : 'x' ) :\n (($octal_permissions & 0x0200) ? 'T' : '-'));\n\n return $info;\n }", "function file_permissions($file) {\n\t// fileperms returns a numeric value\n\t$numeric_perms = fileperms($file);\n\t// but we are used to seeing the octal value\n\t$octal_perms = sprintf('%o', $numeric_perms);\n\treturn substr($octal_perms, -4);\n}", "public function __toString()\r\n {\r\n return \"\" . $this->getCodpermission() . \"\";\r\n }", "final public static function Umask()\n {\n return sprintf(\"%03o\", umask());\n }", "public function __toString() {\n\t\treturn 'PERM';\n\t}", "function human_fileperms (string $path) : string\n{\n $perms = fileperms($path);\n // Socket\n if (($perms & 0xC000) === 0xC000) $type = 's';\n // Symbolic Link\n else if (($perms & 0xA000) === 0xA000) $type = 'l';\n // Regular\n else if (($perms & 0x8000) === 0x8000) $type = '-';\n // Block\n else if (($perms & 0x6000) === 0x6000) $type = 'b';\n // Directory\n else if (($perms & 0x4000) === 0x4000) $type = 'd';\n // Character\n else if (($perms & 0x2000) === 0x2000) $type = 'c';\n // FIFO pipe\n else if (($perms & 0x1000) === 0x1000) $type = 'p';\n // Unknown\n else $type = 'u';\n // Owner\n $owner = (($perms & 0x0100) ? 'r' : '-');\n $owner .= (($perms & 0x0080) ? 'w' : '-');\n $owner .= (($perms & 0x0040) ?\n (($perms & 0x0800) ? 's' : 'x') :\n (($perms & 0x0800) ? 'S' : '-'));\n // Group\n $group = (($perms & 0x0020) ? 'r' : '-');\n $group .= (($perms & 0x0010) ? 'w' : '-');\n $group .= (($perms & 0x0008) ?\n (($perms & 0x0400) ? 's' : 'x') :\n (($perms & 0x0400) ? 'S' : '-'));\n // All\n $all = (($perms & 0x0004) ? 'r' : '-');\n $all .= (($perms & 0x0002) ? 'w' : '-');\n $all .= (($perms & 0x0001) ?\n (($perms & 0x0200) ? 't' : 'x') :\n (($perms & 0x0200) ? 'T' : '-'));\n // Return permissions\n return \"$type$owner$group$all\";\n}", "public function getPermissions() : string\n {\n return $this->permissions;\n }", "protected function _parsePermissions($mode)\n {\n if( $mode & 0x1000 )\n $type='p'; /* FIFO pipe */\n else if( $mode & 0x2000 )\n $type='c'; /* Character special */\n else if( $mode & 0x4000 )\n $type='d'; /* Directory */\n else if( $mode & 0x6000 )\n $type='b'; /* Block special */\n else if( $mode & 0x8000 )\n $type='-'; /* Regular */\n else if( $mode & 0xA000 )\n $type='l'; /* Symbolic Link */\n else if( $mode & 0xC000 )\n $type='s'; /* Socket */\n else\n $type='u'; /* UNKNOWN */\n\n /* Determine permissions */\n $owner['read'] = ($mode & 00400) ? 'r' : '-';\n $owner['write'] = ($mode & 00200) ? 'w' : '-';\n $owner['execute'] = ($mode & 00100) ? 'x' : '-';\n $group['read'] = ($mode & 00040) ? 'r' : '-';\n $group['write'] = ($mode & 00020) ? 'w' : '-';\n $group['execute'] = ($mode & 00010) ? 'x' : '-';\n $world['read'] = ($mode & 00004) ? 'r' : '-';\n $world['write'] = ($mode & 00002) ? 'w' : '-';\n $world['execute'] = ($mode & 00001) ? 'x' : '-';\n\n /* Adjust for SUID, SGID and sticky bit */\n if( $mode & 0x800 )\n $owner[\"execute\"] = ($owner['execute']=='x') ? 's' : 'S';\n if( $mode & 0x400 )\n $group[\"execute\"] = ($group['execute']=='x') ? 's' : 'S';\n if( $mode & 0x200 )\n $world[\"execute\"] = ($world['execute']=='x') ? 't' : 'T';\n\n $s=sprintf('%1s', $type);\n $s.=sprintf('%1s%1s%1s', $owner['read'], $owner['write'], $owner['execute']);\n $s.=sprintf('%1s%1s%1s', $group['read'], $group['write'], $group['execute']);\n $s.=sprintf('%1s%1s%1s', $world['read'], $world['write'], $world['execute']);\n return trim($s);\n }", "public function permissionNames()\r\n {\r\n return array(\r\n 0x0008 => 'membership',\r\n 0x0400 => 're',\r\n 0x0080 => 'neighborhood',\r\n 0x0020 => 'ministry',\r\n 0x0040 => 'change',\r\n 0x0200 => 'admin',\r\n );\r\n\r\n }", "public function getPermission(): string {\n\t\treturn \"blocksniper.type.\" . str_replace(\"hollow\", \"\", str_replace(\" \", \"_\", strtolower($this->getName())));\n\t}", "function oktale_zugriffsrechte($value_datei)\n\t{\n\t\treturn substr(sprintf('%o', fileperms($value_datei)), -3);\n\t}", "function getfperms($file)\n{\n $perms = @fileperms($file);\n\n if (($perms & 0xC000) == 0xC000) $info = 's';\n elseif (($perms & 0xA000) == 0xA000) $info = 'l';\n elseif (($perms & 0x8000) == 0x8000) $info = '-';\n elseif (($perms & 0x6000) == 0x6000) $info = 'b';\n elseif (($perms & 0x4000) == 0x4000) $info = 'd';\n elseif (($perms & 0x2000) == 0x2000) $info = 'c';\n elseif (($perms & 0x1000) == 0x1000) $info = 'p';\n else $info = 'u';\n\n $info .= (($perms & 0x0100) ? 'r' : '-');\n $info .= (($perms & 0x0080) ? 'w' : '-');\n $info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-'));\n $info .= (($perms & 0x0020) ? 'r' : '-');\n $info .= (($perms & 0x0010) ? 'w' : '-');\n $info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-'));\n $info .= (($perms & 0x0004) ? 'r' : '-');\n $info .= (($perms & 0x0002) ? 'w' : '-');\n $info .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x' ) : (($perms & 0x0200) ? 'T' : '-'));\n return $info;\n}", "function permissions_edit($perms) {\n return 'foo';\n $perms = json_decode($permsJson, true);\n if(!$perms || !is_array($perms)) return '';\n $ar = [];\n foreach($perms as $k => $v) {\n $ar[]= ucfirst($v).\" {$k}\";\n }\n return implode(', ', $ar);\n}", "public static function perms(string $file, ?int $perms = null): string\n {\n if ($perms === null) {\n if (!\\file_exists($file)) {\n return '';\n }\n\n /** @noinspection CallableParameterUseCaseInTypeContextInspection */\n $perms = \\fileperms($file);\n }\n\n /** @codeCoverageIgnoreStart */\n $info = 'u'; // undefined\n if (($perms & self::TYPE_SOCKET) === self::TYPE_SOCKET) {\n $info = 's';\n } elseif (($perms & self::TYPE_SYMLINK) === self::TYPE_SYMLINK) {\n $info = 'l';\n } elseif (($perms & self::TYPE_REGULAR) === self::TYPE_REGULAR) {\n $info = '-';\n } elseif (($perms & self::TYPE_BLOCK) === self::TYPE_BLOCK) {\n $info = 'b';\n } elseif (($perms & self::TYPE_DIR) === self::TYPE_DIR) {\n $info = 'd';\n } elseif (($perms & self::TYPE_CHARACTER) === self::TYPE_CHARACTER) {\n $info = 'c';\n } elseif (($perms & self::TYPE_FIFO) === self::TYPE_FIFO) {\n $info = 'p';\n }\n // @codeCoverageIgnoreEnd\n\n // Owner\n $info .= (($perms & self::PERM_OWNER_READ) > 0 ? 'r' : '-');\n $info .= (($perms & self::PERM_OWNER_WRITE) > 0 ? 'w' : '-');\n\n /** @noinspection NestedTernaryOperatorInspection */\n $info .= (($perms & self::PERM_OWNER_EXEC) > 0\n ? (($perms & self::PERM_OWNER_EXEC_STICKY) > 0 ? 's' : 'x')\n : (($perms & self::PERM_OWNER_EXEC_STICKY) > 0 ? 'S' : '-'));\n\n // Group\n $info .= (($perms & self::PERM_GROUP_READ) > 0 ? 'r' : '-');\n $info .= (($perms & self::PERM_GROUP_WRITE) > 0 ? 'w' : '-');\n\n /** @noinspection NestedTernaryOperatorInspection */\n $info .= (($perms & self::PERM_GROUP_EXEC) > 0\n ? (($perms & self::PERM_GROUP_EXEC_STICKY) > 0 ? 's' : 'x')\n : (($perms & self::PERM_GROUP_EXEC_STICKY) > 0 ? 'S' : '-'));\n\n // All\n $info .= (($perms & self::PERM_ALL_READ) > 0 ? 'r' : '-');\n $info .= (($perms & self::PERM_ALL_WRITE) > 0 ? 'w' : '-');\n\n /** @noinspection NestedTernaryOperatorInspection */\n $info .= (($perms & self::PERM_ALL_EXEC) > 0\n ? (($perms & self::PERM_ALL_EXEC_STICKY) > 0 ? 't' : 'x')\n : (($perms & self::PERM_ALL_EXEC_STICKY) > 0 ? 'T' : '-'));\n\n return $info;\n }", "function permissions_print($permsJson) {\n $perms = json_decode($permsJson, true);\n if(!$perms || !is_array($perms)) return '';\n $ar = [];\n foreach($perms as $k => $v) {\n $ar[]= ucfirst($v).\" {$k}\";\n }\n return implode(', ', $ar);\n}", "function userPermissionsReadable($val)\n {\n if ($val == 4) {\n return '<em>' . _('BANNED') . '</em>';\n } elseif ($val == 3) {\n return _('Admin');\n } else {\n return _('Regular User');\n }\n }", "public static function setDefaultPermissionsOctal($perms) {\n self::$defaultPermissionsRwx = self::toRwxPermissions($perms);\n }", "public function to_oct() { # :: Int -> String\n return new Str(decoct($this->value));\n }", "function octdec ($octal_string) {}", "public function __toString()\n {\n $result = '';\n foreach ($this->permissionList as $key) {\n $result .= (string) $key . \"<br />\";\n }\n\n return $result;\n }", "public static function getStr($permission)\n {\n switch ($permission) {\n case 0:\n return 'Editor';\n break;\n case 1:\n return 'Administrator';\n break;\n case 2:\n return 'Super-Administrator';\n break;\n default:\n return null;\n }\n }", "protected function get_permission_strings() {\n static $strpermissions;\n if (!$strpermissions) {\n $strpermissions = array(\n CAP_INHERIT => new lang_string('inherit', 'role'),\n CAP_ALLOW => new lang_string('allow', 'role'),\n CAP_PREVENT => new lang_string('prevent', 'role'),\n CAP_PROHIBIT => new lang_string('prohibit', 'role')\n );\n }\n return $strpermissions;\n }", "function umask ($mask = null) {}", "public function permissionCodes()\r\n {\r\n return array(\r\n 'membership' => 0x008,\r\n 're' => 0x0400,\r\n 'neighborhood' => 0x080,\r\n 'ministry' => 0x020,\r\n 'change' => 0x040,\r\n 'admin' => 0x0200,\r\n );\r\n\r\n }" ]
[ "0.75095385", "0.7299259", "0.7251952", "0.71978015", "0.7152933", "0.71169454", "0.711441", "0.64220697", "0.64030784", "0.63811314", "0.62409985", "0.6144889", "0.6071377", "0.6027047", "0.5888439", "0.57124454", "0.5657032", "0.564838", "0.56473744", "0.56105155", "0.5567705", "0.5549016", "0.55355835", "0.55309176", "0.54711914", "0.5444307", "0.5443081", "0.54347557", "0.54170775", "0.5404892" ]
0.8074843
0
Convert string representation of permissions to octal
public static function permissionsAsOctal($modeStr) { return FileHelper::permissionsAsOctal($modeStr); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function toOctalPermissions($rwx_permissions) {\n $mode = 0;\n if ($rwx_permissions[0] == 'r')\n $mode += 0400;\n if ($rwx_permissions[1] == 'w')\n $mode += 0200;\n if ($rwx_permissions[2] == 'x')\n $mode += 0100;\n else if ($rwx_permissions[2] == 's')\n $mode += 04100;\n else if ($rwx_permissions[2] == 'S')\n $mode += 04000;\n\n if ($rwx_permissions[3] == 'r')\n $mode += 040;\n if ($rwx_permissions[4] == 'w')\n $mode += 020;\n if ($rwx_permissions[5] == 'x')\n $mode += 010;\n else if ($rwx_permissions[5] == 's')\n $mode += 02010;\n else if ($rwx_permissions[5] == 'S')\n $mode += 02000;\n\n if ($rwx_permissions[6] == 'r')\n $mode += 04;\n if ($rwx_permissions[7] == 'w')\n $mode += 02;\n if ($rwx_permissions[8] == 'x')\n $mode += 01;\n else if ($rwx_permissions[8] == 't')\n $mode += 01001;\n else if ($rwx_permissions[8] == 'T')\n $mode += 01000;\n\n return $mode;\n }", "public static function permissionsAsString($modeOctal) {\n return FileHelper::permissionsAsString($modeOctal);\n }", "function fileperms_as_octal($filename)\n {\n return (string)substr(sprintf('%o', fileperms($filename)), -4);\n }", "public static function getDefaultPermissionsOctal() {\n return self::toOctalPermissions(self::$defaultPermissionsRwx);\n }", "public static function toRwxPermissions($octal_permissions) {\n $info = \"\";\n\n // Owner\n $info .= (($octal_permissions & 0x0100) ? 'r' : '-');\n $info .= (($octal_permissions & 0x0080) ? 'w' : '-');\n $info .= (($octal_permissions & 0x0040) ?\n (($octal_permissions & 0x0800) ? 's' : 'x' ) :\n (($octal_permissions & 0x0800) ? 'S' : '-'));\n\n // Group\n $info .= (($octal_permissions & 0x0020) ? 'r' : '-');\n $info .= (($octal_permissions & 0x0010) ? 'w' : '-');\n $info .= (($octal_permissions & 0x0008) ?\n (($octal_permissions & 0x0400) ? 's' : 'x' ) :\n (($octal_permissions & 0x0400) ? 'S' : '-'));\n\n // World\n $info .= (($octal_permissions & 0x0004) ? 'r' : '-');\n $info .= (($octal_permissions & 0x0002) ? 'w' : '-');\n $info .= (($octal_permissions & 0x0001) ?\n (($octal_permissions & 0x0200) ? 't' : 'x' ) :\n (($octal_permissions & 0x0200) ? 'T' : '-'));\n\n return $info;\n }", "public function permsToString($val)\r\n\t{\r\n\t\t$perms = 'rwxrwxrwx';\r\n\t\t$mask = 0x100;\r\n\r\n\t\tfor ($i = 0; $i < 9; $i++)\r\n\t\t{\r\n\t\t\tif (($mask & $val) == 0) $perms[$i] = '-';\r\n\t\t\t$mask = $mask >> 1;\r\n\t\t}\r\n\t\treturn $perms;\r\n\t}", "function fileperms_to_string($perms)\n {\n return is_string($perms) ? $perms : sprintf(\"%04o\", $perms);\n }", "final public static function Umask()\n {\n return sprintf(\"%03o\", umask());\n }", "function octdec ($octal_string) {}", "function file_permissions($file) {\n\t// fileperms returns a numeric value\n\t$numeric_perms = fileperms($file);\n\t// but we are used to seeing the octal value\n\t$octal_perms = sprintf('%o', $numeric_perms);\n\treturn substr($octal_perms, -4);\n}", "protected function _parsePermissions($mode)\n {\n if( $mode & 0x1000 )\n $type='p'; /* FIFO pipe */\n else if( $mode & 0x2000 )\n $type='c'; /* Character special */\n else if( $mode & 0x4000 )\n $type='d'; /* Directory */\n else if( $mode & 0x6000 )\n $type='b'; /* Block special */\n else if( $mode & 0x8000 )\n $type='-'; /* Regular */\n else if( $mode & 0xA000 )\n $type='l'; /* Symbolic Link */\n else if( $mode & 0xC000 )\n $type='s'; /* Socket */\n else\n $type='u'; /* UNKNOWN */\n\n /* Determine permissions */\n $owner['read'] = ($mode & 00400) ? 'r' : '-';\n $owner['write'] = ($mode & 00200) ? 'w' : '-';\n $owner['execute'] = ($mode & 00100) ? 'x' : '-';\n $group['read'] = ($mode & 00040) ? 'r' : '-';\n $group['write'] = ($mode & 00020) ? 'w' : '-';\n $group['execute'] = ($mode & 00010) ? 'x' : '-';\n $world['read'] = ($mode & 00004) ? 'r' : '-';\n $world['write'] = ($mode & 00002) ? 'w' : '-';\n $world['execute'] = ($mode & 00001) ? 'x' : '-';\n\n /* Adjust for SUID, SGID and sticky bit */\n if( $mode & 0x800 )\n $owner[\"execute\"] = ($owner['execute']=='x') ? 's' : 'S';\n if( $mode & 0x400 )\n $group[\"execute\"] = ($group['execute']=='x') ? 's' : 'S';\n if( $mode & 0x200 )\n $world[\"execute\"] = ($world['execute']=='x') ? 't' : 'T';\n\n $s=sprintf('%1s', $type);\n $s.=sprintf('%1s%1s%1s', $owner['read'], $owner['write'], $owner['execute']);\n $s.=sprintf('%1s%1s%1s', $group['read'], $group['write'], $group['execute']);\n $s.=sprintf('%1s%1s%1s', $world['read'], $world['write'], $world['execute']);\n return trim($s);\n }", "public function to_oct() { # :: Int -> String\n return new Str(decoct($this->value));\n }", "public static function setDefaultPermissionsOctal($perms) {\n self::$defaultPermissionsRwx = self::toRwxPermissions($perms);\n }", "public function __toString() {\n\t\treturn 'PERM';\n\t}", "public function getPermissions() : string\n {\n return $this->permissions;\n }", "public function permissionCodes()\r\n {\r\n return array(\r\n 'membership' => 0x008,\r\n 're' => 0x0400,\r\n 'neighborhood' => 0x080,\r\n 'ministry' => 0x020,\r\n 'change' => 0x040,\r\n 'admin' => 0x0200,\r\n );\r\n\r\n }", "public function __toString()\r\n {\r\n return \"\" . $this->getCodpermission() . \"\";\r\n }", "function umask ($mask = null) {}", "public function permissionNames()\r\n {\r\n return array(\r\n 0x0008 => 'membership',\r\n 0x0400 => 're',\r\n 0x0080 => 'neighborhood',\r\n 0x0020 => 'ministry',\r\n 0x0040 => 'change',\r\n 0x0200 => 'admin',\r\n );\r\n\r\n }", "public function testPermissions() {\n\t\t$this->assertEquals('0777', $this->object->permissions());\n\t\t$this->assertEquals(null, $this->temp->permissions());\n\n\t\t$this->object->chmod(0444);\n\t\t$this->temp->chmod(0444);\n\n\t\t$this->assertEquals('0444', $this->object->permissions());\n\t\t$this->assertEquals(null, $this->temp->permissions());\n\t}", "function human_fileperms (string $path) : string\n{\n $perms = fileperms($path);\n // Socket\n if (($perms & 0xC000) === 0xC000) $type = 's';\n // Symbolic Link\n else if (($perms & 0xA000) === 0xA000) $type = 'l';\n // Regular\n else if (($perms & 0x8000) === 0x8000) $type = '-';\n // Block\n else if (($perms & 0x6000) === 0x6000) $type = 'b';\n // Directory\n else if (($perms & 0x4000) === 0x4000) $type = 'd';\n // Character\n else if (($perms & 0x2000) === 0x2000) $type = 'c';\n // FIFO pipe\n else if (($perms & 0x1000) === 0x1000) $type = 'p';\n // Unknown\n else $type = 'u';\n // Owner\n $owner = (($perms & 0x0100) ? 'r' : '-');\n $owner .= (($perms & 0x0080) ? 'w' : '-');\n $owner .= (($perms & 0x0040) ?\n (($perms & 0x0800) ? 's' : 'x') :\n (($perms & 0x0800) ? 'S' : '-'));\n // Group\n $group = (($perms & 0x0020) ? 'r' : '-');\n $group .= (($perms & 0x0010) ? 'w' : '-');\n $group .= (($perms & 0x0008) ?\n (($perms & 0x0400) ? 's' : 'x') :\n (($perms & 0x0400) ? 'S' : '-'));\n // All\n $all = (($perms & 0x0004) ? 'r' : '-');\n $all .= (($perms & 0x0002) ? 'w' : '-');\n $all .= (($perms & 0x0001) ?\n (($perms & 0x0200) ? 't' : 'x') :\n (($perms & 0x0200) ? 'T' : '-'));\n // Return permissions\n return \"$type$owner$group$all\";\n}", "function hex_to_oct($hex){\n return base_convert($hex,16,8);\n }", "function permissions_edit($perms) {\n return 'foo';\n $perms = json_decode($permsJson, true);\n if(!$perms || !is_array($perms)) return '';\n $ar = [];\n foreach($perms as $k => $v) {\n $ar[]= ucfirst($v).\" {$k}\";\n }\n return implode(', ', $ar);\n}", "function ver_permisos ($gid, $resto)\n\t{\n\t\t$regexp = '/^[01][01]$/';\n\t\t$permisos = \"11\";\n\n\t\tif (!preg_match ($regexp, $gid))\n\t\t{\n\t\t\t$permisos .= \"00\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$permisos .= $gid;\n\t\t}\n\n\t\tif (!preg_match ($regexp, $resto))\n\t\t{\n\t\t\t$permisos .= \"00\";\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$permisos .= $resto;\n\t\t}\n\n\t\treturn $permisos;\n\t}", "function oktale_zugriffsrechte($value_datei)\n\t{\n\t\treturn substr(sprintf('%o', fileperms($value_datei)), -3);\n\t}", "function bin_to_oct($bin){\n return base_convert($bin,2,8);\n }", "function oct_to_hex($oct){\n return base_convert($oct,8,16);\n }", "public static function parse($input) {\n\t\tswitch($input) {\n\t\t\tcase 1:\n\t\t\t\treturn FilePermissions::PUBLIC_ACCESS;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\treturn FilePermissions::RESTRICTED_ACCESS;\n\t\t\t\t\n\t\t\t#case 3:\n\t\t\t#\treturn FilePermissions::PRIVATE_ACCESS;\t\n\t\t\t\t\n\t\t\tdefault:\n\t\t\t\tthrow new InvalidArgumentException('$input has wrong format');\n\t\t}\n\t}", "protected function get_permission_strings() {\n static $strpermissions;\n if (!$strpermissions) {\n $strpermissions = array(\n CAP_INHERIT => new lang_string('inherit', 'role'),\n CAP_ALLOW => new lang_string('allow', 'role'),\n CAP_PREVENT => new lang_string('prevent', 'role'),\n CAP_PROHIBIT => new lang_string('prohibit', 'role')\n );\n }\n return $strpermissions;\n }", "function oct_to_bin($oct){\n return base_convert($oct,8,2);\n }" ]
[ "0.7299942", "0.7213264", "0.7189782", "0.7123934", "0.6515655", "0.6405349", "0.6212478", "0.61154044", "0.6059921", "0.5900263", "0.5722218", "0.57215375", "0.57075804", "0.5494517", "0.5420028", "0.53946555", "0.5334396", "0.52997816", "0.5298401", "0.51405233", "0.512179", "0.5113509", "0.5102433", "0.5080339", "0.50583684", "0.5052865", "0.50375456", "0.5019729", "0.49786314", "0.49767748" ]
0.75003695
0
Ensure that object is implementing DirectoryInterface
protected static function ensureDirObject(&$pathOrObject) { if ($pathOrObject instanceof DirectoryInterface) { return $pathOrObject; } elseif ($pathOrObject instanceof FileInterface) { return static::dir($pathOrObject->getPath()); } elseif (is_string($pathOrObject)) { return static::dir($pathOrObject); } return $pathOrObject; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function dir(): DirInterface;", "public function isDirectory(): bool;", "function getParentDirectory() : DirectoryInterface;", "function dir(string $directory, $context): Directory|false {}", "public function isDir();", "public function enabled(ResourceInterface $resource)\n {\n return $resource->exists() && $resource instanceof DirectoryResource;\n }", "public function rootDir(): DirInterface;", "public function testTypeIdentifiesDirectory()\n {\n mkdir(self::$temp . DS . 'foo-dir');\n\n $this->assertSame('dir', Storage::type(self::$temp . DS . 'foo-dir'));\n }", "public function appDir(): DirInterface;", "public function getChild(string $path): DirInterface;", "protected function checkDirectory()\n {\n if (!is_dir($this->absoluteStorageDir)) {\n throw new DirDoesNotExistException(\"Directory '{$this->absoluteStorageDir}' doesnt exists\");\n }\n\n if (!is_writable($this->absoluteStorageDir)) {\n if (!@chmod($this->absoluteStorageDir, 0777)) {\n throw new DirNotWritableException(\"Directory '{$this->absoluteStorageDir}' is not writable\");\n }\n }\n }", "function checkFolder()\n\t{\n\t\t$ignoredPageTypes = Config::inst()->get($this->class, 'ignored_classes');\n\n\t\tforeach ($ignoredPageTypes as $pagetype) {\n\t\t\tif (is_a($this->owner, $pagetype)) {\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\tif (class_exists('Translatable')\n\t\t\t&& $this->owner->Locale !== Translatable::default_locale()\n\t\t\t&& !Config::inst()->get($this->class, 'create_folder_for_translations')\n\t\t) {\n\t\t\treturn;\n\t\t}\n\n\t\tif (!$this->owner->RootFolderID) {\n\t\t\t$this->createRootFolder();\n\t\t} else {\n\t\t\t$this->updateRootFolder();\n\t\t}\n\t}", "public function testBaseClassesImplementsPermissionsInterface()\n {\n $this->assertTrue($this->element_base_class_reflection->implementsInterface(PermissionsInterface::class));\n $this->assertTrue($this->restrictive_element_base_class_reflection->implementsInterface(PermissionsInterface::class));\n $this->assertFalse($this->reverted_element_base_class_reflection->implementsInterface(PermissionsInterface::class));\n }", "public function getManager(): ?DirectoryObject {\n $val = $this->getBackingStore()->get('manager');\n if (is_null($val) || $val instanceof DirectoryObject) {\n return $val;\n }\n throw new \\UnexpectedValueException(\"Invalid type found in backing store for 'manager'\");\n }", "protected function registerDirectoriesCollection()\n {\n $this->app->bind(DirectoriesInterface::class, function($app){\n return new Directories();\n });\n }", "public static function create(DirectoryInterface $directory, string $dirName, int $chmod = 0755) : DirectoryInterface {\n $_dirName = str_replace(array('\\\\', '/'), DIRECTORY_SEPARATOR, trim($dirName, '\\\\/'));\n $path = $directory->getPath().DIRECTORY_SEPARATOR.$_dirName;\n try {\n if (!is_dir($path)) {\n mkdir($path, $chmod, true);\n return new Directory($path);\n }\n } catch (\\Error $err) {\n throw new FileSystemException(\"Following error occurred while making a directory {$path} : {$err->getMessage()}\");\n }\n }", "private function checkObjectCompatibility($object)\n {\n if (!method_exists($object, 'getId') || !method_exists($object, 'getOwnerId') || !method_exists($object, 'permissionsClass'))\n throw new \\InvalidArgumentException(__('Provided Object not under permission management'));\n }", "public function assertStorageInterface()\n {\n if (! ($this->getAdapter() instanceof StorageInterface)) {\n throw new AdapterNotStorageInterfaceException('This adapter not `StorageInterface` instance.');\n }\n }", "public function testDirectory()\n {\n $directorName = 'pydio-test';\n $this->directoryService->createDirectory($this->namespace, $directorName);\n $content = $this->directoryService->ls($this->namespace);\n $listing = $content['tree'];\n // there must be only the bin and the folder\n $this->assertCount(2, $listing);\n // the created folder is the first element of the list\n $this->assertEquals('/'.$directorName, $listing[0]['@attributes']['filename']);\n $this->directoryService->removeDirectory($this->namespace, $directorName);\n\n $content = $this->directoryService->ls($this->namespace);\n $listing = $content['tree'];\n // there must be only the bin\n $this->assertCount(1, $listing);\n }", "public function isDir ()\n {\n return $this->type == EntryType::DIRECTORY;\n }", "public function testCheckDirectory(): void\n {\n $this->assertFalse($this->root->hasChild('mypath'));\n $this->wrapper->checkDirectory(vfsStream::url('exampleDir/mypath/.'));\n $this->assertTrue($this->root->hasChild('mypath'));\n }", "public function testFoldersSetFolderPermission()\n {\n }", "private function validateDestination($destination) {\n\n\t\tif (!is_dir($destination)) {\n\t\t\tthrow new DirException('Given destination \"'.$destination.'\" is not a directory');\n\t\t}\n\n\t\tif (!is_writable($destination)) {\n\t\t\tthrow new DirNotWritableException('Directory '.$destination.' is not writable');\n\t\t}\n\n\t}", "public static function isDirectory()\n {\n return true;\n }", "public function ensureThatClassHasDataStoreDirectoryAttribute()\n {\n $this->assertClassHasAttribute('dataStoreDirectory', 'RDRData');\n }", "public static function isInstanceOf($object)\n {\n throw new Exception('The manually abstract method isInstanceOf is not been hardcoded in the child class');\n }", "function directoryAccess($directory, $user, $is_directory = false)\n{\n if (($is_directory and is_dir($directory)) or !$is_directory) {\n foreach ($user['directories'] as $dir) {\n if (strpos($directory, $user['root_directory'] . $dir) === 0) {\n return true;\n }\n }\n }\n return false;\n}", "public static function isDirectory($directory)\n {\n }", "public function testConstructorReturnsObjectImplementingIdownloaderInterface(): void\n {\n $this->assertInstanceOf(\n IDownloader::class,\n new FakeDownloader()\n );\n }", "public function testAutoLoad ()\n\t{\n\t\t// autoload the class\n\t\t$dir = new Directories;\n\t\t\n\t\t// Assert to true if we got the class\n\t\t$this->assertTrue ( $dir );\n\t}" ]
[ "0.66742134", "0.5682185", "0.5623343", "0.55266285", "0.53646344", "0.53189856", "0.5291049", "0.5251491", "0.52253383", "0.521594", "0.5214465", "0.5194438", "0.5136095", "0.5102523", "0.50730807", "0.5038152", "0.50355536", "0.49402627", "0.49307582", "0.49009117", "0.488638", "0.48620734", "0.484342", "0.48427707", "0.48409787", "0.48303893", "0.48214114", "0.48026037", "0.47976583", "0.47926232" ]
0.5691861
1
Check if unlock timer is set or create it
protected static function checkUnlockTimer() { if (static::$_unlockTimer instanceof TimerInterface) { return; } static::$_unlockTimer = \Reaction::$app->loop->addPeriodicTimer(1, function () { $now = time(); foreach (static::$_lockedFiles as $filePath => $timeout) { if ($timeout <= $now) { static::unlock($filePath); } } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function swoole_timer_exists(int $timer_id) {}", "function _set_upgrade_lock( $release_timeout ) {\n\tglobal $wpdb;\n\n\t$lock_option = _get_lock_option();\n\n\t$lock_result = $wpdb->query(\n\t\t$wpdb->prepare(\n\t\t\t\"INSERT IGNORE INTO `$wpdb->options` ( `option_name`, `option_value`, `autoload` ) VALUES (%s, %s, 'no') /* LOCK */\",\n\t\t\t$lock_option,\n\t\t\ttime()\n\t\t)\n\t);\n\n\tif ( ! $lock_result ) {\n\t\t$lock_result = \\get_option( $lock_option );\n\n\t\t// If a lock couldn't be created, and there isn't a lock, bail.\n\t\tif ( ! $lock_result )\n\t\t\treturn false;\n\n\t\t// Check to see if the lock is still valid. If it is, bail.\n\t\tif ( $lock_result > ( time() - $release_timeout ) )\n\t\t\treturn false;\n\n\t\t// There must exist an expired lock, clear it...\n\t\t_release_upgrade_lock();\n\n\t\t// ...and re-gain it.\n\t\treturn _set_upgrade_lock( $release_timeout );\n\t}\n\n\t// Update the lock, as by this point we've definitely got a lock, just need to fire the actions.\n\t\\update_option( $lock_option, time() );\n\n\treturn true;\n}", "function checkNewTicketTime(){\n\t}", "public function testGetTimerByID() {\r\n $callback = function() {\r\n $this->timer->destroy();\r\n $this->window->close();\r\n };\r\n $this->timer = new Timer($callback, $this->window, Timer::TEST_TIMEOUT);\r\n\r\n $timer = Timer::getTimerByID($this->timer->getID());\r\n\r\n $this->assertEquals($timer->getID(), $this->timer->getID());\r\n $this->assertNull(Timer::getTimerByID(1000));\r\n\r\n $this->timer->start();\r\n $this->app->start();\r\n\r\n $this->assertEquals($timer->getID(), $this->timer->getID());\r\n $this->assertNull(Timer::getTimerByID(1000));\r\n }", "public function wpp_settings_check_lock() {\n if ( !$lock = get_option( 'wpp_settings_lock' ) )\n return false;\n\n $lock = explode( ':', $lock );\n $time = $lock[0];\n $user = isset( $lock[1] ) ? $lock[1] : 0;\n \n /** This filter is similar to wp_check_post_lock_window */\n $time_window = apply_filters( 'wpp_settings_lock_window', 150 );\n \n if ( $time && $time > time() - $time_window && $user != get_current_user_id() )\n return $user;\n return false;\n }", "public function isLocked();", "public function isLocked();", "private static function checkInactivity(){\r\n\t\tif(isset($_SESSION[Constants::$KEY_LAST_TIME_SESSION])){\r\n\t\t\t//tenemos un tiempo registrado para nuestra ultima accion en el sitio\r\n\t\t\t//vemos si no nos excedimos de nuestra maxima inactividad configurada\r\n\t\t\t$time0 = $_SESSION[Constants::$KEY_LAST_TIME_SESSION];\r\n\t\t\t$userDTO = $_SESSION[Constants::$KEY_USUARIO_DTO];\r\n\t\t\t//el tiempo esta almacenado en minutos, lo llevamos a segundos\r\n\t\t\t$maxTime = $userDTO->getTiempoSesion() * 60;\r\n\t\t\t\t\r\n\t\t\tif((time() - $time0) > $maxTime) {\r\n\t\t\t\t//tengo inactivo mas tiempo del permitido, limpio la sesion\r\n\t\t\t\tsession_unset();\r\n\t\t\t\t$_SESSION[Constants::$KEY_MESSAGE_ERROR] = Constants::$TEXT_SESSION_EXPIRED;\r\n\t\t\t\theader(\"Location: index.php\");\r\n\t\t\t\texit();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "function isExpired($name, $time);", "protected function lockoutTime()\n {\n return static::$config['locked_for'] ?? 60;\n }", "private function get_action_lock() {\n\t\t\tif($this->action_has_lock() && !$this->action_has_completed()) {\n\t\t\t\tif( $this->is_lock_owner() )\n\t\t\t\t\treturn true; //already own it\n\t\t\t\treturn false; //someone else owns it\n\t\t\t}\n\t\t\t\n\t\t\t//set it for this instance\n\t\t\t$this->lock_key = md5( uniqid( microtime() . mt_rand(), true ) );\t\n\t\t\tset_transient($this->get_lock_name(), $this->lock_key);\n\t\t\treturn true;\n\t\t}", "public function accountTemporarilyLocked()\n {\n if (($this->getLastLoginAttempt('U') +\n sfConfig::get('app_sf_easy_auth_lockout_duration')) > time())\n {\n if ($this->getFailedLogins() >= sfConfig::get('app_sf_easy_auth_login_attempt_threshold'))\n {\n return true;\n }\n }\n\n return false;\n }", "public function testSetSwitchTimer()\n {\n }", "protected function lockoutTime()\n {\n return property_exists($this, 'lockoutTime') ? $this->lockoutTime : 60;\n }", "public function testTimerAlreadyRunningException() {\r\n $callback = function() {\r\n try {\r\n $this->timer->start();\r\n }\r\n catch(TimerAlreadyRunningException $tare) {\r\n $this->timer->destroy();\r\n $this->window->close();\r\n\r\n return;\r\n }\r\n\r\n $this->fail('The expected TimerAlreadyRunningException has not been raised.');\r\n };\r\n $this->timer = new Timer($callback, $this->window, Timer::TEST_TIMEOUT);\r\n\r\n $this->timer->start();\r\n\r\n $this->app->start();\r\n }", "public function unlock();", "public function get_timer() {\n return $this->semaphore_ac_timer;\n }", "public function isLocked(): bool\n {\n return $this->counter > 0;\n }", "public function isLocked(): bool\n\t{\n\t\treturn $this->locked_until !== null && $this->locked_until->getTimestamp() >= Time::now()->getTimestamp();\n\t}", "public function unlock()\r\n {\r\n }", "public function isLocked()\n\t{\n\t\treturn null;\n\t}", "public function isLocked(): bool;", "public function release_lockout( $id = 0 ) {\n\t\tglobal $wpdb;\n\n\t\tif ( ! $id ) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn (bool) $wpdb->update(\n\t\t\t$wpdb->base_prefix . 'itsec_lockouts',\n\t\t\tarray(\n\t\t\t\t'lockout_active' => 0,\n\t\t\t),\n\t\t\tarray(\n\t\t\t\t'lockout_id' => (int) $id,\n\t\t\t)\n\t\t);\n\t}", "public function getActualTimer();", "function game_set_timer($game_user, $timer_key, $time_secs) {\n game_set_value($game_user, $timer_key, REQUEST_TIME + $time_secs);\n}", "public function test_isUserLocked_returns_true_if_locking_duration_has_not_expired_yet_and_ip_matches()\n {\n $now = 100; // current time: 100 seconds after beginning of time\n\n $lockDuration = 60;\n\n $clock = new ClockStub($now);\n $usersDao = $this->createStub(Users::class);\n\n // system under test\n $sut = new LoginService($usersDao, null, $clock, $lockDuration);\n\n // the time when the user was locked.\n // Note: locked at time 50; plus 60 seconds lock duration, is > than 100 (current time).\n // So the user is still locked (for 10 more seconds...)\n $lockedTime = new DateTime();\n $lockedTime->setTimestamp(50);\n $userIp = '1.2.3.4';\n $user = new User(1, 'username', '[email protected]', 'pass', $userIp, 0, $lockedTime);\n\n $this->assertTrue($sut->isUserLocked($user, $userIp), 'This user is expected to be locked');\n }", "public function acquire(): bool\n {\n if ($this->seconds > 0) {\n return $this->redis->set($this->name, $this->owner, [\n 'NX',\n 'EX' => $this->seconds\n ]) == true;\n } else {\n return $this->redis->setnx($this->name, $this->owner) === 1;\n }\n }", "private function check_timeout () {\n //session set\n if(isset($_SESSION['lastactive'])) {\n if( strlen($this->settings->inactivityTimeout)>0 && (time()-@$_SESSION['lastactive']) > $this->settings->inactivityTimeout) {\n $this->timeout = true;\n unset($_SESSION['lastactive']);\n }\n }\n }", "protected function isRegistrationExpired()\n {\n return $this->getRunningTime() > $this->localConfigurationManager->get('registration.sessionTimeout');\n }", "protected function _existing_timer ($id)\n {\n if (! isset ($this->_timers [$id]))\n {\n log_message (\"Timer [$id] does not exist\", Msg_type_warning, Msg_channel_system);\n }\n\n return $this->_timers [$id];\n }" ]
[ "0.58433557", "0.55905527", "0.5429038", "0.5423939", "0.5379001", "0.532327", "0.532327", "0.5149994", "0.5133984", "0.5096241", "0.5074805", "0.50568926", "0.5043381", "0.5009647", "0.5008891", "0.49875116", "0.49720648", "0.49667615", "0.49575663", "0.49331197", "0.49314108", "0.49253854", "0.49026522", "0.4902222", "0.48987758", "0.48947865", "0.48933625", "0.4891308", "0.48826724", "0.48747167" ]
0.76217246
0
/ View Artist Profile
public function profile_artist() { $user_id= $_GET['id']; $artist=$this->Api_model->getSingleRow('artist',array('user_id'=>$user_id)); $data['user']= $artist; $data['page']='artist'; $this -> load -> view('common/head.php'); $this -> load -> view('common/sidebar.php', $data); $this -> load ->view('profile.php', $data); $this -> load -> view('common/footer.php'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function showProfile();", "public function profile() {\n $summonerName = $this->session->get('user')->summonerName;\n echo view('template/header_loggedin', [\n 'role' => $this->session->get('user')->role,\n 'username' => $summonerName\n ]);\n echo view('pages/profile', [\n 'matches' => KorisnikModel::getMatchHistory($summonerName),\n 'name' => $summonerName,\n 'division' => $this->getDivision($summonerName),\n 'champs' => PlaysModel::getMostPlayed($summonerName),\n 'poros' => $this->getPoros($summonerName)\n ]);\n echo view('template/footer');\n }", "public function profile ()\n {\n return view('admin.authors.profile', ['author' => Auth::user()]);\n }", "public function showProfile() {\n if(Auth::check()){\n $this->layout->bodyclass = \"home-page\";\n $value = Session::get('user.id', Auth::user()->id);\n $this->layout->content = View::make('profile', array('user' => User::find($value)));\n\n $album = new AlbumController();\n $this->layout->content->userAlbums = $album->getAllUserAlbums(Auth::user()->id);\n }\n else\n return Redirect::to('login');\n }", "public function displayProfileAction()\n {\n $userManager = new UserManager();\n\n $adminData = $userManager->findOneBy(['role' => User::ROLE_ADMIN]);\n\n $this->templateVars['profile'] = new User($adminData);\n\n //Creates an instance of Uploads to display profile's avatar\n $uploadManager = new UploadManager();\n\n if(!is_null($adminData['avatar_id']))\n {\n $avatarData = $uploadManager->findOneBy(['id' => $adminData['avatar_id']]);\n\n $this->templateVars['avatar'] = new Upload($avatarData);\n }\n\n //Creates an instance of Uploads to display profile's resume\n if(!is_null($adminData['resume_id']))\n {\n $resumeData = $uploadManager->findOneBy(['id' => $adminData['resume_id']]);\n\n $this->templateVars['resume'] = new Upload($resumeData);\n }\n\n $this->twigRender('/frontMyProfile.html.twig');\n }", "public function showProfile()\n\t{\n\t\treturn View::make('university.profile')->with(\n\t\t\tarray(\n\t\t\t\t'university' => University::find(Auth::id()),\n\t\t\t)\n\t\t);\n\t}", "public function index() {\n return view('profile', ['player' => Auth::user()]);\n }", "public function show(Profile $profile)\n {\n }", "public function profile() {\n\t\t\t\n\t\t\t# checks for signed in user - restricts access to profiles\n\t\t\tif(isset($_SESSION[\"id\"])) {\n\t\t\t\n\t\t\t\t$id = $_SESSION[\"id\"];\n\t\t\t\t\n\t\t\t\t# retrieves user data for user in profile\n\t\t\t\t$user = $this->model->getUserInfo($id);\n\t\t\t\t\n\t\t\t\t# renders profile\n\t\t\t\t$this->renderView(\"profile\",\"Profile\",$user);\n\t\t\t\n\t\t\t}else{\n\t\t\t\n\t\t\t\techo 'must be logged in';\n\t\t\t\n\t\t\t}\n\t\t\n\t\t}", "public function admin_viewProfile()\n {\n $adminDetails = $this->My->adminDetails();\n $this->set(compact('adminDetails')); \n }", "public function show(Profile $profile)\n {\n //\n }", "public function show(Profile $profile)\n {\n //\n }", "public function show(Profile $profile)\n {\n //\n }", "public function show(Profile $profile)\n {\n //\n }", "public function show(Profile $profile)\n {\n //\n }", "public function show(Profile $profile)\n {\n //\n }", "public function show(Profile $profile)\n {\n //\n }", "public function show(Profile $profile)\n {\n //\n }", "public function profile()\n {\n $id = $this->session->userdata('id');\n $profile = $this->usr->cli_profile($id);\n $data = [\n 'title' => 'User Profile',\n 'content' => '/client/profile',\n 'profile' => $profile\n ];\n $this->load->view('wrapper', $data);\n }", "public function artAction()\r\n {\r\n \t$this->view->singleArtifact = $this->studentService->GetArtifact(\r\n \t\t$this->getRequest()->getParam('aid'));\r\n \t\r\n \t$this->view->curArt = $this->studentService->GetAllArtifactDetails(\r\n \t\t$this->view->userInfo['userID'], \r\n \t\t$this->getRequest()->getParam('aid'));\r\n }", "public function show(Artist $artist)\n {\n //\n }", "public function show(Artist $artist)\n {\n //\n }", "public function getProfile()\n {\n echo '<a href=\"' . route('profile.action') . '\">Profile Action</a>';\n }", "public function index()\n {\n $gender = 1;\n $avatars = auth()->user()->getMedia('avatar');\n //$user = User::find(auth()->user()->getAuthIdentifier());\n return view('frontend.profile', compact('avatars', 'gender') ,['user' => auth()->user()] );\n }", "public function show()\n {\n \treturn view('admin.profile.index');\n }", "public function index()\n {\n //$profiles = $this->profile->all();\n\n return view('membership::fronted.profiles.index', compact(''));\n }", "public function ViewprofileAction() {\n /**\n * Load layout.\n */\n $this->loadLayout ();\n /**\n * Set page title.\n */\n $this->getLayout ()->getBlock ( 'head' )->setTitle ( $this->__ ( 'View Profile' ) );\n $this->renderLayout ();\n }", "public function profileAction()\n {\n $user = $this->getUser();\n \n return $this->render('utilisateurs/profile.html.twig', array(\n 'user' => $user,\n ));\n }", "public function Profile() {\r\n $this->data['admin'] = $this->common->selectRecordById('admin', $this->data['adminID'], 'admin_id');\r\n $this->load->view('dashboard/profile', $this->data);\r\n }", "public function Aprofile() {\n\t\t$logged_in = $this->model;\n\t\tif (isset($_SESSION['username'])) {\n\t\t\t# code...\n\t\t\t$username = $_SESSION['username'];\n\t\t$profile = $this->model->A_profile($username);\n\t\t}\n\t\t$content = \"views/Aprofile.php\";\n\t\trequire_once 'views/admin.php';\n\t}" ]
[ "0.7099537", "0.689689", "0.6837471", "0.66331273", "0.66303676", "0.65443105", "0.6504917", "0.647584", "0.6469892", "0.64390564", "0.64332795", "0.64332795", "0.64332795", "0.64332795", "0.64332795", "0.64332795", "0.64332795", "0.64332795", "0.64088136", "0.6381931", "0.6337481", "0.6337481", "0.6334954", "0.6303292", "0.62915355", "0.62908655", "0.6289401", "0.62816805", "0.62588924", "0.62547505" ]
0.77663934
0
Validate a social security number
public function validateSocialSecurityNumber($number) { $socialSecurityNumbIsValid = preg_match(self::$m_socialSecurityNumberRegExp, $number); if (!$socialSecurityNumbIsValid) { self::$m_errorMessages[self::$m_socialSecurityNumberError] = "Social security number entered in the wrong format"; return $socialSecurityNumbIsValid; } // Ta bort "-" $standardNumber = str_replace("-", "", $number); // Ta bort de ev. två första siffrorna (årtusonde och århundrade) if (strlen($standardNumber) > 10) { // De fyra första, t.ex. 1985 är mer än årets år if (substr($standardNumber, strlen($standardNumber) - 8) > date("Y")) { self::$m_errorMessages[self::$m_socialSecurityNumberError] = "Year not valid must be less then " . date("Y") . "."; return false; } $standardNumber = substr($standardNumber, strlen($standardNumber) - 10); } // Luhn algorithmen $numbers = array(); for ($i = 0; $i < strlen($standardNumber); $i++) { if ($i % 2 == 0) $numbers[] = $standardNumber[$i] * 2; else $numbers[] = $standardNumber[$i] * 1; } $luhnNumbs = array(); foreach ($numbers as $numb) { if ($numb > 9) { $luhnNumbs[] = 1; $luhnNumbs[] = $numb - 10; } else $luhnNumbs[] = $numb; } $total = 0; foreach ($luhnNumbs as $luhnNumb) $total = $total + $luhnNumb; if ($total % 10 != 0) { self::$m_errorMessages[self::$m_socialSecurityNumberError] = "Invalid social security number entered"; return false; } return $standardNumber; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function validate()\r\n {\r\n $pattern = '/^(?!219-09-9999|078-05-1120|219099999|078051120)(?!666|000|9\\d{2})\\d{3}-?(?!00)\\d{2}-?(?!0{4})\\d{4}$/';\r\n \r\n if (!preg_match($pattern, $this->_data)) $this->addError('Invalid social security entered.');\r\n\r\n return !sizeof($this->_errors);\r\n }", "public static function socialSecurityNumber($input, $required = true)\n {\n return self::validator($input, $required, \"/^\\b([0-9]){7}([a-zA-Z]){1}\\b/\");\n }", "protected function validateInput()\n {\n\tif (!preg_match(\"/^[0-9]{10}$/\", $this->NHSNumber))\n\t{\n\t $this->isValid = false;\n\t}\n }", "function ssn_us($value) {\n $invalid_area_numbers = array('000', '666');\n $invalid_ssn = array('078051120'); //invalid SSN used in movies and advertisements\n\n $valid = false;\n\n // We do not use Cake's default validation, because we want users to be able to separate\n // the sections of their ssn by either a dash, a period, a space, or by nothing at all\n // The regular expression used here is from the Cake Validation class, modified to allow\n // dash, period, space, or no separator between sections of the ssn\n if (preg_match('/\\\\A\\\\b[0-9]{3}[-. ]?[0-9]{2}[-. ]?[0-9]{4}\\\\b\\\\z/i', $value['value'])) {\n $working_value = preg_replace('/[^0-9]/i', '',$value['value']);\n $areaNumber = substr($working_value,0,3);\n $groupNumber = substr($working_value,3,2);\n $serialNumber = substr($working_value,5,4);\n\n if(!empty($areaNumber) && (!empty($groupNumber) && $groupNumber != '00')\n && (!empty($serialNumber) && $serialNumber != '0000') && (!in_array($working_value, $invalid_ssn))) {\n if( (!in_array($areaNumber, $invalid_area_numbers)) &&\n (!((intval($areaNumber) >= 734) && (intval($areaNumber) <= 749))) && // area numbers 734-749 are invalid\n (!((intval($areaNumber) >= 773) && (intval($areaNumber) <= 999)))) { // area numbers 773-999 are invalid\n $valid = true;\n }\n }\n }\n\n return $valid;\n }", "function checkSGNum($raw_number) {\n\n\t\t$length_ok = strlen($raw_number)===10;\n\t\t$cc_ok = substr($raw_number,0,2)==='65';\n\t\t$num_ok = isDigits($raw_number);\n\n\t\treturn $length_ok && $cc_ok && $num_ok;\n\t}", "private function validateCardSecurityCode() {\n\n\t\t//check it's a string\n\t\tValidate::string($this->cardSecurityCode, $this->errorPrefix.'card security code');\n\t}", "abstract public function validate($number): bool;", "function validatePhoneNumber($phoneNumber){\n \n }", "function validate_phone_number($phone)\n{\n $filtered_phone_number = filter_var($phone, FILTER_SANITIZE_NUMBER_INT);\n // Remove \"-\" from number\n $phone_to_check = str_replace(\"-\", \"\", $filtered_phone_number);\n // Check the lenght of number\n // This can be customized if you want phone number from a specific country\n if (strlen($phone_to_check) < 8 || strlen($phone_to_check) > 14) {\n return false;\n } else {\n return true;\n }\n}", "function validate_phone($phone)\r\n{\r\n $filtered_phone_number = filter_var($phone, FILTER_SANITIZE_NUMBER_INT);\r\n // Check the lenght of number\r\n // This can be customized if you want phone number from a specific country\r\n if (strlen($filtered_phone_number) != 12) {\r\n return false;\r\n } else {\r\n return true;\r\n }\r\n}", "public function ssn($ssn)\r\n\t{\r\n\t\treturn preg_match('^\\d{3}-?\\d{2}-?\\d{4}$', $ssn);\r\n\t}", "function validate_phone_number($phone)\n {\n $filtered_phone_number = filter_var($phone, FILTER_SANITIZE_NUMBER_INT);\n // Remove \"-\" from number\n $phone_to_check = str_replace(\"-\", \"\", $filtered_phone_number);\n // Check the lenght of number\n // This can be customized if you want phone number from a specific country\n if (strlen($phone_to_check) < 10 || strlen($phone_to_check) > 14) {\n return true;\n } else {\n return false;\n }\n }", "function validate_Number($number) {\n\n $status = ''; $msg = ''; $data = '';\n $number = addslashes(trim($number));\n\n if(!preg_match(\"/^[0-9]+$/\", $number)) {\n\n $msg = \"Only Number Accetable\";\n $status = FALSE;\n\n } else {\n $msg = \"\";\n $status = TRUE;\n }\n\n $return_data = array('status' => $status, 'data' => $number, 'message' => $msg);\n\n return $return_data;\n}", "function phone_valid_idd($num) {\n $num = str_replace(array(' ', '-', '(', ')'), '', trim($num));\n \n if(strpos($num, '+') === false) return false;\n if(strlen(ltrim($num, '+')) < 10) return false; \n return true;\n}", "function isValidAccountNumber($value){\n if(strlen($value) !== 10 || SmartWallet::wallet_exists($value) !== null){\n return generateRandomNumber();\n }\n return $value;\n}", "public static function validate(string $phoneNumer): bool;", "public static function validate( $number ) {\n\n /**\n * \"Rio Grande do Norte\" has two different Algorithms based on\n * \"State Registration\" length.\n */\n if( ! self::tenDigits( $number ) ) {\n\n return self::nineDigits( $number );\n }\n\n return TRUE;\n }", "function isValid(string $number = \"\"): bool\n{\n $stripped = preg_replace('/[[:space:]]/u', '', $number);\n\n return isValidLength($stripped) && is_numeric($stripped) && evenlyDivisibleByTen(luhn($stripped));\n}", "function valid_phone_number($phone) {\n\t\t\treturn preg_match(\"/^[0-9]{3}-?[0-9]{3}-?[0-9]{4}$/\", $phone) ? TRUE : FALSE;\n\t\t}", "private function validateSSNHash() {\n $ssnHashParts = $this->ssnDay . $this->ssnMonth . $this->ssnYear . $this->ssnUnique;\n\n $ssnHashPartsInt = (int)$ssnHashParts;\n\n $remainder = $ssnHashPartsInt % 31;\n\n // Compare SSN hash to the precalculated remainder value hash\n if($this->ssnHash != $this->ssnHashes[$remainder]) {\n return false;\n }\n\n return true;\n }", "function is_valid_phone_number($phone) {\n return preg_match(\"#^[0-9[:space:]\\+\\-\\.\\(\\)]+$#si\", $phone);\n}", "function is_valid_phone_number($phone) {\n return preg_match(\"#^[0-9[:space:]\\+\\-\\.\\(\\)]+$#si\", $phone);\n}", "function validateNumber($number)\n\t{\n\t\treturn preg_match('/^[0-9]+$/', $number);\n\t}", "function validPhone($PN)\n {\n return preg_match('/^[0-9]{9}/', $PN);\n }", "public function isValid(): bool\n {\n if (preg_match(\"/^[0-9]{5}[\\-]?[0-9]{3}$/\", $this->number)) {\n return true;\n }\n\n return false;\n }", "function check_validBannerID($student_BannerID)\n{\n\tif(strlen($student_BannerID)==0)\n\t{\n\t\techo\"No ID number given.\\n\";\n\t\treturn false;\n\t}\n\telseif(strlen($student_BannerID)>10)\n\t{\n\t\techo\"Number is too long.\\n\";\n\t\treturn false;\n\t}\n\telseif(ctype_digit($student_BannerID) == false)\n\t{\n\t\techo\"Number does not contain only numbers.\\n\";\n\t\treturn false;\n\t}\n\telse\n\t{\n\t\treturn true;\n\t}\n}", "private static function _validNum($number){\n\t\t$trim_number = bcadd($number,0);\n\t\tif($trim_number !== $number){\n\t\t\tthrow new Exception(\"input contains invalid chars!\");\n\t\t}\n\t}", "public function validateAccountNumber()\n {\n $accountNumber = $this->AccountNumber;\n list($bank, $branch, $account, $suffix) = explode('-', $accountNumber);\n\n return Validator::validate($bank, $branch, $account, $suffix);\n }", "function validPhone($phone) {\r\n if ($phone > 1000000000 && $phone < 9999999999) {\r\n return true;\r\n } else {\r\n return false;\r\n }\r\n}", "function verifyValidationNumber($validationNumber) {\n\t\n\t$fp=fopen(\"public.key\",\"r\");\n\t$pub_key=fread($fp,8192);\n\tfclose($fp);\n\topenssl_get_publickey($pub_key);\n\t$crypttext = '';\n\topenssl_public_encrypt($validationNumber,$crypttext,$pub_key);\t\n\topenssl_free_key($pub_key);\t\n\t\n\t/*Actually ask now, this time with an encrypted validation number*/\n\treturn curl_verify_validnum($crypttext);\n\t\n}" ]
[ "0.704133", "0.67114294", "0.65759474", "0.64178765", "0.636886", "0.63506037", "0.63286173", "0.63013595", "0.62683064", "0.62382555", "0.61583865", "0.6157222", "0.61268485", "0.61026627", "0.6080737", "0.60405695", "0.60165554", "0.6016119", "0.60156673", "0.6014689", "0.5973236", "0.5973236", "0.5958442", "0.59454757", "0.59449524", "0.5922663", "0.5911493", "0.5894424", "0.58720773", "0.58674014" ]
0.80335003
0
Remove a Event from the events array
public function removeEvent($eventName);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function remove($vEvent);", "public function testRemoveEvent()\n {\n $this->addMockEvent();\n $events = $this->events->getEvents();\n $event = array_shift($events);\n $this->events->removeEvent($event);\n $expected = array();\n $actual = $this->events->getEvents();\n $this->assertSame($expected, $actual);\n }", "public function removeAllEvent( array $a = array() ){\r\n\t\tif($a){\r\n\t\t\t$eventId=(int)$a['eventId'];\r\n\t\t\t$allEventIdsArray=$a['dataIds'];\r\n\t\t\t$relatedCType=$a['relatedCType']; //Song[4]/video[15]/image[17]\r\n\t\t\tif($allEventIdsArray){\r\n\t\t\t $data_arr = array();\r\n\t\t\t\tforeach($allEventIdsArray as $kT=>$vT){ \r\n\t\t\t\t $data_arr[] = $vT;\r\n\t\t\t\t}\r\n\t\t\t\t $data_IDS = implode(\",\", $data_arr);\r\n\t\t\t\t $this->sSql = \"DELETE FROM event_map WHERE event_id='\".$eventId.\"' AND content_type='\".$relatedCType.\"' AND content_id IN($data_IDS)\";\r\n\t\t\t\t $res = $this->oMysqli->query($this->sSql);\r\n\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public function remove($e) {\n $this[$e] = false;\n }", "public function removeAllListeners($event);", "public function removeEvent(EventInterface $event);", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public function remove();", "public static function removeEvents()\n {\n $events = Event::where('user_fk','=', Auth::user()->id)\n ->where('start_date', '>=', Carbon::now()->toDateTimeString())\n ->where('completed', '=', FALSE)\n ->where('isSkipped', '=', FALSE)\n ->withTrashed()->forceDelete();\n \n return $events;\n }", "public static function delete($event) {\n unset(self::$_event_tracker[$event->eid]);\n $event->delete();\n }", "public function delete($name)\r\n {\r\n if (is_array($name)) {\r\n foreach ($name as $n) {\r\n $this->delete($n);\r\n }\r\n }\r\n else {\r\n if (array_key_exists($name, self::$events)) {\r\n unset(self::$events[$name]);\r\n }\r\n }\r\n }", "public abstract function remove();", "public function removeAllListeners(string $event): void {\n $event = $this->getName($event);\n $this->_events[$event] = [];\n }", "function eliminar_evento($id) {}", "public function onRemove();", "public function unsubscribe($event);", "abstract public function remove();", "public function clearRecordedEvents(): void;", "public function clearRecordedEvents(): void;", "private function removeFromEventId($event_id){\n $this->getCollection()->remove([\"event_id\" => $event_id]);\n }", "public function removeUserFromEvent(Request $request)\n {\n $event_id = $request->input('event_id');\n $event = Event::findOrFail($event_id);\n\n $user_id = $request->input('user_id');\n $user = User::findOrFail($user_id);\n\n //if ($event->users->contain($user)) {\n //return $event->delete();\n //} else\n //throw new \\Exception(\"Don't have rights to delete this event\");\n return $user->events()->detach($event->id);\n }", "protected function clearSortedListeners($event) {\n\t\tunset ( $this->sortedListeners [$event] );\n\t}", "function rmEvent($eventid)\n\t{\n\t\t$q = \"DELETE FROM `\" . TBL_EVENTS . \"` WHERE `ID` = $eventid\";\n\t\treturn mysql_query($q, $this->connection);\n\t}", "public function remove($name)\n\t{\n\t\tif (isset($this->_events[$name])) {\n\t\t\tunset($this->_events[$name]);\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public function removeElement();", "public function clearRecordedEvent(): void\n {\n }" ]
[ "0.73500335", "0.7007591", "0.6666366", "0.64587307", "0.6320177", "0.62885195", "0.6266439", "0.6266439", "0.6266439", "0.6266439", "0.6266439", "0.6266439", "0.62352455", "0.6225171", "0.6098284", "0.60923535", "0.6078855", "0.6016227", "0.6010103", "0.59856766", "0.59717244", "0.59604675", "0.59604675", "0.5934614", "0.5931761", "0.5898391", "0.58706814", "0.58198696", "0.58153635", "0.5795558" ]
0.70111537
1
Main constructor. Constructor OR static create methods are designed to be called in either a parent QPanel or the main QForm when wanting to create a CheckingAccountLookupMetaControl to edit a single CheckingAccountLookup object within the QPanel or QForm. This constructor takes in a single CheckingAccountLookup object, while any of the static create methods below can be used to construct based off of individual PK ID(s).
public function __construct($objParentObject, CheckingAccountLookup $objCheckingAccountLookup) { // Setup Parent Object (e.g. QForm or QPanel which will be using this CheckingAccountLookupMetaControl) $this->objParentObject = $objParentObject; // Setup linked CheckingAccountLookup object $this->objCheckingAccountLookup = $objCheckingAccountLookup; // Figure out if we're Editing or Creating New if ($this->objCheckingAccountLookup->__Restored) { $this->strTitleVerb = QApplication::Translate('Edit'); $this->blnEditMode = true; } else { $this->strTitleVerb = QApplication::Translate('Create'); $this->blnEditMode = false; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit) {\n\t\t\t// Attempt to Load from PK Arguments\n\t\t\tif (strlen($intId)) {\n\t\t\t\t$objCheckingAccountLookup = CheckingAccountLookup::Load($intId);\n\n\t\t\t\t// CheckingAccountLookup was found -- return it!\n\t\t\t\tif ($objCheckingAccountLookup)\n\t\t\t\t\treturn new CheckingAccountLookupMetaControl($objParentObject, $objCheckingAccountLookup);\n\n\t\t\t\t// If CreateOnRecordNotFound not specified, throw an exception\n\t\t\t\telse if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound)\n\t\t\t\t\tthrow new QCallerException('Could not find a CheckingAccountLookup object with PK arguments: ' . $intId);\n\n\t\t\t// If EditOnly is specified, throw an exception\n\t\t\t} else if ($intCreateType == QMetaControlCreateType::EditOnly)\n\t\t\t\tthrow new QCallerException('No PK arguments specified');\n\n\t\t\t// If we are here, then we need to create a new record\n\t\t\treturn new CheckingAccountLookupMetaControl($objParentObject, new CheckingAccountLookup());\n\t\t}", "public static function CreateFromQueryString($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {\n\t\t\t$intId = QApplication::QueryString('intId');\n\t\t\treturn CheckingAccountLookupMetaControl::Create($objParentObject, $intId, $intCreateType);\n\t\t}", "public static function CreateFromPathInfo($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {\n\t\t\t$intId = QApplication::PathInfo(0);\n\t\t\treturn CheckingAccountLookupMetaControl::Create($objParentObject, $intId, $intCreateType);\n\t\t}", "function __construct($account_details)\n\t{\n\t\t$this->account_details = $account_details; \n\t}", "function __construct() {\n\t\tparent::__construct(\n\t\t\t'geopportal_account_widget', // Base ID\n\t\t\tesc_html__( 'GeoPlatform Sidebar Account', 'geoplatform-ccb' ), // Name\n\t\t\tarray( 'description' => esc_html__( 'GeoPlatform Sidebar Account', 'geoplatform-ccb' ), ) // Args\n\t\t);\n\t}", "function __construct($fieldid=0, $userid=0, $fielddata='') {\n global $DB;\n\n // First call parent constructor.\n parent::__construct($fieldid, $userid, $fielddata);\n\n $this->options[] = get_string('choose').'...';\n $accounts = $DB->get_records('salesforceaccount', ['isdeleted'=>'false']);\n foreach ($accounts as $account) {\n $object = unserialize($account->serialized);\n $accounts[$account->id] = get_string('display', 'profilefield_salesforceaccount', $object);\n }\n asort($accounts);\n foreach ($accounts as $k=>$v) {\n $this->options[$k] = $v;\n }\n\n // Set the data key.\n if ($this->data !== null && $this->data !== '0') {\n $key = $this->data;\n if (isset($this->options[$key]) || ($key = array_search($key, $this->options)) !== false) {\n $this->data = $key;\n $this->datakey = $key;\n }\n }\n }", "public function __construct(){\n\t\t$this->_resultClass = 'BeansBooks\\\\Objects\\\\Account';\n\t\t$this->_resultKey = 'accounts';\n\t\t$this->_url = 'Account/Search';\n\n\t\tparent::__construct();\n\t}", "public function __construct($_accountHolder = NULL,$_billingAddress = NULL,$_checkData = NULL,$_checkTrace = NULL,$_clientIP = NULL,$_creditCardData = NULL,$_customerID = NULL,$_customFields = NULL,$_dateTime = NULL,$_details = NULL,$_lineItems = NULL,$_response = NULL,$_serverIP = NULL,$_shippingAddress = NULL,$_source = NULL,$_status = NULL,$_transactionType = NULL,$_user = NULL)\n {\n parent::__construct(array('AccountHolder'=>$_accountHolder,'BillingAddress'=>$_billingAddress,'CheckData'=>$_checkData,'CheckTrace'=>$_checkTrace,'ClientIP'=>$_clientIP,'CreditCardData'=>$_creditCardData,'CustomerID'=>$_customerID,'CustomFields'=>$_customFields,'DateTime'=>$_dateTime,'Details'=>$_details,'LineItems'=>$_lineItems,'Response'=>$_response,'ServerIP'=>$_serverIP,'ShippingAddress'=>$_shippingAddress,'Source'=>$_source,'Status'=>$_status,'TransactionType'=>$_transactionType,'User'=>$_user),false);\n }", "protected function _construct()\n {\n parent::_construct();\n $this->_init('rewardpoints/catalogrules');\n $this->setIdFieldName('rule_id');\n }", "public function _construct()\n {\n $this->_init('managefields/managefields', 'managefields_id');\n }", "public function __construct() {\r\n parent::__construct( 'checklists' );\r\n\r\n if ( isset( $this->checklist_id ) )\r\n $this->id = $this->checklist_id;\r\n }", "public function __construct()\n {\n $data = Ensure::Input(func_get_args());\n parent::_init($data, new DependsResource(\n array(\n array( \"term\" => \"account\", \"plural\" => false))\n ),\n new LoadsResource(\n array(\"primary\" => \"GET\", \"id\" => \"id\", \"init\" => \"id\", \"silent\" => false)\n ),\n new SchemaResource(\n array(\"fields\" => array(\"id\", \"time\", \"units\", \"type\", \"amount\", \"productType\"), \n \"needs\" => array(\"id\"))\n )\n );\n }", "public function __construct (&$ctl) {\n\t\tparent::__construct();\n\n\t\t// For auto-new\n\t\tunset($this->oAjaxSelDiv);\n\t\tunset($this->oCache);\n\t\tunset($this->oForm);\n\t\tunset($this->oLt);\n\t\tunset($this->oTpl);\n\t\tunset($this->oValidator);\n\n\t\t$this->oCtl = $ctl;\n\t\t$this->sAction = GetGet('a');\n\n/*\n\t\t$this->NewObjForm();\n\t\t$this->NewObjTpl();\n\t\t$this->NewObjLt();\n*/\n\n\t\t/* Template dir must be set before using\n\t\t$this->GenHeader();\n\t\t$this->GenMenu();\n\t\t$this->GenContent();\n\t\t$this->GenFooter();\n\t\t*/\n\t}", "private function __construct()\n {\n $factory = getDAOFactory();\n\n $this->_keychainDAO = $factory->getKeychainDAO();\n $this->_borrowingsDAO = $factory->getBorrowingsDAO();\n $this->_keyDAO = $factory->getKeyDAO();\n $this->_keyKeychainDAO = $factory->getKeyKeychainDAO();\n }", "public function __construct() {\n\t\tglobal $wpdb;\n\n\t\tself::$_wpdb =& $wpdb;\n\t\tself::$_wpdb->show_errors();\n\n\t\tforeach ($this->dbMapping as $prop => $dbField) {\n\t\t\t$this->properties[ $prop ] = '';\n\t\t}\n\t\tforeach ($this->externalProperties as $prop => $dbField) {\n\t\t\t$this->properties[ $prop ] = '';\n\t\t}\n\n\t\tif (method_exists($this, 'init')) {\n\t\t\t$this->init();\n\t\t}\n\t}", "public function __construct() {\n\t\tadd_filter( 'cmb2_render_pw_map', array( $this, 'render_pw_map' ), 10, 5 );\n\t\tadd_filter( 'cmb2_sanitize_pw_map', array( $this, 'sanitize_pw_map' ), 10, 4 );\n\t}", "public function construct() {\n\t\tparent::construct();\n\t\t// set the custom error messages\n \t$this->addCustomErrorMessages(array(\n \t\t\t\t\t\t\t\t\t\"firstname.notblank\" => $this->translate->_(\"useraccount_firstname_error\"),\n \t\t\t\t\t\t\t\t\t\"lastname.notblank\" => $this->translate->_(\"useraccount_lastname_error\"),\n \t\t\t\t\t\t\t\t\t\"email.notblank\" => $this->translate->_(\"useraccount_email_error\"),\n \t\t\t\t\t\t\t\t\t\"email.email\" => $this->translate->_(\"useraccount_email_invalid_error\")\n \t \t\t\t\t\t\t));\n\t}", "public function lblAccountHash_Create($strControlId = null) {\n\t\t\t$this->lblAccountHash = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblAccountHash->Name = QApplication::Translate('Account Hash');\n\t\t\t$this->lblAccountHash->Text = $this->objCheckingAccountLookup->AccountHash;\n\t\t\treturn $this->lblAccountHash;\n\t\t}", "public function _construct() {\n $this->_init('geoipultimatelock/geoipultimatelock', 'geoipultimatelock_id');\n }", "public function __construct($checkReportId)\n {\n $this->checkReportId = $checkReportId;\n }", "public function __construct($objParentObject, $strControlId = null, Address $objAddress = null, $strFirstName = null, $strLastName = null, RecurringPayments $objRecurringPayment = null) {\n\t\t\tparent::__construct($objParentObject, $strControlId);\n\t\t\t$this->strTemplate = dirname(__FILE__) . '/RecurringPaymentPanel.tpl.php';\n\n\t\t\tif (!$objAddress) $objAddress = new Address();\n\n\t\t\t$this->txtFirstName = new QTextBox($this);\n\t\t\t$this->txtFirstName->Name = 'Cardholder Name';\n\t\t\t$this->txtFirstName->Required = true;\n\t\t\t$this->txtFirstName->Text = $strFirstName;\n\t\t\t$this->txtFirstName->Width = '120px';\n\n\t\t\t$this->txtLastName = new QTextBox($this);\n\t\t\t$this->txtLastName->Name = 'Cardholder Last Name';\n\t\t\t$this->txtLastName->Required = true;\n\t\t\t$this->txtLastName->Text = $strLastName;\n\t\t\t$this->txtLastName->Width = '120px';\n\n\t\t\tQCryptography::$Key = CRYPTO_KEY;\n\t\t\t$objCrypto = new QCryptography(null, false);\n\t\t\tif($objRecurringPayment) {\n\t\t\t\t$strOriginal = $objCrypto->Decrypt($objRecurringPayment->CardHolderName);\n\t\t\t\t$nameArray = explode(' ',$strOriginal);\n\t\t\t\t$this->txtFirstName->Text = $nameArray[0];\n\t\t\t\t$this->txtLastName->Text = $nameArray[1];\n\t\t\t}\n\t\t\t$this->txtAddress1 = new QTextBox($this);\n\t\t\t$this->txtAddress1->Name = 'Address 1';\n\t\t\tif(!$objRecurringPayment) {\n\t\t\t\t$this->txtAddress1->Text = $objAddress->Address1;\n\t\t\t} else {\n\t\t\t\t$this->txtAddress1->Text = $objCrypto->Decrypt($objRecurringPayment->Address1);\n\t\t\t}\n\t\t\t$this->txtAddress1->Required = true;\n\n\t\t\t$this->txtAddress2 = new QTextBox($this);\n\t\t\t$this->txtAddress2->Name = 'Address 2';\n\t\t\tif(!$objRecurringPayment) {\n\t\t\t\t$this->txtAddress2->Text = $objAddress->Address2;\n\t\t\t} else {\n\t\t\t\t$this->txtAddress2->Text = $objCrypto->Decrypt($objRecurringPayment->Address2);\n\t\t\t}\n\t\t\t$this->txtCity = new QTextBox($this);\n\t\t\t$this->txtCity->Name = 'City, State and Zip';\n\t\t\tif(!$objRecurringPayment) {\n\t\t\t\t$this->txtCity->Text = $objAddress->City;\n\t\t\t} else {\n\t\t\t\t$this->txtCity->Text = $objCrypto->Decrypt($objRecurringPayment->City);\n\t\t\t}\n\t\t\t$this->txtCity->Required = true;\n\n\t\t\t$this->lstState = new QListBox($this);\n\t\t\t$this->lstState->Name = QApplication::Translate('State');\n\t\t\t$this->lstState->AddItem(QApplication::Translate('- Select One -'), null);\n\t\t\tforeach (UsState::LoadAll(QQ::OrderBy(QQN::UsState()->Name)) as $objUsState) {\n\t\t\t\t$this->lstState->AddItem($objUsState->Name, $objUsState->Abbreviation, $objAddress->State == $objUsState->Abbreviation);\n\t\t\t}\n\t\t\t$this->lstState->Required = true;\n\t\t\t\n\t\t\t$this->txtZipCode = new QTextBox($this);\n\t\t\t$this->txtZipCode->Name = 'Zip Code';\n\t\t\tif(!$objRecurringPayment) {\n\t\t\t\t$this->txtZipCode->Text = $objAddress->ZipCode;\n\t\t\t} else {\n\t\t\t\t$this->txtZipCode->Text = $objCrypto->Decrypt($objRecurringPayment->Zip);\n\t\t\t}\n\t\t\t$this->txtZipCode->Width = '80px';\n\t\t\t$this->txtZipCode->Required = true;\n\t\t\t\n\t\t\t$this->lstCcType = new QListBox($this);\n\t\t\t$this->lstCcType->Name = 'Credit Card';\n\t\t\t$this->lstCcType->Required = true;\n\t\t\t$this->lstCcType->AddItem('- Select One -');\n\t\t\tforeach (CreditCardType::$NameArray as $intId => $strName) {\n\t\t\t\tif($objRecurringPayment) \n\t\t\t\t\t$this->lstCcType->AddItem($strName, $intId, ($objRecurringPayment->CreditCardTypeId==$intId));\n\t\t\t\telse\n\t\t\t\t\t$this->lstCcType->AddItem($strName, $intId);\n\t\t\t}\n\n\t\t\t$this->txtCcNumber = new QTextBox($this);\n\t\t\t$this->txtCcNumber->Name = 'Account Number';\n\t\t\t$this->txtCcNumber->Required = true;\n\t\t\t$this->txtCcNumber->MaxLength = 16;\n\t\t\tif($objRecurringPayment) {\n\t\t\t\t$this->txtCcNumber->Text = $objCrypto->Decrypt($objRecurringPayment->AccountNumber);\n\t\t\t\t$objExpirationDate = $objRecurringPayment->ExpirationDate; //$objCrypto->Decrypt($objRecurringPayment->ExpirationDate);\n\t\t\t\t$intSelectedMonth = substr($objExpirationDate,0,2);\n\t\t\t\t$intSelectedYear = substr($objExpirationDate,2,2);\n\t\t\t} \n\t\t\t\n\t\t\t$this->lstCcExpMonth = new QListBox($this);\n\t\t\t$this->lstCcExpMonth->Name = 'Expiration Date';\n\t\t\t$this->lstCcExpMonth->Required = true;\n\t\t\t$this->lstCcExpMonth->AddItem('- Select One -');\n\t\t\tfor ($intMonth = 1; $intMonth <= 12; $intMonth++) {\n\t\t\t\t$strMonth = date('F', mktime(0, 0, 0, $intMonth, 1, 2000));\n\t\t\t\tif(!$objRecurringPayment)\n\t\t\t\t\t$this->lstCcExpMonth->AddItem(sprintf('%02s - %s', $intMonth, $strMonth), $intMonth);\n\t\t\t\telse \n\t\t\t\t\t$this->lstCcExpMonth->AddItem(sprintf('%02s - %s', $intMonth, $strMonth), $intMonth,($intSelectedMonth==$intMonth));\n\t\t\t}\n\t\t\t\n\t\t\t$this->lstCcExpYear = new QListBox($this);\n\t\t\t$this->lstCcExpYear->Required = true;\n\t\t\t$this->lstCcExpYear->AddItem('---');\n\t\t\tfor ($intYear = 0; $intYear <= 11; $intYear++) {\n\t\t\t\t$intYearToUse = date('Y') + $intYear;\n\t\t\t\t$intCmpYear = substr($intYearToUse,2,2); \n\t\t\t\tif(!$objRecurringPayment)\n\t\t\t\t\t$this->lstCcExpYear->AddItem($intYearToUse, $intYearToUse);\n\t\t\t\telse\n\t\t\t\t\t$this->lstCcExpYear->AddItem($intYearToUse, $intYearToUse,($intSelectedYear == $intCmpYear));\n\t\t\t}\n\t\t\t$this->txtCcCsc = new QTextBox($this);\n\t\t\t$this->txtCcCsc->Name = 'Security Code (CSC/CVV2)';\n\t\t\t$this->txtCcCsc->Required = true;\n\t\t\t$this->txtCcCsc->Width = '80px';\n\t\t\t$this->txtCcCsc->MinLength = 3;\n\t\t\t$this->txtCcCsc->MaxLength = 4;\n\t\t\tif($objRecurringPayment) {\n\t\t\t\t$this->txtCcCsc->Text = $objCrypto->Decrypt($objRecurringPayment->SecurityCode);\n\t\t\t}\n\t\t}", "protected function _initUniqueFields()\r\n {\r\n $this->_uniqueFields = [\r\n [\r\n 'field' => [LinkInterface::CUSTOMER_ID, LinkInterface::STORE_ID, LinkInterface::CHOICE_ID],\r\n 'title' => 'Customer, store and choice combination should be unique'\r\n ]\r\n ];\r\n\r\n return $this;\r\n }", "function __construct() {\n\t\t\tswitch(func_num_args()) {\n\t\t\t\tcase 2:\n\t\t\t\t\t$this->Geohash = new DB_GeoHash(\n\t\t\t\t\t\tfunc_get_arg(0), func_get_arg(1));\n\t\t\t\tcase 1:\n\t\t\t\t\t$this->Geohash = new DB_GeoHash(\n\t\t\t\t\t\tfunc_get_arg(0), DB_GeoHash::DEF_DB);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t}//end condi.\n\t\t\t$this->debug_mode = false;\n\t\t\t$this->time_use = null;\n\t\t\t$this->log_time_usage = false;\n\t\t}", "protected function _construct()\n {\n $this->_init('onsale/rule', 'rule_id');\n }", "private function setupLookup()\n {\n $obj_request = new LookupRequest();\n $this->applyTransaction($obj_request->mutableReadOptions()); // ->setReadConsistency('some-val');\n return $obj_request;\n }", "public function __construct() {\n $this->tableName = 'accounts'; \n $get_arguments = func_get_args();\n $number_of_arguments = func_num_args();\n if (method_exists($this, $method_name = '__construct'.$number_of_arguments)) {\n call_user_func_array(array($this, $method_name), $get_arguments);\n }\n }", "public function __construct() {\n global $CFG;\n require_once($CFG->libdir.'/ldaplib.php');\n\n // Do our own stuff to fix the config (it's easier to do it\n // here than using the admin settings infrastructure). We\n // don't call $this->set_config() for any of the 'fixups'\n // (except the objectclass, as it's critical) because the user\n // didn't specify any values and relied on the default values\n // defined for the user type she chose.\n $this->load_config();\n\n // Make sure we get sane defaults for critical values.\n $this->config->ldapencoding = $this->get_config('ldapencoding', 'utf-8');\n\n }", "public function __construct() {\n $this->account= new Account();\n $this->account->setLastchange(Date::now());\n $this->account->setChangedby($this->getClassName());\n $this->account->setBz_id(10000);\n }", "public function __construct() {\n\t\t\n\t\t\n\t\tif ($this->_getFormId ()) {\n\t\t\t$this->setTableName ( $this->_getFormId () );\n\t\t} \n\t\t$this->_search_fields = array ('id' );\n\t}", "function __construct($code_id=null, $dimension_id=0, $dimension2_id=0, $amount=0, $memo='',\n\t\t$act_descr=null, $person_id=null, $date=null)\n\t{\n\n\t\tif ($act_descr == null && $code_id)\n\t\t\t$this->description = get_gl_account_name($code_id);\n\t\telse\n\t\t\t$this->description = $act_descr;\n\n\t\t$this->code_id = $code_id;\n\t\t$this->person_id = $person_id;\n $gl_type = is_subledger_account($code_id);\n if ($person_id != null && $gl_type)\n\t\t{\n\t\t\t$this->person_type_id = $gl_type > 0 ? PT_CUSTOMER : PT_SUPPLIER;\n\t\t\t$data = get_subaccount_data($code_id, $person_id);\n\t\t\t$this->person_name = $data['name'];\n\t\t\t$this->branch_id = $data['id'];\n\t\t}\n\t\t$this->dimension_id = $dimension_id;\n\t\t$this->dimension2_id = $dimension2_id;\n\t\t$this->amount = round2($amount, user_price_dec());\n\t\t$this->reference = $memo;\n\t\t$this->date = $date;\n\t}" ]
[ "0.62719166", "0.604553", "0.5737503", "0.5365778", "0.53191197", "0.5262867", "0.5254268", "0.51560456", "0.5142189", "0.51271945", "0.5122239", "0.50864327", "0.50761914", "0.50738496", "0.50600904", "0.5054629", "0.50536895", "0.50379497", "0.5029686", "0.50276536", "0.5013348", "0.50106984", "0.5010425", "0.500515", "0.50035405", "0.500158", "0.49958625", "0.49905452", "0.4990019", "0.49859205" ]
0.7244245
0
///////////////////////////////////////////// PUBLIC CREATE and REFRESH METHODS ///////////////////////////////////////////// Create and setup QLabel lblId
public function lblId_Create($strControlId = null) { $this->lblId = new QLabel($this->objParentObject, $strControlId); $this->lblId->Name = QApplication::Translate('Id'); if ($this->blnEditMode) $this->lblId->Text = $this->objCheckingAccountLookup->Id; else $this->lblId->Text = 'N/A'; return $this->lblId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objCannedStrategy->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objAddress->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objLogin->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objEmailMessage->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objParentPagerAttendantHistory->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objOrdemProducao->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblPreguntaId_Create($strControlId = null) {\n\t\t\t$this->lblPreguntaId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPreguntaId->Name = QApplication::Translate('Pregunta Id');\n\t\t\t$this->lblPreguntaId->PreferredRenderMethod = 'RenderWithName';\n\t\t\t$this->lblPreguntaId->LinkedNode = QQN::Pregunta()->PreguntaId;\n\t\t\t$this->lblPreguntaId->Text = $this->objPregunta->PreguntaId;\n\t\t\treturn $this->lblPreguntaId;\n\t\t}", "public function lblMessageIdentifier_Create($strControlId = null) {\n\t\t\t$this->lblMessageIdentifier = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblMessageIdentifier->Name = QApplication::Translate('Message Identifier');\n\t\t\t$this->lblMessageIdentifier->Text = $this->objEmailMessage->MessageIdentifier;\n\t\t\treturn $this->lblMessageIdentifier;\n\t\t}", "public function lblEnunciado_Create($strControlId = null) {\n\t\t\t$this->lblEnunciado = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblEnunciado->Name = QApplication::Translate('Enunciado');\n\t\t\t$this->lblEnunciado->PreferredRenderMethod = 'RenderWithName';\n\t\t\t$this->lblEnunciado->LinkedNode = QQN::Pregunta()->Enunciado;\n\t\t\t$this->lblEnunciado->Text = $this->objPregunta->Enunciado;\n\t\t\treturn $this->lblEnunciado;\n\t\t}", "public function lblNombre_Create($strControlId = null) {\n\t\t\t$this->lblNombre = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblNombre->Name = QApplication::Translate('Nombre');\n\t\t\t$this->lblNombre->Text = $this->objUsuarios->Nombre;\n\t\t\treturn $this->lblNombre;\n\t\t}", "public function lblReferenciaId_Create($strControlId = null) {\n\t\t\t$this->lblReferenciaId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblReferenciaId->Name = QApplication::Translate('Referencia');\n\t\t\t$this->lblReferenciaId->Text = ($this->objOrdemProducao->Referencia) ? $this->objOrdemProducao->Referencia->__toString() : null;\n\t\t\treturn $this->lblReferenciaId;\n\t\t}", "public function setLabelId($val)\n {\n $this->_propDict[\"labelId\"] = $val;\n return $this;\n }", "public function lblUsername_Create($strControlId = null) {\n\t\t\t$this->lblUsername = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblUsername->Name = QApplication::Translate('Username');\n\t\t\t$this->lblUsername->Text = $this->objLogin->Username;\n\t\t\treturn $this->lblUsername;\n\t\t}", "public function lblServerIdentifier_Create($strControlId = null, $strFormat = null) {\n\t\t\t$this->lblServerIdentifier = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblServerIdentifier->Name = QApplication::Translate('Server Identifier');\n\t\t\t$this->lblServerIdentifier->Text = $this->objParentPagerAttendantHistory->ServerIdentifier;\n\t\t\t$this->lblServerIdentifier->Required = true;\n\t\t\t$this->lblServerIdentifier->Format = $strFormat;\n\t\t\treturn $this->lblServerIdentifier;\n\t\t}", "public function lblLongitude_Create($strControlId = null) {\n\t\t\t$this->lblLongitude = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblLongitude->Name = QApplication::Translate('Longitude');\n\t\t\t$this->lblLongitude->Text = $this->objRestaurantCopy1->Longitude;\n\t\t\t$this->lblLongitude->Required = true;\n\t\t\treturn $this->lblLongitude;\n\t\t}", "public function lblIdRestaurant_Create($strControlId = null) {\n\t\t\t$this->lblIdRestaurant = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblIdRestaurant->Name = QApplication::Translate('Id Restaurant');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblIdRestaurant->Text = $this->objRestaurantCopy1->IdRestaurant;\n\t\t\telse\n\t\t\t\t$this->lblIdRestaurant->Text = 'N/A';\n\t\t\treturn $this->lblIdRestaurant;\n\t\t}", "public function lblAddress1_Create($strControlId = null) {\n\t\t\t$this->lblAddress1 = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblAddress1->Name = QApplication::Translate('Address 1');\n\t\t\t$this->lblAddress1->Text = $this->objAddress->Address1;\n\t\t\treturn $this->lblAddress1;\n\t\t}", "public function lblRestaurantName_Create($strControlId = null) {\n\t\t\t$this->lblRestaurantName = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblRestaurantName->Name = QApplication::Translate('Restaurant Name');\n\t\t\t$this->lblRestaurantName->Text = $this->objRestaurantCopy1->RestaurantName;\n\t\t\t$this->lblRestaurantName->Required = true;\n\t\t\treturn $this->lblRestaurantName;\n\t\t}", "public function lblNumero_Create($strControlId = null) {\n\t\t\t$this->lblNumero = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblNumero->Name = QApplication::Translate('Numero');\n\t\t\t$this->lblNumero->Text = $this->objOrdemProducao->Numero;\n\t\t\t$this->lblNumero->Required = true;\n\t\t\treturn $this->lblNumero;\n\t\t}", "public function lblQrcode_Create($strControlId = null) {\n\t\t\t$this->lblQrcode = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblQrcode->Name = QApplication::Translate('Qrcode');\n\t\t\t$this->lblQrcode->Text = $this->objRestaurantCopy1->Qrcode;\n\t\t\t$this->lblQrcode->Required = true;\n\t\t\treturn $this->lblQrcode;\n\t\t}", "public function lblUpdateby_Create($strControlId = null) {\n\t\t\t$this->lblUpdateby = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblUpdateby->Name = QApplication::Translate('Updateby');\n\t\t\t$this->lblUpdateby->PreferredRenderMethod = 'RenderWithName';\n\t\t\t$this->lblUpdateby->LinkedNode = QQN::Pregunta()->Updateby;\n\t\t\t$this->lblUpdateby->Text = $this->objPregunta->Updateby;\n\t\t\treturn $this->lblUpdateby;\n\t\t}", "public function lblUpdated_Create($strControlId = null, $strDateTimeFormat = null) {\n\t\t\t$this->lblUpdated = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblUpdated->Name = QApplication::Translate('Updated');\n\t\t\t$this->strUpdatedDateTimeFormat = $strDateTimeFormat;\n\t\t\t$this->lblUpdated->PreferredRenderMethod = 'RenderWithName';\n\t\t\t$this->lblUpdated->LinkedNode = QQN::Pregunta()->Updated;\n\t\t\t$this->lblUpdated->Text = $this->objPregunta->Updated ? $this->objPregunta->Updated->qFormat($this->strUpdatedDateTimeFormat) : null;\n\t\t\treturn $this->lblUpdated;\n\t\t}", "public function lblUsuariosId_Create($strControlId = null) {\n\t\t\t$this->lblUsuariosId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblUsuariosId->Name = QApplication::Translate('Usuarios Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblUsuariosId->Text = $this->objUsuarios->UsuariosId;\n\t\t\telse\n\t\t\t\t$this->lblUsuariosId->Text = 'N/A';\n\t\t\treturn $this->lblUsuariosId;\n\t\t}", "public function lblHabilitado_Create($strControlId = null) {\n\t\t\t$this->lblHabilitado = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblHabilitado->Name = QApplication::Translate('Habilitado');\n\t\t\t$this->lblHabilitado->Text = ($this->objUsuarios->Habilitado) ? QApplication::Translate('Yes') : QApplication::Translate('No');\n\t\t\treturn $this->lblHabilitado;\n\t\t}", "public function lblCountry_Create($strControlId = null) {\n\t\t\t$this->lblCountry = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblCountry->Name = QApplication::Translate('Country');\n\t\t\t$this->lblCountry->Text = $this->objRestaurantCopy1->Country;\n\t\t\t$this->lblCountry->Required = true;\n\t\t\treturn $this->lblCountry;\n\t\t}", "public function lblEmail_Create($strControlId = null) {\n\t\t\t$this->lblEmail = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblEmail->Name = QApplication::Translate('Email');\n\t\t\t$this->lblEmail->Text = $this->objRestaurantCopy1->Email;\n\t\t\t$this->lblEmail->Required = true;\n\t\t\treturn $this->lblEmail;\n\t\t}", "public function lblParentPagerIndividualId_Create($strControlId = null) {\n\t\t\t$this->lblParentPagerIndividualId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblParentPagerIndividualId->Name = QApplication::Translate('Parent Pager Individual');\n\t\t\t$this->lblParentPagerIndividualId->Text = ($this->objParentPagerAttendantHistory->ParentPagerIndividual) ? $this->objParentPagerAttendantHistory->ParentPagerIndividual->__toString() : null;\n\t\t\t$this->lblParentPagerIndividualId->Required = true;\n\t\t\treturn $this->lblParentPagerIndividualId;\n\t\t}", "public function lblOwnerLastName_Create($strControlId = null) {\n\t\t\t$this->lblOwnerLastName = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblOwnerLastName->Name = QApplication::Translate('Owner Last Name');\n\t\t\t$this->lblOwnerLastName->Text = $this->objRestaurantCopy1->OwnerLastName;\n\t\t\t$this->lblOwnerLastName->Required = true;\n\t\t\treturn $this->lblOwnerLastName;\n\t\t}", "public function lblUsuario_Create($strControlId = null) {\n\t\t\t$this->lblUsuario = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblUsuario->Name = QApplication::Translate('Usuario');\n\t\t\t$this->lblUsuario->Text = $this->objUsuarios->Usuario;\n\t\t\treturn $this->lblUsuario;\n\t\t}", "public function lblLastName_Create($strControlId = null) {\n\t\t\t$this->lblLastName = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblLastName->Name = QApplication::Translate('Last Name');\n\t\t\t$this->lblLastName->Text = $this->objLogin->LastName;\n\t\t\treturn $this->lblLastName;\n\t\t}" ]
[ "0.74553305", "0.7387543", "0.73854125", "0.7379099", "0.73552024", "0.7304298", "0.705772", "0.67587394", "0.6667491", "0.66470516", "0.658415", "0.6579571", "0.6550557", "0.65070385", "0.6415949", "0.6407493", "0.6402573", "0.63903695", "0.6383883", "0.63838625", "0.6362799", "0.6355116", "0.6337618", "0.63262427", "0.63192666", "0.63150835", "0.6304002", "0.62881804", "0.628654", "0.6279589" ]
0.7415746
1
Create and setup QTextBox txtTransitHash
public function txtTransitHash_Create($strControlId = null) { $this->txtTransitHash = new QTextBox($this->objParentObject, $strControlId); $this->txtTransitHash->Name = QApplication::Translate('Transit Hash'); $this->txtTransitHash->Text = $this->objCheckingAccountLookup->TransitHash; $this->txtTransitHash->MaxLength = CheckingAccountLookup::TransitHashMaxLength; return $this->txtTransitHash; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function txtAccountHash_Create($strControlId = null) {\n\t\t\t$this->txtAccountHash = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtAccountHash->Name = QApplication::Translate('Account Hash');\n\t\t\t$this->txtAccountHash->Text = $this->objCheckingAccountLookup->AccountHash;\n\t\t\t$this->txtAccountHash->MaxLength = CheckingAccountLookup::AccountHashMaxLength;\n\t\t\treturn $this->txtAccountHash;\n\t\t}", "public function lblTransitHash_Create($strControlId = null) {\n\t\t\t$this->lblTransitHash = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblTransitHash->Name = QApplication::Translate('Transit Hash');\n\t\t\t$this->lblTransitHash->Text = $this->objCheckingAccountLookup->TransitHash;\n\t\t\treturn $this->lblTransitHash;\n\t\t}", "public function lblAccountHash_Create($strControlId = null) {\n\t\t\t$this->lblAccountHash = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblAccountHash->Name = QApplication::Translate('Account Hash');\n\t\t\t$this->lblAccountHash->Text = $this->objCheckingAccountLookup->AccountHash;\n\t\t\treturn $this->lblAccountHash;\n\t\t}", "public function txtQrcode_Create($strControlId = null) {\n\t\t\t$this->txtQrcode = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtQrcode->Name = QApplication::Translate('Qrcode');\n\t\t\t$this->txtQrcode->Text = $this->objRestaurantCopy1->Qrcode;\n\t\t\t$this->txtQrcode->Required = true;\n\t\t\t$this->txtQrcode->TextMode = QTextMode::MultiLine;\n\t\t\treturn $this->txtQrcode;\n\t\t}", "public function txtQtycoins_Create($strControlId = null) {\n\t\t\t$this->txtQtycoins = new QIntegerTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtQtycoins->Name = QApplication::Translate('Qtycoins');\n\t\t\t$this->txtQtycoins->Text = $this->objRestaurantCopy1->Qtycoins;\n\t\t\treturn $this->txtQtycoins;\n\t\t}", "public function txtPassword_Create($strControlId = null) {\n\t\t\t$this->txtPassword = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtPassword->Name = QApplication::Translate('Password');\n\t\t\t$this->txtPassword->Text = $this->objRestaurantCopy1->Password;\n\t\t\t$this->txtPassword->Required = true;\n\t\t\t$this->txtPassword->MaxLength = RestaurantCopy1::PasswordMaxLength;\n\t\t\treturn $this->txtPassword;\n\t\t}", "public function txtZipCode_Create($strControlId = null) {\n\t\t\t$this->txtZipCode = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtZipCode->Name = QApplication::Translate('Zip Code');\n\t\t\t$this->txtZipCode->Text = $this->objAddress->ZipCode;\n\t\t\t$this->txtZipCode->TextMode = QTextMode::MultiLine;\n\t\t\treturn $this->txtZipCode;\n\t\t}", "public function txtPassword_Create($strControlId = null) {\n\t\t\t$this->txtPassword = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtPassword->Name = QApplication::Translate('Password');\n\t\t\t$this->txtPassword->Text = $this->objUsuarios->Password;\n\t\t\treturn $this->txtPassword;\n\t\t}", "public function txtLatitude_Create($strControlId = null) {\n\t\t\t$this->txtLatitude = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtLatitude->Name = QApplication::Translate('Latitude');\n\t\t\t$this->txtLatitude->Text = $this->objRestaurantCopy1->Latitude;\n\t\t\t$this->txtLatitude->Required = true;\n\t\t\treturn $this->txtLatitude;\n\t\t}", "public function txtPassword_Create($strControlId = null) {\n\t\t\t$this->txtPassword = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtPassword->Name = QApplication::Translate('Password');\n\t\t\t$this->txtPassword->Text = $this->objLogin->Password;\n\t\t\t$this->txtPassword->MaxLength = Login::PasswordMaxLength;\n\t\t\treturn $this->txtPassword;\n\t\t}", "public function txtUsername_Create($strControlId = null) {\n\t\t\t$this->txtUsername = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtUsername->Name = QApplication::Translate('Username');\n\t\t\t$this->txtUsername->Text = $this->objLogin->Username;\n\t\t\t$this->txtUsername->MaxLength = Login::UsernameMaxLength;\n\t\t\treturn $this->txtUsername;\n\t\t}", "public function txtAddress1_Create($strControlId = null) {\n\t\t\t$this->txtAddress1 = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtAddress1->Name = QApplication::Translate('Address 1');\n\t\t\t$this->txtAddress1->Text = $this->objAddress->Address1;\n\t\t\t$this->txtAddress1->TextMode = QTextMode::MultiLine;\n\t\t\treturn $this->txtAddress1;\n\t\t}", "public function txtEmail_Create($strControlId = null) {\n\t\t\t$this->txtEmail = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtEmail->Name = QApplication::Translate('Email');\n\t\t\t$this->txtEmail->Text = $this->objRestaurantCopy1->Email;\n\t\t\t$this->txtEmail->Required = true;\n\t\t\t$this->txtEmail->MaxLength = RestaurantCopy1::EmailMaxLength;\n\t\t\treturn $this->txtEmail;\n\t\t}", "public function txtEmail_Create($strControlId = null) {\n\t\t\t$this->txtEmail = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtEmail->Name = QApplication::Translate('Email');\n\t\t\t$this->txtEmail->Text = $this->objLogin->Email;\n\t\t\t$this->txtEmail->MaxLength = Login::EmailMaxLength;\n\t\t\treturn $this->txtEmail;\n\t\t}", "public function txtRawMessage_Create($strControlId = null) {\n\t\t\t$this->txtRawMessage = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtRawMessage->Name = QApplication::Translate('Raw Message');\n\t\t\t$this->txtRawMessage->Text = $this->objEmailMessage->RawMessage;\n\t\t\t$this->txtRawMessage->Required = true;\n\t\t\t$this->txtRawMessage->TextMode = QTextMode::MultiLine;\n\t\t\treturn $this->txtRawMessage;\n\t\t}", "public function txtEmail_Create($strControlId = null) {\n\t\t\t$this->txtEmail = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtEmail->Name = QApplication::Translate('Email');\n\t\t\t$this->txtEmail->Text = $this->objUsuarios->Email;\n\t\t\treturn $this->txtEmail;\n\t\t}", "protected function createText()\n {\n $number = count($this->elements) + 1;\n $text = new Text(\"input$number\");\n $text->setAttribute('maxlength', $this->maxlength);\n $this->elements[] = $text;\n }", "public function txtAddress_Create($strControlId = null) {\n\t\t\t$this->txtAddress = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtAddress->Name = QApplication::Translate('Address');\n\t\t\t$this->txtAddress->Text = $this->objRestaurantCopy1->Address;\n\t\t\t$this->txtAddress->Required = true;\n\t\t\t$this->txtAddress->MaxLength = RestaurantCopy1::AddressMaxLength;\n\t\t\treturn $this->txtAddress;\n\t\t}", "function render_TextInput($args) {\n print \"<input \".\n \"id='plugintel_options[{$args['id']}]' \".\n \"name='plugintel_options[{$args['id']}]' \".\n \"size='20' \".\n \"type='text' \" .\n \"value='{$this->options[$args['id']]}' \".\n \"/>\"\n ;\n if (!empty($args['description'])) {\n print \"<p class='description'>{$args['description']}</p>\";\n }\n }", "public function getContent()\n {\n\n $textbox = new BootstrapTextBox($this);\n $textbox->label = 'Unique Id';\n $textbox->value = (new UniqueId())->getUniqueId();\n\n return parent::getContent();\n\n }", "public function lblPassword_Create($strControlId = null) {\n\t\t\t$this->lblPassword = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPassword->Name = QApplication::Translate('Password');\n\t\t\t$this->lblPassword->Text = $this->objRestaurantCopy1->Password;\n\t\t\t$this->lblPassword->Required = true;\n\t\t\treturn $this->lblPassword;\n\t\t}", "public function txtUsuario_Create($strControlId = null) {\n\t\t\t$this->txtUsuario = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtUsuario->Name = QApplication::Translate('Usuario');\n\t\t\t$this->txtUsuario->Text = $this->objUsuarios->Usuario;\n\t\t\treturn $this->txtUsuario;\n\t\t}", "function wha_dialog_passwordform(&$out, &$err, $text, $height, $width,\n $formheight, &$items, $common_options=array())\n{ \n $form_options = array('--passwordform', $text, $height, $width, $formheight);\n $form_items = array();\n foreach($items as $key => $tuple) {\n $form_items[] = $tuple[0]; // label\n $form_items[] = $tuple[1]; // x\n $form_items[] = $tuple[2]; // y\n $form_items[] = $tuple[3]; // item\n $form_items[] = $tuple[4]; // x \n $form_items[] = $tuple[5]; // y\n $form_items[] = $tuple[6]; // flen\n $form_items[] = $tuple[7]; // ilen\n }\n $args = array_merge($common_options, $form_options, $form_items);\n $result = wha_dialog($args, $out, $err);\n if($result == 0) {\n if(is_string($out)) {\n $lines = explode(\"\\n\", $out);\n $i = 0;\n foreach($items as $key => $tuple) {\n $items[$key][3] = $lines[$i];\n $i++;\n }\n }\n }\n return $result;\n}", "function snax_render_text_form_internals() {\n\t?>\n\t<input\n\t\ttype=\"hidden\"\n\t\tname=\"snax-add-text-item-nonce\"\n\t\tvalue=\"<?php echo esc_attr( wp_create_nonce( 'snax-add-text-item' ) ); ?>\"\n\t\t/>\n\t<?php\n}", "function wha_dialog_passwordbox(&$out, &$err, $text, $height, $width,\n $init = null, $common_options = array())\n{ \n $passwordbox_options = array('--passwordbox', $text, $height, $width);\n if($init !== null) {\n $passwordbox_options[] = $init;\n }\n $args = array_merge($common_options, $passwordbox_options);\n $result = wha_dialog($args, $out, $err);\n return $result;\n}", "public function txtFromAddress_Create($strControlId = null) {\n\t\t\t$this->txtFromAddress = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtFromAddress->Name = QApplication::Translate('From Address');\n\t\t\t$this->txtFromAddress->Text = $this->objEmailMessage->FromAddress;\n\t\t\t$this->txtFromAddress->MaxLength = EmailMessage::FromAddressMaxLength;\n\t\t\treturn $this->txtFromAddress;\n\t\t}", "public function txtCreateby_Create($strControlId = null) {\n\t\t\t$this->txtCreateby = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtCreateby->Name = QApplication::Translate('Createby');\n\t\t\t$this->txtCreateby->MaxLength = Pregunta::CreatebyMaxLength;\n\t\t\t$this->txtCreateby->PreferredRenderMethod = 'RenderWithName';\n\t\t\t$this->txtCreateby->LinkedNode = QQN::Pregunta()->Createby;\n\t\t\t$this->txtCreateby->Text = $this->objPregunta->Createby;\n\t\t\treturn $this->txtCreateby;\n\t\t}", "public function txtUpdateby_Create($strControlId = null) {\n\t\t\t$this->txtUpdateby = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtUpdateby->Name = QApplication::Translate('Updateby');\n\t\t\t$this->txtUpdateby->MaxLength = Pregunta::UpdatebyMaxLength;\n\t\t\t$this->txtUpdateby->PreferredRenderMethod = 'RenderWithName';\n\t\t\t$this->txtUpdateby->LinkedNode = QQN::Pregunta()->Updateby;\n\t\t\t$this->txtUpdateby->Text = $this->objPregunta->Updateby;\n\t\t\treturn $this->txtUpdateby;\n\t\t}", "function passwordWidget($name, $text, $size)\n {\n // Are there any errors to show for this widget?\n // If so, show them above the widget\n if (isset($_SESSION[\"{$this->formErrors}\"][\"{$name}\"]))\n {\n $this->setCurrentBlock(\"passworderror\");\n $this->setVariable(\"PERRORTEXT\", \n $_SESSION[\"{$this->formErrors}\"][\"{$name}\"]);\n $this->parseCurrentBlock(\"passworderror\");\n }\n\n // Setup the widget\n $this->setCurrentBlock(\"passwordinput\");\n $this->setVariable(\"PINPUTNAME\", \"{$name}\");\n if (isset($_SESSION[\"{$this->formVars}\"][\"{$name}\"]))\n $this->setVariable(\"PINPUTVALUE\", \n $_SESSION[\"{$this->formVars}\"][\"{$name}\"]);\n $this->setVariable(\"PINPUTTEXT\", \"{$text}\");\n $this->setVariable(\"PINPUTSIZE\", $size);\n $this->parseCurrentBlock(\"passwordinput\");\n $this->setCurrentBlock(\"widget\");\n $this->parseCurrentBlock(\"widget\");\n }", "public function txtNumero_Create($strControlId = null) {\n\t\t\t$this->txtNumero = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtNumero->Name = QApplication::Translate('Numero');\n\t\t\t$this->txtNumero->Text = $this->objOrdemProducao->Numero;\n\t\t\t$this->txtNumero->Required = true;\n\t\t\t$this->txtNumero->MaxLength = OrdemProducao::NumeroMaxLength;\n\t\t\treturn $this->txtNumero;\n\t\t}" ]
[ "0.72743493", "0.6435544", "0.5963558", "0.5734979", "0.5717114", "0.5570517", "0.5564429", "0.55429626", "0.54384816", "0.5423457", "0.5380987", "0.5271835", "0.5267103", "0.5238013", "0.523344", "0.5218372", "0.5215268", "0.5167016", "0.51668143", "0.51383877", "0.51227814", "0.5117524", "0.5087222", "0.5040508", "0.50069326", "0.500676", "0.5005637", "0.500261", "0.49816212", "0.4970344" ]
0.7912455
0
Create and setup QLabel lblTransitHash
public function lblTransitHash_Create($strControlId = null) { $this->lblTransitHash = new QLabel($this->objParentObject, $strControlId); $this->lblTransitHash->Name = QApplication::Translate('Transit Hash'); $this->lblTransitHash->Text = $this->objCheckingAccountLookup->TransitHash; return $this->lblTransitHash; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function lblAccountHash_Create($strControlId = null) {\n\t\t\t$this->lblAccountHash = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblAccountHash->Name = QApplication::Translate('Account Hash');\n\t\t\t$this->lblAccountHash->Text = $this->objCheckingAccountLookup->AccountHash;\n\t\t\treturn $this->lblAccountHash;\n\t\t}", "public function lblQtycoins_Create($strControlId = null, $strFormat = null) {\n\t\t\t$this->lblQtycoins = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblQtycoins->Name = QApplication::Translate('Qtycoins');\n\t\t\t$this->lblQtycoins->Text = $this->objRestaurantCopy1->Qtycoins;\n\t\t\t$this->lblQtycoins->Format = $strFormat;\n\t\t\treturn $this->lblQtycoins;\n\t\t}", "public function txtTransitHash_Create($strControlId = null) {\n\t\t\t$this->txtTransitHash = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtTransitHash->Name = QApplication::Translate('Transit Hash');\n\t\t\t$this->txtTransitHash->Text = $this->objCheckingAccountLookup->TransitHash;\n\t\t\t$this->txtTransitHash->MaxLength = CheckingAccountLookup::TransitHashMaxLength;\n\t\t\treturn $this->txtTransitHash;\n\t\t}", "public function lblZipCode_Create($strControlId = null) {\n\t\t\t$this->lblZipCode = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblZipCode->Name = QApplication::Translate('Zip Code');\n\t\t\t$this->lblZipCode->Text = $this->objAddress->ZipCode;\n\t\t\treturn $this->lblZipCode;\n\t\t}", "public function lblLatitude_Create($strControlId = null) {\n\t\t\t$this->lblLatitude = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblLatitude->Name = QApplication::Translate('Latitude');\n\t\t\t$this->lblLatitude->Text = $this->objRestaurantCopy1->Latitude;\n\t\t\t$this->lblLatitude->Required = true;\n\t\t\treturn $this->lblLatitude;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objCheckingAccountLookup->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblPassword_Create($strControlId = null) {\n\t\t\t$this->lblPassword = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPassword->Name = QApplication::Translate('Password');\n\t\t\t$this->lblPassword->Text = $this->objRestaurantCopy1->Password;\n\t\t\t$this->lblPassword->Required = true;\n\t\t\treturn $this->lblPassword;\n\t\t}", "public function lblQrcode_Create($strControlId = null) {\n\t\t\t$this->lblQrcode = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblQrcode->Name = QApplication::Translate('Qrcode');\n\t\t\t$this->lblQrcode->Text = $this->objRestaurantCopy1->Qrcode;\n\t\t\t$this->lblQrcode->Required = true;\n\t\t\treturn $this->lblQrcode;\n\t\t}", "static function buildLabel($val) {\r\n\t\t\techo '<LABEL>';\r\n \t\techo $val;\r\n\t\t\techo '</LABEL>';\t\r\n\t\t}", "public function lblAddress1_Create($strControlId = null) {\n\t\t\t$this->lblAddress1 = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblAddress1->Name = QApplication::Translate('Address 1');\n\t\t\t$this->lblAddress1->Text = $this->objAddress->Address1;\n\t\t\treturn $this->lblAddress1;\n\t\t}", "public function lblUsername_Create($strControlId = null) {\n\t\t\t$this->lblUsername = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblUsername->Name = QApplication::Translate('Username');\n\t\t\t$this->lblUsername->Text = $this->objLogin->Username;\n\t\t\treturn $this->lblUsername;\n\t\t}", "public function lblEmail_Create($strControlId = null) {\n\t\t\t$this->lblEmail = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblEmail->Name = QApplication::Translate('Email');\n\t\t\t$this->lblEmail->Text = $this->objRestaurantCopy1->Email;\n\t\t\t$this->lblEmail->Required = true;\n\t\t\treturn $this->lblEmail;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objEmailMessage->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objCannedStrategy->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblPassword_Create($strControlId = null) {\n\t\t\t$this->lblPassword = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPassword->Name = QApplication::Translate('Password');\n\t\t\t$this->lblPassword->Text = $this->objUsuarios->Password;\n\t\t\treturn $this->lblPassword;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objLogin->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblPassword_Create($strControlId = null) {\n\t\t\t$this->lblPassword = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPassword->Name = QApplication::Translate('Password');\n\t\t\t$this->lblPassword->Text = $this->objLogin->Password;\n\t\t\treturn $this->lblPassword;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objAddress->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblLongitude_Create($strControlId = null) {\n\t\t\t$this->lblLongitude = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblLongitude->Name = QApplication::Translate('Longitude');\n\t\t\t$this->lblLongitude->Text = $this->objRestaurantCopy1->Longitude;\n\t\t\t$this->lblLongitude->Required = true;\n\t\t\treturn $this->lblLongitude;\n\t\t}", "public function lblRawMessage_Create($strControlId = null) {\n\t\t\t$this->lblRawMessage = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblRawMessage->Name = QApplication::Translate('Raw Message');\n\t\t\t$this->lblRawMessage->Text = $this->objEmailMessage->RawMessage;\n\t\t\t$this->lblRawMessage->Required = true;\n\t\t\treturn $this->lblRawMessage;\n\t\t}", "private function create_label($label)\n\t{\n\t\tif ($mylabel = $this->get_label($label))\n\t\t{\n\t\t\t$this->pair .= form::label($this->id, $mylabel, $this->label_extra);\n\t\t}\n\n\t}", "public function lblEmail_Create($strControlId = null) {\n\t\t\t$this->lblEmail = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblEmail->Name = QApplication::Translate('Email');\n\t\t\t$this->lblEmail->Text = $this->objLogin->Email;\n\t\t\treturn $this->lblEmail;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objParentPagerAttendantHistory->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function createLabel($labelStr)\n {\n $this->label = new Label($labelStr);\n }", "public function lblEmail_Create($strControlId = null) {\n\t\t\t$this->lblEmail = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblEmail->Name = QApplication::Translate('Email');\n\t\t\t$this->lblEmail->Text = $this->objUsuarios->Email;\n\t\t\treturn $this->lblEmail;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objOrdemProducao->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblPreguntaId_Create($strControlId = null) {\n\t\t\t$this->lblPreguntaId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPreguntaId->Name = QApplication::Translate('Pregunta Id');\n\t\t\t$this->lblPreguntaId->PreferredRenderMethod = 'RenderWithName';\n\t\t\t$this->lblPreguntaId->LinkedNode = QQN::Pregunta()->PreguntaId;\n\t\t\t$this->lblPreguntaId->Text = $this->objPregunta->PreguntaId;\n\t\t\treturn $this->lblPreguntaId;\n\t\t}", "public function lblAddress_Create($strControlId = null) {\n\t\t\t$this->lblAddress = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblAddress->Name = QApplication::Translate('Address');\n\t\t\t$this->lblAddress->Text = $this->objRestaurantCopy1->Address;\n\t\t\t$this->lblAddress->Required = true;\n\t\t\treturn $this->lblAddress;\n\t\t}", "protected function getLabel() {\n\t\t// Initialise variables.\n\t\t$label = '';\n\n\t\tif ($this->hidden) {\n\t\t\treturn $label;\n\t\t}\n\n\t\t$plgRegisterjOpenSim\t= JPluginHelper::getPlugin('user', 'jopensimregister');\n\t\t$this->params\t\t\t= new JRegistry($plgRegisterjOpenSim->params);\n\t\t$avatarlist\t\t\t\t= $this->params->get('plgJopensimRegisterAvatar');\n\t\t$requiredField\t\t\t= $this->params->get('plgJopensimRegisterUser');\n\n\t\t// Get the label text from the XML element, defaulting to the element name.\n\t\t$text = $this->element['label'] ? (string) $this->element['label'] : (string) $this->element['name'];\n\t\t$text = $this->translateLabel ? JText::_($text) : $text;\n\n\t\tJHtml::_('behavior.modal');\n\n\t\t// Build the class for the label.\n\t\t$class = !empty($this->description) ? 'hasPopover' : '';\n\t\tif($requiredField == \"required\") {\n\t\t\t$this->required = true;\n\t\t\t$class =$class . ' required';\n\t\t}\n\n\t\t$class = !empty($this->labelClass) ? $class . ' jopensimavatar ' . $this->labelClass : $class.' jopensimavatar';\n\n\t\t// Add the opening label tag and main attributes attributes.\n\t\t$label .= '<label id=\"' . $this->id . '-lbl\" for=\"' . $this->id . '\" class=\"' . $class . '\"';\n\n\t\t// If a description is specified, use it to build a tooltip.\n\t\tif (!empty($this->description)) {\n\t\t\t$label .= ' data-title=\"'\n\t\t\t\t. htmlspecialchars(\n trim($text),\n\t\t\t\tENT_COMPAT, 'UTF-8'\n\t\t\t).'\"\n data-content=\"'.JText::_($this->description).'\"';\n\t\t}\n\n\t\t$avatararticle = $this->params->get('plgJopensimRegisterAvatarArticle');\n\t\tif($avatararticle > 0) {\n\t\t\t$link = '<a class=\"modal\" title=\"\" href=\"index.php?option=com_content&amp;view=article&amp;layout=modal&amp;id=' . $avatararticle . '&amp;tmpl=component\" rel=\"{handler: \\'iframe\\', size: {x:800, y:500}}\">' . $text . '</a>';\n\t\t} else {\n\t\t\t$link = $text;\n\t\t}\n\n\t\t// Add the label text and closing tag.\n\t\t$label .= '>' . $link . '</label>';\n\t\treturn $label;\n\t}", "public function lblRestaurantName_Create($strControlId = null) {\n\t\t\t$this->lblRestaurantName = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblRestaurantName->Name = QApplication::Translate('Restaurant Name');\n\t\t\t$this->lblRestaurantName->Text = $this->objRestaurantCopy1->RestaurantName;\n\t\t\t$this->lblRestaurantName->Required = true;\n\t\t\treturn $this->lblRestaurantName;\n\t\t}" ]
[ "0.6947049", "0.60044956", "0.59130925", "0.5661564", "0.562299", "0.55994135", "0.5576478", "0.55750436", "0.5566088", "0.55312", "0.55212504", "0.55080956", "0.54816806", "0.5469655", "0.54669577", "0.54486877", "0.5441387", "0.5434906", "0.5419884", "0.5402996", "0.54018134", "0.538828", "0.53857476", "0.53773135", "0.535816", "0.5351292", "0.5332409", "0.5316865", "0.5293994", "0.52916425" ]
0.78250813
0
Create and setup QTextBox txtAccountHash
public function txtAccountHash_Create($strControlId = null) { $this->txtAccountHash = new QTextBox($this->objParentObject, $strControlId); $this->txtAccountHash->Name = QApplication::Translate('Account Hash'); $this->txtAccountHash->Text = $this->objCheckingAccountLookup->AccountHash; $this->txtAccountHash->MaxLength = CheckingAccountLookup::AccountHashMaxLength; return $this->txtAccountHash; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function txtTransitHash_Create($strControlId = null) {\n\t\t\t$this->txtTransitHash = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtTransitHash->Name = QApplication::Translate('Transit Hash');\n\t\t\t$this->txtTransitHash->Text = $this->objCheckingAccountLookup->TransitHash;\n\t\t\t$this->txtTransitHash->MaxLength = CheckingAccountLookup::TransitHashMaxLength;\n\t\t\treturn $this->txtTransitHash;\n\t\t}", "public function lblAccountHash_Create($strControlId = null) {\n\t\t\t$this->lblAccountHash = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblAccountHash->Name = QApplication::Translate('Account Hash');\n\t\t\t$this->lblAccountHash->Text = $this->objCheckingAccountLookup->AccountHash;\n\t\t\treturn $this->lblAccountHash;\n\t\t}", "public function txtUsername_Create($strControlId = null) {\n\t\t\t$this->txtUsername = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtUsername->Name = QApplication::Translate('Username');\n\t\t\t$this->txtUsername->Text = $this->objLogin->Username;\n\t\t\t$this->txtUsername->MaxLength = Login::UsernameMaxLength;\n\t\t\treturn $this->txtUsername;\n\t\t}", "public function txtPassword_Create($strControlId = null) {\n\t\t\t$this->txtPassword = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtPassword->Name = QApplication::Translate('Password');\n\t\t\t$this->txtPassword->Text = $this->objUsuarios->Password;\n\t\t\treturn $this->txtPassword;\n\t\t}", "public function txtPassword_Create($strControlId = null) {\n\t\t\t$this->txtPassword = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtPassword->Name = QApplication::Translate('Password');\n\t\t\t$this->txtPassword->Text = $this->objLogin->Password;\n\t\t\t$this->txtPassword->MaxLength = Login::PasswordMaxLength;\n\t\t\treturn $this->txtPassword;\n\t\t}", "public function txtPassword_Create($strControlId = null) {\n\t\t\t$this->txtPassword = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtPassword->Name = QApplication::Translate('Password');\n\t\t\t$this->txtPassword->Text = $this->objRestaurantCopy1->Password;\n\t\t\t$this->txtPassword->Required = true;\n\t\t\t$this->txtPassword->MaxLength = RestaurantCopy1::PasswordMaxLength;\n\t\t\treturn $this->txtPassword;\n\t\t}", "public function lblTransitHash_Create($strControlId = null) {\n\t\t\t$this->lblTransitHash = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblTransitHash->Name = QApplication::Translate('Transit Hash');\n\t\t\t$this->lblTransitHash->Text = $this->objCheckingAccountLookup->TransitHash;\n\t\t\treturn $this->lblTransitHash;\n\t\t}", "function ghc_e3_checkout_password_placeholder( $fields ) {\n $fields['account']['account_password']['type'] = 'text';\n\n return $fields;\n}", "public function txtUsuario_Create($strControlId = null) {\n\t\t\t$this->txtUsuario = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtUsuario->Name = QApplication::Translate('Usuario');\n\t\t\t$this->txtUsuario->Text = $this->objUsuarios->Usuario;\n\t\t\treturn $this->txtUsuario;\n\t\t}", "public function broadly_account_id_cb() {\n\t\t$broadly_options = get_option( 'broadly_options', array() );\n\t\t\n\t\t$account_id = '';\n\t\t\n\t\t// Make sure it's properly escaped\n\t\tif ( is_array( $broadly_options ) \n\t\t\t\t&& ! empty( $broadly_options['broadly_account_id'] ) ) {\n\t\t\t$account_id = esc_html( $broadly_options['broadly_account_id'] );\n\t\t}\n\t\t\n\t\techo \"<input type='text' name='broadly_options[broadly_account_id]' value='$account_id'>\";\n\t}", "public function txtEmail_Create($strControlId = null) {\n\t\t\t$this->txtEmail = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtEmail->Name = QApplication::Translate('Email');\n\t\t\t$this->txtEmail->Text = $this->objLogin->Email;\n\t\t\t$this->txtEmail->MaxLength = Login::EmailMaxLength;\n\t\t\treturn $this->txtEmail;\n\t\t}", "function wha_dialog_passwordbox(&$out, &$err, $text, $height, $width,\n $init = null, $common_options = array())\n{ \n $passwordbox_options = array('--passwordbox', $text, $height, $width);\n if($init !== null) {\n $passwordbox_options[] = $init;\n }\n $args = array_merge($common_options, $passwordbox_options);\n $result = wha_dialog($args, $out, $err);\n return $result;\n}", "function mgca_field_gmail_account_cb( $args ) {\n // get the value of the setting we've registered with register_setting()\n $option = get_option( 'mgca_options_gmail_account' );\n // output the field\n ?>\n\n <input \n id=\"<?php echo esc_attr( $args['label_for'] ); ?>\"\n type=\"text\"\n data-custom=\"custom\"\n name=\"mgca_options_gmail_account\"\n value=\"<?php echo $option ?>\"\n >\n <?php\n}", "public function accountNameField() {\n\t\tammm_get_template( 'Admin/Options/input-field', array(\n\t\t\t'field' => self::OPT_NAME . '[account_name]',\n\t\t\t'type' => 'text',\n\t\t\t'value' => $this->options['account_name'],\n\t\t\t'desc' => 'Enter the associated church account name.',\n\t\t\t'example' => 'gracechurchatlanta',\n\t\t) );\n\t}", "function admin_toxid_preview_password_field()\n {\n $password = get_option('toxid_preview_password');\n\n echo \"<input name=\\\"toxid_preview_password\\\" value=\\\"{$password}\\\">\";\n }", "public function txtEmail_Create($strControlId = null) {\n\t\t\t$this->txtEmail = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtEmail->Name = QApplication::Translate('Email');\n\t\t\t$this->txtEmail->Text = $this->objUsuarios->Email;\n\t\t\treturn $this->txtEmail;\n\t\t}", "public function lblPassword_Create($strControlId = null) {\n\t\t\t$this->lblPassword = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPassword->Name = QApplication::Translate('Password');\n\t\t\t$this->lblPassword->Text = $this->objRestaurantCopy1->Password;\n\t\t\t$this->lblPassword->Required = true;\n\t\t\treturn $this->lblPassword;\n\t\t}", "function wcla_plugin_setting_rpc_pass() {\n\techo \"<input id='wcla_plugin_setting_rpc_pass' name='wcla_plugin_options[rpc_pass]' type='text' size='60' value='\" . esc_attr( get_option( 'wcla_plugin_options' )['rpc_pass'] ) . \"' />\";\n}", "public function lblPassword_Create($strControlId = null) {\n\t\t\t$this->lblPassword = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPassword->Name = QApplication::Translate('Password');\n\t\t\t$this->lblPassword->Text = $this->objUsuarios->Password;\n\t\t\treturn $this->lblPassword;\n\t\t}", "public function lblPassword_Create($strControlId = null) {\n\t\t\t$this->lblPassword = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPassword->Name = QApplication::Translate('Password');\n\t\t\t$this->lblPassword->Text = $this->objLogin->Password;\n\t\t\treturn $this->lblPassword;\n\t\t}", "function wcla_plugin_setting_rpc_user() {\n\techo \"<input id='wcla_plugin_setting_rpc_user' name='wcla_plugin_options[rpc_user]' type='text' size='60' value='\" . esc_attr( get_option( 'wcla_plugin_options' )['rpc_user'] ) . \"' />\";\n}", "function passwordWidget($name, $text, $size)\n {\n // Are there any errors to show for this widget?\n // If so, show them above the widget\n if (isset($_SESSION[\"{$this->formErrors}\"][\"{$name}\"]))\n {\n $this->setCurrentBlock(\"passworderror\");\n $this->setVariable(\"PERRORTEXT\", \n $_SESSION[\"{$this->formErrors}\"][\"{$name}\"]);\n $this->parseCurrentBlock(\"passworderror\");\n }\n\n // Setup the widget\n $this->setCurrentBlock(\"passwordinput\");\n $this->setVariable(\"PINPUTNAME\", \"{$name}\");\n if (isset($_SESSION[\"{$this->formVars}\"][\"{$name}\"]))\n $this->setVariable(\"PINPUTVALUE\", \n $_SESSION[\"{$this->formVars}\"][\"{$name}\"]);\n $this->setVariable(\"PINPUTTEXT\", \"{$text}\");\n $this->setVariable(\"PINPUTSIZE\", $size);\n $this->parseCurrentBlock(\"passwordinput\");\n $this->setCurrentBlock(\"widget\");\n $this->parseCurrentBlock(\"widget\");\n }", "public function txtQrcode_Create($strControlId = null) {\n\t\t\t$this->txtQrcode = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtQrcode->Name = QApplication::Translate('Qrcode');\n\t\t\t$this->txtQrcode->Text = $this->objRestaurantCopy1->Qrcode;\n\t\t\t$this->txtQrcode->Required = true;\n\t\t\t$this->txtQrcode->TextMode = QTextMode::MultiLine;\n\t\t\treturn $this->txtQrcode;\n\t\t}", "public function txtEmail_Create($strControlId = null) {\n\t\t\t$this->txtEmail = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtEmail->Name = QApplication::Translate('Email');\n\t\t\t$this->txtEmail->Text = $this->objRestaurantCopy1->Email;\n\t\t\t$this->txtEmail->Required = true;\n\t\t\t$this->txtEmail->MaxLength = RestaurantCopy1::EmailMaxLength;\n\t\t\treturn $this->txtEmail;\n\t\t}", "function buyg_settings_password_cb( $args ) {\n // get the value of the setting we've registered with register_setting()\n $options = get_option( 'buyg_options' );\n // output the field\n ?>\n <input id=\"<?php echo esc_attr($args['label_for']) ?>\"\n type=\"text\"\n name=\"buyg_options[<?php echo esc_attr($args['label_for']); ?>]\"\n value=\"<?php echo isset( $options[ $args['label_for'] ] ) ? $options[ $args['label_for'] ] : ''; ?>\" >\n <?php\n}", "private function createUserWithHash() {\r\n\t\t$hash = RegistrationUserQuery::generateHash($this->entity);\r\n\t\t$this->sendHashNotificationEmail($hash);\r\n\t}", "public function edp_api_account_number_prod_html()\n\t{\n\t\t$this->open_input();\n\n\t\tprintf( '<input type=\"text\" id=\"edp_api_account_number_prod\" class=\"form-control\" name=\"edp_api_account_number_prod\" value=\"%s\" required />',\n\t\t\tesc_attr( ( $val = get_option('edp_api_account_number_prod') ) ? $val : '' )\n\t\t);\n\n\t\t$this->close_input();\n\n\t}", "public function txtAddress1_Create($strControlId = null) {\n\t\t\t$this->txtAddress1 = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtAddress1->Name = QApplication::Translate('Address 1');\n\t\t\t$this->txtAddress1->Text = $this->objAddress->Address1;\n\t\t\t$this->txtAddress1->TextMode = QTextMode::MultiLine;\n\t\t\treturn $this->txtAddress1;\n\t\t}", "public function txtZipCode_Create($strControlId = null) {\n\t\t\t$this->txtZipCode = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtZipCode->Name = QApplication::Translate('Zip Code');\n\t\t\t$this->txtZipCode->Text = $this->objAddress->ZipCode;\n\t\t\t$this->txtZipCode->TextMode = QTextMode::MultiLine;\n\t\t\treturn $this->txtZipCode;\n\t\t}", "public function txtQtycoins_Create($strControlId = null) {\n\t\t\t$this->txtQtycoins = new QIntegerTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtQtycoins->Name = QApplication::Translate('Qtycoins');\n\t\t\t$this->txtQtycoins->Text = $this->objRestaurantCopy1->Qtycoins;\n\t\t\treturn $this->txtQtycoins;\n\t\t}" ]
[ "0.711061", "0.6711509", "0.6050924", "0.58274835", "0.5769188", "0.5732463", "0.56176347", "0.55943865", "0.55138284", "0.5483443", "0.54823315", "0.5443953", "0.5433706", "0.5356381", "0.5351671", "0.5331985", "0.53125775", "0.5269777", "0.5265839", "0.5246606", "0.52222896", "0.51993126", "0.51778746", "0.5177664", "0.5151858", "0.5139013", "0.5122249", "0.5111416", "0.50902694", "0.50876635" ]
0.7975981
0
Create and setup QLabel lblAccountHash
public function lblAccountHash_Create($strControlId = null) { $this->lblAccountHash = new QLabel($this->objParentObject, $strControlId); $this->lblAccountHash->Name = QApplication::Translate('Account Hash'); $this->lblAccountHash->Text = $this->objCheckingAccountLookup->AccountHash; return $this->lblAccountHash; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function lblTransitHash_Create($strControlId = null) {\n\t\t\t$this->lblTransitHash = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblTransitHash->Name = QApplication::Translate('Transit Hash');\n\t\t\t$this->lblTransitHash->Text = $this->objCheckingAccountLookup->TransitHash;\n\t\t\treturn $this->lblTransitHash;\n\t\t}", "public function txtAccountHash_Create($strControlId = null) {\n\t\t\t$this->txtAccountHash = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtAccountHash->Name = QApplication::Translate('Account Hash');\n\t\t\t$this->txtAccountHash->Text = $this->objCheckingAccountLookup->AccountHash;\n\t\t\t$this->txtAccountHash->MaxLength = CheckingAccountLookup::AccountHashMaxLength;\n\t\t\treturn $this->txtAccountHash;\n\t\t}", "public function lblUsername_Create($strControlId = null) {\n\t\t\t$this->lblUsername = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblUsername->Name = QApplication::Translate('Username');\n\t\t\t$this->lblUsername->Text = $this->objLogin->Username;\n\t\t\treturn $this->lblUsername;\n\t\t}", "public function lblPassword_Create($strControlId = null) {\n\t\t\t$this->lblPassword = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPassword->Name = QApplication::Translate('Password');\n\t\t\t$this->lblPassword->Text = $this->objUsuarios->Password;\n\t\t\treturn $this->lblPassword;\n\t\t}", "public function lblPassword_Create($strControlId = null) {\n\t\t\t$this->lblPassword = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPassword->Name = QApplication::Translate('Password');\n\t\t\t$this->lblPassword->Text = $this->objLogin->Password;\n\t\t\treturn $this->lblPassword;\n\t\t}", "public function lblPassword_Create($strControlId = null) {\n\t\t\t$this->lblPassword = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblPassword->Name = QApplication::Translate('Password');\n\t\t\t$this->lblPassword->Text = $this->objRestaurantCopy1->Password;\n\t\t\t$this->lblPassword->Required = true;\n\t\t\treturn $this->lblPassword;\n\t\t}", "public function lblEmail_Create($strControlId = null) {\n\t\t\t$this->lblEmail = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblEmail->Name = QApplication::Translate('Email');\n\t\t\t$this->lblEmail->Text = $this->objLogin->Email;\n\t\t\treturn $this->lblEmail;\n\t\t}", "public function lblUsuario_Create($strControlId = null) {\n\t\t\t$this->lblUsuario = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblUsuario->Name = QApplication::Translate('Usuario');\n\t\t\t$this->lblUsuario->Text = $this->objUsuarios->Usuario;\n\t\t\treturn $this->lblUsuario;\n\t\t}", "public function lblEmail_Create($strControlId = null) {\n\t\t\t$this->lblEmail = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblEmail->Name = QApplication::Translate('Email');\n\t\t\t$this->lblEmail->Text = $this->objUsuarios->Email;\n\t\t\treturn $this->lblEmail;\n\t\t}", "public function lblEmail_Create($strControlId = null) {\n\t\t\t$this->lblEmail = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblEmail->Name = QApplication::Translate('Email');\n\t\t\t$this->lblEmail->Text = $this->objRestaurantCopy1->Email;\n\t\t\t$this->lblEmail->Required = true;\n\t\t\treturn $this->lblEmail;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objCheckingAccountLookup->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function txtTransitHash_Create($strControlId = null) {\n\t\t\t$this->txtTransitHash = new QTextBox($this->objParentObject, $strControlId);\n\t\t\t$this->txtTransitHash->Name = QApplication::Translate('Transit Hash');\n\t\t\t$this->txtTransitHash->Text = $this->objCheckingAccountLookup->TransitHash;\n\t\t\t$this->txtTransitHash->MaxLength = CheckingAccountLookup::TransitHashMaxLength;\n\t\t\treturn $this->txtTransitHash;\n\t\t}", "protected function recoveryAccountCaption():string{\n\t\treturn 'Forgot your password?';\n\t}", "public function lblAddress1_Create($strControlId = null) {\n\t\t\t$this->lblAddress1 = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblAddress1->Name = QApplication::Translate('Address 1');\n\t\t\t$this->lblAddress1->Text = $this->objAddress->Address1;\n\t\t\treturn $this->lblAddress1;\n\t\t}", "public function lblOwnerLastName_Create($strControlId = null) {\n\t\t\t$this->lblOwnerLastName = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblOwnerLastName->Name = QApplication::Translate('Owner Last Name');\n\t\t\t$this->lblOwnerLastName->Text = $this->objRestaurantCopy1->OwnerLastName;\n\t\t\t$this->lblOwnerLastName->Required = true;\n\t\t\treturn $this->lblOwnerLastName;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objLogin->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblHabilitado_Create($strControlId = null) {\n\t\t\t$this->lblHabilitado = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblHabilitado->Name = QApplication::Translate('Habilitado');\n\t\t\t$this->lblHabilitado->Text = ($this->objUsuarios->Habilitado) ? QApplication::Translate('Yes') : QApplication::Translate('No');\n\t\t\treturn $this->lblHabilitado;\n\t\t}", "protected function getLabel() {\n\t\t// Initialise variables.\n\t\t$label = '';\n\n\t\tif ($this->hidden) {\n\t\t\treturn $label;\n\t\t}\n\n\t\t$plgRegisterjOpenSim\t= JPluginHelper::getPlugin('user', 'jopensimregister');\n\t\t$this->params\t\t\t= new JRegistry($plgRegisterjOpenSim->params);\n\t\t$avatarlist\t\t\t\t= $this->params->get('plgJopensimRegisterAvatar');\n\t\t$requiredField\t\t\t= $this->params->get('plgJopensimRegisterUser');\n\n\t\t// Get the label text from the XML element, defaulting to the element name.\n\t\t$text = $this->element['label'] ? (string) $this->element['label'] : (string) $this->element['name'];\n\t\t$text = $this->translateLabel ? JText::_($text) : $text;\n\n\t\tJHtml::_('behavior.modal');\n\n\t\t// Build the class for the label.\n\t\t$class = !empty($this->description) ? 'hasPopover' : '';\n\t\tif($requiredField == \"required\") {\n\t\t\t$this->required = true;\n\t\t\t$class =$class . ' required';\n\t\t}\n\n\t\t$class = !empty($this->labelClass) ? $class . ' jopensimavatar ' . $this->labelClass : $class.' jopensimavatar';\n\n\t\t// Add the opening label tag and main attributes attributes.\n\t\t$label .= '<label id=\"' . $this->id . '-lbl\" for=\"' . $this->id . '\" class=\"' . $class . '\"';\n\n\t\t// If a description is specified, use it to build a tooltip.\n\t\tif (!empty($this->description)) {\n\t\t\t$label .= ' data-title=\"'\n\t\t\t\t. htmlspecialchars(\n trim($text),\n\t\t\t\tENT_COMPAT, 'UTF-8'\n\t\t\t).'\"\n data-content=\"'.JText::_($this->description).'\"';\n\t\t}\n\n\t\t$avatararticle = $this->params->get('plgJopensimRegisterAvatarArticle');\n\t\tif($avatararticle > 0) {\n\t\t\t$link = '<a class=\"modal\" title=\"\" href=\"index.php?option=com_content&amp;view=article&amp;layout=modal&amp;id=' . $avatararticle . '&amp;tmpl=component\" rel=\"{handler: \\'iframe\\', size: {x:800, y:500}}\">' . $text . '</a>';\n\t\t} else {\n\t\t\t$link = $text;\n\t\t}\n\n\t\t// Add the label text and closing tag.\n\t\t$label .= '>' . $link . '</label>';\n\t\treturn $label;\n\t}", "public function lblLastName_Create($strControlId = null) {\n\t\t\t$this->lblLastName = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblLastName->Name = QApplication::Translate('Last Name');\n\t\t\t$this->lblLastName->Text = $this->objLogin->LastName;\n\t\t\treturn $this->lblLastName;\n\t\t}", "public function lblOwnerFirstName_Create($strControlId = null) {\n\t\t\t$this->lblOwnerFirstName = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblOwnerFirstName->Name = QApplication::Translate('Owner First Name');\n\t\t\t$this->lblOwnerFirstName->Text = $this->objRestaurantCopy1->OwnerFirstName;\n\t\t\t$this->lblOwnerFirstName->Required = true;\n\t\t\treturn $this->lblOwnerFirstName;\n\t\t}", "private function create_label($label)\n\t{\n\t\tif ($mylabel = $this->get_label($label))\n\t\t{\n\t\t\t$this->pair .= form::label($this->id, $mylabel, $this->label_extra);\n\t\t}\n\n\t}", "public function lblFirstName_Create($strControlId = null) {\n\t\t\t$this->lblFirstName = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblFirstName->Name = QApplication::Translate('First Name');\n\t\t\t$this->lblFirstName->Text = $this->objLogin->FirstName;\n\t\t\treturn $this->lblFirstName;\n\t\t}", "public function lblZipCode_Create($strControlId = null) {\n\t\t\t$this->lblZipCode = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblZipCode->Name = QApplication::Translate('Zip Code');\n\t\t\t$this->lblZipCode->Text = $this->objAddress->ZipCode;\n\t\t\treturn $this->lblZipCode;\n\t\t}", "public function lblAddress_Create($strControlId = null) {\n\t\t\t$this->lblAddress = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblAddress->Name = QApplication::Translate('Address');\n\t\t\t$this->lblAddress->Text = $this->objRestaurantCopy1->Address;\n\t\t\t$this->lblAddress->Required = true;\n\t\t\treturn $this->lblAddress;\n\t\t}", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objEmailMessage->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblQrcode_Create($strControlId = null) {\n\t\t\t$this->lblQrcode = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblQrcode->Name = QApplication::Translate('Qrcode');\n\t\t\t$this->lblQrcode->Text = $this->objRestaurantCopy1->Qrcode;\n\t\t\t$this->lblQrcode->Required = true;\n\t\t\treturn $this->lblQrcode;\n\t\t}", "static function auth_label($auth_row)\n {\n $label = '';\n $label .= $auth_row['name'];\n if ($auth_row['given']) $label .= \", \" . $auth_row['given'];\n if ($auth_row['role']) $label .= \", \" . $auth_row['role'];\n if ($auth_row['birthyear'] || $auth_row['deathyear']) {\n $label .= \" (\";\n if ($auth_row['birthyear']) $label .= $auth_row['birthyear'];\n else $label .= \" \";\n $label .= '/';\n if ($auth_row['deathyear']) $label .= $auth_row['deathyear'];\n else $label .= \" \";\n $label .= \")\";\n }\n return $label;\n }", "public function build_print_label_ui($host_obj, $order)\n {\n }", "public function lblId_Create($strControlId = null) {\n\t\t\t$this->lblId = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblId->Name = QApplication::Translate('Id');\n\t\t\tif ($this->blnEditMode)\n\t\t\t\t$this->lblId->Text = $this->objAddress->Id;\n\t\t\telse\n\t\t\t\t$this->lblId->Text = 'N/A';\n\t\t\treturn $this->lblId;\n\t\t}", "public function lblQtycoins_Create($strControlId = null, $strFormat = null) {\n\t\t\t$this->lblQtycoins = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblQtycoins->Name = QApplication::Translate('Qtycoins');\n\t\t\t$this->lblQtycoins->Text = $this->objRestaurantCopy1->Qtycoins;\n\t\t\t$this->lblQtycoins->Format = $strFormat;\n\t\t\treturn $this->lblQtycoins;\n\t\t}" ]
[ "0.68114656", "0.64326775", "0.62579906", "0.5974875", "0.59666085", "0.59478706", "0.57868075", "0.5765031", "0.56921905", "0.5587348", "0.5504082", "0.5402021", "0.53690064", "0.5339598", "0.53340185", "0.53066444", "0.5283294", "0.52485347", "0.5228682", "0.5219101", "0.51610786", "0.5155896", "0.5151463", "0.51489353", "0.5147331", "0.5115512", "0.51064974", "0.5092696", "0.50868475", "0.507787" ]
0.7905392
0
Create and setup QListBox lstPeople
public function lstPeople_Create($strControlId = null, QQCondition $objCondition = null, $objOptionalClauses = null) { $this->lstPeople = new QListBox($this->objParentObject, $strControlId); $this->lstPeople->Name = QApplication::Translate('People'); $this->lstPeople->SelectionMode = QSelectionMode::Multiple; // We need to know which items to "Pre-Select" $objAssociatedArray = $this->objCheckingAccountLookup->GetPersonArray(); // Setup and perform the Query if (is_null($objCondition)) $objCondition = QQ::All(); $objPersonCursor = Person::QueryCursor($objCondition, $objOptionalClauses); // Iterate through the Cursor while ($objPerson = Person::InstantiateCursor($objPersonCursor)) { $objListItem = new QListItem($objPerson->__toString(), $objPerson->Id); foreach ($objAssociatedArray as $objAssociated) { if ($objAssociated->Id == $objPerson->Id) $objListItem->Selected = true; } $this->lstPeople->AddItem($objListItem); } // Return the QListControl return $this->lstPeople; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function createList(){\n\t\tgetJSON();\n\t\tglobal $data;\n\n\t\tforeach($data as $obj){\n\t\t\techo \"<li><a href='profile.php?user=\".$obj->name.\"'>\".$obj->name.\"</a></li>\";\n\t\t}\n\t}", "protected function lstPeople_Update() {\n\t\t\tif ($this->lstPeople) {\n\t\t\t\t$this->objCheckingAccountLookup->UnassociateAllPeople();\n\t\t\t\t$objSelectedListItems = $this->lstPeople->SelectedItems;\n\t\t\t\tif ($objSelectedListItems) foreach ($objSelectedListItems as $objListItem) {\n\t\t\t\t\t$this->objCheckingAccountLookup->AssociatePerson(Person::Load($objListItem->Value));\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public function __construct( $args )\n {\n parent::__construct( 'participant', 'view', $args );\n \n // create an associative array with everything we want to display about the participant\n $this->add_item( 'active', 'boolean', 'Active' );\n $this->add_item( 'uid', 'string', 'Unique ID' );\n $this->add_item( 'first_name', 'string', 'First Name' );\n $this->add_item( 'last_name', 'string', 'Last Name' );\n $this->add_item( 'source', 'enum', 'Source' );\n $this->add_item( 'cohort', 'constant', 'Cohort' );\n $this->add_item( 'gender', 'enum', 'Gender' );\n $this->add_item( 'date_of_birth', 'date', 'Date of Birth' );\n $this->add_item( 'language', 'enum', 'Preferred Language' );\n $this->add_item( 'email', 'string', 'Email' );\n $this->add_item( 'site_id', 'enum', 'Prefered Site' );\n $this->add_item( 'status', 'enum', 'Condition' );\n $this->add_item( 'eligible', 'boolean', 'Eligible' );\n $this->add_item( 'no_in_home', 'boolean', 'No in Home' );\n $this->add_item( 'prior_contact_date', 'date', 'Prior Contact Date' );\n \n try\n {\n // create the address sub-list widget\n $this->address_list = new address_list( $args );\n $this->address_list->set_parent( $this );\n $this->address_list->set_heading( 'Addresses' );\n }\n catch( exc\\permission $e )\n {\n $this->address_list = NULL;\n }\n\n try\n {\n // create the phone sub-list widget\n $this->phone_list = new phone_list( $args );\n $this->phone_list->set_parent( $this );\n $this->phone_list->set_heading( 'Phone numbers' );\n }\n catch( exc\\permission $e )\n {\n $this->phone_list = NULL;\n }\n\n try\n {\n // create the consent sub-list widget\n $this->consent_list = new consent_list( $args );\n $this->consent_list->set_parent( $this );\n $this->consent_list->set_heading( 'Consent information' );\n }\n catch( exc\\permission $e )\n {\n $this->consent_list = NULL;\n }\n\n try\n {\n // create the alternate sub-list widget\n $this->alternate_list = new alternate_list( $args );\n $this->alternate_list->set_parent( $this );\n $this->alternate_list->set_heading( 'Alternate contacts' );\n }\n catch( exc\\permission $e )\n {\n $this->alternate_list = NULL;\n }\n }", "protected function getListboxInput()\n {\n $options = array();\n $attr = '';\n\n // Initialize some field attributes.\n $attr .= !empty($this->class) ? ' class=\"' . $this->class . '\"' : '';\n $attr .= !empty($this->size) ? ' size=\"' . $this->size . '\"' : '';\n $attr .= $this->multiple ? ' multiple' : '';\n $attr .= $this->required ? ' required aria-required=\"true\"' : '';\n $attr .= $this->autofocus ? ' autofocus' : '';\n\n // Initialize JavaScript field attributes.\n $attr .= $this->onchange ? ' onchange=\"' . $this->onchange . '\"' : '';\n\n if(self::$userList === null)\n {\n $config = JoomConfig::getInstance();\n $type = $config->get('jg_realname') ? 'name' : 'username';\n\n $db = JFactory::getDbo();\n\n $query = $db->getQuery(true)\n ->select('id AS value')\n ->select($type . ' AS text')\n ->from('#__users')\n ->order($type . ' ASC');\n $db->setQuery($query);\n\n self::$userList = $db->loadObjectList();\n }\n\n $hint = (!empty($this->hint) ? $this->hint : 'COM_JOOMGALLERY_COMMON_NO_USER');\n\n $options[] = JHtml::_('select.option', '', JText::_($hint));\n\n if(!empty(self::$userList))\n {\n foreach(self::$userList as $user)\n {\n $options[] = JHtml::_('select.option', $user->value , $user->text);\n }\n }\n\n return JHtml::_('select.genericlist', $options, $this->name, trim($attr), 'value', 'text', $this->value, $this->id);\n }", "function SetupListOptions() {\r\n\t\tglobal $Security, $Language;\r\n\r\n\t\t// \"edit\"\r\n\t\t$item = &$this->ListOptions->Add(\"edit\");\r\n\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t$item->Visible = $Security->CanEdit();\r\n\t\t$item->OnLeft = TRUE;\r\n\r\n\t\t// \"copy\"\r\n\t\t$item = &$this->ListOptions->Add(\"copy\");\r\n\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t$item->Visible = $Security->CanAdd() && ($this->CurrentAction == \"add\");\r\n\t\t$item->OnLeft = TRUE;\r\n\r\n\t\t// \"delete\"\r\n\t\t$item = &$this->ListOptions->Add(\"delete\");\r\n\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t$item->Visible = $Security->CanDelete();\r\n\t\t$item->OnLeft = TRUE;\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t}", "public function lblPeople_Create($strControlId = null, $strGlue = ', ') {\n\t\t\t$this->lblPeople = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lstPeople->Name = QApplication::Translate('People');\n\t\t\t\n\t\t\t$objAssociatedArray = $this->objCheckingAccountLookup->GetPersonArray();\n\t\t\t$strItems = array();\n\t\t\tforeach ($objAssociatedArray as $objAssociated)\n\t\t\t\t$strItems[] = $objAssociated->__toString();\n\t\t\t$this->lblPeople->Text = implode($strGlue, $strItems);\n\t\t\treturn $this->lblPeople;\n\t\t}", "function SetupListOptions() {\n\t\tglobal $Security, $student_subjects;\n\n\t\t// \"view\"\n\t\t$this->ListOptions->Add(\"view\");\n\t\t$item =& $this->ListOptions->Items[\"view\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"edit\"\n\t\t$this->ListOptions->Add(\"edit\");\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"copy\"\n\t\t$this->ListOptions->Add(\"copy\");\n\t\t$item =& $this->ListOptions->Items[\"copy\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"delete\"\n\t\t$this->ListOptions->Add(\"delete\");\n\t\t$item =& $this->ListOptions->Items[\"delete\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->IsLoggedIn();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$this->ListOptions->Add(\"checkbox\");\n\t\t$item =& $this->ListOptions->Items[\"checkbox\"];\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = TRUE;\n\t\t$item->OnLeft = FALSE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" class=\\\"phpmaker\\\" onclick=\\\"student_subjects_list.SelectAllKey(this);\\\">\";\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\tif ($student_subjects->Export <> \"\" ||\n\t\t\t$student_subjects->CurrentAction == \"gridadd\" ||\n\t\t\t$student_subjects->CurrentAction == \"gridedit\")\n\t\t\t$this->ListOptions->HideAllOptions();\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = FALSE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"view\"\n\t\t$item = &$this->ListOptions->Add(\"view\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"delete\"\n\t\t$item = &$this->ListOptions->Add(\"delete\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = FALSE;\n\n\t\t// \"detail_sana_message\"\n\t\t$item = &$this->ListOptions->Add(\"detail_sana_message\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->AllowList(CurrentProjectID() . 'sana_message') && !$this->ShowMultipleDetails;\n\t\t$item->OnLeft = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\tif (!isset($GLOBALS[\"sana_message_grid\"])) $GLOBALS[\"sana_message_grid\"] = new csana_message_grid;\n\n\t\t// Multiple details\n\t\tif ($this->ShowMultipleDetails) {\n\t\t\t$item = &$this->ListOptions->Add(\"details\");\n\t\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t\t$item->Visible = $this->ShowMultipleDetails;\n\t\t\t$item->OnLeft = FALSE;\n\t\t\t$item->ShowInButtonGroup = FALSE;\n\t\t}\n\n\t\t// Set up detail pages\n\t\t$pages = new cSubPages();\n\t\t$pages->Add(\"sana_message\");\n\t\t$this->DetailPages = $pages;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->OnLeft = FALSE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = FALSE;\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\">\";\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = FALSE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "function listItems()\n\t{\n\t\t$plugin = $this->getPluginObject();\n\t\t$main_tpl = $this->main_tpl;\n\n\t\t$this->tabs->setBackTarget($this->getPluginObject()->txt(\"crs_container\"), $this->ctrl->getLinkTarget($this, \"listContainer\"));\n\n\t\t$plugin->includeClass(\"class.ilUFreibCourseItemTableGUI.php\");\n\t\t$table = new ilUFreibCourseItemTableGUI($this, \"listItems\",\n\t\t\t$this->getPluginObject(), $this->images);\n\n\t\t$main_tpl->setContent($table->getHTML());\n\t}", "function project_manage_persons_list_callback($path){\n $project = prepare_project_manage_page($path);\n \n $breadcrumb = drupal_get_breadcrumb();\n $breadcrumb[] = l($project->name, generate_project_url($path));\n $breadcrumb[] = l(t('Manage'), generate_project_url($path).'/manage');\n drupal_set_breadcrumb($breadcrumb);\n \n $project->path_category = 'manage';\n $project->path_category_subitem = 'persons'; \n \n //add css\n drupal_add_css(drupal_get_path('module','reProjectUser').'/css/user_manage.css');\n drupal_add_css(drupal_get_path('module','reProjectUserProfile').'/personalInfo.css');\n //add js\n drupal_add_js(drupal_get_path('module','reProjectUserProfile').'/personalInfo.js');\n //add jQuery ui\n load_jquery_ui();\n drupal_add_js(drupal_get_path('module','reProjectUser').'/js/edit_tags_window.js');\n \n //add ajax link Drupal.settings.reProjectUser.base_path\n drupal_add_js(array('reProjectUser'=>array('base_path'=>url('project/'.$path.'/manage/persons/'))),'setting');\n //get right part info\n \n //get researchers\n $content.= '<h2>Researchers list</h2>';\n $content.= '<p><a href=\"'.url('project/'.$path.'/manage/persons/researcher/add').'\" class=\"add_link\">Add researcher</a></p>';\n $rows = array();\n $header = array(\n //array('data'=>'Photo'),\n array('data'=>'Name'),\n array('data'=>'Email'),\n );\n $owner = user_load($project->creator);\n $rows[] = array(\n l($owner->name, 'user/'.$owner->uid, array('attributes'=>array('class'=>'show_person_card'))).' (creator)',\n $owner->mail,\n );\n \n $sql = \"SELECT name, mail FROM {research_projects_persons_list} AS p, {users} AS u WHERE p.project=%d AND p.user=u.uid AND p.role='researcher' AND p.active=1\";\n $res = db_query($sql, $project->id);\n while($row=db_fetch_object($res)){\n $rows[] = array(\n l($row->name, 'user/'.$row->uid),\n $row->mail,\n );\n }\n $content.= theme_table($header, $rows);\n \n $content.= '<p>&nbsp;</p>'; \n //get normal user\n $content.= '<h2>Participants list</h2>';\n $content.= '<p><a href=\"'.url(\"project/$path/manage/persons/participant/new\").'\" class=\"add_link\">Add new participant</a>'; \n $content.= '<a href=\"'.url(\"project/$path/manage/persons/tags/manage\").'\" class=\"manage_link\">Manage tags</a></p>';\n \n $rows = array();\n $header = array(\n array('data'=>'Name'),\n array('data'=>'Profile'),\n array('data'=>'Operations'),\n );\n \n $sql2 = \"SELECT id, user, name, email, phone, tags, notes FROM {research_projects_participants_cards} WHERE project={$project->id} ORDER BY created DESC\";\n $res = pager_query($sql2, 30);\n while($row=db_fetch_object($res)){\n $tags = get_tags_as_array($row->tags);\n $row->tags_array = $tags;\n \n $name_div = '<div class=\"participant-card-name-div\">'.$row->name.'<br/><strong>(Unauthorized)</strong></div>';\n if($row->user!=null && $row->user >0 ){\n //check if user is active in the project\n $check = 'SELECT active FROM {research_projects_persons_list} WHERE project=%d AND user=%d AND role=\"participant\"';\n if(db_result(db_query($check, $project->id, $row->user))==1){\n $name_div = '<div class=\"participant-card-name-div\">'.l($row->name, 'user/'.$row->user).'</div>';\n }\n }\n \n $p_card = module_invoke_all('project_participant_card_info', $project->id, $row->user);\n $p_card['email'] = array(\n 'name' => t('Email'),\n 'value'=> $row->email,\n 'weight'=> 0,\n );\n $p_card['phone'] = array(\n 'name' => t('Phone'),\n 'value'=> $row->phone,\n 'weight'=> 0,\n );\n \n $p_card['tags'] = array(\n 'name' => t('Tags'),\n 'value'=> $row->tags_array,\n 'weight'=> 9,\n );\n $p_card['notes'] = array(\n 'name' => t('Notes'),\n 'value'=> $row->notes,\n 'weight'=> 10,\n );\n \n \n $rows[] = array(\n $name_div,\n array(\n 'data' => theme('participants_card_div', $p_card, $project->path),\n ),\n '<p class=\"operation-p\"><a class=\"delete_link\" href=\"'.url(\"project/$path/manage/persons/participant/remove/{$row->id}\").'\">Remove</a></p>'\n .'<p class=\"operation-p\"><a class=\"edit_link\" href=\"'.url(\"project/$path/manage/persons/participant/edit/{$row->id}\").'\">Edit</a></p>'\n .'<p class=\"operation-p\"><a class=\"tags_link window_tab\" href=\"javascript:void(0);\" onclick=\"onclick_edit_tags('.\"'\".$row->id.\"'\".');\" >Tags</a></p>',\n );\n }\n $content.= theme('participants_tags_div',$project);\n $content.= '<div class=\"project-manage-page-table-div\">'.theme_table($header, $rows).'</div>';\n $content.= theme('pager');\n $project->right_part = $content; \n return theme('project_manage_page',$project);\n}", "public function populate_list_person($start = 0, $limit = -1) {\n\t\t$game_id = $this -> get_game_id();\n\t\t$this -> list_person = person_model::list_by_game_id($game_id, $start, $limit);\n\t}", "function SetupListOptions() {\r\n\t\tglobal $Security, $tbl_group;\r\n\r\n\t\t// \"view\"\r\n\t\t$this->ListOptions->Add(\"view\");\r\n\t\t$item =& $this->ListOptions->Items[\"view\"];\r\n\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t$item->Visible = $Security->CanView();\r\n\t\t$item->OnLeft = TRUE;\r\n\r\n\t\t// \"edit\"\r\n\t\t$this->ListOptions->Add(\"edit\");\r\n\t\t$item =& $this->ListOptions->Items[\"edit\"];\r\n\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t$item->Visible = $Security->CanEdit();\r\n\t\t$item->OnLeft = TRUE;\r\n\r\n\t\t// \"copy\"\r\n\t\t$this->ListOptions->Add(\"copy\");\r\n\t\t$item =& $this->ListOptions->Items[\"copy\"];\r\n\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t$item->Visible = $Security->CanAdd();\r\n\t\t$item->OnLeft = TRUE;\r\n\r\n\t\t// \"checkbox\"\r\n\t\t$this->ListOptions->Add(\"checkbox\");\r\n\t\t$item =& $this->ListOptions->Items[\"checkbox\"];\r\n\t\t$item->CssStyle = \"white-space: nowrap;\";\r\n\t\t$item->Visible = $Security->CanDelete();\r\n\t\t$item->OnLeft = TRUE;\r\n\t\t$item->Header = \"<input type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" class=\\\"phpmaker\\\" onclick=\\\"tbl_group_list.SelectAllKey(this);\\\">\";\r\n\t\t$this->ListOptions->MoveItem(\"checkbox\", 0); // Move to first column\r\n\r\n\t\t// Call ListOptions_Load event\r\n\t\t$this->ListOptions_Load();\r\n\t\tif ($tbl_group->Export <> \"\" ||\r\n\t\t\t$tbl_group->CurrentAction == \"gridadd\" ||\r\n\t\t\t$tbl_group->CurrentAction == \"gridedit\")\r\n\t\t\t$this->ListOptions->HideAllOptions();\r\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"view\"\n\t\t$item = &$this->ListOptions->Add(\"view\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"copy\"\n\t\t$item = &$this->ListOptions->Add(\"copy\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanAdd();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"delete\"\n\t\t$item = &$this->ListOptions->Add(\"delete\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<div class=\\\"checkbox\\\"><label><input class=\\\"magic-checkbox\\\" type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\"><span></span></label></div>\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// \"sequence\"\n\t\t$item = &$this->ListOptions->Add(\"sequence\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = TRUE;\n\t\t$item->OnLeft = TRUE; // Always on left\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "function SetupListOptions() {\n\t\tglobal $Security, $Language;\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->Add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"view\"\n\t\t$item = &$this->ListOptions->Add(\"view\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanView();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->Add(\"edit\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"delete\"\n\t\t$item = &$this->ListOptions->Add(\"delete\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = $Security->CanDelete();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// List actions\n\t\t$item = &$this->ListOptions->Add(\"listactions\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\t\t$item->ShowInDropDown = FALSE;\n\n\t\t// \"checkbox\"\n\t\t$item = &$this->ListOptions->Add(\"checkbox\");\n\t\t$item->Visible = FALSE;\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Header = \"<div class=\\\"checkbox\\\"><label><input class=\\\"magic-checkbox\\\" type=\\\"checkbox\\\" name=\\\"key\\\" id=\\\"key\\\" onclick=\\\"ew_SelectAllKey(this);\\\"><span></span></label></div>\";\n\t\t$item->MoveTo(0);\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// \"sequence\"\n\t\t$item = &$this->ListOptions->Add(\"sequence\");\n\t\t$item->CssStyle = \"white-space: nowrap;\";\n\t\t$item->Visible = TRUE;\n\t\t$item->OnLeft = TRUE; // Always on left\n\t\t$item->ShowInDropDown = FALSE;\n\t\t$item->ShowInButtonGroup = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseImageAndText = TRUE;\n\t\t$this->ListOptions->UseDropDownButton = FALSE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->Phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = TRUE;\n\t\tif ($this->ListOptions->UseButtonGroup && ew_IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->ButtonClass = \"btn-sm\"; // Class for button group\n\n\t\t// Call ListOptions_Load event\n\t\t$this->ListOptions_Load();\n\t\t$this->SetupListOptionsExt();\n\t\t$item = &$this->ListOptions->GetItem($this->ListOptions->GroupOptionName);\n\t\t$item->Visible = $this->ListOptions->GroupOptionVisible();\n\t}", "function contributorList() {\r\n $this->showFields = array('NAME', 'LOCATION' , 'COUNTRY');\r\n print '<ul>';\r\n\r\n $xml_parser = xml_parser_create();\r\n xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true);\r\n xml_set_element_handler($xml_parser, array($this,\"startElement\"), array($this, \"endElement\") );\r\n xml_set_character_data_handler($xml_parser, array($this, \"characterData\") );\r\n\r\n if (!(@$fp = fopen('http://wordpress.grandslambert.com/xml/login-configurator/contributors.xml', \"r\"))) {\r\n print 'There was an error getting the list. Try again later.';\r\n return;\r\n }\r\n\r\n while ($data = fread($fp, 4096)) {\r\n if (!xml_parse($xml_parser, $data, feof($fp))) {\r\n die(sprintf(\"XML error: %s at line %d\",\r\n xml_error_string(xml_get_error_code($xml_parser)),\r\n xml_get_current_line_number($xml_parser)));\r\n }\r\n }\r\n\r\n xml_parser_free($xml_parser);\r\n print '</ul>';\r\n }", "public function show_list();", "function colleges_post_list_display_people_before( $content, $items, $atts ) {\n\tob_start();\n?>\n<div class=\"ucf-post-list colleges-post-list-people\">\n<?php\n\treturn ob_get_clean();\n}", "public function getProjectListWidgetViewTemplate();", "public function listPages(){\n $list = new ItemList(array(\n 'id' => 'h-page-editor-pages-list',\n 'action' => App::router()->getUri('h-page-editor-list-pages'),\n 'model' => 'Page',\n 'lineClass' => function($line){\n return $line->active ? '' : 'bg-warning';\n },\n 'controls' => array(\n array(\n 'icon' => 'plus',\n 'class' => 'btn-success',\n 'label' => Lang::get($this->_plugin . '.new-page-button'),\n 'href' => App::router()->getUri('h-page-editor-edit-page', array('pageId' => 0))\n )\n ),\n\n 'fields' => array(\n 'name' => array(\n 'label' => Lang::get($this->_plugin . '.pages-list-name-label'),\n 'href' => function($value, $field, $line){\n return App::router()->getUri('h-page-editor-edit-page', array('pageId' => $line->id));\n }\n ),\n\n 'uri' => array(\n 'label' => Lang::get($this->_plugin . '.pages-list-uri-label'),\n 'display' => function($value, $field, $line){\n return $line->active ?\n '<a href=\"' . $line->getUri() . '\" target=\"newtab\" >' . $line->getUri() . '</a>' :\n $line->getUri();\n }\n ),\n\n 'author' => array(\n 'label' => Lang::get($this->_plugin . '.pages-list-author-label'),\n 'display' => function($value){\n return User::getById($value)->getDisplayName();\n },\n 'search' => false,\n ),\n\n 'createTime' => array(\n 'label' => Lang::get($this->_plugin . '.pages-list-create-time-label'),\n 'display' => function($value){\n return date(Lang::get('main.time-format'), $value);\n },\n 'search' => false,\n ),\n\n 'updateTime' => array(\n 'label' => Lang::get($this->_plugin . '.pages-list-update-time-label'),\n 'display' => function($value){\n return date(Lang::get('main.time-format'), $value);\n },\n 'search' => false,\n ),\n\n 'active' => array(\n 'hidden' => true,\n )\n )\n ));\n\n return $list->display();\n }", "function cCustomView1_list() {\n\t\tglobal $conn;\n\n\t\t// Initialize table object\n\t\t$GLOBALS[\"CustomView1\"] = new cCustomView1();\n\n\t\t// Intialize page id (for backward compatibility)\n\t\tif (!defined(\"EW_PAGE_ID\"))\n\t\t\tdefine(\"EW_PAGE_ID\", 'list', TRUE);\n\n\t\t// Initialize table name (for backward compatibility)\n\t\tif (!defined(\"EW_TABLE_NAME\"))\n\t\t\tdefine(\"EW_TABLE_NAME\", 'CustomView1', TRUE);\n\n\t\t// Open connection to the database\n\t\t$conn = ew_Connect();\n\n\t\t// Initialize list options\n\t\t$this->ListOptions = new cListOptions();\n\t}", "protected function setupListOptions()\n\t{\n\t\tglobal $Security, $Language;\n\n\t\t// \"griddelete\"\n\t\tif ($this->AllowAddDeleteRow) {\n\t\t\t$item = &$this->ListOptions->add(\"griddelete\");\n\t\t\t$item->CssClass = \"text-nowrap\";\n\t\t\t$item->OnLeft = TRUE;\n\t\t\t$item->Visible = FALSE; // Default hidden\n\t\t}\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// \"view\"\n\t\t$item = &$this->ListOptions->add(\"view\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->canView();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"edit\"\n\t\t$item = &$this->ListOptions->add(\"edit\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->canEdit();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"copy\"\n\t\t$item = &$this->ListOptions->add(\"copy\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->canAdd();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// \"delete\"\n\t\t$item = &$this->ListOptions->add(\"delete\");\n\t\t$item->CssClass = \"text-nowrap\";\n\t\t$item->Visible = $Security->canDelete();\n\t\t$item->OnLeft = TRUE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = FALSE;\n\t\tif ($this->ListOptions->UseButtonGroup && IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\n\t\t//$this->ListOptions->ButtonClass = \"\"; // Class for button group\n\t\t// Call ListOptions_Load event\n\n\t\t$this->ListOptions_Load();\n\t\t$item = $this->ListOptions[$this->ListOptions->GroupOptionName];\n\t\t$item->Visible = $this->ListOptions->groupOptionVisible();\n\t}", "protected function setupListOptions()\n\t{\n\t\tglobal $Security, $Language;\n\n\t\t// \"griddelete\"\n\t\tif ($this->AllowAddDeleteRow) {\n\t\t\t$item = &$this->ListOptions->add(\"griddelete\");\n\t\t\t$item->CssClass = \"text-nowrap\";\n\t\t\t$item->OnLeft = TRUE;\n\t\t\t$item->Visible = FALSE; // Default hidden\n\t\t}\n\n\t\t// Add group option item\n\t\t$item = &$this->ListOptions->add($this->ListOptions->GroupOptionName);\n\t\t$item->Body = \"\";\n\t\t$item->OnLeft = TRUE;\n\t\t$item->Visible = FALSE;\n\n\t\t// Drop down button for ListOptions\n\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\t\t$this->ListOptions->DropDownButtonPhrase = $Language->phrase(\"ButtonListOptions\");\n\t\t$this->ListOptions->UseButtonGroup = FALSE;\n\t\tif ($this->ListOptions->UseButtonGroup && IsMobile())\n\t\t\t$this->ListOptions->UseDropDownButton = TRUE;\n\n\t\t//$this->ListOptions->ButtonClass = \"\"; // Class for button group\n\t\t// Call ListOptions_Load event\n\n\t\t$this->ListOptions_Load();\n\t\t$item = $this->ListOptions[$this->ListOptions->GroupOptionName];\n\t\t$item->Visible = $this->ListOptions->groupOptionVisible();\n\t}", "public function createList(){\n global $vues;\n require_once($vues['newList']);\n }", "public function listAction()\n {\n $this->_topMenu->selectItem('list');\n\n $friends = $this->_user->getFriends();\n\n $list = $friends->getFriendsList(App_User_Friends::STATE_APPROVED);\n\n $this->view->friends = $list;\n }", "public function add_list_item() {\n\t\t\tcheck_ajax_referer( 'prince', 'nonce' );\n\t\t\tprince_list_item_view( esc_attr( $_REQUEST['name'] ), esc_attr( $_REQUEST['count'] ), array(), esc_attr( $_REQUEST['post_id'] ), esc_attr( $_REQUEST['get_option'] ), unserialize( prince_decode( esc_attr( $_REQUEST['settings'] ) ) ), esc_attr( $_REQUEST['type'] ) );\n\t\t\tdie();\n\t\t}", "function add_slider_list_meta_box() {\n add_meta_box(\n 'slider_list',\n 'Slider à afficher',\n 'slider_list_meta',\n 'page',\n 'normal',\n 'high'\n );\n}", "protected function setupListOptions()\n {\n global $Security, $Language;\n\n // Add group option item\n $item = &$this->ListOptions->add($this->ListOptions->GroupOptionName);\n $item->Body = \"\";\n $item->OnLeft = false;\n $item->Visible = false;\n\n // \"edit\"\n $item = &$this->ListOptions->add(\"edit\");\n $item->CssClass = \"text-nowrap\";\n $item->Visible = $Security->canEdit();\n $item->OnLeft = false;\n\n // \"delete\"\n $item = &$this->ListOptions->add(\"delete\");\n $item->CssClass = \"text-nowrap\";\n $item->Visible = $Security->canDelete();\n $item->OnLeft = false;\n\n // Drop down button for ListOptions\n $this->ListOptions->UseDropDownButton = false;\n $this->ListOptions->DropDownButtonPhrase = $Language->phrase(\"ButtonListOptions\");\n $this->ListOptions->UseButtonGroup = true;\n //$this->ListOptions->ButtonClass = \"\"; // Class for button group\n\n // Call ListOptions_Load event\n $this->listOptionsLoad();\n $item = $this->ListOptions[$this->ListOptions->GroupOptionName];\n $item->Visible = $this->ListOptions->groupOptionVisible();\n }", "function makeResponsibleList() {\n\t\n\t\t$res = $this->query(\"SELECT id,caption FROM $this->table_responsible WHERE page=\".$this->page_id);\n\t\t\n\t\t$r = \"<ul id='responsible_list_ul'>\\n\";\n\t\twhile ($row = $res->fetch_assoc()) {\n\t\t\t$id = $row['id'];\t\t\t\n\t\t\t$r .= \"\n\t\t\t<li>\n\t\t\t\t<div id='responsible_$id'>\n\t\t\t\t\t\".$this->makeResponsible($row).\"\n\t\t\t\t</div>\n\t\t\t</li>\\n\";\n\t\t\t\n\t\t}\n\t\t$r .= \"</ul>\\n\";\n\t\treturn $r;\n\t}", "protected function initOptionsList()\r\n {\r\n //$this->addOption(new Option('id', 'Identifiant', 'string', null, false, 30));\r\n }", "public function createList()\n {\n return view('list.createList');\n }" ]
[ "0.59285223", "0.5748271", "0.5509062", "0.5484105", "0.53918487", "0.53728116", "0.53634274", "0.5294769", "0.51715946", "0.5133418", "0.511387", "0.50993806", "0.50872576", "0.50659406", "0.5057946", "0.50535667", "0.50523525", "0.503918", "0.49956888", "0.49678862", "0.49485502", "0.49130654", "0.49085736", "0.49049282", "0.49037877", "0.48892236", "0.48752165", "0.48431066", "0.48283035", "0.48208418" ]
0.6728534
0
Create and setup QLabel lblPeople
public function lblPeople_Create($strControlId = null, $strGlue = ', ') { $this->lblPeople = new QLabel($this->objParentObject, $strControlId); $this->lstPeople->Name = QApplication::Translate('People'); $objAssociatedArray = $this->objCheckingAccountLookup->GetPersonArray(); $strItems = array(); foreach ($objAssociatedArray as $objAssociated) $strItems[] = $objAssociated->__toString(); $this->lblPeople->Text = implode($strGlue, $strItems); return $this->lblPeople; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function lblOwnerLastName_Create($strControlId = null) {\n\t\t\t$this->lblOwnerLastName = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblOwnerLastName->Name = QApplication::Translate('Owner Last Name');\n\t\t\t$this->lblOwnerLastName->Text = $this->objRestaurantCopy1->OwnerLastName;\n\t\t\t$this->lblOwnerLastName->Required = true;\n\t\t\treturn $this->lblOwnerLastName;\n\t\t}", "public function lblLastName_Create($strControlId = null) {\n\t\t\t$this->lblLastName = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblLastName->Name = QApplication::Translate('Last Name');\n\t\t\t$this->lblLastName->Text = $this->objLogin->LastName;\n\t\t\treturn $this->lblLastName;\n\t\t}", "public function lblNombre_Create($strControlId = null) {\n\t\t\t$this->lblNombre = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblNombre->Name = QApplication::Translate('Nombre');\n\t\t\t$this->lblNombre->Text = $this->objUsuarios->Nombre;\n\t\t\treturn $this->lblNombre;\n\t\t}", "public function lblFirstName_Create($strControlId = null) {\n\t\t\t$this->lblFirstName = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblFirstName->Name = QApplication::Translate('First Name');\n\t\t\t$this->lblFirstName->Text = $this->objLogin->FirstName;\n\t\t\treturn $this->lblFirstName;\n\t\t}", "public function lblOwnerFirstName_Create($strControlId = null) {\n\t\t\t$this->lblOwnerFirstName = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblOwnerFirstName->Name = QApplication::Translate('Owner First Name');\n\t\t\t$this->lblOwnerFirstName->Text = $this->objRestaurantCopy1->OwnerFirstName;\n\t\t\t$this->lblOwnerFirstName->Required = true;\n\t\t\treturn $this->lblOwnerFirstName;\n\t\t}", "function setLabel($label);", "public function lblUsername_Create($strControlId = null) {\n\t\t\t$this->lblUsername = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblUsername->Name = QApplication::Translate('Username');\n\t\t\t$this->lblUsername->Text = $this->objLogin->Username;\n\t\t\treturn $this->lblUsername;\n\t\t}", "public function getLabel();", "public function getLabel();", "public function getLabel();", "public function getLabel();", "public function getLabel();", "public function getLabel();", "public function getLabel();", "public function getLabel();", "public function getLabel();", "public function getLabel();", "public function getLabel();", "public function lblOwnerMiddleName_Create($strControlId = null) {\n\t\t\t$this->lblOwnerMiddleName = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblOwnerMiddleName->Name = QApplication::Translate('Owner Middle Name');\n\t\t\t$this->lblOwnerMiddleName->Text = $this->objRestaurantCopy1->OwnerMiddleName;\n\t\t\t$this->lblOwnerMiddleName->Required = true;\n\t\t\treturn $this->lblOwnerMiddleName;\n\t\t}", "public function setLabel($var) {}", "public function setLabel( $label );", "public function getLabel() {}", "public function lblUsuario_Create($strControlId = null) {\n\t\t\t$this->lblUsuario = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblUsuario->Name = QApplication::Translate('Usuario');\n\t\t\t$this->lblUsuario->Text = $this->objUsuarios->Usuario;\n\t\t\treturn $this->lblUsuario;\n\t\t}", "public function createLabel($labelStr)\n {\n $this->label = new Label($labelStr);\n }", "public function lblCreateby_Create($strControlId = null) {\n\t\t\t$this->lblCreateby = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblCreateby->Name = QApplication::Translate('Createby');\n\t\t\t$this->lblCreateby->PreferredRenderMethod = 'RenderWithName';\n\t\t\t$this->lblCreateby->LinkedNode = QQN::Pregunta()->Createby;\n\t\t\t$this->lblCreateby->Text = $this->objPregunta->Createby;\n\t\t\treturn $this->lblCreateby;\n\t\t}", "public function lblAddress1_Create($strControlId = null) {\n\t\t\t$this->lblAddress1 = new QLabel($this->objParentObject, $strControlId);\n\t\t\t$this->lblAddress1->Name = QApplication::Translate('Address 1');\n\t\t\t$this->lblAddress1->Text = $this->objAddress->Address1;\n\t\t\treturn $this->lblAddress1;\n\t\t}", "public function setLabelName($name);", "private function create_label($label)\n\t{\n\t\tif ($mylabel = $this->get_label($label))\n\t\t{\n\t\t\t$this->pair .= form::label($this->id, $mylabel, $this->label_extra);\n\t\t}\n\n\t}", "public function setLabel($label);", "function getLabel();" ]
[ "0.62153757", "0.6121705", "0.6079087", "0.60672647", "0.6052184", "0.60168076", "0.5990678", "0.59676695", "0.59676695", "0.59676695", "0.59676695", "0.59676695", "0.59676695", "0.59676695", "0.59676695", "0.59676695", "0.59676695", "0.59676695", "0.59172636", "0.5917086", "0.58716005", "0.5843271", "0.5831908", "0.58106786", "0.58061004", "0.5805637", "0.5799107", "0.57657707", "0.57299274", "0.57159954" ]
0.6955603
0
Refresh this MetaControl with Data from the local CheckingAccountLookup object.
public function Refresh($blnReload = false) { if ($blnReload) $this->objCheckingAccountLookup->Reload(); if ($this->lblId) if ($this->blnEditMode) $this->lblId->Text = $this->objCheckingAccountLookup->Id; if ($this->txtTransitHash) $this->txtTransitHash->Text = $this->objCheckingAccountLookup->TransitHash; if ($this->lblTransitHash) $this->lblTransitHash->Text = $this->objCheckingAccountLookup->TransitHash; if ($this->txtAccountHash) $this->txtAccountHash->Text = $this->objCheckingAccountLookup->AccountHash; if ($this->lblAccountHash) $this->lblAccountHash->Text = $this->objCheckingAccountLookup->AccountHash; if ($this->lstPeople) { $this->lstPeople->RemoveAllItems(); $objAssociatedArray = $this->objCheckingAccountLookup->GetPersonArray(); $objPersonArray = Person::LoadAll(); if ($objPersonArray) foreach ($objPersonArray as $objPerson) { $objListItem = new QListItem($objPerson->__toString(), $objPerson->Id); foreach ($objAssociatedArray as $objAssociated) { if ($objAssociated->Id == $objPerson->Id) $objListItem->Selected = true; } $this->lstPeople->AddItem($objListItem); } } if ($this->lblPeople) { $objAssociatedArray = $this->objCheckingAccountLookup->GetPersonArray(); $strItems = array(); foreach ($objAssociatedArray as $objAssociated) $strItems[] = $objAssociated->__toString(); $this->lblPeople->Text = implode($strGlue, $strItems); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function SaveCheckingAccountLookup() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->txtTransitHash) $this->objCheckingAccountLookup->TransitHash = $this->txtTransitHash->Text;\n\t\t\t\tif ($this->txtAccountHash) $this->objCheckingAccountLookup->AccountHash = $this->txtAccountHash->Text;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the CheckingAccountLookup object\n\t\t\t\t$this->objCheckingAccountLookup->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t\t$this->lstPeople_Update();\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "function reload() {\n\t\t$this->set_fields( $this->get( $this->id ) );\n\t}", "public function Reload() {\n\t\t\t// Make sure we are actually Restored from the database\n\t\t\tif (!$this->__blnRestored)\n\t\t\t\tthrow new QCallerException('Cannot call Reload() on a new, unsaved BusinessChecklistResults object.');\n\n\t\t\t// Reload the Object\n\t\t\t$objReloaded = BusinessChecklistResults::Load($this->intId);\n\n\t\t\t// Update $this's local variables to match\n\t\t\t$this->QuestionId = $objReloaded->QuestionId;\n\t\t\t$this->ChecklistId = $objReloaded->ChecklistId;\n\t\t\t$this->intValue = $objReloaded->intValue;\n\t\t\t$this->UserId = $objReloaded->UserId;\n\t\t}", "public function reload_fields() {\n $this->fields = field::existing_instances($this->id);\n }", "public static function refetch(): void\n {\n static::fetchAllSettings();\n }", "public function refresh() {\n\t\t$this->_stats = null;\n\t\t$this->_info = null;\n\t}", "private function refresh()\n {\n $this->__construct($this->id);\n }", "private function refresh()\n {\n $this->__construct($this->id);\n }", "public function refresh() {\n\t\t$dataArrays = static::gatherData($this->getItemId());\n\t\t$this->load($dataArrays[0]);\n\t}", "public function refresh() {\r\n\t\tparent::refresh();\r\n\t\t$this->rights = new Role($this);\r\n\t\tif (!$this->loggedIn) {\r\n\t\t\t$this->rights->loadIDs($this->defaultRoles);\r\n\t\t} else {\r\n\t\t\t$this->rights->loadForUser();\r\n\t\t}\r\n\t\tif (!$this->partial) {\r\n\t\t\t$this->prefs = new UserPrefs($this);\r\n\t\t\t$this->prefs->load();\r\n\t\t}\r\n\t}", "function Refresh()\n\t{\n\t\tif (parent::Refresh() === FALSE)\n\t\t{\n\t\t\treturn FALSE;\n\t\t}\n\t\t\n\t\t// There are no extra details to load for ADSL services\n\t\t\n\t\treturn TRUE;\n\t}", "public function refresh_(){\n\t\t$model=$this->model;\n\t\tif(isset($_POST[\"s\"])){\n\t\t\t$instances=$this->search($model, $_POST[\"s\"]);\n\t\t}else{\n\t\t\t$page=URequest::post(\"p\",1);\n\t\t\t$instances=$this->getInstances($totalCount,$page);\n\t\t}\n\t\tif(!isset($totalCount)){\n\t\t\t$totalCount=DAO::count($model,$this->_getAdminData()->_getInstancesFilter($model));\n\t\t}\n\t\t$recordsPerPage=$this->_getModelViewer()->recordsPerPage($model,$totalCount);\n\t\t$grpByFields=$this->_getModelViewer()->getGroupByFields();\n\t\tif(isset($recordsPerPage)){\n\t\t\tif(!is_array($grpByFields)){\n\t\t\t\tUResponse::asJSON();\n\t\t\t\t$responseFormatter=new ResponseFormatter();\n\t\t\t\tprint_r($responseFormatter->getJSONDatas($instances));\n\t\t\t}else{\n\t\t\t\t$this->_renderDataTableForRefresh($instances, $model,$totalCount);\n\t\t\t}\n\t\t}else{\n\t\t\t$this->jquery->execAtLast('$(\"#search-query-content\").html(\"'.$_POST[\"s\"].'\");$(\"#search-query\").show();$(\"#table-details\").html(\"\");');\n\t\t\t$this->_renderDataTableForRefresh($instances, $model,$totalCount);\n\t\t}\n\t}", "function reload()\n {\n $this->load();\n }", "protected function postLoad()\n\t\t{\n\t\t\n\t\t\t$this->profile->setUniversalDueId($this->getId());\n\t\t\t$this->profile->load();\n\t\t\t\n\t\t\t\n\t\t}", "private function load() {\n $res = $this->get();\n\n $this->_data = $res->data;\n\n if(isset($res->facets)) {\n $this->_facets = $res->facets;\n } else {\n $this->_facets = false;\n }\n\n $this->_currentPage = $res->paging->current_page;\n $this->_pages = $res->paging->total_pages;\n $this->_pageItems = count($res->data);\n $this->_count = $res->paging->total_items;\n $this->_loaded = true;\n }", "public function classifieds_refresh_taccess_after_import() {\n\n if (defined('ICL_SITEPRESS_VERSION')) {\n\n $custom_groups_updated=get_option('classifieds_access_custom_group_updated');\n\n if ($custom_groups_updated != 'yes') {\n //Run on WPML versions only\n //Get existing custom groups available for Access\n global $wpdb;\n $post_meta_table = $wpdb->prefix.'postmeta';\n $results = $wpdb->get_results(\"SELECT post_id,meta_value FROM $post_meta_table WHERE meta_key='_wpcf_access_group'\", ARRAY_A);\n\n if (!(empty($results))) {\n\n $custom_groups_array=array();\n\n foreach ($results as $key=>$inner_array) {\n $custom_groups_array[$inner_array['post_id']]=$inner_array['meta_value'];\n }\n $dummy=$custom_groups_array;\n\n if ((is_array($custom_groups_array)) && (!(empty($custom_groups_array)))) {\n\n $cf_db_name='_wpcf_access_group';\n $post_type='message';\n\n //Loop and set\n foreach ($custom_groups_array as $post_id=>$cf_value) {\n $this->_classifieds_copy_cf_values_to_translations($post_id,$cf_value,$cf_db_name,$post_type);\n }\n\n update_option('classifieds_access_custom_group_updated', 'yes' );\n }\n }\n }\n }\n }", "public function DeleteCheckingAccountLookup() {\n\t\t\t$this->objCheckingAccountLookup->UnassociateAllPeople();\n\t\t\t$this->objCheckingAccountLookup->Delete();\n\t\t}", "function Refresh(){\n $this->RefreshBy([\"id = \".$this->id]);\n }", "public function refresh()\n {\n return $this->load($this->getId());\n }", "public function refresh()\n {\n return $this->refreshFields();\n }", "public function datasuppliers_freshdata() {\n\t\t\tdatasuppliers::freshdata();\n\t\t}", "private function _loadAccounts() {\n $all = Config::get()->collectionAccount();\n $custId = $this->getAccountantMageId();\n $all->addFieldToFilter(Account::ATTR_CUSTOMER_ID, $custId);\n /* join assets to get codes */\n $asAsset = 'a';\n $table = array( $asAsset => Config::ENTITY_TYPE_ASSET );\n $cond = 'main_table.' . Account::ATTR_ASSET_ID . '='\n . $asAsset . '.' . TypeAsset::ATTR_ID;\n $cols = array( TypeAsset::ATTR_CODE );\n $all->join($table, $cond, $cols);\n foreach($all as $one) {\n $accId = $one->getData(Account::ATTR_ID);\n $assetId = $one->getData(Account::ATTR_ASSET_ID);\n $custId = $one->getData(Account::ATTR_CUSTOMER_ID);\n $code = $one->getData(TypeAsset::ATTR_CODE);\n $item = new Varien_Object();\n $item->setId($accId);\n $item->setAssetId($assetId);\n $item->setCustomerId($custId);\n self::$_cachedAccountantData[ $code ] = $item;\n }\n }", "public function index() {\n if ($this->GdataAuth->isAuthorized()) {\n // Set paginate() to use the custom find type\n $this->paginate['GoogleAnalytic'][] = 'accounts';\n $this->set('accounts', $this->paginate('GoogleAnalytic'));\n }\n }", "function reload() {\n $rows = self::lookup(\"id = :id\", ['id'=>$this->id], [], static::$table);\n if (!$rows) return false;\n $this->name = $rows[0]->name;\n $this->condition_type = $rows[0]->condition_type;\n $this->stock = $rows[0]->stock;\n $this->price = $rows[0]->price;\n $this->description = $rows[0]->description;\n $this->created_date = $rows[0]->created_date;\n $this->suspention = $rows[0]->suspention;\n $this->dealer_id = $res[0]->dealer_id;\n $this->delivery_type_id = $res[0]->delivery_type_id;\n return true;\n }", "private function reload() {\r\n\r\n\t\t$timestamp = (int) (microtime(true) * 1000);\r\n\r\n\t\t// if the value is empty\r\n\t\tif (!InputValidator::isEmpty($this->NAME) &&\r\n\t\t\t!InputValidator::isEmpty($this->NAVIGATIONCAPTION) &&\r\n\t\t\t!InputValidator::isEmpty($this->DESCRIPTION) &&\r\n\t\t\t$this->NEXT_REQUEST_TIMESTAMP > $timestamp) {\r\n\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$this->load();\r\n\t}", "private function loadData()\n {\n if ($this->selectedOption == 'all' || $this->selectedOption == 'a') {\n $this->syncService->getAllData();\n } else {\n $this->syncService->getData($this->selectedOption);\n }\n }", "public function refresh() {\n }", "public function Reload() {\n\t\t\t// Make sure we are actually Restored from the database\n\t\t\tif (!$this->__blnRestored)\n\t\t\t\tthrow new QCallerException('Cannot call Reload() on a new, unsaved SignupForm object.');\n\n\t\t\t// Reload the Object\n\t\t\t$objReloaded = SignupForm::Load($this->intId);\n\n\t\t\t// Update $this's local variables to match\n\t\t\t$this->SignupFormTypeId = $objReloaded->SignupFormTypeId;\n\t\t\t$this->MinistryId = $objReloaded->MinistryId;\n\t\t\t$this->strName = $objReloaded->strName;\n\t\t\t$this->strToken = $objReloaded->strToken;\n\t\t\t$this->blnActiveFlag = $objReloaded->blnActiveFlag;\n\t\t\t$this->blnConfidentialFlag = $objReloaded->blnConfidentialFlag;\n\t\t\t$this->strDescription = $objReloaded->strDescription;\n\t\t\t$this->strInformationUrl = $objReloaded->strInformationUrl;\n\t\t\t$this->strSupportEmail = $objReloaded->strSupportEmail;\n\t\t\t$this->strEmailNotification = $objReloaded->strEmailNotification;\n\t\t\t$this->blnAllowOtherFlag = $objReloaded->blnAllowOtherFlag;\n\t\t\t$this->blnAllowMultipleFlag = $objReloaded->blnAllowMultipleFlag;\n\t\t\t$this->intSignupLimit = $objReloaded->intSignupLimit;\n\t\t\t$this->intSignupMaleLimit = $objReloaded->intSignupMaleLimit;\n\t\t\t$this->intSignupFemaleLimit = $objReloaded->intSignupFemaleLimit;\n\t\t\t$this->strFundingAccount = $objReloaded->strFundingAccount;\n\t\t\t$this->DonationStewardshipFundId = $objReloaded->DonationStewardshipFundId;\n\t\t\t$this->dttDateCreated = $objReloaded->dttDateCreated;\n\t\t\t$this->blnLoginNotRequiredFlag = $objReloaded->blnLoginNotRequiredFlag;\n\t\t}", "public function claimants_freshdata() {\n\t\t\tclaimants::freshdata();\n\t\t}", "public function refresh()\n {\n $this->completeTreeUpdate($this->getCompleteTree());\n }" ]
[ "0.5666102", "0.54599845", "0.53916204", "0.49983048", "0.49445853", "0.49354145", "0.4879742", "0.4879742", "0.48651215", "0.48416388", "0.4788444", "0.47565782", "0.46766603", "0.46630472", "0.4662366", "0.46610916", "0.46566266", "0.4616309", "0.4609955", "0.458945", "0.4588049", "0.45695177", "0.4499102", "0.4487788", "0.44555867", "0.44497642", "0.4445809", "0.44367766", "0.44029695", "0.43945828" ]
0.59931576
0
///////////////////////////////////////////// PUBLIC CHECKINGACCOUNTLOOKUP OBJECT MANIPULATORS ///////////////////////////////////////////// This will save this object's CheckingAccountLookup instance, updating only the fields which have had a control created for it.
public function SaveCheckingAccountLookup() { try { // Update any fields for controls that have been created if ($this->txtTransitHash) $this->objCheckingAccountLookup->TransitHash = $this->txtTransitHash->Text; if ($this->txtAccountHash) $this->objCheckingAccountLookup->AccountHash = $this->txtAccountHash->Text; // Update any UniqueReverseReferences (if any) for controls that have been created for it // Save the CheckingAccountLookup object $this->objCheckingAccountLookup->Save(); // Finally, update any ManyToManyReferences (if any) $this->lstPeople_Update(); } catch (QCallerException $objExc) { $objExc->IncrementOffset(); throw $objExc; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function DeleteCheckingAccountLookup() {\n\t\t\t$this->objCheckingAccountLookup->UnassociateAllPeople();\n\t\t\t$this->objCheckingAccountLookup->Delete();\n\t\t}", "public function Refresh($blnReload = false) {\n\t\t\tif ($blnReload)\n\t\t\t\t$this->objCheckingAccountLookup->Reload();\n\n\t\t\tif ($this->lblId) if ($this->blnEditMode) $this->lblId->Text = $this->objCheckingAccountLookup->Id;\n\n\t\t\tif ($this->txtTransitHash) $this->txtTransitHash->Text = $this->objCheckingAccountLookup->TransitHash;\n\t\t\tif ($this->lblTransitHash) $this->lblTransitHash->Text = $this->objCheckingAccountLookup->TransitHash;\n\n\t\t\tif ($this->txtAccountHash) $this->txtAccountHash->Text = $this->objCheckingAccountLookup->AccountHash;\n\t\t\tif ($this->lblAccountHash) $this->lblAccountHash->Text = $this->objCheckingAccountLookup->AccountHash;\n\n\t\t\tif ($this->lstPeople) {\n\t\t\t\t$this->lstPeople->RemoveAllItems();\n\t\t\t\t$objAssociatedArray = $this->objCheckingAccountLookup->GetPersonArray();\n\t\t\t\t$objPersonArray = Person::LoadAll();\n\t\t\t\tif ($objPersonArray) foreach ($objPersonArray as $objPerson) {\n\t\t\t\t\t$objListItem = new QListItem($objPerson->__toString(), $objPerson->Id);\n\t\t\t\t\tforeach ($objAssociatedArray as $objAssociated) {\n\t\t\t\t\t\tif ($objAssociated->Id == $objPerson->Id)\n\t\t\t\t\t\t\t$objListItem->Selected = true;\n\t\t\t\t\t}\n\t\t\t\t\t$this->lstPeople->AddItem($objListItem);\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($this->lblPeople) {\n\t\t\t\t$objAssociatedArray = $this->objCheckingAccountLookup->GetPersonArray();\n\t\t\t\t$strItems = array();\n\t\t\t\tforeach ($objAssociatedArray as $objAssociated)\n\t\t\t\t\t$strItems[] = $objAssociated->__toString();\n\t\t\t\t$this->lblPeople->Text = implode($strGlue, $strItems);\n\t\t\t}\n\n\t\t}", "function updateAccount($dataObj){\n\trequire_once '../classes/Validation.php';\n\trequire '../classes/Pdo_methods.php';\n\trequire_once '../classes/General.php';\n\t\n\t$validate = new Validation();\n\t$pdo = new PdoMethods();\n\t$General = new General();\n\t$i = 0; $error = false;\n\twhile($i < count($dataObj->elements)){\n\t\tif(!$validate->validate($dataObj->elements[$i]->regex, $dataObj->elements[$i]->value)){\n\t\t\t$error = true;\n\t\t\t$dataObj->elements[$i]->status = 'error';\n\t\t}\n\t\t$i++;\n\t}\n\t\n\tif($error){\n\t\t$dataObj->masterstatus = 'fielderrors';\n\t\t$data = json_encode($dataObj);\n\t\techo $data;\n\t}\n\telse {\n\t\t\n\t\t/* IF EVERYTHING IS VALID THEN CHECK FOR A DUPLICATE NAME \n\t\tHERE I LOOP THROUGH THE DATA ELEMENTS AND GET THE NAME THAT WAS ENTERED AND STORE THAT INTO A VARIABLE OF NEWNAME */\n\t\tforeach($dataObj->elements as $element){\n\t\t\tif($element->id === 'name'){\n\t\t\t\t$newName = $element->value;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* HERE I LOOP THROUGH DATA ELEMENTS AND GET THE ORIGINAL NAME THAT IS STORED IN A HIDDEN FIELD ON THE FORM. IT CONTAINS THE LAST NAME USED FOR THE ACCOUNT.*/\n\t\tforeach($dataObj->elements as $element){\n\t\t\tif($element->id === 'hiddenName'){\n\t\t\t\t$origName = $element->value;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t/* I COMPARE BOTH NAMES AND IF THEY ARE THE SAME THEN I MOVE ON SETTING THE RESULT TO AN EMPTY ARRAY WHICH IS WHAT THE CHECK DUPLICATES FUNCTION WILL RETURN IF THERE ARE NO DUPLICATE NAMES FOUND IN THE DATABASE. I HAVE TO DO THIS BECAUSE TO ELIMINATE THE ERROR IF THE USER DID NOT CHANGE THE AND I RAN CHECK DUPCLIATES IT WOULD THINK THERE WAS A DUPLICATE NAME WHEN THERE WAS NOT. OPTIONALLY I COULD HAVE SENT THE RECORD ID WITH THE NAME AND COMPARED IT IN THE DATABASE.*/\n\t\tif($origName === $newName){\n\t\t\t$result = [];\n\t\t}\n\t\t\n\t\t/* IF THE ORIGNAME AND NEWNAME DO NOT MATCH THEN A CHECK DUPLIATE WILL BE RUN ON THE NEW NAME TO INSURE THAT IT IS NOT BEING USED BY ANOTHER ACCOUNT. */\n\t\telse {\n\t\t\t$result = $General->checkDuplicates($dataObj, 'account', $pdo);\n\t\t}\n\t\tif($result != \"error\"){\n\t\t\tif(count($result) != 0){\n\t\t\t\t$response = (object) [\n\t\t\t\t 'masterstatus' => 'error',\n\t\t\t\t 'msg' => 'There is already an account by that name',\n\t\t\t\t ];\n\t\t\t\techo json_encode($response);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t/* HERE I CREATE AN ARRAY THAT LISTS THE ELEMENT NAME, WHICH IS THE ID AND THE DATATYPE NEEDED BY PDO. THEY ARE SEPERATED BY A ^^. WHEN THIS IS RUN THROUGH THE CREATEBINDEDARRAY OF THE GENERAL CLASS, THAT METHOD WILL CREATE A BINDED ARRAY*/\n\t\t\t\t$elementNames = array('name^^str','address^^str','state^^str','city^^str','zip^^str');\n\t\t\t\t\t\t\n\t\t\t\t/* CREATE BINDINGS NEEDED FOR PDO QUERY. I CREATED A METHOD IN THE GENERAL CLASS THAT DOES THIS AUTOMATICALLY BY SENDING IN THE ELEMENTNAMES ARRAY AND THE DATAOBJ. FOR THIS TO WORK YOU JUST HAVE THE CORRECT DATAOBJ STRUCTURE*/\n\t\t\t\t$bindings = $General->createBindedArray($elementNames, $dataObj);\n\t\t\t\t/* ADD THE ACCOUNTID TO THE BINDINGS ARRAY*/\n\t\t\t\tarray_push($bindings, array(':accountId', $dataObj->accountId, 'str'));\n\t\t\t\t/* CREATE SQL STATEMENT AND ADD BINDINGS */\n\t\t\t\t$sql = \"UPDATE account SET name=:name, address=:address, state=:state, city=:city, zip=:zip WHERE id=:accountId\";\n\t\t\t $result = $pdo->otherBinded($sql, $bindings);\n\t\t\t\tif($result = 'noerror'){\n\t\t\t\t\t$object = (object) [\n\t\t\t\t\t\t'masterstatus' => 'success',\n\t\t\t\t\t\t'msg' => 'Account has been updated'\n\t\t\t\t\t];\n\t\t\t\t\techo json_encode($object);\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$object = (object) [\n\t\t\t\t\t\t'masterstatus' => 'error',\n\t\t\t\t\t\t'msg' => 'There was a problem updating the account'\n\t\t\t\t\t];\n\t\t\t\t\techo json_encode($object);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$object = (object) [\n\t\t\t\t'masterstatus' => 'error',\n\t\t\t\t'msg' => 'There was a problem updating the account'\n\t\t\t];\n\t\t\techo json_encode($object);\n\t\t}\n\t\t\n\t}\n}", "public function __construct($objParentObject, CheckingAccountLookup $objCheckingAccountLookup) {\n\t\t\t// Setup Parent Object (e.g. QForm or QPanel which will be using this CheckingAccountLookupMetaControl)\n\t\t\t$this->objParentObject = $objParentObject;\n\n\t\t\t// Setup linked CheckingAccountLookup object\n\t\t\t$this->objCheckingAccountLookup = $objCheckingAccountLookup;\n\n\t\t\t// Figure out if we're Editing or Creating New\n\t\t\tif ($this->objCheckingAccountLookup->__Restored) {\n\t\t\t\t$this->strTitleVerb = QApplication::Translate('Edit');\n\t\t\t\t$this->blnEditMode = true;\n\t\t\t} else {\n\t\t\t\t$this->strTitleVerb = QApplication::Translate('Create');\n\t\t\t\t$this->blnEditMode = false;\n\t\t\t}\n\t\t }", "protected function _applyObjectProperty()\n\t{\n\t\tparent::_applyObjectProperty();\n\n// echo \"<pre>\";\n// var_dump($_POST);\n// echo \"</pre>\";\n\n\t\tif ($this->_object->dchartaccount_id)\n\t\t{\n\t\t\t$oDChartaccount = $this->_object->Chartaccount_Debit;\n\n\t\t\tfor ($i = 0; $i < 3; $i++)\n\t\t\t{\n\t\t\t\t$subcountName = 'sc' . $i;\n\t\t\t\t$debitSubcountName = 'd' . $subcountName;\n\t\t\t\t$scValue = Core_Array::getPost($debitSubcountName, 0, 'strval');\n\n\t\t\t\tswitch ($oDChartaccount->$subcountName)\n\t\t\t\t{\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\t$aExplodeCompany = explode('_', $scValue);\n\t\t\t\t\t\t$scValue = isset($aExplodeCompany[1]) ? intval($aExplodeCompany[1]) : 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$this->_object->$debitSubcountName = $scValue;\n\t\t\t}\n\n\t\t\t$this->_object->save();\n\t\t}\n\n\t\tif ($this->_object->cchartaccount_id)\n\t\t{\n\t\t\t$oDChartaccount = $this->_object->Chartaccount_Credit;\n\n\t\t\tfor ($i = 0; $i < 3; $i++)\n\t\t\t{\n\t\t\t\t$subcountName = 'sc' . $i;\n\t\t\t\t$creditSubcountName = 'c' . $subcountName;\n\t\t\t\t$scValue = Core_Array::getPost($creditSubcountName, 0, 'strval');\n\n\t\t\t\tswitch ($oDChartaccount->$subcountName)\n\t\t\t\t{\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\t$aExplodeCompany = explode('_', $scValue);\n\t\t\t\t\t\t$scValue = isset($aExplodeCompany[1]) ? intval($aExplodeCompany[1]) : 0;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t$this->_object->$creditSubcountName = $scValue;\n\t\t\t}\n\n\t\t\t$this->_object->save();\n\t\t}\n\n\t\tCore_Event::notify(get_class($this) . '.onAfterRedeclaredApplyObjectProperty', $this, array($this->_Admin_Form_Controller));\n\t}", "function accountswitcher_ufields()\n{\n\tglobal $eas;\n\t$eas->update_userfields_cache();\n}", "public function edit(CheckingAccount $checkingAccount)\n {\n //\n }", "function addAccount($dataObj){\n\trequire_once '../classes/Validation.php';\n\trequire_once '../classes/Pdo_methods.php';\n\trequire_once '../classes/General.php';\n\t\n\t$validate = new Validation();\n\t\n\t$i = 0;\n\t$error = false;\n\twhile($i < count($dataObj->elements)){\n\t\tif(!$validate->validate($dataObj->elements[$i]->regex, $dataObj->elements[$i]->value)){\n\t\t\t$error = true;\n\t\t\t$dataObj->elements[$i]->status = 'error';\n\t\t}\n\t\t$i++;\n\t}\n\t\n\tif($error){\n\t\t$dataObj->masterstatus = 'fielderrors';\n\t\t$data = json_encode($dataObj);\n\t\techo $data;\n\t}\n\telse {\n\t\n\t\t$General = new General();\n\t\t$pdo = new PdoMethods();\n\t\t/* IF EVERYTHING IS VALID THEN CHECK FOR A DUPLICATE NAME \n\t\tUSE THE CHECKDUPLICATES METHOD FROM THE GENRERAL CLASS. THE SECOND PARAMETER IS THE TABLE WE ARE GOING TO CHECK. IN THE METHOD BASED UPON THAT DECIDES WHAT QUERY WE USE. THE $PDO IS THE CONNECTION INSTANCE SEE GENERAL METHOD FOR MORE INFO */\n\t\t\n\t\t$result = $General->checkDuplicates($dataObj, 'account', $pdo);\n\t\t\t\n\t\t/* BASED UPON THE RESULT CREATE A CUSTOM OBJECT CONTAINING THE MASTERSTATUS AND MESSAGE. ON THE JAVASCRIPT END I CREATE A RESPONSE THAT BASED UPON WHAT IS SENT WILL DISPLAY A MESSAGE BOX SHOWING THE MESSAGE. THIS IS A NICE WAY OF A CUSTOM MESSAGES BOX FOR THE USER BASED UPON WHAT HAD HAPPENED ON THE SERVER */\n\t\tif($result != 'error'){\n\t\t\tif(count($result) != 0){\n\t\t\t\t$response = (object) [\n\t\t\t\t 'masterstatus' => 'error',\n\t\t\t\t 'msg' => 'There is already an account by that name',\n\t\t\t\t ];\n\t\t\t\techo json_encode($response);\n\t\t\t}\n\t\t\telse {\n\t\t\t\t/* GET THE ACCOUNT NAME FROM THE DATAOBJ */\n\t\t\t\t$i = 0; $name = '';\n\t\t\t\twhile($i < count($dataObj->elements)){\n\t\t\t\t\tif($dataObj->elements[$i]->id === 'name'){\n\t\t\t\t\t\t$name = $dataObj->elements[$i]->value;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\t$i++;\n\t\t\t\t}\n\t\t\t\t/* CREATE AND THE FOLDER BY ADDING THE NAME AND A TIMESTAMP TO KEEP IT UNIQUE */\n\t\t\t\t$foldername = $name.time();\n\t\t\t\t$foldername = str_replace(\" \", \"_\", $foldername);\n\t\t\t\t$foldername = strtolower ($foldername);\n\t\t\t\t\n\t\t\t\t/* ADD THE FOLDER TO THE SERVER GIVE IT 777 PERMISSIONS */\n\t\t\t\t$path = '../public/account_folders/'.$foldername;\n\t\t\t\t$dir = mkdir($path, 0777);\n\t\t\t\t/* ADD ACCOUNT TO DATABASE \n\t\t\t\t IMPORTANT NOTE: THE ORDER OF THE \t\n\t\t\t\t*/\n\t\t\t\t$sql = \"INSERT INTO account (name, address, state, city, zip, folder) VALUES (:name, :address, :state, :city, :zip, :folder)\";\n\t\t\t\t\n\t\t\t\t/* HERE I CREATE AN ARRAY THAT LISTS THE ELEMENT NAME, WHICH IS THE ID AND THE DATATYPE NEEDED BY PDO. THEY ARE SEPERATED BY A ^^. WHEN THIS IS RUN THROUGH THE CREATEBINDEDARRAY OF THE GENERAL CLASS, THAT MEHTHOD WILL CREATE A BINDED ARRAY*/\n\t\t\t\t$elementNames = array('name^^str','address^^str','state^^str','city^^str','zip^^str');\n\t\t\t\t\n\t\t\t\t/* CREATE BINDINGS NEEDED FOR PDO QUERY. I CREATED A METHOD IN THE GENERAL CLASS THAT DOES THIS AUTOMATICALLY BY SENDING IN THE ELEMENTNAMES ARRAY AND THE DATAOBJ. FOR THIS TO WORK YOU JUST HAVE THE CORRECT DATAOBJ STRUCTURE*/\n\t\t\t\t$bindings = $General->createBindedArray($elementNames, $dataObj);\n\t\t\t\t/* ADD THE FOLDER TO THE BINDINGS ARRAY*/\n\t\t\t\tarray_push($bindings, array(':folder', $path, 'str'));\n\t\t\t\t\n\t\t\t\t/* IF THE DIRECTORY WAS CREATED THEN ADD TO THE DATABASE OTHERWISE SEND ERROR MESSAGE */\n\t\t\t\tif($dir){\n\t\t\t\t\t$result = $pdo->otherBinded($sql, $bindings);\n\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\tif($result == 'noerror'){\n\t\t\t\t\t\t$response = (object) [\n\t\t\t\t\t \t'masterstatus' => 'success',\n\t\t\t\t\t \t'msg' => 'The account has been added',\n\t\t\t\t\t\t];\n\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t}\n \n\t\t\t\t\telse {\n\t\t\t\t\t\t$response = (object) [\n\t\t\t\t\t \t'masterstatus' => 'error',\n\t\t\t\t\t \t'msg' => 'There was a problem adding the account',\n\t\t\t\t\t\t];\n\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$response = (object) [\n\t\t\t\t\t \t'masterstatus' => 'error',\n\t\t\t\t\t \t'msg' => 'There was a problem making the directory',\n\t\t\t\t\t\t];\n\t\t\t\t\t\techo json_encode($response);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse {\n\t\t\t$object = (object) [\n\t\t\t\t'masterstatus' => 'error',\n\t\t\t\t'msg' => 'There was an error with our sql statement',\n\t\t\t];\n\t\t\techo json_encode($object);\n\t\t}\n\t\t\n\t}\n}", "public function updateCheckins()\n\t{\t\n\t\t$this->updateObject(\n\t\t\tarray(\n\t\t\t\t\"table_name\" => \"facebook_checkins\",\n\t\t\t\t\"likes\" => true,\n\t\t\t\t\"date_field\" => \"created_time\",\n\t\t\t\t\"keys\" => array(\n\t\t\t\t\t\"message\" => array(\"place\", \"name\"),\n\t\t\t\t\t\"city\" => array(\"place\", \"location\", \"city\"),\n\t\t\t\t\t\"country\" => array(\"place\", \"location\", \"country\"),\n\t\t\t\t\t\"longitude\" => array(\"place\", \"location\", \"longitude\"),\n\t\t\t\t\t\"latitude\" => array(\"place\", \"location\", \"latitude\")\n\t\t\t\t)\n\t\t\t),\n\t\t\t\"/me/checkins\"\n\t\t);\n\t}", "public static function CreateFromPathInfo($objParentObject, $intCreateType = QMetaControlCreateType::CreateOrEdit) {\n\t\t\t$intId = QApplication::PathInfo(0);\n\t\t\treturn CheckingAccountLookupMetaControl::Create($objParentObject, $intId, $intCreateType);\n\t\t}", "public function initAccounts()\n\t{\n\t\t$account = new Account();\n\t\t$account->name = $this->name;\n\t\t$account->balance_item_id = $this->id;\n\t\t$errors = [];\n\t\tif ($account->save()) {\n\t\t\t//for all existed balance items create amount for default account\n\t\t\t$bSheets = BalanceSheet::find()->where(['user_id'=>$this->user_id])->all();\n\t\t\t$success = true;\n\t\t\tforeach ($bSheets as $sheet) {\n\t\t\t\tif (isset($sheet->id)) {\n\t\t\t\t\t$amount = new BalanceAmount();\n\t\t\t\t\t$amount->account_id = $account->id;\n\t\t\t\t\t$amount->balance_sheet_id = $sheet->id;\n\t\t\t\t\t$amount->amount = 0;\n\t\t\t\t\tif (!$amount->save()) {\n\t\t\t\t\t\t$success = false;\n\t\t\t\t\t\t$errors['amount'] = $amount->errors;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ($success) return false;\n\t\t} else {\n\t\t\t$errors['account'] = $account->errors;\n\t\t}\n\t\t$errors['message'] = \"Errors in BalanceItem::initAccounts()\";\n\t\treturn $errors;\n\t}", "function clientLookupTable($sync_group_name, $store_id, $user_id, $obj) {\n\t\tglobal $log;\n\t\t\n\t\t$currentTime = time();\t\t\n\t\t$currentDate = date(\"Y-m-d H:i:s\", $currentTime);\n\t\t$user = 'user';\n\t\t\n\t\t//Deactive all the lookup values\n\t\t$sql = \"UPDATE \" . DB_PREFIX . \"sync_lookup SET is_active = 0 WHERE store_id = \" . $this->db_escape($store_id) . \" AND sync_group_name = \" . $this->db_escape($sync_group_name);\n\t\t$this->db->query($sql);\n\t\t\n\t\tforeach ($obj as $key => $value) {\n\t\t\t\t\n\t\t\t\t$sql = \"SELECT * FROM \" . DB_PREFIX . \"sync_lookup WHERE store_id = \" . $this->db_escape($store_id) . \" AND sync_group_name = \" . $this->db_escape($sync_group_name) . \" AND ref_key = \" . $this->db_escape($key);\n\t\t\t\t$result = $this->db->query($sql);\n\t\t\t\t\n\t\t\t\tif (!$result->num_rows) {//Insert New lookup values Record\n\t\t\t\t\t\n\t\t\t\t\t$sql = \"INSERT INTO \" . DB_PREFIX . \"sync_lookup (store_id, sync_group_name, name, ref_key, is_system, created_by, dt_created, updated_by, dt_updated, is_active)\n\t\t\t\t\t\t\tVALUES (\" . $this->db_escape($store_id) . \", \" . $this->db_escape($sync_group_name) . \", \" . $this->db_escape($value) . \", \" . $this->db_escape($key) . \", 0, \" . $this->db_escape($user_id) . \", \" . $this->db_escape($currentDate) . \", \" . $this->db_escape($user_id) . \", \" . $this->db_escape($currentDate) . \", 1)\";\n\t\t\t\t\t$this->db->query($sql);\t\t\t\n\t\t\t\t\t\n\t\t\t\t} else { //Update lookup values Record\n\t\t\t\t\t\t\n\t\t\t\t\t$sql = \"UPDATE \" . DB_PREFIX . \"sync_lookup SET name = \" . $this->db_escape($value) . \", is_active = 1 WHERE store_id = \" . $this->db_escape($store_id) . \" AND sync_group_name = \" . $this->db_escape($sync_group_name) . \" AND ref_key = \" . $this->db_escape($key);\n\t\t\t\t\t$this->db->query($sql);\n\t\t\t\t}\n\t\t}\n\t}", "abstract protected function getLookupFields();", "public function initCheckinss()\n\t{\n\t\t$this->collCheckinss = array();\n\t}", "function LF_save_account_info_data()\r\n\t{\r\n\t\tcheck_ajax_referer( 'savepluginData', 'token' );\r\n\r\n\t\t$user_name = sanitize_text_field($_POST['LF_user_name']);\r\n\t\t$password = sanitize_text_field($_POST['LF_password']);\r\n\t\t$email = sanitize_text_field($_POST['LF_email']);\r\n\t\t$fromEmail = sanitize_text_field($_POST['LF_fromemail']);\r\n\t\t$office_id = sanitize_text_field($_POST['LF_Office_id']);\r\n\t\t$agent_id = sanitize_text_field($_POST['LF_agent_id']);\r\n\r\n\t\tif(isset($user_name) and $user_name!=''){\r\n\t\t\tLF_add_settings('user_name',$user_name);\r\n\t\t}\r\n\r\n\t\tif(isset($password) and $password!=''){\r\n\t\t\tLF_add_settings('password',$password);\r\n\t\t}\r\n\r\n\t\tif(isset($email) and $email != ''){\r\n\t\t\tLF_add_settings('email',$email);\r\n\t\t}\r\n\r\n\t\tif(isset($fromEmail)){\r\n\t\t\tLF_add_settings('fromEmail',$fromEmail);\r\n\t\t}\r\n\t\tif(isset($office_id) and $office_id!=''){\r\n\t\t\tLF_add_settings('office_id',$office_id);\r\n\t\t}\r\n\r\n\t\tif(isset($agent_id) and $agent_id!=''){\r\n\t\t\tLF_add_settings('agent_id',$agent_id);\r\n\t\t}\r\n\r\n\t\techo '1';\r\n\t\tdie();\r\n\t}", "public function account() {\n\t\t\n\t\t$this->validate();\n\t}", "private function populate($accountInfo)\n {\n foreach ($accountInfo as $key => $value)\n {\n $this->{$key} = $value;\n }\n }", "public function planner_search_accounts() {\n \n // Gets accounts\n (new MidrubBaseUserAppsCollectionPlannerHelpers\\Accounts)->planner_search_accounts();\n \n }", "public static function Create($objParentObject, $intId = null, $intCreateType = QMetaControlCreateType::CreateOrEdit) {\n\t\t\t// Attempt to Load from PK Arguments\n\t\t\tif (strlen($intId)) {\n\t\t\t\t$objCheckingAccountLookup = CheckingAccountLookup::Load($intId);\n\n\t\t\t\t// CheckingAccountLookup was found -- return it!\n\t\t\t\tif ($objCheckingAccountLookup)\n\t\t\t\t\treturn new CheckingAccountLookupMetaControl($objParentObject, $objCheckingAccountLookup);\n\n\t\t\t\t// If CreateOnRecordNotFound not specified, throw an exception\n\t\t\t\telse if ($intCreateType != QMetaControlCreateType::CreateOnRecordNotFound)\n\t\t\t\t\tthrow new QCallerException('Could not find a CheckingAccountLookup object with PK arguments: ' . $intId);\n\n\t\t\t// If EditOnly is specified, throw an exception\n\t\t\t} else if ($intCreateType == QMetaControlCreateType::EditOnly)\n\t\t\t\tthrow new QCallerException('No PK arguments specified');\n\n\t\t\t// If we are here, then we need to create a new record\n\t\t\treturn new CheckingAccountLookupMetaControl($objParentObject, new CheckingAccountLookup());\n\t\t}", "function\tnewAccountFromPOST() {\n\t\t$this->getFromPost() ;\n\t\t$myCuContact\t=\tnew AccountBooking() ;\n\t\t$myCuContact->getFromPost() ;\n\t\tif ( $this->AccountName1 == \"\") {\n\t\t\t$this->AccountName1\t=\t$myCuContact->FirstName . \" \" . $myCuContact->Name ;\n\t\t}\n\t\t/**\n\t\t *\n\t\t */\n\t\tif ( strlen( $this->AccountName1) < 8) {\n\t\t\tself::$err['_IAccountName1']\t=\ttrue ;\n\t\t}\n\t\tif ( strlen( $myCuContact->Name) < 3) {\n\t\t\tself::$err['_IName']\t=\ttrue ;\n\t\t}\n\t\tif ( strlen( $myCuContact->FirstName) < 3) {\n\t\t\tself::$err['_IFirstName']\t=\ttrue ;\n\t\t}\n\t\tif ( strlen( $this->Street) < 3) {\n\t\t\tself::$err['_IStreet']\t=\ttrue ;\n\t\t}\n\t\tif ( strlen( $this->Number) < 3) {\n\t\t\tself::$err['_INumber']\t=\ttrue ;\n\t\t}\n\t\tif ( strlen( $this->ZIP) < 3) {\n\t\t\tself::$err['_IZIP']\t=\ttrue ;\n\t\t}\n\t\tif ( strlen( $this->City) < 3) {\n\t\t\tself::$err['_ICity']\t=\ttrue ;\n\t\t}\n\t\t/**\n\t\t * check eMail Address for length\n\t\t * for match\n\t\t * all ok\n\t\t */\n\t\tif ( strlen( $this->eMail) < 10) {\n\t\t\tself::$err['_IeMail']\t=\ttrue ;\n\t\t} else if ( $this->eMail != $_POST['_IeMailVerify']) {\n\t\t\tself::$err['_IeMail']\t=\ttrue ;\n\t\t} else {\n\t\t\t$this->newAccount( \"900000\", \"999999\") ;\n\t\t\t$this->getPassword() ;\n\t\t\t$myCuContact->AccountNo\t=\t$this->AccountNo ;\n\t\t\t$myCuContact->newAccountBooking() ;\n\t\t}\n\t}", "public function Reload() {\n\t\t\t// Make sure we are actually Restored from the database\n\t\t\tif (!$this->__blnRestored)\n\t\t\t\tthrow new QCallerException('Cannot call Reload() on a new, unsaved BusinessChecklistResults object.');\n\n\t\t\t// Reload the Object\n\t\t\t$objReloaded = BusinessChecklistResults::Load($this->intId);\n\n\t\t\t// Update $this's local variables to match\n\t\t\t$this->QuestionId = $objReloaded->QuestionId;\n\t\t\t$this->ChecklistId = $objReloaded->ChecklistId;\n\t\t\t$this->intValue = $objReloaded->intValue;\n\t\t\t$this->UserId = $objReloaded->UserId;\n\t\t}", "public function syncAccount(array $data): int\n\t{\n\t\t$recordModel = \\Vtiger_Record_Model::getCleanInstance('Accounts');\n\t\tif ($id = $this->findAccount($data, $recordModel)) {\n\t\t\t$recordModel = \\Vtiger_Record_Model::getInstanceById($id, 'Accounts');\n\t\t}\n\t\t$fields = $recordModel->getModule()->getFields();\n\t\tif (!($companyName = $data['company_name_a'] ?: $data['company_name_b'] ?: false)) {\n\t\t\tif (empty($data['firstname'])) {\n\t\t\t\t$data['firstname'] = $data['first_name_a'] ?? $data['first_name_b'];\n\t\t\t}\n\t\t\tif (empty($data['lastname'])) {\n\t\t\t\t$data['lastname'] = $data['last_name_a'] ?? $data['last_name_b'];\n\t\t\t}\n\t\t\t$companyName = $data['firstname'] . '|##|' . $data['lastname'];\n\t\t\tif ('|##|' === $companyName) {\n\t\t\t\t$companyName = $data['email'] ?? $data['email_a'];\n\t\t\t}\n\t\t\t$recordModel->set('legal_form', 'PLL_NATURAL_PERSON');\n\t\t}\n\t\t$recordModel->set('accountname', $companyName);\n\t\t$recordModel->set('vat_id', $data['vat_id_a'] ?: $data['vat_id_b'] ?: '');\n\t\tforeach ($this->accountFieldsMap as $target => $source) {\n\t\t\tif (isset($data[$source], $fields[$target])) {\n\t\t\t\t$recordModel->set($target, $data[$source]);\n\t\t\t}\n\t\t}\n\t\t$recordModel->save();\n\t\t$id = $recordModel->getId();\n\t\tif ($recordModel->get('vat_id')) {\n\t\t\t\\App\\Cache::staticSave('MagentoFindAccount', $recordModel->get('vat_id'), $id);\n\t\t}\n\t\tif ($data['email'] ?? $data['email_a']) {\n\t\t\t\\App\\Cache::staticSave('MagentoFindByEmailAccounts', $data['email'] ?? $data['email_a'], $id);\n\t\t}\n\t\treturn $id;\n\t}", "function save()\n {\n plugin::save();\n unset($this->attrs['base']);\n\n /* Try to add entries to databases */\n $str = $this->add_to_database(true);\n if($str){\n msg_dialog::display(_(\"Error\"), $str, ERROR_DIALOG);\n }\n\n /* Write back to ldap */\n $ldap= $this->config->get_ldap_link();\n $ldap->cat($this->dn, array('dn'));\n $a= $ldap->fetch();\n\n if (count($a)){\n $ldap->cd($this->dn);\n $this->cleanup();\n $ldap->modify ($this->attrs); \n\n $this->handle_post_events(\"modify\");\n } else {\n $ldap->cd($this->config->current['BASE']);\n $ldap->create_missing_trees(preg_replace('/^[^,]+,/', '', $this->dn));\n $ldap->cd($this->dn);\n $ldap->add($this->attrs);\n $this->handle_post_events(\"add\");\n }\n if (!$ldap->success()){\n msg_dialog::display(_(\"LDAP error\"), msgPool::ldaperror($ldap->get_error(), $this->dn, 0, get_class()));\n }\n\n /* Log last action */\n if($this->initially_was_account){\n new log(\"modify\",\"gofonmacro/\".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());\n }else{\n new log(\"create\",\"gofonmacro/\".get_class($this),$this->dn,array_keys($this->attrs),$ldap->get_error());\n }\n }", "public function processUpdateFields()\r\r\n {\r\r\n if (!is_array($fields = Tools::getValue('fieldsBox'))) {\r\r\n $fields = array();\r\r\n }\r\r\n\r\r\n $object = new $this->className();\r\r\n if (!$object->addFieldsRequiredDatabase($fields)) {\r\r\n $this->errors[] = Tools::displayError('An error occurred when attempting to update the required fields.');\r\r\n } else {\r\r\n $this->redirect_after = self::$currentIndex . '&conf=4&token=' . $this->token;\r\r\n }\r\r\n\r\r\n return $object;\r\r\n }", "function communityservice_account_edit_account() {\n\t\tCS_Shortcode_My_Account::edit_account();\n\t}", "function saveInfoandAccount()\n{\n\t$app = Application::getInstance();\n\t$app->saveInfoandAccount();\t\n}", "public function buildLookup()\n {\n $lookup = array_combine(\n array_merge(range('A', 'Z'), range(2, 7)),\n range(0, 31)\n );\n $this->setLookup($lookup);\n }", "function init_account() {\n\n\t/* Setup master database path inside the Plugin 'Database' folder */\n\t$root_path = App::pluginPath('Webzash');\n\tif (empty($root_path)) {\n\t\tdebug(\"Could not set database path. Please check your setup.\");\n\t\tCakeSession::delete('ActiveAccount.id');\n\t\tCakeSession::delete('ActiveAccount.account_role');\n\t\treturn;\n\t}\n\n\t/* Load the master database configuration in $wz */\n\trequire_once($root_path . './Config/' . 'MasterConfig.php');\n\n\t/* Create master database config and try to connect to it */\n\tApp::uses('ConnectionManager', 'Model');\n\ttry {\n\t\tConnectionManager::create('wz', $wz);\n\t} catch (Exception $e) {\n\t\tdebug(\"Missing master sqlite database file. Please check your setup.\");\n\t\tCakeSession::delete('ActiveAccount.id');\n\t\tCakeSession::delete('ActiveAccount.account_role');\n\t\treturn;\n\t}\n\n\t/* Check if account is active */\n\tApp::uses('CakeSession', 'Model/Datasource');\n\n\t$account_id = CakeSession::read('ActiveAccount.id');\n\tif (empty($account_id)) {\n\t\treturn;\n\t}\n\n\t/* If account is active load the database details from master database */\n\tApp::import(\"Webzash.Model\", \"Wzaccount\");\n\t$Wzaccount = new Wzaccount();\n\t$Wzaccount->useDbConfig = 'wz';\n\n\t/* Read the details, if not found delete the active account from session */\n\ttry {\n\t\t$account = $Wzaccount->findById($account_id);\n\t} catch (Exception $e) {\n\t\tdebug(\"Missing master sqlite database file. Please check your setup.\");\n\t\tCakeSession::delete('ActiveAccount.id');\n\t\tCakeSession::delete('ActiveAccount.account_role');\n\t\treturn;\n\t}\n\tif (!$account) {\n\t\tdebug(\"Account not found. Please check your accounts in the 'Administer' section.\");\n\t\tCakeSession::delete('ActiveAccount.id');\n\t\tCakeSession::delete('ActiveAccount.account_role');\n\t\treturn;\n\t}\n\n\t/* Create account database configuration */\n\t$wz_accconfig['datasource'] = $account['Wzaccount']['db_datasource'];\n\t$wz_accconfig['database'] = $account['Wzaccount']['db_database'];\n\t$wz_accconfig['host'] = $account['Wzaccount']['db_host'];\n\t$wz_accconfig['port'] = $account['Wzaccount']['db_port'];\n\t$wz_accconfig['login'] = $account['Wzaccount']['db_login'];\n\t$wz_accconfig['password'] = $account['Wzaccount']['db_password'];\n\t$wz_accconfig['prefix'] = $account['Wzaccount']['db_prefix'];\n\tif ($account['Wzaccount']['db_persistent'] == 1) {\n\t\t$wz_accconfig['persistent'] = TRUE;\n\t} else {\n\t\t$wz_accconfig['persistent'] = FALSE;\n\t}\n\t$wz_accconfig['schema'] = $account['Wzaccount']['db_schema'];\n\t$wz_accconfig['unixsocket'] = $account['Wzaccount']['db_unixsocket'];\n\t$wz_accconfig['settings'] = $account['Wzaccount']['db_settings'];\n\n\t/* Create account database config and try to connect to it */\n\ttry {\n\t\tConnectionManager::create('wz_accconfig', $wz_accconfig);\n\t} catch (Exception $e) {\n\t\tCakeSession::delete('ActiveAccount.id');\n\t\tCakeSession::delete('ActiveAccount.account_role');\n\t\tCakeSession::write('ActiveAccount.failed', true);\n\t\treturn;\n\t}\n}", "public function get_accounts() {\n \n // Get network's input\n $network = $this->CI->input->get('network', TRUE);\n \n // Get type's input\n $type = $this->CI->input->get('type', TRUE);\n \n if ( $network && $type ) {\n \n $data = array(\n 'success' => TRUE,\n 'type' => $type\n );\n \n if ( $type === 'accounts_manager' ) {\n \n $settings = (new MidrubBaseUserAppsCollectionHelpers\\Accounts)->get_network_info($network);\n \n $icon = '';\n \n if ( $settings ) {\n $icon = $settings['icon'];\n $data['hidden'] = $settings['hidden'];\n } else {\n $data['hidden'] = '';\n }\n \n $display_hidden_content = '';\n \n if ( $data['hidden'] ) {\n $display_hidden_content = ' manage-accounts-display-hidden-content';\n }\n \n $connect_button_text = (isset($settings['custom_connect']))?$settings['custom_connect']:$this->CI->lang->line('new_account');\n \n $data['active'] = (new MidrubBaseUserAppsCollectionHelpers\\Accounts)->get_active_accounts($this->CI->networks_model->get_accounts_by_network( $this->CI->user_id, $network, 0 ), 0) . (new MidrubBaseUserAppsCollectionHelpers\\Accounts)->get_active_accounts($this->CI->networks_model->get_accounts_by_network( $this->CI->user_id, $network, 1 ), 1);\n $data['instructions'] = (new MidrubBaseUserAppsCollectionHelpers\\Accounts)->get_network_instructions($network);\n $data['search_form'] = '<div class=\"col-xl-7\">'\n . '<div class=\"input-group accounts-manager-search\">'\n . '<div class=\"input-group-prepend\">'\n . '<i class=\"icon-magnifier\"></i>'\n . '</div>'\n . '<input type=\"text\" class=\"form-control accounts-manager-search-for-accounts\" data-network=\"' . $network . '\" placeholder=\"' . $this->CI->lang->line('search_for_accounts') . '\">'\n . '<button type=\"button\" class=\"cancel-accounts-manager-search input-group-append\">'\n . '<i class=\"icon-close\"></i>'\n . '</button>'\n . '</div>'\n . '</div>'\n . '<div class=\"col-xl-5\">'\n . '<button type=\"button\" class=\"manage-accounts-new-account' . $display_hidden_content . '\">'\n . $icon . ' ' . $connect_button_text\n . '</button>'\n . '</div>';\n\n } else {\n\n $data['active'] = (new MidrubBaseUserAppsCollectionHelpers\\Accounts)->get_active_accounts($this->CI->networks_model->get_accounts_by_network( $this->CI->user_id, $network, 1 ), 2);\n\n }\n\n echo json_encode($data);\n \n } else {\n \n $data = array(\n 'success' => FALSE,\n 'message' => $this->CI->lang->line('error_occurred')\n );\n\n echo json_encode($data); \n \n }\n \n }", "function bloomsbury_get_account_fields() {\n\treturn apply_filters( 'bloomsbury_account_fields', array(\n\t\t'first_name'\t\t\t=> array(\n\t\t\t'type' \t\t=> 'text',\n\t\t\t'label' \t\t=> __( 'First Name', 'bloomsbury' ),\n\t\t\t'placeholder'\t\t \t\t=> __( 'First Name' ),\n\t\t\t'hide_in_account' \t\t=> true,\n\t\t\t'hide_in_admin' \t\t=> true,\n\t\t\t'hide_in_checkout' \t\t=> true,\n\t\t\t'hide_in_registration' \t\t=> false,\n\t\t\t'required' \t\t=> true,\n\t\t),\n\n\t\t'last_name'\t\t\t\t=> array(\n\t\t\t'type' \t\t=> 'text',\n\t\t\t'label' \t\t=> __( 'Last Name', 'bloomsbury' ),\n\t\t\t'placeholder'\t\t\t\t=> __( 'Last Name', 'bloomsbury' ),\n\t\t\t'hide_in_account' \t\t=> true,\n\t\t\t'hide_in_admin' \t\t=> true,\n\t\t\t'hide_in_checkout' \t\t=> true,\n\t\t\t'hide_in_registration' \t\t=> false,\n\t\t\t'required' \t\t=> true,\n\t\t),\n\n\t\t'display_name'\t\t\t=> array(\n\t\t\t'type'\t\t\t\t\t\t=> 'text',\n\t\t\t'label'\t\t\t\t\t\t=> __( 'Username', 'bloomsbury' ),\n\t\t\t'placeholder'\t\t\t\t=> __( 'First & Last Name' ),\n\t\t\t'hide_in_account' \t\t=> true,\n\t\t\t'hide_in_admin' \t\t=> true,\n\t\t\t'hide_in_checkout' \t\t=> true,\n\t\t\t'hide_in_registration' \t\t=> false,\n\t\t\t'required'\t\t\t\t\t=> false,\n\t\t),\n\n\t\t'email'\t\t\t=> array(\n\t\t\t'type'\t\t\t\t\t\t=> 'email',\n\t\t\t'label'\t\t\t\t\t\t=> __( 'Email', 'bloomsbury'),\n\t\t\t'placeholder'\t\t\t\t=> __( 'Email Address' ),\n\t\t\t'hide_in_account' \t\t=> true,\n\t\t\t'hide_in_admin' \t\t=> true,\n\t\t\t'hide_in_checkout' \t\t=> true,\n\t\t\t'hide_in_registration' \t\t=> false,\n\t\t\t'required' \t\t=> true,\n\t\t),\n\n\t\t'user_pass'\t\t\t\t=> array(\n\t\t\t'type'\t\t\t\t\t\t=> 'password',\n\t\t\t'label'\t\t\t\t\t\t=> __( 'Password', 'bloomsbury' ),\n\t\t\t'placeholder'\t\t\t\t=> __( 'Enter a Password', 'bloomsbury' ),\n\t\t\t'required'\t\t\t\t\t=> true,\n\t\t),\n\n\t\t'user_url' \t\t\t\t=> array(\n\t\t\t'type'\t\t\t\t\t=> 'text',\n\t\t\t'label'\t\t\t\t\t=> __( 'Website', 'bloomsbury'),\n\t\t\t'placeholder' \t\t\t=> __( 'Example - bloomsburybeginnings.com', 'bloomsbury'),\n\t\t\t'required' \t\t\t\t=> false,\n\t\t\t'hide_in_account'\t\t=> false,\n\t\t\t'hide_in_admin'\t\t\t=> true,\n\t\t\t'hide_in_checkout'\t\t=> true,\n\t\t\t'hide_in_registration' \t=> true,\n\t\t),\n\n 'user_company' => array(\n 'type' => 'text',\n 'label' => __( 'Company', 'bloomsbury'),\n 'placeholder' => __( 'Example - Bloomsbury', 'bloomsbury'),\n 'required' => false,\n 'hide_in_account' => false,\n 'hide_in_admin' => true,\n 'hide_in_checkout' => true,\n 'hide_in_registration' => true,\n ),\n\n 'job_title' => array(\n 'type' => 'text',\n 'label' => __( 'Job Title', 'bloomsbury'),\n 'placeholder' => __( 'Example - CEO/Founder', 'bloomsbury'),\n 'required' => false,\n 'hide_in_account' => false,\n 'hide_in_admin' => true,\n 'hide_in_checkout' => true,\n 'hide_in_registration' => true,\n ),\n\n 'description' => array(\n 'type' => 'text',\n 'label' => __( 'Description', 'bloomsbury'),\n 'placeholder' => __( 'Example - Bloomsbury', 'bloomsbury'),\n 'required' => false,\n 'hide_in_account' => false,\n 'hide_in_admin' => true,\n 'hide_in_checkout' => true,\n 'hide_in_registration' => true,\n ),\n\t) );\n}" ]
[ "0.5519764", "0.54611963", "0.5451497", "0.5398476", "0.51364326", "0.50191355", "0.500996", "0.4966981", "0.48802456", "0.47783783", "0.47761935", "0.4757844", "0.4727149", "0.4695353", "0.4600891", "0.45862678", "0.45818272", "0.4537134", "0.45114553", "0.45047548", "0.44952932", "0.44843704", "0.44763947", "0.44408065", "0.4428325", "0.43953514", "0.43839595", "0.43804184", "0.43667388", "0.43626603" ]
0.7970584
0
This will DELETE this object's CheckingAccountLookup instance from the database. It will also unassociate itself from any ManyToManyReferences.
public function DeleteCheckingAccountLookup() { $this->objCheckingAccountLookup->UnassociateAllPeople(); $this->objCheckingAccountLookup->Delete(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function destroy(CheckingAccount $checkingAccount)\n {\n //\n }", "public function account_manager_delete_accounts() {\n \n // Delete accounts\n (new MidrubBaseUserAppsCollectionPlannerHelpers\\Accounts)->delete_accounts();\n \n }", "public static function clearRelatedInstancePool()\n {\n // Invalidate objects in \".$this->getClassNameFromBuilder($joinedTableTableMapBuilder).\" instance pool,\n // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n EmailManagerTraceTableMap::clearInstancePool();\n EmailManagerHistoryTableMap::clearInstancePool();\n EmailManagerTraceI18nTableMap::clearInstancePool();\n }", "public function unload()\r\n {\r\n foreach($this->entities as $key => $entity)\r\n {\r\n $newEntity = $this->manager\r\n ->find(get_class($entity), $entity->id);\r\n\r\n if (is_null($newEntity))\r\n {\r\n continue;\r\n }\r\n\r\n $this->manager->remove($newEntity);\r\n unset($this->entities[$key]);\r\n }\r\n\r\n $this->manager->flush();\r\n }", "public function SaveCheckingAccountLookup() {\n\t\t\ttry {\n\t\t\t\t// Update any fields for controls that have been created\n\t\t\t\tif ($this->txtTransitHash) $this->objCheckingAccountLookup->TransitHash = $this->txtTransitHash->Text;\n\t\t\t\tif ($this->txtAccountHash) $this->objCheckingAccountLookup->AccountHash = $this->txtAccountHash->Text;\n\n\t\t\t\t// Update any UniqueReverseReferences (if any) for controls that have been created for it\n\n\t\t\t\t// Save the CheckingAccountLookup object\n\t\t\t\t$this->objCheckingAccountLookup->Save();\n\n\t\t\t\t// Finally, update any ManyToManyReferences (if any)\n\t\t\t\t$this->lstPeople_Update();\n\t\t\t} catch (QCallerException $objExc) {\n\t\t\t\t$objExc->IncrementOffset();\n\t\t\t\tthrow $objExc;\n\t\t\t}\n\t\t}", "protected function _delete()\n { \n $id = (int) $this->id;\n \n //Check if there is a user account associated with this\n \n if ($user = $this->user_id) {\n $user->delete();\n }\n \n $db = get_db();\n \n //Remove all taggings associated with this entity\n $taggings = $db->getTable('Taggings')->findBy(array('entity' => $id));\n \n foreach ($taggings as $tagging) {\n $tagging->delete();\n }\n \n $update_join = \"\n UPDATE $db->EntitiesRelations \n SET entity_id = NULL \n WHERE entity_id = ?\";\n \n $db->exec($update_join, array($id)); \n }", "public function destroy() {\n\t\tself::getEntityManager()->remove($this);\n\t}", "public function clearCheckinss()\n\t{\n\t\t$this->collCheckinss = null; // important to set this to NULL since that means it is uninitialized\n\t}", "public function purge()\n {\n $this->absentTypes->each->delete();\n\n $this->publicHolidays->each->delete();\n\n $this->owner()->where('current_location_id', $this->id)\n ->update(['current_location_id' => null]);\n\n $this->users()->where('current_location_id', $this->id)\n ->update(['current_location_id' => null]);\n\n $this->users()->detach();\n\n $this->delete();\n }", "public function delete() :void {\n $hashes = HashLinkModel::select(\n Where::and()\n ->set('user_id', Where::OperatorEq, $this->getUserId())\n ->set('type', Where::OperatorEq, $this->type)\n );\n\n foreach ($hashes as $hash) {\n /**\n * @var HashLinkModel $hash\n */\n $hash->delete(true);\n }\n }", "public function destroy() {\n\t\t$account = Account::find(Auth::user()->id);\n\t\tif (Hash::check(Input::get('password'), $account->getAuthPassword())) {\n\t\t\t$account->delete();\n\t\t}\n\t}", "public function destroy(AccountSetup $accountSetup)\n {\n //\n }", "public function destroy(Accounts $accounts)\n {\n //\n }", "public function DeleteAllRelationshipsAsRelatedTo() {\n\t\t\tif ((is_null($this->intVictimWitnessNum)))\n\t\t\t\tthrow new QUndefinedPrimaryKeyException('Unable to call UnassociateRelationshipAsRelatedTo on this unsaved Person.');\n\n\t\t\t// Get the Database Object for this Class\n\t\t\t$objDatabase = Person::GetDatabase();\n\n\t\t\t// Journaling\n\t\t\tif ($objDatabase->JournalingDatabase) {\n\t\t\t\tforeach (Relationship::LoadArrayByRelatedToPersonId($this->intVictimWitnessNum) as $objRelationship) {\n\t\t\t\t\t$objRelationship->Journal('DELETE');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Perform the SQL Query\n\t\t\t$objDatabase->NonQuery('\n\t\t\t\tDELETE FROM\n\t\t\t\t\t`relationship`\n\t\t\t\tWHERE\n\t\t\t\t\t`related_to_person_id` = ' . $objDatabase->SqlVariable($this->intVictimWitnessNum) . '\n\t\t\t');\n\t\t}", "public function deleteAll()\n {\n $this->delete();\n foreach ($this->_model->related as $name => $info) {\n $model = $this->_model->getRelated($name)->getModel();\n $model->cache->delete();\n }\n }", "public function DeleteAllAddresses() {\n\t\t\tif ((is_null($this->intVictimWitnessNum)))\n\t\t\t\tthrow new QUndefinedPrimaryKeyException('Unable to call UnassociateAddress on this unsaved Person.');\n\n\t\t\t// Get the Database Object for this Class\n\t\t\t$objDatabase = Person::GetDatabase();\n\n\t\t\t// Journaling\n\t\t\tif ($objDatabase->JournalingDatabase) {\n\t\t\t\tforeach (Address::LoadArrayByPersonId($this->intVictimWitnessNum) as $objAddress) {\n\t\t\t\t\t$objAddress->Journal('DELETE');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Perform the SQL Query\n\t\t\t$objDatabase->NonQuery('\n\t\t\t\tDELETE FROM\n\t\t\t\t\t`address`\n\t\t\t\tWHERE\n\t\t\t\t\t`person_id` = ' . $objDatabase->SqlVariable($this->intVictimWitnessNum) . '\n\t\t\t');\n\t\t}", "public function DeleteAllRelationships() {\n\t\t\tif ((is_null($this->intVictimWitnessNum)))\n\t\t\t\tthrow new QUndefinedPrimaryKeyException('Unable to call UnassociateRelationship on this unsaved Person.');\n\n\t\t\t// Get the Database Object for this Class\n\t\t\t$objDatabase = Person::GetDatabase();\n\n\t\t\t// Journaling\n\t\t\tif ($objDatabase->JournalingDatabase) {\n\t\t\t\tforeach (Relationship::LoadArrayByPersonId($this->intVictimWitnessNum) as $objRelationship) {\n\t\t\t\t\t$objRelationship->Journal('DELETE');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Perform the SQL Query\n\t\t\t$objDatabase->NonQuery('\n\t\t\t\tDELETE FROM\n\t\t\t\t\t`relationship`\n\t\t\t\tWHERE\n\t\t\t\t\t`person_id` = ' . $objDatabase->SqlVariable($this->intVictimWitnessNum) . '\n\t\t\t');\n\t\t}", "public function delete(){\n\t\t $db = Loader::db();\n\t\t\t$db->Execute(\"DELETE FROM {$this->tableName} WHERE id = ?\", array($this->id));\n $db->Execute(\"DELETE FROM ClinicaPersonnelLocations WHERE personnelID = ?\", array($this->id));\n\t\t}", "public static function clearRelatedInstancePool()\n {\n // Invalidate objects in related instance pools,\n // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n AdminUserTableMap::clearInstancePool();\n ApplicationTableMap::clearInstancePool();\n }", "public function destroy(CheckList $checklist)\n {\n $checklist->delete();\n return $this->showOne($checklist);\n }", "public function unload()\n {\n if (false !== $this->isLoaded) { \n \n $this->db->createCommand()->delete($this->name)->execute();\n if (null !== $this->tableSchema->sequenceName) {\n $this->db->createCommand()->resetSequence($this->name, 1)->execute();\n }\n $this->isLoaded = false;\n }\n }", "public static function deleteAccount(Account $oAccount): void\n {\n parent::deleteAccount($oAccount);\n unlink(static::generateKeyPath($oAccount));\n }", "public function destroy(ChecklistType $checklistType)\n {\n //\n }", "public function delete()\n {\n if ($this->isLoaded) {\n $sqlQuery = \"DELETE FROM `\" . $this->table\n . \"` WHERE $this->primaryKey = ?\";\n\n $statement = self::$dbh->prepare($sqlQuery);\n $statement->execute([$this->data[$this->primaryKey]]);\n $this->isLoaded = false;\n $this->data[$this->primaryKey] = null;\n } else {\n self::$logger->notice(\"You must load an entry before deleting\");\n }\n }", "public function DeleteCannedStrategy() {\n\t\t\t$this->objCannedStrategy->Delete();\n\t\t}", "public function DeleteAllSignupEntries() {\n\t\t\tif ((is_null($this->intId)))\n\t\t\t\tthrow new QUndefinedPrimaryKeyException('Unable to call UnassociateSignupEntry on this unsaved SignupForm.');\n\n\t\t\t// Get the Database Object for this Class\n\t\t\t$objDatabase = SignupForm::GetDatabase();\n\n\t\t\t// Journaling\n\t\t\tif ($objDatabase->JournalingDatabase) {\n\t\t\t\tforeach (SignupEntry::LoadArrayBySignupFormId($this->intId) as $objSignupEntry) {\n\t\t\t\t\t$objSignupEntry->Journal('DELETE');\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Perform the SQL Query\n\t\t\t$objDatabase->NonQuery('\n\t\t\t\tDELETE FROM\n\t\t\t\t\t`signup_entry`\n\t\t\t\tWHERE\n\t\t\t\t\t`signup_form_id` = ' . $objDatabase->SqlVariable($this->intId) . '\n\t\t\t');\n\t\t}", "public function deleteObject() {\n\t\t$this->people()->each()->deleteObject();\n\t\t$this->invoices()->each()->deleteObject();\n\t\tparent::deleteObject();\n\t}", "public static function clearRelatedInstancePool()\n {\n // Invalidate objects in related instance pools,\n // since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n QuoteItemTableMap::clearInstancePool();\n }", "public static function clearRelatedInstancePool()\n\t{\n\t\t// Invalidate objects in CustomerPeer instance pool, \n\t\t// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n\t\tCustomerPeer::clearInstancePool();\n\t\t// Invalidate objects in WebsitePeer instance pool, \n\t\t// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n\t\tWebsitePeer::clearInstancePool();\n\t\t// Invalidate objects in WebsiteTemplatePeer instance pool, \n\t\t// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n\t\tWebsiteTemplatePeer::clearInstancePool();\n\t\t// Invalidate objects in MemberFeedbackPeer instance pool, \n\t\t// since one or more of them may be deleted by ON DELETE CASCADE/SETNULL rule.\n\t\tMemberFeedbackPeer::clearInstancePool();\n\t}", "public function testDoDeleteAllInstancePool()\n {\n $review = ReviewQuery::create()->findOne();\n $book = $review->getBook();\n BookTableMap::doDeleteAll();\n $this->assertNull(BookQuery::create()->findPk($book->getId()), 'doDeleteAll invalidates instance pool');\n $this->assertNull(ReviewQuery::create()->findPk($review->getId()), 'doDeleteAll invalidates instance pool of related tables with ON DELETE CASCADE');\n }" ]
[ "0.6221673", "0.56582886", "0.53272223", "0.5313464", "0.53133845", "0.52903616", "0.517165", "0.5131671", "0.50784546", "0.5060873", "0.50541556", "0.5030748", "0.5003312", "0.49833977", "0.4981498", "0.49794132", "0.4970368", "0.49546576", "0.49528548", "0.49294114", "0.49121475", "0.49053296", "0.48775676", "0.48694396", "0.48593786", "0.48437843", "0.48260438", "0.48131493", "0.48096904", "0.48046696" ]
0.81817746
0
Gets a server by name
public function getServer($name) { if (!isset($this->servers[$name])) { return $this->createServer($name); } return $this->servers[$name]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function server($name = null) {\n\t\treturn $name ? $_SERVER[$name] : $_SERVER;\n\t}", "public function getServer($name = null)\n {\n if ($name === null) {\n return $_SERVER;\n }\n \n return isset($_SERVER[$name]) ? $_SERVER[$name] : null;\n }", "function server($name){\n //server(str index)\n return $_SERVER[$name];\n}", "public function get_server($name){\n if(!in_array($name, HtmlRequest::$Svars)){\n return null;\n }\n return $this->check_param($_SERVER[$name]);\n }", "public static function getSERVER(string $name = self::UNDEFINED, $default = null)\n\t{\n\t\treturn self::getVar('server', $name, $default);\n\t}", "public function getServerName();", "public function server_get_serverid_by_name($session_id, $server_name)\n {\n global $app;\n\t\tif(!$this->checkPerm($session_id, 'server_get')) {\n \tthrow new ISPConfigRemoteException('permission_denied', 'You do not have the permissions to access this function.');\n\t\t}\n\t\tif (!empty($session_id) && !empty($server_name)) {\n\t\t\t$sql = \"SELECT server_id FROM server WHERE server_name = ?\";\n\t\t\t$all = $app->db->queryOneRecord($sql, $server_name);\n\t\t\treturn $all;\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "public function getValue($name) {\n $name = strtoupper($name);\n if (isset($this->server[$name])) {\n return $this->server[$name];\n }\n return false;\n }", "public function server($key) {\n if (isset($_SERVER[$key])) {\n return $_SERVER[$key];\n }\n\n return NULL;\n }", "function getServerName() {\n\tglobal $serverid;\n\tswitch ($serverid) {\n\t\t\tcase 1:\n\t\t\t\treturn \"skyskol.com.mysql\";\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\treturn \"127.0.0.1\";\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\treturn \"okrets.se.mysql\";\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\treturn \"pistolsm2011.se.mysql\";\n\t\t\t\tbreak;\n\t\t}\n}", "public function getServer (mixed $name, mixed $default = NULL)\n {\n }", "public static function get($name)\n {\n if (! isset(self::$connections[$name])) {\n return;\n }\n\n return self::$connections[$name];\n }", "public static function _server(string $var) { return self::$server[$var] ?? null; }", "public function server($key)\n {\n return isset($_SERVER[$key]) ? $_SERVER[$key] : null;\n }", "public function onGetServer(): \\swoole_server\r\n {\r\n return $this->server;\r\n }", "function getservbyname ($service, $protocol) {}", "public static function getServerName()\n {\n }", "function server_safe($name)\n{\n if (isset($_SERVER[$name])) {\n return $_SERVER[$name];\n }\n return null;\n}", "private function getHost() {\n\t\t$request = <<<DATA\n<server>\n\t<get>\n\t\t<gen_info/>\n\t</get>\n</server>\nDATA;\n\n\t\t$resp = pm_ApiRpc::getService()->call($request);\n\n\n\t\treturn $resp->server->get->result->gen_info->server_name;\n\t}", "public function server($key = null, $default = null)\n {\n return $this->getItem('server', $key, $default);\n }", "public function server($key = null, $default = null)\n {\n return $this->retrieveItem('server', $key, $default);\n }", "public function server($key = null, $default = null)\n {\n return $this->retrieveItem('server', $key, $default);\n }", "public function getServer($key = null, $default = null)\n {\n return $this->_server->get($key, $default);\n }", "public function getName()\r\n {\r\n return $this->_serverName;\r\n }", "function get_servername() {return $this->a_servername;}", "public function get($name);", "public function get($name);", "public function get($name);", "public function get($name);", "public function get($name);" ]
[ "0.76727694", "0.71311027", "0.71099395", "0.6912815", "0.6745057", "0.6444168", "0.6163964", "0.6134961", "0.6070212", "0.6061864", "0.6009869", "0.5983119", "0.59708697", "0.59653986", "0.5964705", "0.59439284", "0.59395", "0.58709115", "0.5864965", "0.5791493", "0.57748103", "0.57748103", "0.57699215", "0.57409203", "0.57223713", "0.57165104", "0.57165104", "0.57165104", "0.57165104", "0.57165104" ]
0.7855258
0
For getting a document from copying a template
public function getDocumentFromTemplate ($template, $docName = "") { $url = $this->apiBaseURL . "template/".$template."/copy"; $parameters = ""; if (!empty($docName)) { $parameters = json_encode(array("document_name"=>$docName)); } $header = array("Accept:application/json", "Authorization: Bearer ".$this->clientToken); return self::makeCurlRequest ($url, $header, $parameters, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getTemporary(\\TYPO3\\Docs\\RenderingHub\\Domain\\Model\\Document $document);", "private function makeDoc() {\n $template_path = $this->file_folder . $this->template->file_guid;\n \n $templateProcessor = new \\PhpOffice\\PhpWord\\TemplateProcessor($template_path);\n \n $fld_arr = $templateProcessor->getVariables();\n\n foreach($fld_arr as $fld)\n {\n $templateProcessor->setValue($fld, $this->getFieldValue($fld));\n }\n \n $this->file_name = $this->getFileName() . \".\" . File::extension($this->template->file_name);\n $this->file_guid = Uuid::generate(4) . \".\" . File::extension($this->template->file_name);\n\n $this->file_path = $this->file_folder . $this->file_guid;\n\n $templateProcessor->saveAs($this->file_path);\n }", "public function getDocument($document);", "function getTemplate();", "abstract public function getTemplate();", "abstract public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function getTemplate();", "public function sael_template_data_loads() {\n $template_id = $_POST['template_id'];\n $with_page = $_POST['with_page'];\n\n $template = SAEL_Temp_Remote::sael_get_instance()->get_template_content($template_id);\n\n if (is_wp_error($template)) {\n return $template;\n }\n\n // Finally create the page.\n $page_id = $this->create_page($template, $with_page);\n echo ((int) $page_id ? $page_id : 'problem');\n exit;\n }", "function getSourceTemplate();", "protected function copyTemplate() {\n\t\t$copyFrom = tx_templavoilaframework_lib::getSkinPath(t3lib_div::_GP('copySkin'));\n\t\t$copyTo = tx_templavoilaframework_lib::getCustomSkinPath();\n\n\t\t$filemounts['1'] = array(\n\t\t\t'name' => $copyTo,\n\t\t\t'path' => PATH_site . $copyTo\n\t\t);\n\t\t$filemounts['2'] = array(\n\t\t\t'name' => 'typo3conf/ext/',\n\t\t\t'path' => PATH_site . 'typo3conf/ext/'\n\t\t);\n\n\t\t$fileCommands = array(\n\t\t\t'copy' => array(\n\t\t\t\tarray(\n\t\t\t\t\t'data' => PATH_site . $copyFrom,\n\t\t\t\t\t'target' => PATH_site . $copyTo,\n\t\t\t\t\t'altName' => 1\n\t\t\t\t)\n\t\t\t)\n\t\t);\n\n\t\t$fileHandler = t3lib_div::makeInstance('t3lib_extFileFunctions');\n\t\t$fileHandler->init($filemounts, $TYPO3_CONF_VARS['BE']['fileExtensions']);\n\t\t$fileHandler->init_actionPerms($GLOBALS['BE_USER']->getFileoperationPermissions());\n\t\t$fileHandler->start($fileCommands);\n\n\t\t$fileHandler->processData();\n\t\t$fileHandler->printLogErrorMessages();\n\t}", "function Get_Template ( $template )\n {\n if( !file_exists( $template ) )\n {\n die ('<br><br><center><b><font color=\"#FF0000\">Template '.$template.' nicht geladen.</font></b></center>');\n }\n $daten = fopen ( $template, \"r\" );\n $show = fread ( $daten, filesize($template) );\n fclose ( $daten );\n return $show;\n }", "function tainacan_get_the_document() {\n\t$item = tainacan_get_item();\n\t\n\tif (!$item)\n\t\treturn;\n\t\n\treturn apply_filters('tainacan-get-the-document', $item->get_document_as_html(), $item);\n\t\n}", "function get_documents() {\n if (isset($this->qa_document_id) && $this->qa_document_id != \"\") {\n $q = \"SELECT * FROM request_project rp, qa_model_documents md, qa_document d\";\n $q .= \" WHERE rp.request_id=$this->project_id\";\n $q .= \" AND md.qa_model_id=rp.qa_model_id\";\n $q .= \" AND md.qa_document_id=$this->qa_document_id\";\n $qry = new PgQuery($q);\n if ($qry->Exec(\"qa_process_step::get_documents\") && $qry->rows > 0) {\n $row = $qry->Fetch();\n $this->path_to_template = $row->path_to_template;\n $this->path_to_example = $row->path_to_example;\n }\n }\n }", "function getDocument($we_editmode=\"0\",$baseHref=\"0\",$we_transaction=\"\") {\n\t\treturn $this->i_getDocument();\n\t}", "public function getSource(\\TYPO3\\Docs\\RenderingHub\\Domain\\Model\\Document $document);", "function bboss_bp_doc_group_doc_single_template( $template_path, $template ) {\n\tremove_filter( 'bp_docs_locate_template', 'bboss_bp_doc_group_doc_single_template', 11, 2 );\n\tglobal $bp, $bboss_single_group_doc_view;\n\n\tif ( $bp->bp_docs->current_view == 'list' && $bboss_single_group_doc_view == 'bp_doc_group_doc_single' ) {\n\n\t\tadd_filter( 'bp_docs_is_existing_doc', '__return_true', 11 );\n\n\t\treturn BBOSS_BPDOC_GDS_PATH . 'bpdocs_gds/single/index.php';\n\t}\n\treturn $template_path;\n}", "function gettemplate($template) {\n\n//$file=file($template);\n//$template=implode('',$file);\n$template = file_get_contents($template);\n$template=str_replace('\"','\\\"',$template);\n\nreturn $template;\n}", "protected function GetTemplate()\n\t{\n\t}", "function getCopyDialog()\n {\n $str = \"\";\n\n $smarty = get_smarty();\n $smarty->assign(\"cn\", \t set_post($this->cn));\n $smarty->assign(\"description\", set_post($this->description));\n $str = $smarty->fetch(get_template_path(\"paste_generic.tpl\",TRUE,dirname(__FILE__)));\n\n $ret = array();\n $ret['string'] = $str;\n $ret['status'] = \"\";\n return($ret);\n }", "static function ExtractPublicationTemplate(&$page, &$_mapping){\n // getting relative path to publications templates\n $_path = $page->Kernel->Settings->GetItem(\"COMMON\",\"PublicationsTemplatesPath\");\n\n if($_mapping[\"xsl_template\"] != '')\n $page->IncludeTemplate($_path.$_mapping[\"xsl_template\"]);\n }", "public function template() {}", "function ura_get_template( $template_name, $require_once = true )\r\n{\r\n\t//die( $template_name );\r\n\tload_template( ura_return_template( $template_name ), $require_once );\r\n}", "function get_template($template){\n $login_arr = $this->action_parser($this->action,'template') ;\n $pos = array_search($template, $login_arr['template']['name']); \n return $login_arr['template']['path'][$pos];\n }", "function get_template($template){\n\t\t\t$login_arr = $this->action_parser($this->action,'template') ;\n\t\t\t$pos = array_search($template, $login_arr['template']['name']); \n\t\t\treturn $login_arr['template']['path'][$pos];\n\t\t}", "function get_template($template){\n\t\t\t$login_arr = $this->action_parser($this->action,'template') ;\n\t\t\t$pos = array_search($template, $login_arr['template']['name']); \n\t\t\treturn $login_arr['template']['path'][$pos];\n\t\t}", "public function get_template_content() {\n \n $template = $_GET['templateID'];\n \n if( ! isset( $template ) ) {\n return;\n }\n \n $template_content = $this->templateInstance->get_template_content( $template );\n \n if ( empty ( $template_content ) || ! isset( $template_content ) ) {\n wp_send_json_error();\n }\n \n $data = array(\n 'template_content' => $template_content\n );\n \n wp_send_json_success( $data );\n \n }", "function createTmpDoc($dbaccess, $fromid, $defaultvalue = true)\n{\n $d = createDoc($dbaccess, $fromid, false, $defaultvalue, true);\n if ($d) {\n $d->doctype = 'T'; // tag has temporary document\n $d->profid = 0; // no privilege\n \n }\n return $d;\n}" ]
[ "0.6512584", "0.63687074", "0.6327677", "0.6317387", "0.62992656", "0.62992656", "0.6205744", "0.6205744", "0.6205744", "0.6205744", "0.61427706", "0.6115614", "0.609373", "0.6059395", "0.60138386", "0.59403974", "0.5897998", "0.5888073", "0.581756", "0.5812513", "0.56934744", "0.56733656", "0.5665148", "0.56634736", "0.56630594", "0.5654356", "0.56330436", "0.56330436", "0.5600112", "0.5592598" ]
0.7728242
0
For getting history of a document.
public function getDocumentHistory ($document) { $url = $this->apiBaseURL . "document/".$document."/history"; $header = array("Accept: application/json", "Authorization: Bearer ".$this->clientToken); return self::makeCurlRequest ($url, $header, "", false); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getHistory()\n {\n return $this->_history;\n }", "public function history() {\n return $this->history;\n }", "function getHistory() {\n\t\treturn $this->query_history;\n\t}", "function history() {\n\t\tglobal $wgUser, $wgOut, $wgLang, $wgShowUpdatedMarker, $wgRequest,\n\t\t\t$wgTitle, $wgUseValidation;\n\n\t\t/*\n\t\t * Allow client caching.\n\t\t */\n\n\t\tif( $wgOut->checkLastModified( $this->mArticle->getTimestamp() ) )\n\t\t\t/* Client cache fresh and headers sent, nothing more to do. */\n\t\t\treturn;\n\n\t\t$fname = 'PageHistory::history';\n\t\twfProfileIn( $fname );\n\n\t\t/*\n\t\t * Setup page variables.\n\t\t */\n\t\t$wgOut->setPageTitle( $this->mTitle->getPrefixedText() );\n\t\t$wgOut->setSubtitle( wfMsg( 'revhistory' ) );\n\t\t$wgOut->setArticleFlag( false );\n\t\t$wgOut->setArticleRelated( true );\n\t\t$wgOut->setRobotpolicy( 'noindex,nofollow' );\n\n\t\t/*\n\t\t * Fail if article doesn't exist.\n\t\t */\n\t\t$id = $this->mTitle->getArticleID();\n\t\tif( $id == 0 ) {\n\t\t\t$wgOut->addWikiText( wfMsg( 'nohistory' ) );\n\t\t\twfProfileOut( $fname );\n\t\t\treturn;\n\t\t}\n\n\t\t/*\n\t\t * Extract limit, the number of revisions to show, and\n\t\t * offset, the timestamp to begin at, from the URL.\n\t\t */\n\t\t$limit = $wgRequest->getInt('limit', 50);\n\t\t$offset = $wgRequest->getText('offset');\n\n\t\t/* Offset must be an integral. */\n\t\tif (!strlen($offset) || !preg_match(\"/^[0-9]+$/\", $offset))\n\t\t\t$offset = 0;\n\n\t\t/*\n\t\t * \"go=last\" means to jump to the last history page.\n\t\t */\n\t\tif (($gowhere = $wgRequest->getText(\"go\")) !== NULL) {\n\t\t\tswitch ($gowhere) {\n\t\t\tcase \"first\":\n\t\t\t\tif (($lastid = $this->getLastOffsetForPaging($id, $limit)) === NULL)\n\t\t\t\t\tbreak;\n\t\t\t\t$gourl = $wgTitle->getLocalURL(\"action=history&limit={$limit}&offset={$lastid}\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\t$gourl = NULL;\n\t\t\t}\n\n\t\t\tif (!is_null($gourl)) {\n\t\t\t\t$wgOut->redirect($gourl);\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\n\t\t/*\n\t\t * Fetch revisions.\n\t\t *\n\t\t * If the user clicked \"previous\", we retrieve the revisions backwards,\n\t\t * then reverse them. This is to avoid needing to know the timestamp of\n\t\t * previous revisions when generating the URL.\n\t\t */\n\t\t$direction = $this->getDirection();\n\t\t$revisions = $this->fetchRevisions($limit, $offset, $direction);\n\t\t$navbar = $this->makeNavbar($revisions, $offset, $limit, $direction);\n\n\t\t/*\n\t\t * We fetch one more revision than needed to get the timestamp of the\n\t\t * one after this page (and to know if it exists).\n\t\t *\n\t\t * linesonpage stores the actual number of lines.\n\t\t */\n\t\tif (count($revisions) < $limit + 1)\n\t\t\t$this->linesonpage = count($revisions);\n\t\telse\n\t\t\t$this->linesonpage = count($revisions) - 1;\n\n\t\t/* Un-reverse revisions */\n\t\tif ($direction == DIR_PREV)\n\t\t\t$revisions = array_reverse($revisions);\n\n\t\t/*\n\t\t * Print the top navbar.\n\t\t */\n\t\t$s = $navbar;\n\t\t$s .= $this->beginHistoryList();\n\t\t$counter = 1;\n\n\t\t/*\n\t\t * Print each revision, excluding the one-past-the-end, if any.\n\t\t */\n\t\tforeach (array_slice($revisions, 0, $limit) as $i => $line) {\n\t\t\t$first = !$i && $offset == 0;\n\t\t\t$next = isset( $revisions[$i + 1] ) ? $revisions[$i + 1 ] : null;\n\t\t\t$s .= $this->historyLine($line, $next, $counter, $this->getNotificationTimestamp(), $first);\n\t\t\t$counter++;\n\t\t}\n\n\t\t/*\n\t\t * End navbar.\n\t\t*/\n\t\t$s .= $this->endHistoryList();\n\t\t$s .= $navbar;\n\n\t\t/*\n\t\t * Article validation line.\n\t\t */\n\t\tif ($wgUseValidation)\n\t\t\t$s .= '<p>' . Validation::getStatisticsLink( $this->mArticle ) . '</p>' ;\n\n\t\t$wgOut->addHTML( $s );\n\t\twfProfileOut( $fname );\n\t}", "public function getRecordHistory()\n {\n return $this->_recordHistory;\n }", "public function getHistory() {\n return $this->history->getValues();\n }", "function history() {\n\t}", "function history() {\n $id = @$this->params['id'];\n if (!$id) throw new xException('Missing id parameter');\n // Retrieves all versions that impact this record\n // (directly or indirectly)\n $r = xModel::load('version_relation', array(\n 'model_name' => $this->model,\n 'id_field_value' => $id,\n 'xorder_by' => 'versions_relations.version_id',\n 'xorder' => 'DESC'\n ))->get();\n $versions = array();\n foreach ($r as $rr) $versions[] = $rr['version_id'];\n //\n $data = array();\n foreach ($versions as $version) {\n $data[$version] = array(\n 'version' => xModel::load('version', array(\n 'id' => $version\n ))->get(0),\n 'modifications' => xModel::load('version_data', array(\n 'version_id' => $version,\n 'xjoin' => array()\n ))->get(),\n );\n }\n return $data;\n }", "private function get_history($event){\n\t\t$noteID = $event->get_arg(1);\n\t\t$pageNumber = $event->get_arg(2);\n if(is_null($pageNumber) || !is_numeric($pageNumber))\n $pageNumber = 0;\n else if ($pageNumber <= 0)\n $pageNumber = 0;\n else\n $pageNumber--;\n\n global $config;\n \n\t\t$histiriesPerPage = $config->get_int('notesHistoriesPerPage');\n\t\t\n\t\tglobal $database;\n\t\t$histories = $database->get_all(\"SELECT h.note_id, h.review_id, h.image_id, h.date, h.note, u.name AS user_name \".\n\t\t\t\t\t\t\t\t\t\t\"FROM note_histories AS h \".\n\t\t\t\t\t\t\t\t\t\t\"INNER JOIN users AS u \".\n\t\t\t\t\t\t\t\t\t\t\"ON u.id = h.user_id \".\n\t\t\t\t\t\t\t\t\t\t\"WHERE note_id = ? \".\n\t\t\t\t\t\t\t\t\t\t\"ORDER BY date DESC LIMIT ?, ?\",\n\t\t\t\t\t\t\t\t\t\tarray($noteID, $pageNumber * $histiriesPerPage, $histiriesPerPage));\n\t\t\t\t\t\n\t\t$totalPages = ceil($database->get_one(\"SELECT COUNT(*) FROM note_histories WHERE note_id = ?\", array($noteID)) / $histiriesPerPage);\n\t\t\n\t\t$this->theme->display_history($histories, $pageNumber + 1, $totalPages);\n\t}", "function getCallHistory()\n\t{\n\t\treturn $this->call_hist;\n\t}", "function history() {\r\n\r\n\r\n $app =& JFactory::getApplication('site');\r\n $document =& JFactory::getDocument();\r\n $pManager =& getPluginManager();\r\n\r\n $wid = JRequest::getInt( 'wid', 0 );\r\n $iid = JRequest::getInt( 'iid', 0 );\r\n\r\n $workflowModel =& $this->getModel('workflow');\r\n $workflow = $workflowModel->get( $wid );\r\n\r\n if( !$workflow )\r\n JError::raiseError( 404, JText::_(\"Workflow not found\"));\r\n\r\n\r\n /* Authorization */\r\n $pManager->loadPlugins('acl');\r\n $response = $pManager->invokeMethod( 'acl', 'getMyGroupId', array($workflow->acl),null );\r\n $userGroups = $response[$workflow->acl];\r\n $user =& JFactory::getUser();\r\n\r\n if( $user->guest )\r\n JError::raiseError( 403, JText::_(\"Access Forbidden\") );\r\n\r\n if(\t!canManageWorkflows() && !in_array($workflow->admin_gid,array_keys($userGroups)))\r\n JError::raiseError( 403, JText::_(\"Access Forbidden\"));\r\n /* User is autorized */\r\n\r\n $historyModel =& $this->getModel('history');\r\n $itemHistory = $historyModel->get( $wid, $iid );\r\n\r\n if( !$itemHistory )\r\n JError::raiseError( 404, JText::_(\"Item not found or No history stored for this item\"));\r\n\r\n\r\n\r\n /* Prepare and display the view */\r\n $viewType\t= $document->getType();\r\n $viewName\t= 'history';\r\n $viewLayout\t= 'default';\r\n\r\n $view = & $this->getView( $viewName, $viewType, '', array( 'base_path'=>$this->_basePath));\r\n\r\n\r\n // Set the layout\r\n $view->setLayout($viewLayout);\r\n\r\n //Display the view\r\n $view->display($itemHistory, $workflow);\r\n\r\n }", "public function get_post_history($post_id = 0)\n {\n }", "private function getHistory()\n {\n $action = $this->getGET('action', null);\n if ($action == \"delete\") {\n /* @var User $user */\n $user = $this->data['user'];\n $history = $user->history;\n if (key_exists($_GET['key'], $history)) {\n unset($history[$_GET['key']]);\n $user->history = $history;\n $user->save();\n FlashMessage::add(FlashMessage::TYPE_SUCCESS, 'Datensatz erfolgreich gelöscht.');\n Helpers::redirect(str_replace('&edit=1', '', $_SERVER['REQUEST_URI']));\n }\n }\n }", "function get_search_history()\n {\n clearos_profile(__METHOD__, __LINE__);\n try {\n $file = new File(self::FOLDER_MARKETPLACE . '/' . self::FILE_SEARCH_HISTORY . '.' . $this->CI->session->userdata['username']);\n $history = array();\n\n // If we haven't yet initialized, set default\n if (!$file->exists())\n $this->reset_search_criteria();\n\n $contents = $file->get_contents_as_array();\n\n foreach ($contents as $search) {\n $info = (array)json_decode($search);\n array_push($history, $info);\n }\n return $history;\n\n } catch (Exception $e) {\n throw new Engine_Exception(clearos_exception_message($e), CLEAROS_ERROR);\n }\n }", "public function history()\n {\n /** @var Client $this */\n return new HistoryResource($this);\n }", "public function getRelevantHistory()\n {\n return $this->relevantHistory;\n }", "public function get_all_history()\n {\n $sentence = new SentenceUtil();\n $sentence->fromCommand(\"/system/history/getall\");\n $this->talker->send($sentence);\n $rs = $this->talker->getResult();\n $i = 0;\n if ($i < $rs->size()) {\n return $rs->getResultArray();\n } else {\n return \"No History\";\n }\n }", "public function signal_history(/* ... */)\n {\n return $this->_history;\n }", "public function getRevisionLog();", "function get_entry_history($entry_id) {\r\n\r\n global $mongo, $readPreference;\r\n\r\n $filter = ['entry_id' => $entry_id];\r\n $options = ['sort' => ['_id' => -1]];\r\n $query = new MongoDB\\Driver\\Query($filter, $options);\r\n $cursor = $mongo->executeQuery('memoryatlas.entries', $query, $readPreference);\r\n\r\n $result = [];\r\n foreach ($cursor as $doc) {\r\n $result[] = $doc;\r\n }\r\n return $result;\r\n}", "public function action_history()\n\t{\n\t\t$this->access('admin.'.strtolower($this->_admin->resource).'.history');\n\t\t$id = $this->request->param('id');\n\n\t\tif(!$this->request->is_ajax())\n\t\t{\n\t\t\tthrow new Kohana_HTTP_Exception_404;\n\t\t}\n\n\t\t// Needs to be a GET request\n\t\tif($this->request->method() != Request::GET)\n\t\t{\n\t\t\tthrow new Kohana_HTTP_Exception_403('No data was requested.');\n\t\t}\n\n\n\t\t$record = $this->_admin->model->where($this->_admin->primary_key, '=', $id)->find();\n\n\t\tif($record->loaded())\n\t\t{\n\t\t\t$tag_fields = array(\n\t\t\t\t'old_value',\n\t\t\t\t'new_value',\n\t\t\t\t'column_name'\n\t\t\t);\n\t\t\t$tags_group_sql = DB::expr('CAST('.implode(' AS CHAR),\\'|\\',CAST(', $tag_fields).' AS CHAR)');\n\n\t\t\t$datalog = ORM::factory('DataLog')\n\t\t\t\t->select(DB::expr('GROUP_CONCAT('.$tags_group_sql.' SEPARATOR \\'$*/*$\\') concat'))\n\t\t\t\t->where('table_name', '=', $this->_admin->model->table_name())\n\t\t\t\t->and_where('row_pk', '=', $id)\n\t\t\t\t->group_by('date_and_time')\n\t\t\t\t->order_by('date_and_time', 'DESC')\n\t\t\t\t->order_by('id', 'DESC')\n\t\t\t\t->find_all();\n\n\t\t\t$history = [];\n\n\t\t\tforeach($datalog as $data)\n\t\t\t{\n\t\t\t\t$history[] = $data->as_array();\n\t\t\t}\n\t\t\tRD::set(RD::SUCCESS, 'History for :resource #:id has loaded.', array(\n\t\t\t\t\t':resource' => Inflector::singular($this->_resource),\n\t\t\t\t\t':id' => $id\n\t\t\t\t),\n\t\t\t\tarray('history' => $history)\n\t\t\t);\n\t\t}\n\t\telse\n\t\t{\n\t\t\tRD::set(RD::WARNING, 'History for :resource can\\'t be found.', array(\n\t\t\t\t':resource' => Inflector::singular($this->_resource),\n\t\t\t\t':id' => $id\n\t\t\t));\n\t\t}\n\t}", "public function getHistory(): GetHistory\n {\n return new GetHistory($this->_provider);\n }", "public function history(): mixed\n {\n $payload = Payload::list('fx');\n\n return $this->transporter->get($payload->uri)->throw()->json('data');\n }", "public function historyAction()\n {\n $this->view->header = \"History requests\";\n\n $paginator = Zend_Paginator::factory($this->request->fetchAll());\n\n $config = $this->getInvokeArg('bootstrap')->getOptions();\n $paginator->setDefaultItemCountPerPage($config['pagination']['per_page']);\n $allItems = $paginator->getTotalItemCount();\n\n $page = $this->getRequest()->getParam('page', 1);\n $paginator->setCurrentPageNumber($page);\n\n $this->view->paginator = $paginator;\n $this->view->countItems = $allItems;\n }", "public function getWorkHistory() {\r\n return $this->work_history;\r\n }", "public function historyAction() {\n\t\t$this->_helper->layout()->disableLayout();\n\t\t$resourceid = $this->_request->getParam('id');\n\t\t$versions = StudentResourceService::getPreviousVersions($resourceid);\n\t\t$this->view->versions = $versions;\n\t}", "public function getHistory($username=\"this\") {\r\n\t\tif ($username==\"this\") return $this->UserDBHelper->getHistory(\"*\");\r\n\t\telse return $this->UserDBHelper->getHistory($username);\r\n\t}", "public function getStatusHistory()\n {\n return $this->status_history;\n }", "public function getJobHistory()\n {\n return $this->jobhistory;\n }", "public function indexHistory()\n {\n // if(!Auth::guard('web')->check()){\n // return redirect('/');\n // }\n $history = BorrowedBook::where('user_id', Auth::user()->id)->get();\n\n return view('history', compact('history'));\n }" ]
[ "0.740071", "0.73521185", "0.7350514", "0.70585525", "0.69706076", "0.68717486", "0.6746417", "0.66378725", "0.6570081", "0.65173644", "0.65157896", "0.6447253", "0.64446324", "0.64309347", "0.6419047", "0.63940924", "0.6385347", "0.6369158", "0.63657856", "0.6294679", "0.62894493", "0.62681323", "0.6219459", "0.6213612", "0.6151518", "0.61464", "0.6145673", "0.60913205", "0.60902166", "0.6069287" ]
0.8116415
0
For inviting a user to sign a document.
public function inviteUserToSignDocument ($document, $email) { $url = $this->apiBaseURL . "document/".$document."/invite?email=enable"; $header = array("Accept: application/json", "Authorization: Bearer ".$this->clientToken); $parameters = json_encode(array("from"=>$this->fromEmail,"to"=>$email)); return self::makeCurlRequest ($url, $header, $parameters, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function markSignedIn();", "function signatureRequestOnDocument($loginConfig, $status = \"sent\", $embeddedSigning = false, $filepath, $signature, $contract_key) {\n\n $allDocument = array();\n foreach ($filepath as $key => $val) {\n $documentFileName = $val;\n $documentName = pathinfo($documentFileName, PATHINFO_BASENAME);\n $document = new Document();\n $document->setDocumentBase64(base64_encode(file_get_contents($documentFileName)));\n $document->setName($documentName);\n $document->setDocumentId($key + 1);\n $allDocument[] = $document;\n }\n\n $envelop_summary = null;\n if (!empty($loginConfig->getAccountId())) {\n\n $envelopeApi = new EnvelopesApi($loginConfig->getApiClient());\n\n // Add a document to the envelope\n\n\n /* Using Array */\n $i = 1;\n $recipients = new Recipients();\n $allSigners = array();\n foreach ($signature as $sign) {\n\n if (!empty($sign['user'])) {\n $signerVar = \"Signer\" . $i;\n $signerVar = new Signer();\n $signerVar->setEmail($sign['user']['email']);\n $signerVar->setName($sign['user']['name']);\n $signerVar->setRecipientId($sign['user']['receiptId']);\n if(isset($sign['user']['order'])){\n $signerVar->setRoutingOrder($sign['user']['order']); \n }\n }\n\n\n $tabsVar = \"tabs\" . $i;\n $tabsVar = new Tabs();\n\n\n if (!empty($sign['sign'])) {\n $j = 1;\n $allSigns = array();\n foreach ($sign['sign'] as $signValue) {\n $signHereVar = \"signHere\" . $i . $j;\n $signHereVar = new SignHere();\n $signHereVar->setXPosition($signValue[\"xpos\"]);\n $signHereVar->setYPosition($signValue[\"ypos\"]);\n $signHereVar->setDocumentId($signValue[\"documentId\"]);\n $signHereVar->setPageNumber($signValue[\"pageNumber\"]);\n $signHereVar->setRecipientId($signValue[\"receiptId\"]);\n $allSigns[] = $signHereVar;\n $j++;\n \n }\n\n $tabsVar->setSignHereTabs($allSigns);\n \n }\n\n\n if (!empty($sign['dateSign'])) {\n $k = 1;\n $allDate = array();\n foreach ($sign['dateSign'] as $dateSignValue) {\n $dateSignedVar = \"dateSigned\" . $i . $k;\n $dateSignedVar = new DateSigned();\n $dateSignedVar->setXPosition($dateSignValue[\"xpos\"]);\n $dateSignedVar->setYPosition($dateSignValue[\"ypos\"]);\n $dateSignedVar->setDocumentId($dateSignValue[\"documentId\"]);\n $dateSignedVar->setPageNumber($dateSignValue[\"pageNumber\"]);\n $dateSignedVar->setRecipientId($dateSignValue[\"receiptId\"]);\n $allDate[] = $dateSignedVar;\n $k++;\n }\n\n $tabsVar->setDateSignedTabs($allDate);\n }\n\n\n\n if (!empty($sign['initialSign'])) {\n $l = 1;\n $allInitial = array();\n foreach ($sign['initialSign'] as $initialSignValue) {\n $initialHereVar = \"initialHere\" . $i . $l;\n $initialHereVar = new InitialHere();\n $initialHereVar->setXPosition($initialSignValue[\"xpos\"]);\n $initialHereVar->setYPosition($initialSignValue[\"ypos\"]);\n $initialHereVar->setDocumentId($initialSignValue[\"documentId\"]);\n $initialHereVar->setPageNumber($initialSignValue[\"pageNumber\"]);\n $initialHereVar->setRecipientId($initialSignValue[\"receiptId\"]);\n $allInitial[] = $initialHereVar;\n $l++;\n }\n\n $tabsVar->setInitialHereTabs($allInitial);\n }\n\n\n $signerVar->setTabs($tabsVar);\n $allSigners[] = $signerVar;\n $i++;\n }\n $recipients->setSigners($allSigners); \n /* END */\n\n $envelope_events = [\n (new \\DocuSign\\eSign\\Model\\EnvelopeEvent())->setEnvelopeEventStatusCode(\"sent\"),\n (new \\DocuSign\\eSign\\Model\\EnvelopeEvent())->setEnvelopeEventStatusCode(\"delivered\"),\n (new \\DocuSign\\eSign\\Model\\EnvelopeEvent())->setEnvelopeEventStatusCode(\"completed\"),\n (new \\DocuSign\\eSign\\Model\\EnvelopeEvent())->setEnvelopeEventStatusCode(\"declined\"),\n (new \\DocuSign\\eSign\\Model\\EnvelopeEvent())->setEnvelopeEventStatusCode(\"voided\"),\n (new \\DocuSign\\eSign\\Model\\EnvelopeEvent())->setEnvelopeEventStatusCode(\"sent\"),\n (new \\DocuSign\\eSign\\Model\\EnvelopeEvent())->setEnvelopeEventStatusCode(\"sent\")\n ];\n $recipient_events = [\n (new \\DocuSign\\eSign\\Model\\RecipientEvent())->setRecipientEventStatusCode(\"Sent\"),\n (new \\DocuSign\\eSign\\Model\\RecipientEvent())->setRecipientEventStatusCode(\"Delivered\"),\n (new \\DocuSign\\eSign\\Model\\RecipientEvent())->setRecipientEventStatusCode(\"Completed\"),\n (new \\DocuSign\\eSign\\Model\\RecipientEvent())->setRecipientEventStatusCode(\"Declined\"),\n (new \\DocuSign\\eSign\\Model\\RecipientEvent())->setRecipientEventStatusCode(\"AuthenticationFailed\"),\n (new \\DocuSign\\eSign\\Model\\RecipientEvent())->setRecipientEventStatusCode(\"AutoResponded\")\n ];\n $webhook_url = SITE_FULL_URL . 'projects/docu-sign-track-and-download/' . $contract_key;\n $event_notification = new \\DocuSign\\eSign\\Model\\EventNotification();\n $event_notification->setUrl($webhook_url);\n $event_notification->setLoggingEnabled(\"true\");\n $event_notification->setRequireAcknowledgment(\"true\");\n $event_notification->setUseSoapInterface(\"false\");\n $event_notification->setIncludeCertificateWithSoap(\"false\");\n $event_notification->setSignMessageWithX509Cert(\"false\");\n $event_notification->setIncludeDocuments(\"true\");\n $event_notification->setIncludeEnvelopeVoidReason(\"true\");\n $event_notification->setIncludeTimeZone(\"true\");\n $event_notification->setIncludeSenderAccountAsCustomField(\"true\");\n $event_notification->setIncludeDocumentFields(\"true\");\n $event_notification->setIncludeCertificateOfCompletion(\"true\");\n $event_notification->setEnvelopeEvents($envelope_events);\n $event_notification->setRecipientEvents($recipient_events);\n\n $envelop_definition = new EnvelopeDefinition();\n $envelop_definition->setEmailSubject($signature[0]['email_subject']);\n $envelop_definition->setEmailBlurb($signature[0]['email_content']);\n\n // set envelope status to \"sent\" to immediately send the signature request\n $envelop_definition->setStatus($status);\n $envelop_definition->setRecipients($recipients);\n $envelop_definition->setDocuments($allDocument);\n $envelop_definition->setEventNotification($event_notification);\n $options = new CreateEnvelopeOptions();\n $options->setCdseMode(null);\n $options->setMergeRolesOnDraft(null);\n\n $envelop_summary = $envelopeApi->createEnvelope($loginConfig->getAccountId(), $envelop_definition, $options);\n if (!empty($envelop_summary)) {\n if ($status == \"created\") {\n $loginConfig->setCreatedEnvelopeId($envelop_summary->getEnvelopeId());\n } else {\n $loginConfig->setEnvelopeId($envelop_summary->getEnvelopeId());\n }\n }\n }\n\n return $loginConfig;\n }", "public function signinMethod();", "function createSign($document, $private_key = null, $hash_func = null)\n {\n // check private key\n if (is_null($private_key)) {\n $private_key = $this->_private_key;\n }\n else if (!Crypt_RSA_Key::isValid($private_key)) {\n $this->pushError('invalid private key. It must be an object of Crypt_RSA_Key class', CRYPT_RSA_ERROR_WRONG_KEY);\n return false;\n }\n if ($private_key->getKeyType() != 'private') {\n $this->pushError('signing key must be private', CRYPT_RSA_ERROR_NEED_PRV_KEY);\n return false;\n }\n\n // check hash_func\n if (is_null($hash_func)) {\n $hash_func = $this->_hash_func;\n }\n if (!function_exists($hash_func)) {\n $this->pushError(\"cannot find hash function with name [$hash_func]\", CRYPT_RSA_ERROR_WRONG_HASH_FUNC);\n return false;\n }\n\n return $this->encrypt($hash_func($document), $private_key);\n }", "public function issignedinAction()\n {\n if (isset($_SESSION['Incite']['IS_LOGIN_VALID']) && $_SESSION['Incite']['IS_LOGIN_VALID']) {\n echo 'true';\n } else {\n echo 'false';\n }\n }", "public function store(Request $request)\n {\n $request->validate([\n 'document_id' => ['required'],\n ]);\n\n // check if we're updating\n $signerId = $request->input('signer_id');\n if ($signerId != null) {\n $signer = Signer::find($signerId);\n if ($signer != null) {\n return $this->update($request, $signer);\n }\n }\n\n // get all signing parties through the document variables\n $document = Document::find($request->input('document_id'));\n if ($document === null) {\n return redirect('');\n } else {\n // check if signatures have already been sent\n if (count($document->signers) > 0) {\n foreach ($document->signers as $signer) {\n $signer->generateAuthCode();\n }\n return redirect()->route('document.show', ['document'=>$document->id]);\n } else {\n // send new signature requests\n $signatureVariables = array_filter((array)$document->getVariables(), function($variable, $i){\n return (int)$variable->signature_field === 1;\n }, ARRAY_FILTER_USE_BOTH);\n\n if (count($signatureVariables) > 0) {\n // create a new signature model for each signer\n foreach ($signatureVariables as $signer) {\n // create signature model\n $newSigner = new Signer([\n 'document_id' => $document->id,\n 'email' => $signer->value\n ]);\n $newSigner->generateAuthCode();\n $newSigner->save();\n }\n return redirect()->route('document.show', ['document'=>$document->id]);\n } else {\n //todo: return with error message indicating there's no signature email field set\n return redirect()->route('document.show', ['document'=>$document->id]);\n }\n }\n }\n }", "public function signOn()\n {\n $this->sessionTokenTime = time();\n if (! empty($this->serviceKey)) {\n $this->sessionToken = $this->serviceInformationService->delegatedSignOn($this->identityToken, $this->serviceKey);\n } else {\n $this->sessionToken = $this->serviceInformationService->signOn($this->identityToken);\n }\n }", "public function authorize()\n\t{\n\t\treturn request()->invoice->user_id == request()->user()->id;\n\t}", "function signIn();", "public function forAuth()\n {\n\n }", "public function createDocumentForEnvelope(array $args): string\n {\n return <<< heredoc\n <!DOCTYPE html>\n <html>\n <head>\n <meta charset=\"UTF-8\">\n </head>\n <body style=\"font-family:sans-serif;margin-left:2em;\">\n <h1 style=\"font-family: 'Trebuchet MS', Helvetica, sans-serif;\n color: #850456;margin-bottom: 0;\">Umeed</h1>\n <h2 style=\"font-family: 'Trebuchet MS', Helvetica, sans-serif;\n margin-top: 0px;margin-bottom: 3.5em;font-size: 1em;\n color: #850456;\">An empowered woman is one who not only has the freedom to choose but also the skills and mindset to sustain that choice.</h2>\n <br>\n <h2>Approval form</h2>\n <h4>Ordered by {$args['signer_name']}</h4>\n <p style=\"margin-top:0em; margin-bottom:0em;\">Manager email: {$args['signer_email']}</p>\n <p style=\"margin-top:0em; margin-bottom:0em;\">Sent by: {$args['cc_name']}, {$args['cc_email']}</p>\n <p style=\"margin-top:0em; margin-bottom:0em;\">Quantity: 10\n\n \n <!-- Note the anchor tag for the signature field is in white. -->\n <h3 style=\"margin-top:3em;\">Agreed: <span style=\"color:white;\">**signature_1**/</span></h3>\n </body>\n </html>\nheredoc;\n }", "public function sendInvitations()\n {\n }", "public function signin()\n {\n $this->oauth();\n\n }", "public function isSignedIn();", "public function UserIsSignedInOrRecirectToSignIn() {\n\n\t\tif(!$this -> uo -> isAuthenticated()) {\n $_SESSION['errorMessage'] = 'Du måste vara inloggad för att komma åt den sidan';\n CPageController::RedirectTo(WS_SITELINK . \"pages/login/PLogin.php\");\n\t\t}\n\t}", "private function _setSignature() {\n // A new linefeed is necessary between your AccessID and Expires\n $string_to_sign = $this->_accessID.\"\\n\".$this->_expires;\n \n // Get the \"raw\" or binary output of the hmac hash\n $binary_signature = hash_hmac('sha1', $string_to_sign, $this->_secretKey, true);\n \n // We need to base64-encode it and then url-encode that\n $url_safe_signature = urlencode(base64_encode($binary_signature));\n \n // Set the authenticated signature\n $this->_signature = $url_safe_signature;\n }", "public function pki_sign_file(Request $request)\n {\n // this code resposible for private key signature \n // main technique: using CURL \n // recieving token and PDF base64 , conect with server, pass value, get new document singed\n\n $user_id = $request->input('user_id');\n $item_id = $request->input('item_id');\n $token = $request->input('token');\n\n $user_id = UsersModel::where('user_id', $request->user_id)->exists();\n\n $item_id = FileItemModel::where('id', $request->item_id)->exists();\n\n if ($item_id != null and $user_id != 0) {\n\n\n $fileToSign = FileItemModel::where('id', '=', $request->item_id)->get('file_url');\n\n $fileBaseName = basename($fileToSign[0]->file_url);\n\n $path1 = '/var/www/html/storage/app/public/' . $fileBaseName;\n\n $path = File::get($path1);\n\n\n $base64 = base64_encode($path);\n\n\n $curl = curl_init();\n\n curl_setopt_array($curl, array(\n\n CURLOPT_PORT => \"28445\",\n CURLOPT_URL => \"https://idm.iris.com.my:28445/resource-server/api/1/0001/pdf/sign\",\n CURLOPT_RETURNTRANSFER => true,\n CURLOPT_ENCODING => \"\",\n CURLOPT_MAXREDIRS => 10,\n CURLOPT_TIMEOUT => 30,\n CURLOPT_SSL_VERIFYPEER => false,\n CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,\n CURLOPT_CUSTOMREQUEST => \"POST\",\n CURLOPT_POSTFIELDS => \"{\\n\\t\\t\\\"id\\\":\\\"876543210123\\\", \\n\\t\\t\\\"document\\\": \\\"$base64\\\"\\n\\t\\n}\",\n CURLOPT_HTTPHEADER => array(\n \"Accept: application/json\",\n \"Accept-Encoding: gzip, deflate, br\",\n \"Authorization: Bearer $token\",\n \"Cache-Control: no-cache\",\n \"Connection: keep-alive\",\n \"Content-Length: 104270\",\n \"Content-Type: application/json\",\n \"Cookie: JSESSIONID=B6F78698554929E0CA5FA83B0E62FA50\",\n \"Host: idm.iris.com.my:28445\",\n \"Postman-Token: 692b42f3-0ab3-4749-a281-ce6ca4a69b5f,edf769d0-dadd-40ab-ba29-f281fd6e92f9\",\n \"User-Agent: PostmanRuntime/7.22.0\",\n \"cache-control: no-cache\"\n ),\n ));\n\n $response = curl_exec($curl);\n $err = curl_error($curl);\n\n curl_close($curl);\n\n if ($err) {\n echo \"cURL Error #:\" . $err;\n } else {\n\n ////// replace the file //// done \n\n $var = json_decode($response, true);\n\n $signedDocument = $var['signedDocument'];\n\n $DecodeSignedDocument = base64_decode($signedDocument);\n\n\n if (File::exists($path1)) {\n\n var_dump(File::delete($path1));\n\n var_dump($open = Storage::disk('public')->put($fileBaseName, $DecodeSignedDocument));\n } else if (!File::exists($path1)) {\n\n echo \"file not exisit\";\n }\n }\n } else {\n\n $response = [\"status\" => \"200\", \"message\" => \"faild check UserID or ItemID\"];\n\n return response(json_encode($response), 200, [\"Content-Type\" => \"application/json\",]);\n }\n }", "public function newInvitedUser() {\n\t\t\t// Inicialize variables\n\t\t\t$email\t\t\t= (isset($GLOBALS['params'][1])) ? trim(($GLOBALS['params'][1])) : false;\n\t\t\t// If values were sent\n\t\t\tif ($email) {\n\t\t\t\t// Prepare reuturn\n\t\t\t\tView::set('email', $email);\n\t\t\t\t// Return\n\t\t\t\tView::render('newInvitedUser');\n\t\t\t}\n\t\t}", "public function signIn()\r\n {\r\n // echo 'User Sign In!';\r\n $this->show( );\r\n }", "public function sign($message);", "public static function signEmrexDocument($filename_unsigned, $filename_signed, $keyfile, $password) {\n $filepath_unsigned = Storage::disk('local')->getDriver()->getAdapter()->getPathPrefix() . $filename_unsigned;\n $filepath_signed = Storage::disk('local')->getDriver()->getAdapter()->getPathPrefix() .$filename_signed;\n \n $xmlSigner = new XmlSigner();\n \n $xmlSigner->loadPfxFile($keyfile, $password);\n $xmlSigner->signXmlFile($filepath_unsigned, $filepath_signed, 'sha512');\n }", "public function signedAction()\n {\n $form = $this->getServiceLocator()->get('Helper\\Form')->createForm('Lva\\ApplicationSigned');\n\n // If form submitted then go to payment page\n if ($this->getRequest()->isPost()) {\n return $this->redirect()->toRoute(\n 'lva-'.$this->lva . '/pay-and-submit',\n [$this->getIdentifierIndex() => $this->getIdentifier(), 'redirect-back' => 'undertakings'],\n [],\n true\n );\n }\n\n // Get signature details from backend\n $applicationData = $this->getUndertakingsData();\n $signedBy = $applicationData['signature']['name'];\n $signedDate = new \\DateTime($applicationData['signature']['date']);\n\n // Update the form HTML with details name of person who signed\n /** @var \\Common\\Service\\Helper\\TranslationHelperService $translator */\n $translator = $this->getServiceLocator()->get('Helper\\Translation');\n $form->get('signatureDetails')->get('signature')->setValue(\n $translator->translateReplace('undertakings_signed', [$signedBy, $signedDate->format(\\DATE_FORMAT)])\n );\n\n return $this->render('undertakings', $form);\n }", "public function signInProc()\r\n {\r\n header(\"Content-type: application/json; charset = utf-8\");\r\n $sign_data = json_decode(file_get_contents('php://input'));\r\n\r\n $m_user = new UserService();\r\n $result = $m_user->signInUserByEmail($sign_data);\r\n\r\n $this->ajaxReturn($result);\r\n }", "function get_signcheck() {\n\t\treturn USER_ID;\n\t}", "function gnupg_encryptsign($identifier, $plaintext)\n{\n}", "protected function setDocument() \n {\n $isNew = ($this->item->user_id < 1);\n $document = JFactory::getDocument();\n $document->setTitle($isNew ? JText::_('COM_TPCXSOCIAL_USER_CREATING')\n : JText::_('COM_TPCXSOCIAL_USER_EDITING'));\n $document->addScript(JURI::root() . \"/administrator/components/com_tpcxsocial\"\n . \"/views/user/submitbutton.js\");\n JText::script('COM_TPCXSOCIAL_USER_ERROR_UNACCEPTABLE');\n }", "public function forceSignIn()\n {\n $this->_rootElement->find($this->forceSignIn)->click();\n $element = $this->browser->find($this->confirmModal);\n /** @var \\Magento\\Ui\\Test\\Block\\Adminhtml\\Modal $modal */\n $modal = $this->blockFactory->create('Magento\\Ui\\Test\\Block\\Adminhtml\\Modal', ['element' => $element]);\n $modal->acceptAlert();\n }", "function verify_user(){\n \n \n }", "function invite()\n\t{\n\t\tif (!empty($this->data['SuiUser']))\n\t\t{\n\t\t\t$error = $saved = false;\n\t\t\t\n\t\t\tunset($this->data['SuiUser']['id']);\n\t\t\t$this->data['SuiUser']['user_status'] = 'invited';\n\t\t\t\n\t\t\t$this->SuiUser->create($this->data);\n\t\t\tif ($this->SuiUser->validates())\n\t\t\t{\n\t\t\t\tif ($this->SuiUser->save())\n\t\t\t\t{\n\t\t\t\t\t$saved = true;\n\t\t\t\t\t$this->set('data', $this->data);\n\t\t\t\t\t$this->MexcMail->send($this->data['SuiUser']['email'], 'MEXC', 'Convite', 'third_user_confirmation');\n\t\t\t\t\t$email = $this->data['SuiUser']['email'];\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$validationErrors = $this->SuiUser->validationErrors;\n\t\t\t}\n\t\t\t\n\t\t\t$this->view = 'JjUtils.Json';\n\t\t\t$this->set('jsonVars', compact('error', 'saved', 'validationErrors', 'email'));\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$this->data['SuiUser']['email'] = $this->data['email'];\n\t\t\n\t\t}\n\t\t$this->setFormData();\n\t}", "public function showSignature() {\n\t\tif (!$this->signatureCache) return false;\n\t\tif ($this->disabledSignature) return false;\n\t\tif (WCF::getUser()->userID && !WCF::getUser()->showSignature) return false;\n\t\t\n\t\treturn true;\n\t}" ]
[ "0.5828513", "0.5729702", "0.5416224", "0.5290016", "0.5269747", "0.52182937", "0.519713", "0.516926", "0.5102716", "0.5101382", "0.50885856", "0.5075686", "0.5058108", "0.5049849", "0.5034613", "0.5034111", "0.5011358", "0.5010355", "0.49968493", "0.49736285", "0.49447903", "0.49431735", "0.49357885", "0.49135384", "0.4911763", "0.49107817", "0.48755494", "0.48745805", "0.4872202", "0.4871929" ]
0.6229548
0
For getting the signing link to a document.
public function signingLink ($document) { $url = $this->apiBaseURL . "link/"; $header = array("Accept: application/json", "Authorization: Bearer ".$this->clientToken); $parameters = json_encode(array("document_id"=>$document)); return self::makeCurlRequest ($url, $header, $parameters, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getDocLink()\n {\n return $this->docLink;\n }", "public function link(Document $document);", "public function getDocumentUrl()\n {\n return 'fattura/show?id='.$this->document->getId();\n }", "public function linkdocument()\n {\n $return = array('error' => _t('UploadField.FIELDNOTSET', 'Could not add document to page'));\n $documentSet = $this->getCurrentDocumentSet();\n if (!empty($documentSet)) {\n $document = DMSDocument::get()->byId($this->getRequest()->getVar('documentID'));\n $documentSet->Documents()->add($document);\n\n $buttonText = '<button class=\"ss-uploadfield-item-edit ss-ui-button ui-corner-all\"'\n . ' title=\"' . _t('DMSDocument.EDITDOCUMENT', 'Edit this document') . '\" data-icon=\"pencil\">'\n . _t('DMSDocument.EDIT', 'Edit') . '<span class=\"toggle-details\">'\n . '<span class=\"toggle-details-icon\"></span></span></button>';\n\n // Collect all output data.\n $return = array(\n 'id' => $document->ID,\n 'name' => $document->getTitle(),\n 'thumbnail_url' => $document->Icon($document->getExtension()),\n 'edit_url' => $this->getEditForm()->Fields()->fieldByName('Main.From your computer.AssetUploadField')\n ->getItemHandler($document->ID)->EditLink(),\n 'size' => $document->getFileSizeFormatted(),\n 'buttons' => $buttonText,\n 'showeditform' => true\n );\n }\n\n return Convert::raw2json($return);\n }", "public function getLink();", "public function getLink(){\n return $this->manager()->autoformLink($this->getPack(),$this->getTag());\n }", "public function get_doc_url(\\core_search\\document $doc) {\n global $USER;\n\n // The post is already in static cache, we fetch it in self::search_access.\n $entry = $this->get_entry($doc->get('itemid'));\n $contextmodule = \\context::instance_by_id($doc->get('contextid'));\n\n if ($entry->approved == false && $entry->userid != $USER->id) {\n // The URL should change when the entry is not approved and it was not created by the user.\n $docparams = array('id' => $contextmodule->instanceid, 'mode' => 'approval');\n } else {\n $docparams = array('id' => $contextmodule->instanceid, 'mode' => 'entry', 'hook' => $doc->get('itemid'));\n\n }\n return new \\moodle_url('/mod/glossary/view.php', $docparams);\n }", "public function downloadDocumentLink ($document) {\n\t\t// POST /document/<id>/download/link\n\t\t$url = $this->apiBaseURL . \"document/\".$document.\"/download/link\";\n\t\t$header = array(\"Accept: application/json\", \"Authorization: Bearer \".$this->clientToken);\n\t\treturn self::makeCurlRequest ($url, $header, \"\", true);\n\t}", "public function getScopeDocsUrl();", "private function getRelatedDocNoLink($relatedDocNo) {\n\t\t$pdfDocument = tx_ptgsapdfdocs_documentAccessor::getInstance()->selectDocumentsByRelatedErpDocNo($relatedDocNo);\n\t\ttrace($pdfDocument[0],0,'pdfDocument');\n\t\tif ($pdfDocument[0]['file']) {\n\t\t\t$pdf['url'] = tx_ptgsapdfdocs_div::urlToInvoice($relatedDocNo);\n\t\t} else {\n\t\t\t$pdf['url'] = '';\n\t\t}\n\t\tif ($pdfDocument[0]['signed']) {\n\t\t\t$pdf['signed'] = true;\n\t\t}\n\t\t#echo 'pdf'; var_dump($pdf); echo '<br>';\n\t\treturn $pdf;\n\t}", "public function getGMailLink () {\n\t \t$link = 'https://www.google.com/accounts/AuthSubRequest?scope='.$this->GMailScope;\n \t\t$link .= '&session=1&secure=0&next='.urlencode($this->returnURL);\n \treturn $link;\n \t}", "public function get_url() {\n\t\tif ( empty( $this->filename ) ) {\n\t\t\treturn '';\n\t\t}\n\n\t\t$url = add_query_arg( $this->get_url_args(), site_url( 'index.php' ) );\n\t\t$filter = array( 'gform_signature_url', $this->form_id, $this->field_id );\n\n\t\tif ( function_exists( 'gf_has_filters' ) && gf_has_filters( $filter ) ) {\n\t\t\t$this->addon->log_debug( __METHOD__ . '(): Executing functions hooked to gform_signature_url.' );\n\t\t}\n\n\t\t/**\n\t\t * Allows the signature URL to be overridden.\n\t\t *\n\t\t * @since 4.0\n\t\t *\n\t\t * @param string $url The signature URL.\n\t\t * @param string $filename The signature filename excluding extension.\n\t\t * @param int $form_id The ID of the form used to create the signature.\n\t\t * @param int $field_id The ID of the field used to create the signature.\n\t\t */\n\t\treturn gf_apply_filters( $filter, $url, $this->filename, $this->form_id, $this->field_id );\n\t}", "public function get_doc_url(\\core_search\\document $doc) {\n $entry = $this->get_entry($doc->get('itemid'));\n return new \\moodle_url('/mod/data/view.php', array( 'd' => $entry->dataid, 'rid' => $entry->id ));\n }", "public function getSignedUrl($params)\r\n\t{\r\n\t\t$signature=$this->generateSignature($params);\r\n\r\n\t\treturn $signedUrl= \"http://\".$signature['host'].$signature['uri'].'?'.$signature['queryUrl'].'&Signature='.$signature['string'];\r\n\t}", "private function get_publisher_url() {\n\t\tif ( $this->context->site_represents === 'person' ) {\n\t\t\treturn $this->context->site_url . Schema_IDs::PERSON_HASH;\n\t\t}\n\n\t\treturn $this->context->site_url . Schema_IDs::ORGANIZATION_HASH;\n\t}", "public function getLink() {\n return $this->get('link')[0];\n }", "public function link(): string {\n return telegram::fileLink($this->file_id);\n }", "public function linkToDocumentAdmin (Document $document) : string\n\t{\n\t\treturn sprintf(\n\t\t\t\"https://{$this->repository}.prismic.io/documents~b=working&c=published&l=%s/%s/\",\n\t\t\t$document->getAttributes()->getLanguage(),\n\t\t\t$document->getId(),\n\t\t);\n\t}", "public function getDocumentationLink()\n\t{\n\t\treturn $this->language->getInformation('documentation');\n\t}", "public function getLink() {\n return $this->get(self::LINK);\n }", "public function link() {\n\t\treturn $this->bookmark->link_url;\n\t}", "public function getOfficialLink();", "public function getURLsafe()\n {\n return $this->getLink();\n }", "public function document_path()\n {\n if ($this->documents->count() > 0) {\n return $this->documents()->first()->path;\n } else {\n return '';\n }\n }", "public function getLink()\n {\n return $this->link;\n }", "public function getLink()\n {\n return $this->link;\n }", "public function getLink()\n {\n return $this->link;\n }", "public function getLink()\n {\n return $this->link;\n }", "public function getLink()\n {\n return $this->link;\n }", "public function getLink()\n {\n return $this->link;\n }" ]
[ "0.7025786", "0.6631284", "0.6624836", "0.62844944", "0.62358475", "0.6081104", "0.6038276", "0.5954972", "0.5952413", "0.5931078", "0.5904658", "0.5889105", "0.5856603", "0.57959235", "0.57915664", "0.57893455", "0.5723649", "0.5698275", "0.5697665", "0.5697529", "0.5695799", "0.5678424", "0.56704205", "0.56564397", "0.5652532", "0.5652532", "0.5652532", "0.5652532", "0.5652532", "0.5652532" ]
0.7910277
0
Update Signer account with user first name and turn off reusable signatures
public function updateSignerAccount ($firstName, $lastName) { $signerToken = $this->signerAccountAccessToken(); $url = $this->apiBaseURL . "user"; $header = array("Accept: application/json", "Authorization: Bearer ".$signerToken); $parameters = json_encode(array("first_name"=>$firstName,"last_name"=>$lastName)); $response = self::makeCurlRequest ($url, $header, $parameters, false, true); $url = $this->apiBaseURL . "user/setting/no_user_signature_return"; $header = array("Accept: application/json", "Authorization: Bearer ".$signerToken); $parameters = json_encode(array("active"=>1)); $response = self::makeCurlRequest ($url, $header, $parameters, false, true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function updateUserFirstName() {\n $firstName = $_POST['firstName'];\n if ($GLOBALS['config']['usel']['fname'][$_SESSION['auth']['accesslevel']]) {\n return $this->M_Users->updateUserFirstName($this->UserID, $firstName);\n } else {\n return \"insufficent permissions.\";\n }\n }", "private function updateName(string $key): void\n {\n if (false === in_array($key, ['first_name', 'last_name'])) {\n return;\n }\n\n $fullName = ucwords($this->first_name) . ' ' . ucwords($this->last_name);\n\n wp_update_user([\n 'ID' => $this->ID,\n 'user_nicename' => $fullName,\n 'display_name' => $fullName,\n 'first_name' => ucwords($this->first_name),\n 'last_name' => ucwords($this->last_name),\n ]);\n }", "function pmproan2c_update_first_and_last_name_after_checkout($user_id)\n{\nif(!empty($_REQUEST['first_name']))\n$first_name = $_REQUEST['first_name'];\nelseif(!empty($_SESSION['first_name']))\n$first_name = $_SESSION['first_name'];\nelse\n$first_name = \"\";\nif(!empty($_REQUEST['last_name']))\n$last_name = $_REQUEST['last_name'];\nelseif(!empty($_SESSION['last_name']))\n$last_name = $_SESSION['last_name'];\nelse\n$last_name = \"\";\nupdate_user_meta($user_id, \"first_name\", $first_name);\nupdate_user_meta($user_id, \"last_name\", $last_name);\n}", "function on_signature_update($member=array(), $new_sig=\"\")\n\t{\n\t\tglobal $DB, $std, $ibforums;\n\t\t\n\t\t//---- START\n\t\t\n\t\t\n\t\t//---- END\n\t}", "public function markSignedIn();", "private function updateFormSignature()\n {\n /** @var \\Common\\Service\\Helper\\FormHelperService $formHelper */\n $formHelper = $this->getServiceLocator()->get('Helper\\Form');\n // if form signed, then display signature details\n if (!empty($this->continuationDetailData['signature']['name'])\n && !empty($this->continuationDetailData['signature']['date'])\n && $this->continuationDetailData['signatureType']['id'] === RefData::SIGNATURE_TYPE_DIGITAL_SIGNATURE\n ) {\n $signedBy = $this->continuationDetailData['signature']['name'];\n $signedDate = new \\DateTime($this->continuationDetailData['signature']['date']);\n\n // Update the form HTML with details name of person who signed\n /** @var \\Common\\Service\\Helper\\TranslationHelperService $translator */\n $translator = $this->getServiceLocator()->get('Helper\\Translation');\n $this->form->get('signatureDetails')->get('signature')->setValue(\n $translator->translateReplace('undertakings_signed', [$signedBy, $signedDate->format(\\DATE_FORMAT)])\n );\n $formHelper->remove($this->form, 'form-actions->sign');\n $formHelper->remove($this->form, 'content');\n } else {\n $formHelper->remove($this->form, 'signatureDetails');\n if ($this->continuationDetailData['disableSignatures'] === false) {\n $this->getServiceLocator()->get('Script')->loadFiles(['continuation-declaration']);\n }\n }\n }", "function updateUserFirstName() {\n $id = $_POST['id'];\n $firstName = $_POST['firstName'];\n $rank = $this->M_Users->getUserRank($id);\n if ($GLOBALS['config']['uel'][$rank][$_SESSION['auth']['accesslevel']]) {\n return $this->M_Users->updateUserFirstName($id, $firstName);\n } else {\n return 'Insuficent permisions to perform action.';\n }\n }", "private function _setSignature() {\n // A new linefeed is necessary between your AccessID and Expires\n $string_to_sign = $this->_accessID.\"\\n\".$this->_expires;\n \n // Get the \"raw\" or binary output of the hmac hash\n $binary_signature = hash_hmac('sha1', $string_to_sign, $this->_secretKey, true);\n \n // We need to base64-encode it and then url-encode that\n $url_safe_signature = urlencode(base64_encode($binary_signature));\n \n // Set the authenticated signature\n $this->_signature = $url_safe_signature;\n }", "public function setFirstName($value)\n {\n Yii::trace('setFirstName()', 'application.components.RinkfinderWebUser');\n\t$this->setState('__firstName', $value);\n }", "public function checkSignedIn() {\n\t if (!empty($this->user) && $this->user !== 'anon.') {\n\t $this->addAlias($this->getIdentifier(), $this->user);\n\t }\n\t}", "private function signature(){\n $this->params['api_sig'] = StileroFlickrSignature::getSignature($this->params, $this->Api);\n }", "function signature($user){\n $short = substr(hash('sha256', (encrypt($user->name))), 12);\n return str_limit($short, 24 , '');\n}", "function inspiry_update_profile() {\n\n\t\t// Get user info\n\t\t$current_user = wp_get_current_user();\n\n\t\t// Array for errors\n\t\t$errors = array();\n\n\t\tif ( wp_verify_nonce( $_POST[ 'user_profile_nonce' ], 'update_user' ) ) {\n\n\t\t\t// profile-image-id\n\t\t\t// Update profile image\n\t\t\tif ( ! empty( $_POST[ 'profile-image-id' ] ) ) {\n\t\t\t\t$profile_image_id = intval( $_POST[ 'profile-image-id' ] );\n\t\t\t\tupdate_user_meta( $current_user->ID, 'profile_image_id', $profile_image_id );\n\t\t\t} else {\n\t\t\t\tdelete_user_meta( $current_user->ID, 'profile_image_id' );\n\t\t\t}\n\n\t\t\t// Update first name\n\t\t\tif ( ! empty( $_POST[ 'first-name' ] ) ) {\n\t\t\t\t$user_first_name = sanitize_text_field( $_POST[ 'first-name' ] );\n\t\t\t\tupdate_user_meta( $current_user->ID, 'first_name', $user_first_name );\n\t\t\t} else {\n\t\t\t\tdelete_user_meta( $current_user->ID, 'first_name' );\n\t\t\t}\n\n\t\t\t// Update last name\n\t\t\tif ( ! empty( $_POST[ 'last-name' ] ) ) {\n\t\t\t\t$user_last_name = sanitize_text_field( $_POST[ 'last-name' ] );\n\t\t\t\tupdate_user_meta( $current_user->ID, 'last_name', $user_last_name );\n\t\t\t} else {\n\t\t\t\tdelete_user_meta( $current_user->ID, 'last_name' );\n\t\t\t}\n\n\t\t\t// Update display name\n\t\t\tif ( ! empty( $_POST[ 'display-name' ] ) ) {\n\t\t\t\t$user_display_name = sanitize_text_field( $_POST[ 'display-name' ] );\n\t\t\t\t$return = wp_update_user( array(\n\t\t\t\t\t'ID' => $current_user->ID,\n\t\t\t\t\t'display_name' => $user_display_name\n\t\t\t\t) );\n\t\t\t\tif ( is_wp_error( $return ) ) {\n\t\t\t\t\t$errors[] = $return->get_error_message();\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// Update user email\n\t\t\tif ( ! empty( $_POST[ 'email' ] ) ) {\n\t\t\t\t$user_email = is_email( sanitize_email( $_POST[ 'email' ] ) );\n\t\t\t\tif ( ! $user_email )\n\t\t\t\t\t$errors[] = __( 'The Email you entered is not valid. Please try again.', 'framework' );\n\t\t\t\telse {\n\t\t\t\t\t$email_exists = email_exists( $user_email ); // email_exists returns a user id if a user exists against it\n\t\t\t\t\tif ( $email_exists ) {\n\t\t\t\t\t\tif ( $email_exists != $current_user->ID ) {\n\t\t\t\t\t\t\t$errors[] = __( 'This Email is already used by another user. Please try a different one.', 'framework' );\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// no need to update the email as it is already current user's\n\t\t\t\t\t\t}\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$return = wp_update_user( array( 'ID' => $current_user->ID, 'user_email' => $user_email ) );\n\t\t\t\t\t\tif ( is_wp_error( $return ) ) {\n\t\t\t\t\t\t\t$errors[] = $return->get_error_message();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// update user description\n\t\t\tif ( ! empty( $_POST[ 'description' ] ) ) {\n\t\t\t\t$user_description = sanitize_text_field( $_POST[ 'description' ] );\n\t\t\t\tupdate_user_meta( $current_user->ID, 'description', $user_description );\n\t\t\t} else {\n\t\t\t\tdelete_user_meta( $current_user->ID, 'description' );\n\t\t\t}\n\n\t\t\t// Update mobile number\n\t\t\tif ( ! empty( $_POST[ 'mobile-number' ] ) ) {\n\t\t\t\t$user_mobile_number = sanitize_text_field( $_POST[ 'mobile-number' ] );\n\t\t\t\tupdate_user_meta( $current_user->ID, 'mobile_number', $user_mobile_number );\n\t\t\t} else {\n\t\t\t\tdelete_user_meta( $current_user->ID, 'mobile_number' );\n\t\t\t}\n\n\t\t\t// Update office number\n\t\t\tif ( ! empty( $_POST[ 'office-number' ] ) ) {\n\t\t\t\t$user_office_number = sanitize_text_field( $_POST[ 'office-number' ] );\n\t\t\t\tupdate_user_meta( $current_user->ID, 'office_number', $user_office_number );\n\t\t\t} else {\n\t\t\t\tdelete_user_meta( $current_user->ID, 'office_number' );\n\t\t\t}\n\n\t\t\t// Update fax number\n\t\t\tif ( ! empty( $_POST[ 'fax-number' ] ) ) {\n\t\t\t\t$user_fax_number = sanitize_text_field( $_POST[ 'fax-number' ] );\n\t\t\t\tupdate_user_meta( $current_user->ID, 'fax_number', $user_fax_number );\n\t\t\t} else {\n\t\t\t\tdelete_user_meta( $current_user->ID, 'fax_number' );\n\t\t\t}\n\n\t\t\t// Update facebook url\n\t\t\tif ( ! empty( $_POST[ 'facebook-url' ] ) ) {\n\t\t\t\t$facebook_url = sanitize_text_field( $_POST[ 'facebook-url' ] );\n\t\t\t\tupdate_user_meta( $current_user->ID, 'facebook_url', $facebook_url );\n\t\t\t} else {\n\t\t\t\tdelete_user_meta( $current_user->ID, 'facebook_url' );\n\t\t\t}\n\n\t\t\t// Update twitter url\n\t\t\tif ( ! empty( $_POST[ 'twitter-url' ] ) ) {\n\t\t\t\t$twitter_url = sanitize_text_field( $_POST[ 'twitter-url' ] );\n\t\t\t\tupdate_user_meta( $current_user->ID, 'twitter_url', $twitter_url );\n\t\t\t} else {\n\t\t\t\tdelete_user_meta( $current_user->ID, 'twitter_url' );\n\t\t\t}\n\n\t\t\t// Update google plus url\n\t\t\tif ( ! empty( $_POST[ 'google-plus-url' ] ) ) {\n\t\t\t\t$google_plus_url = sanitize_text_field( $_POST[ 'google-plus-url' ] );\n\t\t\t\tupdate_user_meta( $current_user->ID, 'google_plus_url', $google_plus_url );\n\t\t\t} else {\n\t\t\t\tdelete_user_meta( $current_user->ID, 'google_plus_url' );\n\t\t\t}\n\n\t\t\t// Update linkedIn url\n\t\t\tif ( ! empty( $_POST[ 'linkedin-url' ] ) ) {\n\t\t\t\t$linkedin_url = sanitize_text_field( $_POST[ 'linkedin-url' ] );\n\t\t\t\tupdate_user_meta( $current_user->ID, 'linkedin_url', $linkedin_url );\n\t\t\t} else {\n\t\t\t\tdelete_user_meta( $current_user->ID, 'linkedin_url' );\n\t\t\t}\n\n\t\t\t// Update user password\n\t\t\tif ( ! empty( $_POST[ 'pass1' ] ) || ! empty( $_POST[ 'pass2' ] ) ) {\n\t\t\t\tif ( $_POST[ 'pass1' ] === $_POST[ 'pass2' ] ) {\n\t\t\t\t\t$return = wp_update_user( array(\n\t\t\t\t\t\t'ID' => $current_user->ID,\n\t\t\t\t\t\t'user_pass' => $_POST[ 'pass1' ]\n\t\t\t\t\t) );\n\t\t\t\t\tif ( is_wp_error( $return ) ) {\n\t\t\t\t\t\t$errors[] = $return->get_error_message();\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t$errors[] = __( 'The passwords you entered do not match. Your password was not updated.', 'framework' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// if everything is fine\n\t\t\tif ( count( $errors ) == 0 ) {\n\n\t\t\t\t//action hook for plugins and extra fields saving\n\t\t\t\tdo_action( 'edit_user_profile_update', $current_user->ID );\n\n\t\t\t\t$response = array(\n\t\t\t\t\t'success' => true,\n\t\t\t\t\t'message' => __( 'Profile information is updated successfully!', 'framework' ),\n\t\t\t\t);\n\t\t\t\techo json_encode( $response );\n\t\t\t\tdie;\n\t\t\t}\n\n\t\t} else {\n\t\t\t$errors[] = __( 'Security check failed!', 'framework' );\n\t\t}\n\n\t\t// in case of errors\n\t\t$response = array(\n\t\t\t'success' => false,\n\t\t\t'errors' => $errors\n\t\t);\n\t\techo json_encode( $response );\n\t\tdie;\n\n\t}", "function hook_username_alter(&$name, $account) {\n // Display the user's uid instead of name.\n if (isset($account->uid)) {\n $name = t('User !uid', array('!uid' => $account->uid));\n }\n}", "public function updateSignature(Request $request) {\n $user = $request->get('auth');\n $signature = $request->input('signature');\n\n $userData = UserHelper::getUserDataOrCreate($user->userId);\n $userData->signature = $signature;\n $userData->save();\n\n Logger::user($user->userId, $request->ip(), LogType::UPDATED_SIGNATURE);\n return response()->json(\n [\n 'signature' => $signature,\n 'parsedSignature' => $userData->getParsedSignature()\n ]\n );\n }", "function updateUser() {\n\t}", "public function setSender($name)\n {\n $this->user = $name;\n }", "public function setFirstName(string $firstName): void\n {\n $this->firstName = $firstName;\n }", "function shurly_integration_user_settings_form_submit($form, &$form_state) {\n $values = $form_state['values'];\n $account = array(\n 'uid' => $values['account_uid'],\n 'api_key' => $values['oxf_am_api_key'],\n );\n if (!empty($values['account_delete'])) {\n shurly_integration_oxfam_account_delete($account);\n drupal_set_message('Oxf.am account API key deleted successfully.');\n }\n else {\n shurly_integration_oxfam_account_set($account);\n drupal_set_message('Oxf.am account API key saved successfully.');\n }\n}", "function user_metadata( $user_id ){\n\n if( !empty( $_POST['firname'] ) && !empty( $_POST['lasname'] ) ){\n \n update_user_meta( $user_id, 'role', 'customer' );\n\n update_user_meta( $user_id, 'first_name', sanitize_text_field($_POST['firname']) );\n update_user_meta( $user_id, 'billing_first_name', sanitize_text_field($_POST['firname']) );\n \n update_user_meta( $user_id, 'last_name', sanitize_text_field($_POST['lasname']) );\n update_user_meta( $user_id, 'billing_last_name', sanitize_text_field($_POST['lasname']) );\n\n update_user_meta( $user_id, 'license_number', sanitize_text_field($_POST['licenseNumber']) );\n\n update_user_meta( $user_id, 'phone', sanitize_text_field($_POST['phone']) );\n update_user_meta( $user_id, 'phone', billing_phone($_POST['phone']) );\n\n update_user_meta( $user_id, 'office_name', sanitize_text_field($_POST['office_name']) );\n\n update_user_meta( $user_id, 'district', sanitize_text_field($_POST['district']) );\n\n update_user_meta( $user_id, 'expertise', sanitize_text_field($_POST['expertise']) );\n\n update_user_meta( $user_id, 'show_admin_bar_front', false );\n \n }\n \n\n}", "function set_person_name()\n\t\t\t\t{\n\t\t\t\t\t$this->first_name = 'Jaddian';\n\t\t\t\t\t$this->last_name = 'Forte';\n\t\t\t\t}", "public function setOnPremisesSamAccountName(?string $value): void {\n $this->getBackingStore()->set('onPremisesSamAccountName', $value);\n }", "function setFirstname($firstname);", "public function markTwoFactorVerified();", "function cloudcheck_global_verification() {\r\n \r\n if($_POST['user_id']) {\r\n $user = get_user_by('email', $_POST['user_id']);\r\n $user_id = $user->ID;\r\n } else {\r\n $user_id = get_current_user_id();\r\n }\r\n $value = 'verified';\r\n// $result = wp_update_user( [\r\n// 'ID' => $user_id,\r\n// 'is_verified' => $value\r\n// ] );\r\n\r\n $result = update_user_meta( $user_id, 'is_verified', $value );\r\n\r\n if ( ! $result ) {\r\n echo 'An error has occurred, perhaps such a user does not exist.';\r\n }\r\n else {\r\n echo 'Verification completed successfully.';\r\n }\r\n}", "public function p_plowersignup() {\n\n $q = \"SELECT email\n FROM users \n WHERE email = '\" . $_POST['email'] . \"'\";\n\n $email_dupe = DB::instance(DB_NAME)->select_field($q);\n \n #If it does produce an error \n\n if($email_dupe){\n \n Router::redirect('/users/plowersignup/email_dupe');\n \n } \n\n #Otherwise proceed with sign up\n \n else {\n\n # Encrypt the password \n $_POST['password'] = sha1(PASSWORD_SALT.$_POST['password']); \n\n # Create an encrypted token via their email address and a random string\n $_POST['token'] = sha1(TOKEN_SALT.$_POST['email'].Utils::generate_random_string()); \n\n # Insert this user into the database\n $user = DB::instance(DB_NAME)->insert('users', $_POST);\n\n Router::redirect(\"/users/login/\");\n }\n }", "function update_vendor_f( $entry, $form) {\n global $wpdb;\n\n $current_user = wp_get_current_user();\n $username = $current_user->user_login;\n\n $data;\n $field_type;\n add_contact_only($entry, $form, $data, $field_type);\n add_vendor_specific_info($entry, $form, $data, $field_type);\n\n $wpdb->update(\n 'vendor_info',\n $data,\n array('contact_email' => \"$username\"),\n $field_type\n );\n $wpdb->insert('logs', array('user_type' => 'vendor', 'log_type' => 'Update Vendor Profile', 'log_entry' => \"Vendor $username updated profile\")); //log the event\n}", "public function recalculatePersonalCode()\n {\n $personal_code = md5( implode( \"-\", array( $this->name, $this->surname, \n $this->email, $this->address, $this->country, $this->city ) ) );\n $this->set( \"personal_code\", $personal_code );\n }", "public function setFirstName(String $firstName): void\n {\n $this->firstName = $firstName;\n }", "protected function setFirstName($first_name) {\r\n $this->first_name = $first_name;\r\n }" ]
[ "0.57574105", "0.56713986", "0.5613354", "0.557651", "0.54028", "0.5322713", "0.53183466", "0.52796584", "0.523381", "0.52118134", "0.5203047", "0.51707506", "0.51248574", "0.5105771", "0.5089663", "0.5074322", "0.50527567", "0.50306636", "0.49985388", "0.49876067", "0.49846286", "0.49627313", "0.4958553", "0.49578348", "0.4954411", "0.49459296", "0.49411476", "0.4935054", "0.492442", "0.49179134" ]
0.6801073
0
Generate link to download a document.
public function downloadDocumentLink ($document) { // POST /document/<id>/download/link $url = $this->apiBaseURL . "document/".$document."/download/link"; $header = array("Accept: application/json", "Authorization: Bearer ".$this->clientToken); return self::makeCurlRequest ($url, $header, "", true); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function DownloadLink()\n\t{\n\t\t// get the base URL, prepend with the external content \n\t\t// controller /download action and add this object's id\n\t\treturn ExternalContentPage_Controller::URL_STUB.'/download/'.$this->ID;\n\t}", "function getDownloadUrlForObjectId($id) {\n\treturn PATH_URL . \"download/document/\" . $id;\n}", "public function actionDownload($id)\n {\n $this->layout='main';\n $data = OmDocuments::findOne($id);\n header('Content-Type:'.pathinfo($data->doc_link, PATHINFO_EXTENSION));\n header('Content-Disposition: attachment; filename='.$data->doc_link);\n return readfile($data->doc_link);\n }", "public function link(Document $document);", "public function actionDownloadDoc($id){\n\n $model = Doc::findOne($id);\n $file = Yii::getAlias('@webroot').'/docs/'.$model->idClient.'/'.$model->docName;\n if(file_exists($file)){\n return Yii::$app->response->sendFile($file);\n\n }\n \n }", "public function getDownloadLink()\n {\n return $this->download_link;\n }", "public function getDocLink()\n {\n return $this->docLink;\n }", "public function getDownloadFileURL()\n\t{\n\t\tif ('I' == $this->get('filelocationtype')) {\n\t\t\t$fileDetails = $this->getFileDetails();\n\n\t\t\treturn 'file.php?module=' . $this->getModuleName() . '&action=DownloadFile&record=' . $this->getId() . '&fileid=' . $fileDetails['attachmentsid'];\n\t\t}\n\t\treturn $this->get('filename');\n\t}", "public function getDocumentUrl()\n {\n return 'fattura/show?id='.$this->document->getId();\n }", "function projectdocumentDownload()\r\n\t {\r\n\t\t$file = $_GET['fileName'];//print_r($file);die;\r\n\t\t$filePath= 'tenderFile/'.$file;\r\n\t\theader(\"Content-Disposition: attachment;filename=$file\");\r\n\t\treadfile($filePath);\r\n\t\t\t \r\n\t }", "function getDownloadUrl($force_download = false) {\n $last_revision = $this->getLastRevision();\n return instance_of($last_revision, 'Attachment') ? $last_revision->getViewUrl(null, $force_download) : '';\n }", "function plugin_download_link() {\n\t\t$this->response['download_link'] = site_url( '/wp-content/shopp-uploads/adsanity.zip' );\n\t}", "public function getDownloadLinkAttribute()\n {\n return route('farmer.download', [\n 'farmer' => $this->farmer->eth_address,\n 'file' => $this->sha512,\n ],false);\n\n }", "public function download(){\r\n\t\tdownload($this->arquivo_nome);\r\n\t}", "public function getDownloadLinkAttribute()\n {\n if ($this->url) {\n return $this->url;\n } else if ($this->file) {\n return $this->file_link;\n }\n\n return '';\n }", "function getItemLink($force_download = true) {\n\t\t\treturn \"/assets/files/\".$this->file_name;\n\t\t}", "protected function buildURL()\n {\n $version = $this->argument('version');\n if ($version === 'latest') {\n return 'http://modx.com/download/latest';\n }\n $file = $this->buildFileName();\n\n return \"http://modx.com/download/direct/{$file}\";\n }", "public function link(): string {\n return telegram::fileLink($this->file_id);\n }", "public function getDownloadURL() {\n\t\tif (!$this->guid) {\n\t\t\treturn false;\n\t\t}\n\n\t\treturn \"/releases/download/{$this->getVersion()}\";\n\t}", "function createDownloadLink($element, $entry_id, $fileName, $displayName) {\n $ele_value = $element->getVar('ele_value');\n if($ele_value[2]) {\n return \"<a href='\".XOOPS_URL.\"/uploads/formulize_\".$element->getVar('id_form').\"_\".$entry_id.\"_\".$element->getVar('ele_id').\"/$fileName' target='_blank'>\".htmlspecialchars(strip_tags($displayName),ENT_QUOTES).\"</a>\"; \n } else {\n return \"<a href='\".XOOPS_URL.\"/modules/formulize/download.php?element=\".$element->getVar('ele_id').\"&entry_id=$entry_id'>\".htmlspecialchars(strip_tags($displayName),ENT_QUOTES).\"</a>\";\n }\n }", "public function downloadFile($isAdmin = false)\n {\n // Gets the data passed through the url query.\n $jinput = JFactory::getApplication()->input;\n // The document id.\n $id = $jinput->get('id', 0, 'uint');\n // The version number of the file archive to download.\n $version = $jinput->get('version', 0, 'uint');\n // Gets the user's access view.\n $user = JFactory::getUser();\n // Gets a possible email variable.\n $email = $jinput->get('email', '', 'string');\n\n if($version && !$isAdmin) {\n // Cannot download a previous version of the current file from the front-end. \n echo '<div class=\"alert alert-no-items\">'.JText::_('COM_OKEYDOC_DOWNLOAD_UNAUTHORISED').'</div>';\n return;\n }\n\n if((int)$id) {\n // Retrieves some data from the document. \n $db = JFactory::getDbo();\n $query = $db->getQuery(true);\n\n // Sets the query according to the type of file to download.\n\n if($version) { // A previous version of the current file.\n\t$query->select('a.file_path,a.file_name,a.file_type,a.file_size,a.archived,'.\n\t 'd.title,d.access,d.published,d.publish_up,d.publish_down')\n\t ->from('#__okeydoc_archive AS a')\n\t ->join('LEFT', '#__okeydoc_document AS d ON d.id=a.doc_id')\n\t ->where('a.doc_id='.(int)$id)\n\t ->where('a.version='.$version);\n }\n // The current file.\n else { \n\t$query->select('published,publish_up,publish_down,access,title,email_required,'.\n\t 'file_path,file_name,file_type,file_size,file_location')\n\t ->from('#__okeydoc_document')\n\t ->where('id='.(int)$id);\n }\n\n $db->setQuery($query);\n $document = $db->loadObject();\n\n // Checks the publication and publication dates (start and stop) of the document.\n // N.B: Those checkings are not taken in account if the file is downloaded from \n // the admin part (back-end).\n\n // The document is unpublished.\n if(!$isAdmin && $document->published != 1) {\n\techo '<div class=\"alert alert-no-items\">'.JText::_('COM_OKEYDOC_DOCUMENT_UNAVAILABLE').'</div>';\n\treturn;\n }\n\n // Checks again the given email (in case JS checking has failed). \n if(!$isAdmin && $document->email_required && !filter_var($email, FILTER_VALIDATE_EMAIL)) {\n\techo '<div class=\"alert alert-no-items\">'.JText::_('COM_OKEYDOC_INVALID_EMAIL').'</div>';\n\treturn;\n }\n\n // Gets the current date and time (UTC).\n $now = JFactory::getDate()->toSql();\n\n // A date to stop publishing is set.\n if(!$isAdmin && $document->publish_down != '0000-00-00 00:00:00') {\n\t// Publication date has expired.\n\tif(strcmp($now, $document->publish_down) > 0) {\n\t echo '<div class=\"alert alert-no-items\">'.JText::_('COM_OKEYDOC_DOCUMENT_EXPIRED').'</div>';\n\t return;\n\t}\n }\n\n // A date to start publishing is set.\n if(!$isAdmin && $document->publish_up != '0000-00-00 00:00:00') {\n\tif(strcmp($now, $document->publish_up) < 0) {\n\t // Publication date doesn't have started yet.\n\t echo '<div class=\"alert alert-no-items\">'.JText::_('COM_OKEYDOC_DOCUMENT_NOT_PUBLISHED_YET').'</div>';\n\t return;\n\t}\n }\n\n // Check the permissions of the user for this document.\n\n $accessView = false;\n if(in_array($document->access, $user->getAuthorisedViewLevels())) {\n\t$accessView = true;\n }\n\n // The user has the required permission.\n if($accessView) {\n\tif($document->file_path) {\n\t if(!$version) {\n\t // Increment the download counter for this document.\n\t // N.B: Previous versions of the current file are not incremented.\n\t $query->clear();\n\t $query->update('#__okeydoc_document')\n\t\t ->set('downloads=downloads+1')\n\t\t ->where('id='.$id);\n\t $db->setQuery($query);\n\t $db->execute();\n\t }\n\n\t // Inserts the retrieved email. \n\t if(!$isAdmin && $document->email_required) {\n\t $query->clear();\n\t $query->insert('#__okeydoc_email')\n\t\t ->columns(array('doc_id', 'email', 'downloaded'))\n\t\t ->values($id.','.$db->Quote($email).','.$db->Quote($now));\n\t $db->setQuery($query);\n\t $db->execute();\n\t }\n\n\t if($document->file_location === 'url') {\n\t // Redirects with the url file.\n\t JFactory::getApplication()->redirect($document->file_path);\n\t return;\n\t }\n\n\t // Builds the path to the file.\n\t $download = JPATH_ROOT.'/'.$document->file_path.'/'.$document->file_name;\n\n\t if(file_exists($download) === false) {\n\t echo '<div class=\"alert alert-no-items\">'.JText::_('COM_OKEYDOC_FILE_NOT_FOUND').'</div>';\n\t return;\n\t }\n\n\t // Gets the file extension from the (real) file name.\n\t preg_match('#\\.([a-z0-9]{1,})$#', $document->file_name, $matches);\n\t $extension = $matches[1];\n\n\t // Builds the file name from the title.\n\t $documentName = JFilterOutput::stringURLSafe($document->title);\n\n\t if($version) {\n\t // Appends the version number to the file name.\n\t $documentName = $documentName.'-[version-'.$version.']';\n\t }\n\n\t $documentName = $documentName.'.'.$extension;\n\n\t header('Content-Description: File Transfer');\n\t header('Cache-Control: no-cache, must-revalidate'); // HTTP/1.1\n\t header('Expires: Sat, 26 Jul 1997 05:00:00 GMT'); // Date in the past\n\t header('Content-type: '.$document->file_type);\n\t header('Content-Transfer-Encoding: binary');\n\t header('Content-length: '.$document->file_size);\n\t header(\"Content-Disposition: attachment; filename=\\\"\".$documentName.\"\\\"\");\n\t ob_clean();\n\t flush();\n\t readfile($download);\n\n\t exit;\n\t} \n\telse { // The document url is empty.\n\t echo '<div class=\"alert alert-no-items\">'.JText::_('COM_OKEYDOC_WRONG_DOCUMENT_URL').'</div>';\n\t return;\n\t}\n }\n else { // The user doesn't have the required permission.\n\techo '<div class=\"alert alert-no-items\">'.JText::_('COM_OKEYDOC_DOWNLOAD_UNAUTHORISED').'</div>';\n\treturn;\n }\n }\n else { // The document id is unset.\n echo '<div class=\"alert alert-no-items\">'.JText::_('COM_OKEYDOC_DOCUMENT_DOES_NOT_EXIST').'</div>';\n }\n\n }", "public function downloadAction()\n {\n\n // if session expire\n if ( !isset($_SESSION['_token']) ) {\n header(\"HTTP/1.1 401 Unauthorized\");\n exit;\n }\n\n // its a Google Doc, we need use files.export\n\n // clean param\n $k = filter_var($_POST['key'], FILTER_SANITIZE_STRING);\n $m = filter_var($_POST['mime'], FILTER_SANITIZE_STRING);\n\n $this->logger->info(\"Download file ID: \" . $k);\n\n // create google client\n $cl = $this->CreateClient();\n $cl->setAccessToken($_SESSION['_token']);\n\n // perform action\n $drive = new Google_Service_Drive($cl);\n\n // get file name by ID\n $filename = $drive->files->get($k, ['fields' => 'name'])->getName();\n\n // get all posible export format for this document\n $eformat = $drive->about->get(['fields' => 'exportFormats'])->getExportFormats();\n\n $eformat = $eformat[$m];\n\n // now need to decide which export format use\n // 'application/zip', 'application/pdf', 'image/jpeg'\n $eformat = array_intersect($this->preferedformats, $eformat);\n\n // in case if there are several possible format we choose first, i.e. $eformat[0]\n\n $response = $drive->files->export($k, $eformat[0], array(\n 'alt' => 'media'));\n\n //add filename extension\n $filename .= \".\" . explode('/', $eformat[0])[1];\n\n $content = $response->getBody()->getContents();\n\n header('Content-Description: File Transfer');\n header('Content-Type: application/octet-stream');\n header('Content-Disposition: attachment;filename=\"' . $filename . '\"');\n header('Expires: 0');\n header('Cache-Control: must-revalidate');\n header('Pragma: public');\n header('Content-Length: ' . strlen($content));\n\n // lets download\n exit($content);\n\n\n }", "function und_file_link($variables) {\n $file = $variables['file'];\n\n $url = file_create_url($file->uri);\n\n $options = array(\n 'attributes' => array(\n 'type' => $file->filemime . '; length=' . $file->filesize,\n ),\n );\n\n if (empty($file->description)) {\n $link_text = $file->filename;\n } else {\n $link_text = $file->description;\n $options['attributes']['title'] = check_plain($file->filename);\n }\n}", "public function downloadAction(): Response\n {\n $paginator = $this->getPaginatorForDownload($this->getReferrerAction());\n\n $data = $this->prepareDataToDownload($paginator->getCurrentPageResults());\n\n return $this->renderDownloadResponse($data);\n }", "public function get_link_download($design_id) {\n\t\t$url_tool = $this->get_url_tool_design();\n\t\t$param = '';\n\t\tif($design_id) {\n\t\t\t$param .= 'rest/design-download?id='.$design_id.'&zip=1&format=pdf';\n\t\t} else {\n\t\t\t$param = '#';\n\t\t}\n\t\tif(substr($url_tool, -1) == '/') {\n\t\t\t$url_tool .= $param;\n\t\t} else {\n\t\t\t$url_tool .= '/'.$param;\n\t\t}\n\t\treturn $url_tool;\n\t}", "public function downloadDocumentJoiningApplicationForLlcAction(): Response\n {\n return $this->redirect(\n $this->getAbsUrl(Organization::getTemplateUrl('zayavlenie_o_prisoedinenii_dlya_ooo'))\n );\n }", "public function download($file_url){\n }", "public function download($filename)\n\t{\n\t\t$doc = Document::find(Input::get('documentid'));\n\t\t$path = $doc -> absdir() . '/' . $filename;\n\n\t\t// get mime type of the file\n\t\t$finfo = finfo_open(FILEINFO_MIME_TYPE);\n\t\t$mime = finfo_file($finfo, $path);\n\t\tfinfo_close($finfo);\n\n\t\t// get file size \n\t\t$size = filesize($path);\n\n\t\t// write headers\n\t\theader('Content-type: ' . $mime);\n\t\theader('Content-length: ' . $size);\n\t\theader('Content-disposition: filename=\"'.$filename.'\"');\n\n\t\t// write file\n\t\treadfile($path);\n\t}", "public function getDownloadUrl() : string\n {\n // Get the URL and run a replacement with the auth values\n return static::replace($this->auth, $this->config['url']);\n }", "public function getURL()\n {\n return Yii::app()->params->relative_document_dir . $this->file_name;\n }" ]
[ "0.7223669", "0.6788392", "0.66781807", "0.65934926", "0.65622216", "0.6485757", "0.6437041", "0.63652796", "0.63614976", "0.63201404", "0.631686", "0.63059664", "0.62973315", "0.62026316", "0.6200427", "0.61534", "0.6146503", "0.6140791", "0.6129672", "0.61226326", "0.61097604", "0.60975474", "0.6086012", "0.6040111", "0.6032207", "0.60155684", "0.6007668", "0.6007031", "0.5986157", "0.5981074" ]
0.72289383
0
sending email to the admin and seller for auction cancel notification
public function send_auction_cancel_notification_admin_seller($product_id,$seller_id,$won_amt) { //load email library $this->load->library('email'); //configure mail $config['charset'] = 'utf-8'; $config['wordwrap'] = TRUE; $config['mailtype'] = 'html'; $config['protocol'] = 'sendmail'; $this->email->initialize($config); $this->load->model('email_model'); //dnt get confused with the function name this functin is used for getting user info $seller_info = $this->get_winner_info($seller_id); $seller_email = $seller_info->email; $lang_id = $seller_info->lang_id; //Get auction info $auction_info = $this->get_auction_byproductid($product_id); $product_name = $auction_info->name; //sending email to seller $template=$this->email_model->get_email_template("auction_cancel_notification_seller",$lang_id); $subject=$template['subject']; $emailbody=$template['email_body']; //parse email $parseElement=array("USERNAME"=>$seller_info->user_name, "SITENAME"=>WEBSITE_NAME, "PRODUCT_NAME"=>$product_name, "AMOUNT"=>$won_amt, "DATE"=>$this->general->get_local_time('time')); $subject=$this->email_model->parse_email($parseElement,$subject); $emailbody=$this->email_model->parse_email($parseElement,$emailbody); //echo $emailbody; $this->email->clear(); $this->email->from(CONTACT_EMAIL); $this->email->to($seller_email); $this->email->subject($subject); $this->email->message($emailbody); $this->email->send(); //sending email to admin $template=$this->email_model->get_email_template("auction_cancel_notification_admin",LANG_ID); $subject=$template['subject']; $emailbody=$template['email_body']; //parse email $parseElement=array("SITENAME"=>WEBSITE_NAME, "PRODUCT_NAME"=>$product_name, "AMOUNT"=>$won_amt, "DATE"=>$this->general->get_local_time('time')); $subject=$this->email_model->parse_email($parseElement,$subject); $emailbody=$this->email_model->parse_email($parseElement,$emailbody); //echo $emailbody; $this->email->clear(); $this->email->from($seller_email); $this->email->to(CONTACT_EMAIL); $this->email->subject($subject); $this->email->message($emailbody); $this->email->send(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function send_auction_cancel_notification_user($product_id,$user_id,$return_credit=\"\")\r\n\t{\r\n\t\t//load email library\r\n \t$this->load->library('email');\r\n\t\t\t//configure mail\r\n\t\t\t$config['charset'] = 'utf-8';\r\n\t\t\t$config['wordwrap'] = TRUE;\r\n\t\t\t$config['mailtype'] = 'html';\r\n\t\t\t$config['protocol'] = 'sendmail';\r\n\t\t\t$this->email->initialize($config);\r\n\t\t\t\r\n\t\t\t\t\t\r\n\t\t$this->load->model('email_model');\t\t\r\n\t\t\r\n\t\t//dnt get confused with the function name this functin is used for getting user info\r\n\t\t$user_info = $this->get_winner_info($user_id);\r\n\t\t$user_email = $user_info->email;\r\n\t\t$lang_id = $user_info->lang_id;\r\n\t\t\r\n\t\t//Get auction info\r\n\t\t$auction_info = $this->get_auction_byproductid($product_id);\r\n\t\t$product_name = $auction_info->name;\r\n\t\t//Get auction closed template for winner\r\n\t\t$template=$this->email_model->get_email_template(\"auction_cancel_notification_user\",$lang_id);\r\n\t\t\t\r\n\r\n $subject=$template['subject'];\r\n $emailbody=$template['email_body'];\r\n\t\t\r\n\t\t\t\t//parse email\r\n $parseElement=array(\"USERNAME\"=>$user_info->user_name,\r\n \"SITENAME\"=>WEBSITE_NAME,\r\n \"PRODUCT_NAME\"=>$product_name,\t\t\t\t\t\t\t\t\r\n \"AMOUNT\"=>$return_credit,\r\n \"DATE\"=>$this->general->get_local_time('time'));\r\n\r\n $subject=$this->email_model->parse_email($parseElement,$subject);\r\n $emailbody=$this->email_model->parse_email($parseElement,$emailbody);\r\n\t\r\n\t //echo $emailbody; \r\n\t\t\r\n\t\t$this->email->clear();\r\n\t\t$this->email->from(CONTACT_EMAIL);\r\n\t\t$this->email->to($user_email); \r\n\t\t$this->email->subject($subject);\r\n\t\t$this->email->message($emailbody); \r\n\t\t$this->email->send();\r\n\t}", "public function auction_close_mail()\n\t{\n\t\t$this_details = $this->home->get_auction_alert_details(2);\n\t\tforeach($this_details as $alert) {\n\t\t\tif($alert->mail_alert==2){ // First mail alert\n\t\t\t\t$time_diff = time()-$alert->end_time;\n\t\t\t\t\t$day_alert1 = AUCTION_ALERT_DAY + 1 ; \n\t\t\t $days2 = $day_alert1*24*3600; //alert mail for reset the auction \n\t\t\t\t\n\t\t\t\t\t\tif(file_exists(DOCROOT.'images/auction/1000_800/'.$alert->deal_key.'_1'.'.png')) {\n\t\t\t\t\t\t\t\t$image = PATH.'images/auction/1000_800/'.$alert->deal_key.'_1'.'.png';\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t$image = PATH.\"themes/\".THEME_NAME.\"/images/noimage_deals_details.png\";\n\t\t\t\t\t\t\t} \n\t\t\t\t\t\t$end_time = $alert->end_time+(AUCTION_ALERT_DAY*24*60*60);\n\t\t\t\t\t\t$fromEmail = NOREPLY_EMAIL;\n\t\t\t\t\t\t$to = $alert->email;\n\t\t\t\t\t\t$subject = $this->Lang['OR_B_CANCEL'];\n\t\t\t\t\t\t$close_message = \"<p style='color:red;'>\".$this->Lang['CAN_O_NOTICE'].\"<p/><p style='color:red;'>Sorry, \".$alert->firstname.\"!</p><p style='color:red;'>\".$this->Lang['ORDR_CLED'].\"</p><p><img border='0' src='$image' height='160px' width='160px'/></p><p>\".$this->Lang['AUC_TIT'].\" : $alert->auction_title</p>\"; \n\t\t\t\t\t\t\n\t\t\t\t\t\t$this->name = ucfirst($alert->firstname);\n\t\t\t\t\t\t$this->merchant_message = $close_message;\n\t\t\t\t\t\t$closemessage = new View(\"themes/\".THEME_NAME.\"/merchant_signup_mail_template\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(EMAIL_TYPE==2) { \n\t\t\t\t\t\t\temail::smtp($fromEmail,$to,$subject,$closemessage); \n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\temail::sendgrid($fromEmail,$to,$subject,$closemessage);\n\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t$mail_alert = $this->home->update_third_mail_alert($alert->bid_id,$alert->auction_id); \n\t\t\t\t\n\t\t\t} \n\t\t} \n\t}", "public function cancel($uid)\n {\n try {\n $options = array(\n 'cluster' => env('PUSHER_CLUSTER'),\n 'useTLS' => env('PUSHER_USETLS')\n );\n $pusher = new Pusher(\n env('PUSHER_APP_KEY'),\n env('PUSHER_APP_SECRET'),\n env('PUSHER_APP_ID'),\n $options\n );\n $data['message'] = 'Cancel order-'.$uid;\n $pusher->trigger(env('PUSHER_CHANNEL'), env('PUSHER_EVENT'), $data);\n } catch (PusherException $e) {\n }\n\n $deliverys = DeliveryInCart::where('uid', $uid);\n $deliverys->update(['state' => 2]);\n $mail_headers = \"From: \".env('APP_NAME') . \" - \". env('APP_TITLE').\"<\".env('MAIL_FROM_ADDRESS').\">\";\n $subject = 'Alert: Bullet - Delivery Canceled';\n \n $new_orders = $deliverys->get()->toArray();\n $total_price = 0;\n $total_payable = 0;\n $total_tax = 0;\n $total_discount = 0;\n $delivery_price = $new_orders[0]['delivery_price']; \n foreach($new_orders as $new_order)\n {\n $total_price += $new_order['sub_total'];\n $total_discount += $new_order['discount'] * $new_order['product_quantity'];\n $total_tax += $new_order['tax'] * $new_order['product_quantity'];\n }\n $total_tax += $new_orders[0]['delivery_tax'];\n $total_payable = $total_price + $delivery_price + $total_tax - $total_discount;\n\n $message = \"Hi \" . $new_orders[0]['user_name'] . \",\\r\\n\" .\n \"Your delivery canceled. \\r\\n\" .\n \"Delivery area: \" . $new_orders[0]['order_area_address'] . \"\\r\\n\" .\n \"Total price: \" . $total_price . \"\\r\\n\" .\n \"Total tax: \" . $total_tax . \"\\r\\n\" . \n \"Total payable: \" . $total_payable . \"\\r\\n\" . \n \"Thanks,\\n\" .\n env('APP_NAME') . \" - \". env('APP_TITLE');\n\n DataHelper::send_mail($new_orders[0]['user_email'], $subject, $message, $mail_headers);\n \n return back()\n ->with('status', ['success' => 1,\n 'msg' => __('messages.delivery_cancel')]);\n }", "public function notifySeller($auction, $options = array()){\n\t\t$seller = $this->Auction->Seller->find('first', array('conditions' => array('Seller.id' => $auction['Auction']['seller_id'])));\n\t\t$this->__sendMail($seller['Seller']['email'], 'Webpages.Auctioneer Expired Auction', $auction);\n\t}", "public function cancelPending($uid)\n {\n try {\n $options = array(\n 'cluster' => env('PUSHER_CLUSTER'),\n 'useTLS' => env('PUSHER_USETLS')\n );\n $pusher = new Pusher(\n env('PUSHER_APP_KEY'),\n env('PUSHER_APP_SECRET'),\n env('PUSHER_APP_ID'),\n $options\n );\n $data['message'] = 'Cancel pending order-'.$uid;\n $pusher->trigger(env('PUSHER_CHANNEL'), env('PUSHER_EVENT'), $data);\n } catch (PusherException $e) {\n }\n\n $deliverys = DeliveryInCart::where('uid', $uid);\n $deliverys->update(['state' => 2]);\n $mail_headers = \"From: \".env('APP_NAME') . \" - \". env('APP_TITLE').\"<\".env('MAIL_FROM_ADDRESS').\">\";\n $subject = 'Alert: Bullet - Delivery Confirmed';\n \n $new_orders = $deliverys->get()->toArray();\n $total_price = 0;\n $total_payable = 0;\n $total_tax = 0;\n $total_discount = 0;\n $delivery_price = $new_orders[0]['delivery_price']; \n foreach($new_orders as $new_order)\n {\n $total_price += $new_order['sub_total'];\n $total_discount += $new_order['discount'] * $new_order['product_quantity'];\n $total_tax += $new_order['tax'] * $new_order['product_quantity'];\n }\n $total_tax += $new_orders[0]['delivery_tax'];\n $total_payable = $total_price + $delivery_price + $total_tax - $total_discount;\n\n $message = \"Hi \" . $new_orders[0]['user_name'] . \",\\r\\n\" .\n \"Unfortunately you were unable to receive the order. \\r\\n\" .\n \"Delivery area: \" . $new_orders[0]['order_area_address'] . \"\\r\\n\" .\n \"Total price: \" . $total_price . \"\\r\\n\" .\n \"Total tax: \" . $total_tax . \"\\r\\n\" . \n \"Total payable: \" . $total_payable . \"\\r\\n\" . \n \"Thanks,\\n\" .\n env('APP_NAME') . \" - \". env('APP_TITLE');\n\n DataHelper::send_mail($new_orders[0]['user_email'], $subject, $message, $mail_headers);\n\n ///////////decrease points///////////////\n $this->transactionUtil->decreasePointsFromDelivery($new_orders, $uid);\n /////////////////////////////////////////\n return back()\n ->with('status', ['success' => 1,\n 'msg' => __('messages.delivery_cancel')]);\n }", "public function admin_email_send() {\n add_action( 'neh_cron_hook', 'neh_cron_execution' );\n }", "public function disapproveAction()\r\n {\r\n /**\r\n * Checking the posted id values is greater than 0\r\n * if so retreive the posted id value\r\n */\r\n if ($this->getRequest()->getParam('id') > 0) {\r\n $id = $this->getRequest()->getParam('id');\r\n try {\r\n $model = Mage::getModel('customer/customer')->load($this->getRequest()->getParam('id'));\r\n $model->setCustomerstatus('2')->save();\r\n /**\r\n * send email to admin regarding disapprove of seller registration\r\n */\r\n $templateId = ( int )Mage::getStoreConfig('marketplace/admin_approval_seller_registration/seller_email_template_disapprove');\r\n /**\r\n * Get the admin configuration information related mail like\r\n * admin email id\r\n * to mail id\r\n * to name\r\n */\r\n $adminEmailIdData = Mage::getStoreConfig('marketplace/marketplace/admin_email_id');\r\n $toMailId = Mage::getStoreConfig(\"trans_email/ident_$adminEmailIdData/email\");\r\n $toName = Mage::getStoreConfig(\"trans_email/ident_$adminEmailIdData/name\");\r\n /**\r\n * Check the template id has been set in admin section\r\n * if so load the template id\r\n * else load the admin approval seller registration seller email template disapprove template\r\n */\r\n if ($templateId) {\r\n $emailTemplateForSeller = Mage::getModel('core/email_template')->load($templateId);\r\n } else {\r\n $emailTemplateForSeller = Mage::getModel('core/email_template')->loadDefault('marketplace_admin_approval_seller_registration_seller_email_template_disapprove');\r\n }\r\n /**\r\n * get the customer information like\r\n * Customer data\r\n * customer name\r\n * customer email\r\n */\r\n $customer = Mage::getModel('customer/customer')->load($id);\r\n $recipient = $customer->getEmail();\r\n $cname = $customer->getName();\r\n /**\r\n * Replacing the retrieved values dynamicall in the email template\r\n */\r\n $emailTemplateForSellerVariables = (array(\r\n 'ownername' => ucwords($toName),\r\n 'cname' => ucwords($cname)\r\n ));\r\n\r\n $emailTemplateForSeller->setSenderName(ucwords($toName));\r\n $emailTemplateForSeller->setSenderEmail($toMailId);\r\n\r\n $emailTemplateForSeller->setDesignConfig(array(\r\n 'area' => 'frontend'\r\n ));\r\n $emailTemplateForSeller->getProcessedTemplate($emailTemplateForSellerVariables);\r\n /**\r\n * Send email function\r\n */\r\n $emailTemplateForSeller->send($recipient, ucwords($cname), $emailTemplateForSellerVariables);\r\n /**\r\n * end email\r\n * Display the success message on seller disapprove success\r\n */\r\n Mage::getSingleton('adminhtml/session')->addSuccess(Mage::helper('marketplace')->__('Seller disapproved.'));\r\n $this->_redirect('*/*/');\r\n } catch (Exception $e) {\r\n /**\r\n * Display error message if the seller action is failure\r\n */\r\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\r\n $this->_redirect('*/*/');\r\n }\r\n }\r\n\r\n $this->_redirect('*/*/');\r\n }", "public function bookingCancellationCompany($params)\n {\n $this->logger->info('sending new booking for company');\n $options['subject'] = \"Your SkedApp customer booking cancellation confirmed\";\n\n $booking = $params['booking'];\n\n $admins = $this->container->get(\"member.manager\")\n ->getServiceProviderAdmin($params['booking']->getConsultant()->getCompany()->getId());\n\n if ($admins) {\n foreach ($admins as $admin) {\n $tmp = array(\n 'fullName' => $admin->getFirstName() . ' ' . $admin->getLastName(),\n 'consultant' => $booking->getConsultant()->getFirstName() . ' ' . $booking->getConsultant()->getLastName(),\n 'service' => $booking->getService()->getName(),\n 'date' => $booking->getHiddenAppointmentStartTime()->format(\"r\"),\n );\n\n\n $emailBodyHtml = $this->template->render(\n 'SkedAppCoreBundle:EmailTemplates:booking.cancel.company.html.twig', $tmp\n );\n\n $emailBodyTxt = $this->template->render(\n 'SkedAppCoreBundle:EmailTemplates:booking.cancel.company.txt.twig', $tmp\n );\n\n $options['bodyHTML'] = $emailBodyHtml;\n $options['bodyTEXT'] = $emailBodyTxt;\n $options['email'] = $admin->getEmail();\n $options['fullName'] = $tmp['fullName'];\n\n $this->sendMail($options);\n }\n }\n\n return;\n }", "public function sendConfirmationRequestEmail()\n {\n $this->sendConfirmationEmail(__FUNCTION__);\n }", "function sendConfirmationEmail();", "public static function sendBookingCancellationEmail($booking,$cancelledByUserType,$penalty) {\n \n $userObj = \\Auth::user();\n $serviceName = Service::where('id',$booking->service_id)->first()->name;\n if($cancelledByUserType == User::IS_BEAUTICIAN)\n {\n $customer = User::find($booking->customer_id);\n $cancelledWith = [\n 'userType' => 'Customer',\n 'name' => trim($customer->first_name.' '.$customer->last_name)\n ];\n\n $cancelledBy = [\n 'userType' => 'Beauty Pro',\n 'name' => trim($userObj->first_name.' '.$userObj->last_name)\n ];\n\n $toEmail = $customer->email;\n\n $cancellationPaymentsInfo = \"\";\n }\n else\n {\n $beautician = User::find($booking->beautician_id);\n $cancelledWith = [\n 'userType' => 'Beauty Pro',\n 'name' => trim($beautician->first_name.' '.$beautician->last_name)\n ];\n\n $cancelledBy = [\n 'userType' => 'Customer',\n 'name' => trim($userObj->first_name.' '.$userObj->last_name)\n ];\n \n $toEmail = $beautician->email;\n\n $cancellationPaymentsInfo = $penalty?\" and the associated payment has been credited to your account\":\", no payments were associated with the cancellation\";\n }\n\n \n $userName = trim($userObj->first_name.' '.$userObj->last_name);\n\n\n $bookingDateTime =DateTimeUtility::convertDateTimeToTimezone($booking->start_datetime,$booking->timezone,'d/m/Y , g:i A');\n\n\n $subject = trans('messages.email_subject.booking_cancelled');\n\n $bookingId = $booking->id;\n $booking = CustomerBooking::join('services as s',function($join) use($bookingId){\n $join->on('s.id','=','customer_bookings.service_id')\n ->where('customer_bookings.id',$bookingId);\n \n })\n ->join('services as ps',function($join){\n $join->on('ps.id','=','customer_bookings.parent_service_id');\n })\n ->join('users as customer',function($join){\n $join->on('customer.id','=','customer_bookings.customer_id');\n })\n ->join('users as beautician',function($join){\n $join->on('beautician.id','=','customer_bookings.beautician_id');\n })\n ->join('customer_bookings_master','customer_bookings_master.id','=','customer_bookings.customer_bookings_master_id')\n ->select('customer_bookings.*','customer_bookings_master.booking_address','s.name as service_name','ps.name as parent_service_name',DB::raw(\"CONCAT(customer.first_name,' ',customer.last_name) as customer_name\"),DB::raw(\"CONCAT(beautician.first_name,' ',beautician.last_name) as beautician_name\"))\n ->first()->toArray();\n\n\n //email to the user with whom the booking has been cancelled\n $status = \\Mail::send('email.user.booking_cancelled', ['booking' => $booking,'user' => $cancelledWith['name'],'cancelledWith'=>$cancelledBy, 'serviceName' => $serviceName,'bookingDateTime' => $bookingDateTime, 'penaltyInfo' => $cancellationPaymentsInfo], function($message) use ($toEmail,$subject) {\n $message->to($toEmail)->subject($subject);\n $message->from(env('MAIL_USERNAME'), env('APP_NAME', 'BeautyJunkie'));\n });\n\n \n //email to self \n if($penalty)\n {\n $penaltyInfo = \" with a penalty of \".CustomerBooking::CANCELLATION_CHARGE_PERCENT.\"% on the booking amount\";\n }\n else\n {\n $penaltyInfo = \" with no penalties\";\n }\n\n $selfEmail = $userObj->email;\n $status = \\Mail::send('email.user.booking_cancelled', ['booking' => $booking,'user' => $userName,'cancelledWith'=>$cancelledWith, 'serviceName' => $serviceName,'bookingDateTime' => $bookingDateTime, 'penaltyInfo' => $penaltyInfo], function($message) use ($selfEmail,$subject) {\n $message->to($selfEmail)->subject($subject);\n $message->from(env('MAIL_USERNAME'), env('APP_NAME', 'BeautyJunkie'));\n });\n }", "function merchant_checkout_send_admin_email( $purchase, $details, $email ) {\n\n\t\t// Make sure email content exists\n\t\tif ( !is_array( $details ) || !array_key_exists( 'email_2_subject', $details ) || !array_key_exists( 'email_2_content', $details ) ) return;\n\n\t\t// Variables\n\t\t$admin_email = sanitize_email( get_option( 'admin_email' ) );\n\t\t$name = get_bloginfo( 'name' );\n\t\t$domain = merchant_get_site_domain();\n\n\t\t// Setup email\n\t\t$headers = array(\n\t\t\t'From: ' . $name . ' <notifications@' . $domain . '>',\n\t\t\t'Sender: ' . $name . ' <' . $admin_email . '>',\n\t\t\t'Reply-To: ' . $name . ' <' . $admin_email . '>',\n\t\t);\n\t\t$subject = $details['email_2_subject'];\n\t\t$message = nl2br( str_replace( '{{username}}', $email, $details['email_2_content'] ) );\n\n\t\t// Send email\n\t\twp_mail( $admin_email, $subject, $message, $headers );\n\n\t}", "public function sendNotificationEmail()\n {\n $helper=Mage::helper('kdcatalogupdates');\n if($helper->isEnabled()){\n $logCollection=Mage::getModel('kdcatalogupdates/log')->getCollection();\n if($logCollection->count()){\n $notificationEmail= $helper->getNotificationEmail();\n $emailTemplate = Mage::getModel('core/email_template')\n ->loadDefault('productattribute_update_notification');\n\n $emailTemplateVariables = array();\n $emailTemplate->setTemplateSubject('Changed Product Attributes');\n $emailTemplate->setSenderName($helper->getSenderName());\n $emailTemplate->setSenderEmail($helper->getSenderEmail());\n if($emailTemplate->send($notificationEmail,'', $emailTemplateVariables))\n {\n foreach($logCollection as $log){\n $log->delete();\n }\n }\n }\n }\n }", "public function bookingMessageCancelFromCompany($params)\n {\n $this->logger->info(\"send booking message with cancellation to customer\");\n $options['subject'] = \"Your SkedApp booking has been cancelled\";\n\n $booking = $params['booking'];\n\n if (!isset ($params['messageText']))\n $params['messageText'] = '';\n\n if (strlen ($params['messageText']) > 0)\n $params['messageText'] = 'This is the message from ' . $booking->getConsultant()->getCompany()->getName() . ': ' . $params['messageText'];\n else\n $params['messageText'] = 'Please take note of your cancelled booking.';\n\n $tmp = array(\n 'user' => $booking->getCustomer(),\n 'consultant' => $booking->getConsultant(),\n 'provider' => $booking->getConsultant()->getCompany(),\n 'service' => $booking->getService(),\n 'date' => $booking->getHiddenAppointmentStartTime()->format(\"Y-m-d H:i\"),\n 'company' => $booking->getConsultant()->getCompany(),\n 'messageText' => $params['messageText'],\n 'booking' => $booking,\n );\n\n $emailBodyHtml = $this->template->render(\n 'SkedAppCoreBundle:EmailTemplates:booking.message.cancel.customer.html.twig', $tmp\n );\n\n $emailBodyTxt = $this->template->render(\n 'SkedAppCoreBundle:EmailTemplates:booking.message.cancel.customer.txt.twig', $tmp\n );\n\n $options['bodyHTML'] = $emailBodyHtml;\n $options['bodyTEXT'] = $emailBodyTxt;\n $options['email'] = $booking->getCustomerEmail();\n $options['fullName'] = $booking->getCustomerFullName();\n\n if ( (isset($params['attachments_data'])) && (count($params['attachments_data']) > 0) )\n $options['attachments_data'] = $params['attachments_data'];\n\n $this->sendMail($options);\n return;\n }", "function ignacio_send_email() {\n}", "public function sendAction() {\n\t\t$emailid = $this->getRequest()->getParam('emailid');\n\t\t$send_mail_status = $this->getRequest()->getParam('send_mail_status');\n\t\t$cms_page_name = Mage::getStoreConfig('webfaqtab1/general/dropdown'); \n\n\t\t$admin_email = Mage::getStoreConfig('trans_email/ident_general/email');\t\t\t\t\t\t \n\t\t$custom_admin_email = Mage::getStoreConfig('webfaqtab1/general/adminmailid');\n\t\t\n\t\tif($custom_admin_email != ''){\n\t\t\t $admin_email = $custom_admin_email;\t\t\t\n\t\t}\t\t\n\t\t \t\t\t\t\n\t\tif($send_mail_status == 1){\t\t\t\n\t\t\t$url = Mage::getBaseUrl(Mage_Core_Model_Store::URL_TYPE_WEB).$cms_page_name;\n\t\t\t$emailTemplate = Mage::getModel('core/email_template')->loadDefault('faq_customer_template');\t\t\n\t\t\t$emailTemplateVariables = array();\n\t\t\t$emailTemplateVariables['url'] = $url;\n\t\t\t$emailTemplateVariables['email'] = $emailid;\t\t\n\t\t\t$processedTemplate = $emailTemplate->getProcessedTemplate($emailTemplateVariables);\n\t\t\t$mail = Mage::getModel('core/email')\n\t\t\t\t\t ->setToEmail($emailid)\n\t\t\t\t\t ->setBody($processedTemplate)\n\t\t\t\t\t ->setSubject('Website FAQ Reply')\n\t\t\t\t\t ->setFromEmail($admin_email)\n\t\t\t\t\t ->setFromName($name)\n\t\t\t\t\t ->setType('html');\t\n\t\t\ttry {\n\t\t\t\t$mail->send();\n\t\t\t} catch(Exception $error) {\n\t\t\t\tMage::getSingleton('core/session')->addError($error->getMessage());\n\t\t\t\treturn false;\n\t\t\t}\t\t\t\t\t\n\t\t} else {\n\t\t\treturn;\n\t\t}\n\t}", "public function sendEmail()\n {\n return Yii::$app->mailer->compose()\n ->setTo($this->email)\n ->setFrom([Yii::$app->params['adminEmail'] => 'BROWSER POLL'])\n ->setSubject('Vote Confirmation')\n ->setTextBody('Thank you for contibuting to our site us.')\n ->send();\n }", "public function confirm($uid)\n {\n try {\n $options = array(\n 'cluster' => env('PUSHER_CLUSTER'),\n 'useTLS' => env('PUSHER_USETLS')\n );\n $pusher = new Pusher(\n env('PUSHER_APP_KEY'),\n env('PUSHER_APP_SECRET'),\n env('PUSHER_APP_ID'),\n $options\n );\n $data['message'] = 'Confirm order-'.$uid;\n $pusher->trigger(env('PUSHER_CHANNEL'), env('PUSHER_EVENT'), $data);\n } catch (PusherException $e) {\n }\n\n $deliverys = DeliveryInCart::where('uid', $uid);\n $deliverys->update(['state' => 3]);\n $mail_headers = \"From: \".env('APP_NAME') . \" - \". env('APP_TITLE').\"<\".env('MAIL_FROM_ADDRESS').\">\";\n $subject = 'Alert: Bullet - Delivery Confirmed';\n \n $new_orders = $deliverys->get()->toArray();\n $total_price = 0;\n $total_payable = 0;\n $total_tax = 0;\n $total_discount = 0;\n $delivery_price = $new_orders[0]['delivery_price']; \n foreach($new_orders as $new_order)\n {\n $total_price += $new_order['sub_total'];\n $total_discount += $new_order['discount'] * $new_order['product_quantity'];\n $total_tax += $new_order['tax'] * $new_order['product_quantity'];\n }\n $total_tax += $new_orders[0]['delivery_tax'];\n $total_payable = $total_price + $delivery_price + $total_tax - $total_discount;\n\n ////////// increase points when cash pay//////////\n if($new_orders[0]['payment_method'] == 'Cash') {\n $this->transactionUtil->increasePointsFromDelivery($new_orders, $uid);\n }\n /////////////////////////////\n\n $message = \"Hi \" . $new_orders[0]['user_name'] . \",\\r\\n\" .\n \"Your delivery confirmed. \\r\\n\" .\n env('APP_NAME') . \" - \". env('APP_TITLE');\n DataHelper::send_mail($new_orders[0]['user_email'], $subject, $message, $mail_headers);\n return back()\n ->with('status', ['success' => 1,\n 'msg' => __('messages.delivery_confirm')]);\n }", "public function sendNewInspirationEmailNotification() {\n if (!isset($this->logged_in_user) || !isset($this->maker_updated) || !isset($this->user_to_notify)) {\n throw new Exception('Email notifier has not been initialized');\n }\n $maker_page_link = \"http://makerbase.co/m/\".$this->maker_updated->uid.\"/\".$this->maker_updated->slug\n .\"/inspirations\";\n $ga_campaign_tags = \"?utm_source=Makerbase&utm_medium=Email&utm_campaign=New%20inspiration\";\n $editor_name = $this->logged_in_user->twitter_username;\n $unsub_link = \"http://makerbase.co/u/\".$this->user_to_notify->uid;\n $params = array(\n 'USER_EMAIL'=>$this->user_to_notify->email,\n 'MAKER_PAGE_LINK'=>$maker_page_link.$ga_campaign_tags,\n 'EDITOR_NAME'=>$editor_name,\n 'UNSUBSCRIBE_LINK'=>$unsub_link\n );\n try {\n $email_result = Mailer::mailHTMLViaMandrillTemplate($to=$this->user_to_notify->email,\n $subject=$editor_name.\" said you're an inspiration\",\n $template_name = \"Makerbase inspiration notification\", $template_params = $params);\n\n //Set notified user's last_email_notification_sent value here\n $user_dao = new UserMySQLDAO();\n $user_dao->updateLastMakerChangeEmailNotificationSentTime($this->user_to_notify);\n } catch (Exception $e) {\n error_log(get_class($e).\" - \".$e->getMessage());\n }\n }", "public function massDisapproveAction()\r\n {\r\n /**\r\n * Get all the seel buy ids from posted values\r\n */\r\n $marketplaceIds = $this->getRequest()->getParam('marketplace');\r\n /**\r\n * Check the sell buy ids is not an array\r\n * if so add error message like select seller\r\n */\r\n if (!is_array($marketplaceIds)) {\r\n Mage::getSingleton('adminhtml/session')->addError(Mage::helper('adminhtml')->__('Please select at least one seller'));\r\n } else {\r\n try {\r\n foreach ($marketplaceIds as $marketplaceId) {\r\n Mage::helper('marketplace/common')->disapproveSellerStatus($marketplaceId);\r\n /**\r\n * send email to admin regarding disapprove of seller registration\r\n */\r\n $template_id = ( int )Mage::getStoreConfig('marketplace/admin_approval_seller_registration/seller_email_template_disapprove');\r\n /**\r\n * Get and assign the values like admin email id, to mail id, to name from admin store configuration\r\n * if so display error message to selecte atleast one seller\r\n */\r\n $adminEmailId = Mage::getStoreConfig('marketplace/marketplace/admin_email_id');\r\n $toMailId = Mage::getStoreConfig(\"trans_email/ident_$adminEmailId/email\");\r\n $toName = Mage::getStoreConfig(\"trans_email/ident_$adminEmailId/name\");\r\n\r\n $emailTemplateForSeller = Mage::helper('marketplace/general')->getSellerApprovalEmailTemplate($template_id, 2);\r\n /**\r\n * Retrieve the customer info like\r\n * customername\r\n * customer mail id\r\n */\r\n $customer = Mage::helper('marketplace/marketplace')->loadCustomerData($marketplaceId);\r\n $cname = $customer->getName();\r\n $recipient = $customer->getEmail();\r\n\r\n /**\r\n * Dyanamically replace the retrieved values in email template\r\n */\r\n $emailTemplateForSeller->setSenderName(ucwords($toName));\r\n $emailTemplateForSeller->setSenderEmail($toMailId);\r\n\r\n $emailTemplateForSeller->setDesignConfig(array(\r\n 'area' => 'frontend'\r\n ));\r\n $emailTemplateSellerVariables = (array(\r\n 'ownername' => ucwords($toName),\r\n 'cname' => ucwords($cname)\r\n ));\r\n $emailTemplateForSeller->getProcessedTemplate($emailTemplateSellerVariables);\r\n /**\r\n * Email sending function for the dynamically replaced values\r\n */\r\n $emailTemplateForSeller->send($recipient, ucwords($cname), $emailTemplateSellerVariables);\r\n /**\r\n * end email\r\n */\r\n }\r\n /**\r\n * Success message of records on disapproval\r\n */\r\n $successMsg = Mage::helper('adminhtml')->__('A total of %d record(s) is successfully disapproved', count($marketplaceIds));\r\n Mage::getSingleton('adminhtml/session')->addSuccess($successMsg);\r\n } catch (Exception $e) {\r\n /**\r\n * Error message of records on disapproval failure\r\n */\r\n Mage::getSingleton('adminhtml/session')->addError($e->getMessage());\r\n }\r\n }\r\n\r\n $this->_redirect('*/*/index');\r\n }", "function sendingCancelOrderEmailForCustomer($order, $user, $products, $info_cancel)\n {\n\n $shipping_method = \"\";\n if ($order->shipping_method == \"GHN\") {\n $shipping_method = \"Giao hàng nhanh\";\n }\n if ($order->shipping_method == \"VTP\") {\n $shipping_method = \"Viettel Post\";\n }\n if ($order->shipping_method == \"SHO\") {\n $shipping_method = \"Shop giao\";\n }\n $payment_method = \"\";\n switch ($order->payment_method) {\n case \"info_nganluong\":\n $payment_method = \"Thanh toán qua Ngân Lượng\";\n break;\n case \"info_cod\":\n $payment_method = \"Thanh toán khi nhận hàng\";\n break;\n case \"info_bank\":\n $payment_method = \"Chuyển khoản qua ngân hàng\";\n break;\n case \"info_cash\":\n $payment_method = \"Thanh toán bằng tiền mặt tại quầy\";\n break;\n }\n $protocol = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off' || $_SERVER['SERVER_PORT'] == 443) ? \"https://\" : \"http://\";\n $shop_user = $this->user_model->fetch_join('use_id,parent_id,use_group,sho_name, sho_link,domain', \"LEFT\", \"tbtt_shop\", \"sho_user = use_id\", 'use_id = \"' . (int)$order->order_saler . '\"');\n $arr_domain = explode('.',$_SERVER['HTTP_HOST']);\n $duoi = $azi = $_SERVER['HTTP_HOST'];\n if(count($arr_domain)>2) {\n $duoi = $arr_domain[1].'.'.$arr_domain[2];\n }\n $shopLink = $order->sho_link . '.' . $duoi;\n $domain = $order->domain;\n if ($domain == $duoi || $order->domain!='') {\n $shopLink = $domain;\n }\n $store = $shopLink . '/';\t \n $segment1 = 'shop';\n if($order->order_group_id > 0){\n $segment1 = 'grtshop';\n $this->load->model('grouptrade_model');\n $get_grt = $this->grouptrade_model->get('grt_link,grt_domain', 'grt_id = \"' . (int)$order->order_group_id . '\"');\n if($get_grt->grt_domain != \"\") {\n $shopLink = $get_grt->grt_domain;\n }else{\n $shopLink = $get_grt->grt_link . '.' . $duoi;\n }\n }\n\t $shopLink .= '/';\n \n $html1 = '<div id=\":hn\" class=\"a3s\" style=\"overflow: hidden;\">\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin:0 auto;font-family:arial,sans-serif;font-size:12px;color:#000;text-align:left;line-height:24px;background-color:#f5f5f5\" width=\"100%\">\n <tbody>\n <tr>\n <td align=\"center\" style=\"padding:20px 0\"><img alt=\"\" src=\"http://azibai.com/images/logo-azibai.png\" class=\"CToWUd\"></td>\n </tr>\n </tbody>\n</table>\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin:0 auto;font-family:arial,sans-serif;font-size:12px;color:#000;text-align:left;line-height:24px;background-color:#f5f5f5\" width=\"100%\">\n<tbody>\n <tr></tr>\n <tr>\n <td>\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin:0 auto;border:1px solid #ececec;border-top:2px solid #ececec;background-color:#fff\" width=\"800\">\n<tbody>\n <tr>\n <td>\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin:0 auto\" width=\"700\">\n<tbody>\n\n<tr><td style=\"padding:20px 0\"><p style=\"color:#000;font-size:18px;text-transform:uppercase;margin-bottom:20px\"><strong>' . $user->ord_sname . '</strong> thân mến,</p> <p style=\"font-size:14px;color:#000\">Do nhu cầu mua sắm phát sinh cao cho (những) sản phẩm mà bạn đã đặt mua, Shop <a href=\"' . $store . 'shop\" target=\"_blank\">' . $order->sho_name . '</a> xin thông báo đơn hàng <a href=\"' . $shopLink . 'information-order/' . $order->id . '?order_token=' . $order->order_token . '\" target=\"_blank\">' . $order->id . '</a> đặt vào ngày ' . date(\"d-m-Y H:i:s\", $order->date) . ' đã hết hàng. </p> </td> </tr>\n\n<tr><td style=\"padding-top:20px;border-top:1px solid #b2b2b2;font-size:16px\">Thông tin đơn hàng bạn đã đặt mua : </td> </tr>\n\n <tr>\n <td style=\"padding-top:30px\">\n <table align=\"left\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"100%\">\n<tbody>\n <tr>\n <td colspan=\"3\" style=\"height:36px\">Shop: <strong><a href=\"' . $store . 'shop\" target=\"_blank\">' . $order->sho_name . '</a></strong> </td>\n </tr>\n <tr>\n <td></td>\n </tr>\n <tr>\n <td>';\n foreach ($products as $product) {\n $img1 = explode(',', $product->pro_image);\n if ($img1[0] != \"\") {\n $imgSrc = DOMAIN_CLOUDSERVER . 'media/images/product/' . $product->pro_dir . '/thumbnail_1_' . $img1[0];\n } else {\n $imgSrc = $shopLink . 'media/images/noimage.png';\n }\n\n if($product->pro_type==0){\n $type='/product';\n }else{\n if($product->pro_type==2){\n $type='/coupon';\n }\n }\n $html1 .= '<table width=\"100%\" cellpadding=\"0\" cellspacing=\"0\" border=\"0\" style=\"padding:20px 0;border-top:1px dashed #000\">\n<tbody>\n<tr><td rowspan=\"5\" width=\"65\" valign=\"top\" style=\"padding-top:10px\"><a href=\"' . $shopLink . $segment1 . $type . '/detail/' . $product->pro_id . '/' . RemoveSign($product->pro_name) . '\" target=\"_blank\"><img src=\"' . $imgSrc . '\" alt=\"\" width=\"55\" height=\"55\" class=\"CToWUd\"></a></td>\n<td style=\"font-size:14px;color:#000\"><a href=\"' . $shopLink . $segment1 . $type. '/detail/' . $product->pro_id . '/' . RemoveSign($product->pro_name) . '\" target=\"_blank\">' . sub($product->pro_name, 200) . '</a></td></tr>\n<tr><td>Mã hàng:</td>\n<td style=\"font-size:14px;color:#000\" width=\"110\">' . $product->pro_sku . '</td></tr>\n<tr><td>Đơn giá:</td>\n<td style=\"font-size:14px;color:#000\">' . number_format($product->pro_price, 0, ',', '.') . ' đ</td></tr>\n<tr><td>Số lượng:</td>\n<td style=\"font-size:14px;color:#000\">' . $product->shc_quantity . '</td></tr>\n<tr><td>Thành tiền:</td>\n<td style=\"font-size:14px;color:#000\">' . number_format($product->shc_total, 0, ',', '.') . ' đ</td></tr>\n</tbody></table>';\n\n }\n $html1 .= '</td></tr>\n </tbody></table>\n <table align=\"right\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"padding:60px 0 0 60px\" width=\"50%\">\n <tbody>\n <tr>\n <td></td>\n </tr>\n <tr>\n <td style=\"font-size:12px;text-transform:uppercase;height:20px;padding-left:10px;border-bottom:1px solid #dcdcdc\">Tổng cộng</td>\n <td style=\"font-size:14px;text-transform:uppercase;border-bottom:1px solid #dcdcdc;text-align:right\">' . number_format($order->order_total_no_shipping_fee, 0, ',', '.') . ' đ</td>\n </tr>\n <tr>\n <td style=\"font-size:12px;text-transform:uppercase;height:20px;padding-left:10px;border-bottom:1px solid #dcdcdc\">Phí vận chuyển</td>\n <td style=\"font-size:14px;text-transform:uppercase;border-bottom:1px solid #dcdcdc;text-align:right\">' . number_format($order->shipping_fee, 0, ',', '.') . ' đ</td>\n </tr>\n <tr>\n <td style=\"font-size:12px;text-transform:uppercase;height:20px;padding-left:10px;border-bottom:1px solid #dcdcdc;color:#000;font-weight:bold\">Tổng thanh toán</td>\n <td style=\"font-size:14px;text-transform:uppercase;border-bottom:1px solid #dcdcdc;text-align:right;color:#000;font-weight:bold\">' . number_format($order->order_total, 0, ',', '.') . ' đ</td>\n </tr>\n </tbody>\n</table>\n</td> </tr>\n\n<tr>\n <td style=\"padding:20px;border-top:1px solid #ececec;font-size:14px\">\n <p>Đơn hàng đã bị hủy bởi Shop <a href=\"' . $store . 'shop\" target=\"_blank\">' . $order->sho_name . '</a> .<br/><span style=\"color:red;font-weight:bold;\">Lý do hủy:' . $info_cancel . '</span><br/> Nếu bạn đã thanh toán cho đơn hàng. Azibai.com sẽ tiến hành hoàn lại 100% số tiền cho bạn. Vui lòng xem thêm chi tiết <a href=\"' . $shopLink . 'information-order/' . $order->id . '?order_token=' . $order->order_token . '\" target=\"_blank\">tại đây</a><br> Chúng tôi rất tiếc vì sự bất tiện này. Mong bạn sẽ tiếp tục ủng hộ Azibai.com. Chân thành cảm ơn.</p>\n <p></p>\n </td>\n</tr>\n</tbody></table> </td> </tr> </tbody></table> </td> </tr> </tbody></table>\n<table align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin:0 auto;font-family:arial,sans-serif;font-size:12px;color:#000;text-align:left;line-height:24px;background-color:#f5f5f5\" width=\"100%\">\n <tbody>\n <tr>\n <td>\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin:0 auto;border:1px solid #ececec;background-color:#fff\" width=\"800\">\n <tbody>\n <tr></tr>\n <tr>\n <td style=\"border-top:1px solid #ececec;padding:30px 0;color:#666\">\n <table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" style=\"margin:0 auto\" width=\"700\">\n <tbody>\n <tr>\n <td align=\"left\" valign=\"top\" width=\"55%\">\n <p style=\"line-height:24px;color:#2a2a2a;margin-top:10px;display:block\">CÔNG TY TNHH DỊCH VỤ MỌI NGƯỜI CÙNG VUI, AZIBAI.COM<br> ' . settingAddress_1 . '<br> Liên hệ: Số điện thoại <span style=\"color:#ff0000\">' . settingPhone . '</span> - Email <a href=\"mailto:+' . settingEmail_1 . '\" style=\"color:#f00;text-decoration:none\" target=\"_blank\"> ' . settingEmail_1 . '</a> </p>\n </td>\n <td align=\"right\">\n <div style=\"padding-top:10px;margin-right:5px\"><img alt=\"Banking\" src=\"' . base_url() . 'templates/home/images/dichvuthanhtoan.jpg\"></div>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n </table>\n </td>\n </tr>\n </tbody>\n</table></div>';\n $this->load->library('email');\n $config['useragent'] = $this->lang->line('useragen_mail_detail');\n $config['mailtype'] = 'html';\n $this->email->initialize($config);\n #Email\n $folder = folderWeb;\n require_once($_SERVER['DOCUMENT_ROOT'] . $folder . '/PHPMailer/class.phpmailer.php');\n require_once($_SERVER['DOCUMENT_ROOT'] . $folder . '/PHPMailer/class.pop3.php');\n $return_email = $this->smtpmailer(trim($user->ord_semail), $this->lang->line('EMAIL_MEMBER_TT24H'), \"Azibai.com\", \"Thông báo hủy đơn hàng\", $html1);\n }", "private function sendConfirmation() {\n\t\t// Template Pfad und Template laden\n\t\t$tPath = shopStatic::getMailTemplate('confirmation');\n\t\t$tpl = new templateImproved($tPath);\n\t\t// Warenkorb view einbauen\n\t\t$cart = new defaultCart($this->Order);\n\t\t// Spezielle Templates verwenden\n\t\t$cart->setEntryTemplate('mail-cart-article');\n\t\t$cart->setListTemplate('mail-cart');\n\t\t// Diesen im Template so darstellen\n\t\t$tpl->addSubtemplate(\n\t\t\t'CART_DEFAULT_LIST',\n\t\t\t$cart->getTemplate()\n\t\t);\n\t\t// Bestellnummer im Mail ermöglichen\n\t\t$tpl->addData('ORDER_ID',$this->Order->getShoID());\n\t\t$message = $this->Order->getMessage();\n\t\tif (strlen($message) == 0)\n\t\t\t$message = $this->Res->html(656,page::language());\n\t\t$tpl->addData('USER_MESSAGE',$message);\n\t\t// Payment informationen einfügen\n\t\t$this->addPaymentInfo($tpl);\n\t\t// Mail Erstellen und konfigurieren\n\t\t$mail = new phpMailer();\n\t\t//$mail->CharSet = 'utf-8';\n\t\t//$mail->Encoding = 'quoted-printable';\n\t\t$mail->From = shopModuleConfig::MAIL_FROM;\n\t\t$mail->FromName = shopModuleConfig::MAIL_FROMNAME;\n\t\t$mail->AddAddress($this->User->getUsername());\n\t\t$mail->AddBCC(shopModuleConfig::MAIL_FROM);\n\t\t// Inhalte definieren\n\t\t$mail->IsHTML(true);\n\t\t$mail->Body = $tpl->output();\n\t\t$mail->Subject = $this->Res->normal(1108, page::language()).' #'.$this->Order->getShoID();\n\t\t// Absenden\n\t\t$mail->Send();\n\t}", "function sendConfirmartionEmail($yourName, $email, $pluginName, $pluginDescription) {\r\n\t\t\r\n\tinclude 'cytostaff_emails.inc';\r\n\r\n\t$from = $cytostaff_emails[0];\r\n\t$to = $email;// Author e-mail contact\r\n\t$bcc = $cytostaff_emails[0];\r\n\t//for ($i=0; $i<count($cytostaff_emails); $i++){\r\n // \t$bcc = $bcc . $cytostaff_emails[$i] . \" \";\r\n\t//}\r\n\t$subject = \"Your plugin -- \" . $pluginName;\r\n\t$body = $yourName.\",\\n\\nThank you for submitting \" . $pluginName . \" to Cytoscape. \" .\r\n\t\t\"\\n\\nDescription:\\n\\n\".$pluginDescription.\"\\n\\n\".\r\n \t\"Cytoscape staff will review your plugin and publish it on the Cytoscape website.\" .\r\n \t\"\\n\\n\\nCytoscape team\";\r\n\r\n\t$headers = \"From: \" . $from . \"\\r\\n\"; \r\n\tif ($bcc != \"\") {\r\n\t\t$headers = $headers . \"BCC: \" . $bcc;\r\n\t}\r\n\r\n\tif (trim($to) == \"\") {\r\n\t\t// in case user did not provide an e-mail address, notify the cytostaff\r\n \t$to = $cytostaff_emails[0];\r\n \t$body = $body . \"\\n\\nNote: User did not provide an e-mail address!\";\r\n\t}\r\n\r\n\tif (mail($to, $subject, $body, $headers)) {\r\n \t\t//echo(\"<p>Confirmation e-mail was sent!</p>\");\r\n \t} else {\r\n \t\techo(\"<p>Failed to send a confirmation e-mail...</p>\");\r\n \t}\r\n\t\r\n\t//Send notification e-mail to staff\r\n\r\n\t$to =$cytostaff_emails[0];\r\n\t$bcc = $cytostaff_emails[0].' ';\r\n\tfor ($i=0; $i<count($cytostaff_emails); $i++){\r\n \t$bcc = $bcc . $cytostaff_emails[$i] . \" \";\r\n\t}\r\n\r\n\t$headers = \"From: \" . $from . \"\\r\\n\"; \r\n\tif ($bcc != \"\") {\r\n\t\t$headers = $headers . \"BCC: \" . $bcc;\r\n\t}\r\n\r\n\r\n\t$body = $body. \"\\n\\nAdmin URL: http://chianti.ucsd.edu/cyto_web/plugins3/pluginadmin.php\\n\\n\";\r\n\r\n\tif (mail($to, $subject, $body, $headers)) {\r\n \t\t//echo(\"<p>notification e-mail was sent to staff!</p>\");\r\n \t} else {\r\n \t\techo(\"<p>Failed to send a notification e-mail...</p>\");\r\n \t}\r\n}", "function drush_aakb_survey_queue_mails() {\n aakb_survey_send_invitation();\n}", "protected function send_activation_email() {}", "public function job_24hrs_no_sched_confirmation(){\n date_default_timezone_set('Asia/Manila');\n $date_now = date(\"Y-m-d h:i:s\");\n $exceeds = $this->Admin_model->get_all_sched_24hrs_no_sched();\n foreach($exceeds as $exceed){\n $time_exceed = $exceed->date_created;\n $customer_number = $exceed->customer_number;\n $get_customers = $this->Admin_model->get_customer_by_custnum($customer_number);\n $timediff = $this->Admin_model->get_time_diff($date , $time_exceed);\n if ($timediff >= '24:00:00'){\n foreach($get_customers as $get_customer){\n $email_address = $get_customer->email_address;\n $mobile_number = $get_customer->mobile_number;\n if(!empty($email_address)){\n $message = \"Greetings from Federal Land, Inc.! Please be advised that we have yet to receive a reply from you within the allotted 24-hour response period, from the date of letter transmittal. Kindly contact us upon receipt of this message. Thank you.\";\n $send_email = $this->send_email($email_address, 'WeServe', $message);\n $send_sms = $this->send_sms($mobile_number, $message);\n if($send_email == true && $send_sms == true) { // && $return_sms == true\n echo \"<script type='text/javascript'>alert('Email and SMS notification will be sent to Unit Owner.');</script>\";\n $this->Admin_model->update_used_link($customer_number , $exceed->ticket_number);\n //For Outbound tickets\n $o_associates = array();\n $outbounds = $this->Admin_model->get_all_outbound_associate();\n foreach ($outbounds as $outbound) {\n $o_associates[] = $outbound->user_id;\n }\n $outbound_rand = array_rand($o_associates);\n $outbound_assigned = $o_associates[$outbound_rand];\n $insert_ticket = array(\n 'ticket_number' => $exceed->ticket_number,\n 'customer_number' => $customer_number,\n 'created_by' => '0',\n 'category' => 'Turnover',\n 'subject' => 'For Callout did not confirm his/her schedule within 24 hrs (System Generated)',\n 'assigned_to' => $outbound_assigned,\n 'date_assigned' => date(\"Y/m/d H:i s\")\n );\n\n $insert_id = $this->Admin_model->add_ticket($insert_ticket); \n \n if ($insert_id > 0){\n //Insert ticket status in db after assigning the tickets\n $ticket_status_data_insertion = array(\n array(\n 'ticket_number' => $exceed->ticket_number,\n 'status' => 0,\n 'assign_to' => '',\n 'user_section' => 'INBOUND_ASSOC',\n 'activity_status' => 0\n ),\n array(\n 'ticket_number' => $exceed->ticket_number,\n 'status' => 0,\n 'assign_to' => $outbound_assigned,\n 'user_section' => 'OUTBOUND_ASSOC',\n 'activity_status' => 0\n ),\n array(\n 'ticket_number' => $exceed->ticket_number,\n 'status' => 0,\n 'assign_to' => '',\n 'user_section' => 'HANDOVER_ASSOC',\n 'activity_status' => 0\n )\n );\n $this->db->insert_batch('tbl_ticket_status', $ticket_status_data_insertion);\n \n //Send Email to assigned ticket\n $outbond_details = $this->Admin_model->get_user_detail($outbound_assigned , '7');\n foreach($outbond_details as $outbond_detail){\n $email_address_outbond = $outbond_detail->email_address;\n $message = \"Ticket was successfully assigned to you...\";\n $send_email = $this->send_email($email_address_outbond, 'TICKET ASSIGNED', $message);\n if($send_email == true) { // && $return_sms == true\n echo \"<script type='text/javascript'>alert('Email notification will be sent to Unit Owner. Selected schedule will be temporarily blocked for 24 hours and will be fully blocked once received confirmation from Unit Owner by replying YES to SMS and email message or clicking the link provided or providing the OTP to Inbound Associate.');</script>\";\n } else {\n echo \"<script type='text/javascript'>alert('Failure to send the email notification.');</script>\";\n }\n }\n }\n }\n }else{\n echo \"<script type='text/javascript'>alert('Failure to send the email notification.');</script>\";\n }\n } \n }\n }\n }", "public function customEmail()\n {\n if (parent::verifyAdmin()) {\n if (isset($_POST['email'])) {$email = $_POST['email'];}\n if (isset($_POST['asunto'])) {$asunto = $_POST['asunto'];}\n if (isset($_POST['contenido'])) {$contenido = $_POST['contenido'];}\n\n $this->enviarEmail($email, 4,[\"asunto\" => $asunto, \"mensaje\" => $contenido]);\n }else{\n header(\"Location: index.php?controller=producto\");\n }\n }", "public function job_daily_notify_for_qualified_no_shed_status(){\n date_default_timezone_set('Asia/Manila');\n $date_now = date(\"Y-m-d\");\n\n $qualified_turnover = $this->Admin_model->get_all_qualified_for_turn_over();\n\n foreach ($qualified_turnover as $data) {\n if (!empty($data->qualified)){\n $schedule = $this->Admin_model->check_schedule_by_customer_number($data->customer_number);\n if (empty($schedule)){\n $detail_buyer = $this->Admin_model->get_customer_by_number($data->customer_number);\n foreach($detail_buyer as $buyers){\n $message = \"Greetings from Federal Land, Inc.! Please be advised that we are still awaiting your preferred turnover schedule. You may reach us through the contact details provided in the Notice of Inspection / Notice of Unit Turnover. Thank you.\";\n $send_email = $this->send_email($buyers->email_address, 'WeServe', $message);\n $send_sms = $this->send_sms($buyers->mobile_number, $message);\n\n if($send_email == true && $send_sms == true) { // && $return_sms == true\n echo \"<script type='text/javascript'>alert('Email notification will be sent to Unit Owner. Selected schedule will be temporarily blocked for 24 hours and will be fully blocked once received confirmation from Unit Owner by replying YES to SMS and email message or clicking the link provided or providing the OTP to Inbound Associate.');</script>\";\n }else{\n echo \"<script type='text/javascript'>alert('Failure to send the notification.');</script>\";\n }\n } \n }else{\n //Do Nothing\n }\n }else{\n //Do Nothing\n }\n }\n }", "function send_admin_mail() {\n\t // mail to admin (comes with the next version)\n\t}", "function email_Employee_Cancel_ApptNotification ($appointment_id,$debug=0){\n require_once('appointment_functions.php');\n $Appointments_dal = new Appointments_DAL;\n $AppointmentInfo = $Appointments_dal->Appointments_displayAppointmentInfo($appointment_id);\n\n require_once('customers_functions.php');\n $Customer_dal = new Customers_DAL();\n $Customer_Info = $Customer_dal->get_CustomerDataPerId($AppointmentInfo[0]->customer_id);\n\n require_once('companies_functions.php');\n $Companies_dal = new Companies_DAL();\n $SERVER_ADDRESS = $Companies_dal->get_TemplateTabData_by_Name('SERVER_ADDRESS', $Customer_Info[0]->company_id);\n $COMPANY_NAME = $Companies_dal->get_TemplateTabData_by_Name('COMPANY_NAME', $Customer_Info[0]->company_id);\n $COMPANY_URL = $Companies_dal->get_TemplateTabData_by_Name('COMPANY_URL', $Customer_Info[0]->company_id);\n $NewAppointment_EMAIL_REPLY_ADDRESS = $Companies_dal->get_TemplateTabData_by_Name('NewAppointment_EMAIL_REPLY_ADDRESS',$Customer_Info[0]->company_id);\n $email_subject = \"STAFF: CANCELED Appt - \".$Customer_Info[0]->firstname. \" \" . $Customer_Info[0]->lastname.\".\";\n $reply_address = $NewAppointment_EMAIL_REPLY_ADDRESS[0]->value;\n\n ob_start();\n displayAppointmentInfo(0,$appointment_id);\n $AppointmentInfo_Display = ob_get_clean();\n\n ob_start();\n services_selected_for_appointment($appointment_id);\n $AppointmentServices_Display = ob_get_clean();\n\n $BGcolor = \"red\";\n $TopHeader_Display = emailTopHeader($BGcolor,$email_subject,\"Appt. Canceled:<br>\".date('l jS \\of F Y', strtotime($AppointmentInfo[0]->startDate)).\"<br>Time: \".date('h:i a', strtotime($AppointmentInfo[0]->startDate)). \"<br>\" .$Customer_Info[0]->firstname.\" \".$Customer_Info[0]->lastname);\n\n $message = $TopHeader_Display;\n $message.= \"\n <tr>\n <td colspan=\\\"3\\\">\n <!--CONTENT STARTS HERE-->\n <table cellpadding=\\\"0\\\" width=100%>\n <tr>\n <td width='100%' style='padding-right:10px; font-family:Trebuchet MS, Verdana, Arial; font-size:12px;' valign='top'>\n <div class='wp100 d_InlineBlock s08' style='display:inline-block; width: 100%;'>\n <div class='f_left left wp50 ml5' style='float:left; text-align: left; width:25%'>Customer:</div>\n <div class='f_left right wp45' style='float:left; text-align: right; width:75%'>\".$Customer_Info[0]->firstname.\" \".$Customer_Info[0]->lastname.\", \".$Customer_Info[0]->email.\"</div>\n </div>\n <div class='wp100 d_InlineBlock s08' style='display:inline-block; width: 100%;'>\n <div class='f_left left wp50 ml5' style='float:left; text-align: left; width:25%'>Cust Ph. Number:</div>\n <div class='f_left right wp45' style='float:left; text-align: right; width:75%'>\".$Customer_Info[0]->phone_num.\"</div>\n </div>\n <div class='wp100 d_InlineBlock s08' style='display:inline-block; width: 100%;'>\n <div class='f_left left wp50 ml5' style='float:left; text-align: left; width:20%'>Staff:</div>\n <div class='f_left right wp45' style='float:left; text-align: right; width:80%'>\".$AppointmentInfo[0]->staff_first_name.\" \".$AppointmentInfo[0]->staff_last_name.\", \".$AppointmentInfo[0]->staff_email_address.\"</div>\n </div>\n <div class='wp100 d_InlineBlock s08' style='display:inline-block; width: 100%;'>\n <div class='f_left left wp50 ml5' style='float:left; text-align: left; width:25%'>Date:</div>\n <div class='f_left right wp45' style='float:left; text-align: right; width:75%'>\".date('l jS \\of F Y', strtotime($AppointmentInfo[0]->startDate)).\"</div>\n </div>\n <div class='wp100 d_InlineBlock s08' style='display:inline-block; width: 100%;'>\n <div class='f_left left wp50 ml5' style='float:left; text-align: left; width:25%'>Time:</div>\n <div class='f_left right wp45' style='float:left; text-align: right; width:75%'>\".date('h:i a', strtotime($AppointmentInfo[0]->startDate)).\"</div>\n </div> \n \".$AppointmentServices_Display.\"\n <br>\n Sorry about the bad news,<br/>\n \".$COMPANY_NAME[0]->value.\"<br/>\n <a href=\\\"http://\". $COMPANY_URL[0]->value.\"\\\">\".$COMPANY_URL[0]->value.\"</a><br/>\n </td>\n </tr>\n </table>\n </td>\n </tr>\n</table>\n<br />\n\".emailBottomTable().\"\n</center>\n</body>\n\";\n$headers = \"MIME-Version: 1.0\" . \"\\r\\n\";\n$headers .= \"Content-type:text/html;charset=iso-8859-1\" . \"\\r\\n\";\n$headers .= \"From: \\\"\".$COMPANY_NAME[0]->value.\"\\\" <[email protected]>\\r\\n\";\n$headers .= \"Reply-to: \\\"\".$COMPANY_NAME[0]->value.\"\\\" <[email protected]>\\r\\n\";\n$headers .= \"X-Mailer: PHP/\" . phpversion().\"\\r\\n\";\nif ($debug != 1) {\n mail($AppointmentInfo[0]->staff_email_address,$email_subject,$message,$headers);\n}\nelse {\n echo \"REPLY TO:\" . $reply_address . \"<br>\";\n echo $message;\n}\n}" ]
[ "0.7083268", "0.6951906", "0.68185496", "0.6702256", "0.65076923", "0.6365885", "0.63454837", "0.6328166", "0.6271605", "0.6261137", "0.6255493", "0.6244561", "0.6206805", "0.61694455", "0.6146437", "0.61397064", "0.6131453", "0.6086631", "0.60851973", "0.60776144", "0.6066812", "0.60566", "0.6049492", "0.60468835", "0.6044352", "0.60341245", "0.6030421", "0.60286736", "0.6026498", "0.60252863" ]
0.76600903
0
get a review by id
public function GetById($id){ $id = (int)$id; $book = $this->GetAllReviews("WHERE review_id = $id"); return $book[0]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function reviewshow($id)\n {\n //\n $data = review::find($id);\n return $data;\n }", "function appthemes_get_review( $id ) {\n\treturn APP_Review_Factory::retrieve( $id );\n}", "public function show($id)\n\t{\n\t\t$review = Review::find($id);\n\t\tif(!$review) {\n\t\t\t$error = Responder::error(4040);\n\t\t\t$error->globalMessage('The requested item does not exist in our database');\n\t\t\tif(!is_numeric($id)) {\n\t\t\t\t$error->developerMessage('Review IDs must be numeric');\n\t\t\t}\n\t\t\treturn $error->showError();\n\t\t}\n\t\treturn $review;\n\t}", "public static function getById($id){\n return Reviews::where('id', '=', $id)->first();\n }", "public function reviewedit($id)\n {\n //\n $data = review::find($id);\n return $data;\n }", "public function getReview($id){\n\t\t$this->db->select('f.title as title, f.poster as poster, r.id as id, r.rating as rating, r.review as review', FALSE);\n\t\t$this->db->from('review as r, film as f');\n\t\t$this->db->where('r.film_id = f.id');\n\t\t$this->db->where('r.id', $id);\n\t\treturn $this->db->get()->result_array();\n\t}", "public function get(int $reviewId): \\Divante\\ReviewApi\\Api\\Data\\ReviewInterface;", "public function fetchById($id)\r\n {\r\n return $this->prepareResult($this->reviewsMapper->findByPk($id));\r\n }", "public function find_by_id($review_id) {\n return $this->db->get_where('obmp_review', array('review_id' => $review_id))->row();\n }", "public function getReviewForId($review_id){\n\t\t$query = $this->db->query('\n\t\t\tselect \n\t\t\t\tr.id, round(r.rating/?*100) rating, r.review, r.user_id, u.name user_name\n\t\t\tfrom\n\t\t\t\tfood_review r\n\t\t\tleft join\n\t\t\t\tuser u\n\t\t\ton \n\t\t\t\tu.id = r.user_id\n\t\t\twhere\n\t\t\t\tr.id = ?', \n\t\t\tarray(Food_review_model::$HIGHEST_RATING, $review_id));\n\t\t$results = $query->result();\n\t\t\n\t\tif (count($results)==0)\n\t\t\treturn false;\n\t\telse\n\t\t\treturn $results[0];\n\t}", "public function GetByUserID($id){\n $id = (int)$id; // init\n $bokks_reviews = $this->GetAllReviews(\"WHERE review_user_id = $id\"); // order\n return $bokks_reviews; // return data\n }", "public function show($id)\n {\n\n if ($this->review->findOrFail($id)) {\n\n return response()->json([\n 'success' => true,\n 'data' => [\n 'review' => $this->reviewService->show($id),\n ]\n ]);\n }\n }", "public function get($id)\n {\n $reponse=$this->bd->prepare('SELECT b.rating, b.bio, a.name,b.date FROM user a \n INNER JOIN review b on a.id=b.id_user WHERE b.id_course=:id ' ) ;\n $reponse->execute(array(\n 'id'=>$id\n ));\n\n return $reponse ;\n }", "public function GetByBookID($id){\n $id = (int)$id; // init\n $bokks_reviews = $this->GetAllReviews(\"WHERE review_book_id = $id\"); // order\n return $bokks_reviews; // return data\n }", "public function getReview();", "public function getReview();", "public function getReview();", "public function show($id)\n {\n $review = Review::findOrFail($id);\n\n if ((Auth::user()->roles()->where('role_id', 4)->first() and Auth::id() == $review->reviewer->id) or\n Auth::user()->roles()->where('role_id', 1)->first()) {\n return view('backend.review.detail')\n ->with('review', $review)\n ->with('contribution', $review->contribution);\n } else {\n return redirect()->back()\n ->with(\"message\", \"You do not have permission to access that module\")\n ->with(\"message_type\", \"danger\");\n }\n }", "public function show($id)\n {\n $review = Review::find($id);\n if($review) {\n /* META */\n $meta = [\n 'title' => replaceVariables($review->meta_title ? $review->meta_title : 'Отзыв'),\n 'description' => replaceVariables($review->meta_description),\n 'keywords' => replaceVariables($review->meta_tags),\n ];\n /* END META */\n $breadcrumbs = [\n ['href' => route('front'), 'name' => 'Главная'],\n ['href' => route('review.index'), 'name' => 'Отзывы'],\n ['href' => route('review.show',['id'=>$id]), 'name' => 'Отзыв пользователя'],\n ];\n return view('pages.review', [\n 'review' => $review,\n 'breadcrumbs' => $breadcrumbs,\n 'meta' => $meta,\n ]);\n } else {\n abort(404);\n }\n }", "public function show($id)\n {\n //\n $review = Review::find($id);\n return view('review.edit', compact('review'));\n }", "public function show($id)\n {\n $review = Review::findOrFail($id);\n\n return view('reviews.showOne', compact('review'));\n }", "public function index($id)\n {\n $product = Product::find($id);\n if(isset($product)){\n if(count($product->reviews)>0)\n return ReviewResource::collection($product->reviews);\n else\n return \"No review\";\n }\n else{\n return response([\n \"msg\"=>\"Product not found\"\n ],Response::HTTP_NOT_FOUND);\n }\n }", "public function show($id)\n {\n try {\n $review = TravelerReview::findOrFail($id);\n } catch (\\Illuminate\\Database\\Eloquent\\ModelNotFoundException $th) {\n return response()->error('Traveler Review is not found');\n } catch (\\Throwable $th) {\n return response()->error('Something went wrong', StatusCode::INTERNAL_SERVER_ERROR);\n }\n return response()->successWithKey(new TravelerReviewResource($review), 'traveler_review');\n }", "function getReview($reviewId){\n $db = acmeConnect();\n $sql = 'SELECT reviewText, reviewDate, reviews.invId, invName FROM reviews JOIN inventory ON inventory.invId = reviews.invId WHERE reviewId = :reviewId';\n $stmt = $db->prepare($sql);\n $stmt->bindParam(':reviewId', $reviewId, PDO::PARAM_INT);\n $stmt->execute();\n $clientData = $stmt->fetch(PDO::FETCH_ASSOC);\n $stmt->closeCursor();\n return $clientData;\n}", "function findit_reply_view_reviews($id) {\n ctools_add_css('reply', 'findit_reply', 'css');\n $data = finditreply::index('*', array('id' => $id, 'show_deleted' => 1), 0, 20);\n $reply = $data['data'][0];\n $description = reply_post_html($reply);\n return $description;\n}", "public function showReview(Request $request,$id){\n\t\t$UserId=base64_decode($id);\n\t $homeTitle = 'Review List';\n\t\t$reviewList = DB::table('sb_product')\n\t\t\t->select('sb_product.*','sb_product.status as productStatus','sb_product.name as productName','sb_review.*')\n\t\t\t->leftJoin('sb_review', 'sb_review.product_id', '=', 'sb_product.product_id')->where('user_id',$UserId)->get(); \n\t\treturn view('admin.customers.reviewlist',array('homeTitle'=>$homeTitle,'reviewList'=>$reviewList,'params'=>$request))\n\t\t->with('i', ($request->input('page', 1) - 1) * env('RECORD_PER_PAGE')); \n }", "function appthemes_get_rating( $review_id ) {\n\t$review = appthemes_get_review( $review_id );\n\treturn $review->get_rating();\n}", "public function retrieve($id);", "public function show($product_id,$review_id)\n {\n //\n }", "public function reviews($id)\n\t{\n\t\t//all users\n\t\t$user = User::where('userName', $id)->first();\n\t\tif(empty($user))\n\t\t{\n\t\t\treturn redirect()->back();\n\t\t}\n\t\t$userDetail = UserDetail::where('userId', $user->id)->first();\n\t\t$business = Business::find($userDetail->businessId);\n\t\tif(empty($business))\n\t\t{\n\t\t\treturn redirect('/user/'.$user->userName.'/profile');\n\t\t}\n\t\t$business = (object) array_merge($user->toArray(), $userDetail->toArray(), $business->toArray());\n \treturn view('business.reviews')->withBusiness($business);\n\t}" ]
[ "0.82431614", "0.8216979", "0.7992245", "0.7911477", "0.7829551", "0.7638819", "0.7627322", "0.7467663", "0.74210423", "0.73274493", "0.7132527", "0.69078976", "0.6882474", "0.68679523", "0.68663406", "0.68663406", "0.68663406", "0.68619776", "0.6715965", "0.6697138", "0.6673893", "0.66700155", "0.6657406", "0.6632752", "0.6622968", "0.66207725", "0.6603148", "0.6601313", "0.658358", "0.6560188" ]
0.8272779
0
Testing to validate extensions
public function testValidateExtensions(): void { $darser = new Darser('csv','xml'); $this->assertTrue($darser->validateFileTypes('CSV','XML')); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function testFileValidateExtensions() {\n $file = File::create(['filename' => 'asdf.txt']);\n $errors = file_validate_extensions($file, 'asdf txt pork');\n $this->assertCount(0, $errors, 'Valid extension accepted.');\n\n $file->setFilename('asdf.txt');\n $errors = file_validate_extensions($file, 'exe png');\n $this->assertCount(1, $errors, 'Invalid extension blocked.');\n }", "public function testExtensionDetector(): void\n {\n $request = new ServerRequest();\n $request = $request->withParam('_ext', 'json');\n $this->assertTrue($request->is('json'));\n\n $request = new ServerRequest();\n $request = $request->withParam('_ext', 'xml');\n $this->assertFalse($request->is('json'));\n }", "abstract public function supportsExtension($extension);", "public function testExtension()\n {\n $this->instance->init();\n $this->instance->serverHandler = & $this->serverHandler;\n\n $this->serverHandler\n ->expects($this->once())\n ->method('name')\n ->willReturn('tests/samsonos.png');\n\n $upload = new Upload(array('xls', 'gif'), null, $this->instance);\n\n $this->assertFalse($upload->upload());\n }", "public function testGetExtFromType() {\n\t\t$this->assertEquals(array('jpe', 'jpeg', 'jpg'), MimeType::getExtFromType('image/jpeg'));\n\t\t$this->assertEquals('jpg', MimeType::getExtFromType('image/jpeg', true));\n\t\t$this->assertEquals(array('png'), MimeType::getExtFromType('image/png'));\n\t\t$this->assertEquals(array(), MimeType::getExtFromType('foo/bar'));\n\t\t$this->assertEquals('txt', MimeType::getExtFromType('text/plain', true));\n\t}", "private function checkExtensions()\n\t{\n\t\t$problem = false;\n\n\t\tforeach ($this->extensions as &$ext)\n\t\t{\n\t\t\tif ($ext['type'] === 'function') {\n $loaded = function_exists($ext['name']);\n } else {\n $loaded = extension_loaded($ext['name']);\n }\n\n\t\t\t//make notice if any extensions status\n\t\t\t//doesn't match what we need\n\t\t\tif ($loaded !== $ext['expected'])\n\t\t\t{\n\t\t\t\t$problem = true;\n\t\t\t}\n\n\t\t\t$ext['actual'] = $loaded;\n\t\t}\n\n\t\t$this->compatResults['problem'] = $problem;\n\n\t\treturn $this->extensions;\n\t}", "public function providerTestFileValidateExtensionsOnUri(): array {\n $temporary_txt_file_properties = [\n 'filename' => 'asdf.txt',\n 'uri' => 'temporary://asdf',\n 'status' => 0,\n ];\n $permanent_txt_file_properties = [\n 'filename' => 'asdf.txt',\n 'uri' => 'public://asdf_0.txt',\n 'status' => 1,\n ];\n $permanent_png_file_properties = [\n 'filename' => 'The Druplicon',\n 'uri' => 'public://druplicon.png',\n 'status' => 1,\n ];\n return [\n 'Temporary txt validated with \"asdf\", \"txt\", \"pork\"' => [\n 'File properties' => $temporary_txt_file_properties,\n 'Allowed_extensions' => ['asdf', 'txt', 'pork'],\n 'Expected errors' => [],\n ],\n 'Temporary txt validated with \"exe\" and \"png\"' => [\n 'File properties' => $temporary_txt_file_properties,\n 'Allowed_extensions' => ['exe', 'png'],\n 'Expected errors' => [\n 'Only files with the following extensions are allowed: <em class=\"placeholder\">exe png</em>.',\n ],\n ],\n 'Permanent txt validated with \"asdf\", \"txt\", \"pork\"' => [\n 'File properties' => $permanent_txt_file_properties,\n 'Allowed_extensions' => ['asdf', 'txt', 'pork'],\n 'Expected errors' => [],\n ],\n 'Permanent txt validated with \"exe\" and \"png\"' => [\n 'File properties' => $permanent_txt_file_properties,\n 'Allowed_extensions' => ['exe', 'png'],\n 'Expected errors' => [\n 'Only files with the following extensions are allowed: <em class=\"placeholder\">exe png</em>.',\n ],\n ],\n 'Permanent png validated with \"png\", \"gif\", \"jpg\", \"jpeg\"' => [\n 'File properties' => $permanent_png_file_properties,\n 'Allowed_extensions' => ['png', 'gif', 'jpg', 'jpeg'],\n 'Expected errors' => [],\n ],\n 'Permanent png validated with \"exe\" and \"txt\"' => [\n 'File properties' => $permanent_png_file_properties,\n 'Allowed_extensions' => ['exe', 'txt'],\n 'Expected errors' => [\n 'Only files with the following extensions are allowed: <em class=\"placeholder\">exe txt</em>.',\n ],\n ],\n ];\n }", "public function isExt ($ext);", "public function testGetTypeFromExt() {\n\t\t$this->assertEquals('image/jpeg', MimeType::getTypeFromExt('jpg'));\n\t\t$this->assertEquals('image/png', MimeType::getTypeFromExt('png'));\n\t\t$this->assertEquals('application/x-7z-compressed', MimeType::getTypeFromExt('7z'));\n\n\t\ttry {\n\t\t\tMimeType::getTypeFromExt('foobar');\n\n\t\t\t$this->assertTrue(false);\n\n\t\t} catch (Exception $e) {\n\t\t\t$this->assertTrue(true);\n\t\t}\n\t}", "private function assertExtensions()\n {\n if (!extension_loaded('curl')) {\n throw new NotSupportedException(\n 'The \"curl\" extension is required by this connection backend.'\n );\n }\n\n if (!extension_loaded('phpiredis')) {\n throw new NotSupportedException(\n 'The \"phpiredis\" extension is required by this connection backend.'\n );\n }\n }", "public function testPHPandExtensions(){\n\t\n\t//check php version\n\t$this->assertGreaterThanOrEqual(0, version_compare(PHP_VERSION, $this->_min_php_ver), \"Your PHP version must be at least $this->_min_php_ver.\");\n\n\t//check which extensions are available\n\tforeach($this->_extensions as $extension => $message){\n\t try {\n\t\t$this->assertTrue(extension_loaded($extension));\n\t }\n\t catch (PHPUnit_Framework_ExpectationFailedException $e) {\n\t $this->_warnings[$extension] = \"Extension $extension was not found: $message\";\n\t }\n\t}\n\t\n\t//check if versions of extension are valid\n\tforeach($this->_extensions_versions as $extension => $version){\n\t if(isset($this->_warnings[$extension])) continue; //skip all not found extensions\n\t \n\t $ext_version = phpversion($extension);\n\t try {\n\t\t$this->assertGreaterThanOrEqual(0, version_compare($ext_version, $version));\n\t }\n\t catch (PHPUnit_Framework_ExpectationFailedException $e) {\n\t $this->_warnings[] = \"Least tested version of $extension extension is $version. Detected version is: $ext_version. Consider upgrading!\";\n\t }\n\t}\n\n\t$this->assertEmpty($this->_warnings, \"Warnings occured: \\n\".implode(\"\\n\", $this->_warnings));;\n }", "public function check() {\n\t\t$loadedExtensions = get_loaded_extensions();\n\t\tif (!in_array($this->extensionName, $loadedExtensions)) {\n\t\t\t$this->log('Extension '.$this->extensionName.' is required', Project::MSG_ERR);\n\t\t\treturn 1;\n\t\t}\n\t\t$this->log('Extension '.$this->extensionName.' is passed', Project::MSG_VERBOSE);\n\t\treturn 0;\n\t}", "public function getIsExtension() {}", "function check_extension_validity($temp)\r\n {\r\n $this->allowedExts = array_map('strtolower', $this->allowedExts);\r\n\r\n // Business Logic\r\n $extension = end($temp);\r\n $allowedE = false;\r\n\r\n $json = array(\r\n \"status\" => 'false',\r\n );\r\n\r\n $extension = strtolower($extension);\r\n $extension = trim($extension, \" \");\r\n\r\n // Check extension\r\n if(in_array($extension, $this->allowedExts)){\r\n $allowedE = true;\r\n }\r\n else\r\n {\r\n\t\tif($this->chunkEnabled)\r\n\t\t\t$json['error'] = $_REQUEST[\"file-type\"].\": Invalid file type!\";\r\n\t\telse\r\n\t\t\t$json['error'] = $_FILES[\"SelectedFile\"][\"type\"].\": Invalid file type!\";\r\n\t\t\t\r\n echo json_encode($json);\r\n die();\r\n }\r\n \r\n return true;\r\n }", "function checkExtension()\n\t{\n\t\t$ext = substr( strrchr( $this->mediaName , '.' ) , 1 ) ;\n\t\tif( ! empty( $this->allowedExtensions ) && ! in_array( strtolower( $ext ) , $this->allowedExtensions ) ) {\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "function parseExtensions() {\n\t\t$self =& Router::getInstance();\n\t\t$self->__parseExtensions = true;\n\t\tif (func_num_args() > 0) {\n\t\t\t$self->__validExtensions = func_get_args();\n\t\t}\n\t}", "private static function trustExtensions(){\n\t\t\n\t\t//Otherwhise, continue treatment\n\t\t$extensions = config\\Extensions::$_extensions;\n\t\t$extensionsKeys = array_keys($extensions);\t\t\n\t\t\n\t\ttry {\n\t\t\t\t\t\t\n\t\t\tif( isset($extensions['exception.manager']) && array_shift($extensionsKeys) != 'exception.manager'){ throw new \\Exception('First Extension must be \"exception.manager\", please refactor extensions configuration file with command line like this \"php console -r\"'); }\t\t\t\n\t\t\tself::$_extension = $extensions;\n\t\t\treturn true;\n\t\t\t\t\t\n\t\t} catch (Exception $e) {\n\t\t\techo 'Exception received: \"'.$e->getMessage().'\" ';\t\t\t\n\t\t}\n\t}", "public function testFileExtension(): void\n {\n $formatter = new Xml($this->serializer->reveal());\n $this->assertEquals('.xml', $formatter->getExtension());\n }", "public function testCanGetManagedExtensions()\n {\n $this->mockWooCommerceExtensionsRequestFunctions();\n $this->mockSkyVergeExtensionsRequestFunctions();\n\n $extensions = ManagedExtensionsRepository::getManagedExtensions();\n\n $this->assertIsArray($extensions);\n $this->assertCount(2, $extensions);\n }", "abstract public static function getAllowedExtensions(): array;", "public static function ValidateExtensions() {\n if (fusion_get_settings('mime_check')) {\n if (isset($_FILES) && count($_FILES)) {\n $mime_types = mimeTypes();\n foreach ($_FILES as $each) {\n // Here can be param,\n\n if (isset($each['name']) && !empty($each['name']) && !empty($each['tmp_name'])) {\n if (is_array($each['name'])) {\n\n for ($i = 0; $i < count($each['name']); $i++) {\n $file_info = pathinfo($each['name'][$i]);\n if (!empty($file_info['extension'])) {\n $extension = strtolower($file_info['extension']);\n if (isset($mime_types[$extension])) {\n if (is_array($mime_types[$extension])) {\n $valid_mimetype = FALSE;\n foreach ($mime_types[$extension] as $each_mimetype) {\n if ($each_mimetype == $each['type'][$i]) {\n $valid_mimetype = TRUE;\n break;\n }\n }\n if (!$valid_mimetype) {\n die('Prevented an unwanted file upload attempt!');\n }\n unset($valid_mimetype);\n } else {\n if ($mime_types[$extension] != $each['type']) {\n die('Prevented an unwanted file upload attempt!');\n }\n }\n }\n unset($file_info, $extension);\n }\n }\n } else {\n $file_info = pathinfo($each['name']);\n if (!empty($file_info['extension'])) {\n $extension = strtolower($file_info['extension']);\n if (isset($mime_types[$extension])) {\n if (is_array($mime_types[$extension])) {\n $valid_mimetype = FALSE;\n foreach ($mime_types[$extension] as $each_mimetype) {\n if ($each_mimetype == $each['type']) {\n $valid_mimetype = TRUE;\n break;\n }\n }\n if (!$valid_mimetype) {\n die('Prevented an unwanted file upload attempt!');\n }\n unset($valid_mimetype);\n } else {\n if ($mime_types[$extension] != $each['type']) {\n die('Prevented an unwanted file upload attempt!');\n }\n }\n }\n unset($file_info, $extension);\n }\n }\n }\n }\n unset($mime_types);\n }\n }\n }", "public function testExtensionReturnsExtension()\n {\n file_put_contents(self::$temp . DS . 'foo.txt', 'foo');\n\n $this->assertSame('txt', Storage::extension(self::$temp . DS . 'foo.txt'));\n }", "public function validate_extension($data, $param, $error='', $success='')\n {\n if(!$this->validate_required($data)){\n $this->_error = $error;\n return false;\n }\n\n if (is_array($data) && $data['error'] !== 4) {\n $param = trim(strtolower($param));\n $allowed_extensions = explode(';', $param);\n\n $path_info = pathinfo($data['name']);\n $extension = isset($path_info['extension']) ? $path_info['extension'] : false;\n\n if ($extension && in_array(strtolower($extension), $allowed_extensions)) {\n $this->_success = $success;\n return true;\n }else{\n $this->_error = $error;\n return false;\n }\n }\n }", "abstract protected function storeExtension();", "function check_allowed_extensions($filename)\r\n{\r\n\t$ci = & get_instance();\r\n\t$extension = strtolower(file_extension($filename));\r\n\t\r\n\tif(in_array($extension, $ci->config->item('video_extensions'))){\r\n\t\treturn TRUE;\r\n\t} else {\r\n\t\treturn FALSE;\r\n\t}\r\n\t\r\n}", "abstract protected function getExtension();", "function bgl360_di_isValidUploadFileExtension($file, $accepted_extension) {\r\n\r\n $path_parts = pathinfo($file[\"name\"]);\r\n $extension = $path_parts['extension'];\r\n\r\n// echo \"THis is extracted extension \" . $extension;\r\n if(in_array( '.' . $extension, $accepted_extension)) {\r\n return true;\r\n }\r\n else\r\n {\r\n return false;\r\n }\r\n}", "public function test_addingExtension()\n\t{\n\t\t$this->map->add('test', Array());\n\n\t\t$this->assertTrue($this->map->has('test'));\n\t\t$this->assertEquals(Array(), $this->map->get('test'));\n\t}", "protected function getExtensions()\n {\n $this->validator = $this->createMock(ValidatorInterface::class);\n // use getMock() on PHPUnit 5.3 or below\n // $this->validator = $this->getMock(ValidatorInterface::class);\n $this->validator\n ->method('validate')\n ->will($this->returnValue(new ConstraintViolationList()));\n $this->validator\n ->method('getMetadataFor')\n ->will($this->returnValue(new ClassMetadata(Form::class)));\n\n return [\n new ValidatorExtension($this->validator),\n ];\n }", "public function testValidate(): void\n {\n $this->assertTrue(method_exists(ShopAdmin::class, 'validate'));\n }" ]
[ "0.7869658", "0.7221979", "0.7017274", "0.6965364", "0.6919844", "0.6853955", "0.6660011", "0.65833974", "0.65692604", "0.6541264", "0.65374804", "0.6490003", "0.64814246", "0.6480545", "0.64655423", "0.64211655", "0.6413048", "0.63916945", "0.6369549", "0.63107854", "0.6247205", "0.6230546", "0.62022567", "0.6197945", "0.6195667", "0.6189424", "0.61641043", "0.6163161", "0.6131449", "0.6126295" ]
0.78766906
0
Lists all Author models.
public function actionIndex() { $searchModel = new AuthorSearch(); $dataProvider = $searchModel->search(Yii::$app->request->queryParams); return $this->render('index', [ 'searchModel' => $searchModel, 'dataProvider' => $dataProvider, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionIndex()\n {\n $modelAuthor = new Author();\n $dataProvider = $modelAuthor->search(Yii::$app->request->get());\n\n return $this->render('index', [\n 'modelAuthor' => $modelAuthor,\n 'dataProvider' => $dataProvider,\n ]);\n }", "public function getAllAuthorsForAdmin()\n {\n $entityManager = $this->getEntityManager();\n $queryBuilder = $entityManager->createQueryBuilder();\n $queryBuilder\n ->select('a')\n ->from('App:Author', 'a')\n ->orderBy('a.id', 'DESC');\n\n return $queryBuilder->getQuery()->getResult();\n }", "public function index()\n {\n $authors = Author::all();\n return view('backend.author.index', compact('authors'));\n }", "function listAuthors(){\n $authorManager=new AuteurManager();\n $authors = $authorManager->getAuthors();\n require 'view/listAuteurView.php';\n }", "public function getAuthors(){\n // Get authors from database\n $authors = $this->model->getAuthors();\n \n // Render the view template where is the add-form and authors table included\n include_once('View.php');\n }", "public function index()\n {\n return response()->json(Author::all());\n }", "public function index()\n {\n $author = Author::all();\n\n return view('admin.content.author.index-author', compact('author'));\n }", "public function index()\n {\n $authors=Author::all();\n return view('backend.author.index', compact('authors'));\n }", "public function listAuthors()\n {\n $cli = new Client(['base_uri' => $this->apiUrl]);\n $authors = $cli->request('GET', 'authors');\n\n return response()->json($authors->getBody()->getContents())->getData();\n }", "public function index()\n {\n $authors=Author::all();\n\n return view('admin.authors.index',compact('authors'));\n }", "public function index()\n {\n $authors = Author::orderBy('updated_at', 'desc')\n ->with(['books:title'])\n ->paginate(10);\n\n return view('authors.index', compact('authors'));\n }", "function displayAllAuthors()\n {\n $query = \"SELECT a.authorid, a.name, \n COUNT(b.authorid) AS bookcount\n FROM authors AS a\n LEFT JOIN books AS b\n ON a.authorid = b.authorid\n GROUP BY a.authorid\";\n $result = $this->conn->query($query);\n\n return $this->buildAuthorsTable($result);\n }", "public function fetch_all_authors(){\n $this->db->select('*');\n $this->db->from('author');\n return $this->db->get()->result();\n }", "public function getAuthors() {\n $authors = Author::get();\n return response()->json($authors, 200);\n }", "public function index()\n {\n $data = Author::all();\n\n return view('pages.author', ['data' => $data]);\n }", "public function index() {\n\t\t$with = array('Books');\n\t\t$authors = Authors::find('all', compact('with'));\n\t\treturn compact('authors');\n\t}", "public function index()\n {\n $author = new Author();\n return view('library', ['authors' => $author->getAllAuthors()]);\n }", "public function actionList()\n\t{\n\t\t/**\n\t\t * @var Author[] $authors\n\t\t */\n\t\t$criteria = new CDbCriteria;\n\n\t\t$query = $this->request->getQuery('q');\n\t\tif ($query)\n\t\t{\n\t\t\t$criteria->addCondition('name like :query');\n\t\t\t$query = str_replace('%', '', $query);\n\t\t\t$query = str_replace('?', '', $query);\n\t\t\t$criteria->params[':query'] = '%' . $query . '%';\n\t\t}\n\n\t\t$count = Author::model()->count($criteria);\n\n\t\t$criteria->limit = 15;\n\t\t$criteria->offset = $this->request->getQuery('offset', 0);\n\n\t\t$authors = Author::model()->findAll($criteria);\n\t\t$this->send(\n\t\t\tarray(\n\t\t\t\t'authors' => $authors,\n\t\t\t\t'count' => $count,\n\t\t\t\t'offset' => $criteria->offset\n\t\t\t)\n\t\t);\n\t}", "public function index()\n {\n //\n // $authors= Author::all();\n $authors = QueryBuilder::for(Author::class)->allowedSorts([\n 'name',\n 'created_at'\n ])->jsonPaginate();\n return AuthorsResource::collection($authors);\n }", "public function getAuthors();", "public function getAuthors();", "public function index()\n {\n $authors = Author::all();\n\n return response()->json($authors);\n }", "public function getAuthorList(): Response\n {\n $authors = $this->authorStorage->findAuthors();\n\n return $this->responseBuilder->buildAuthorCollectionResponse($authors);\n }", "public function index()\n {\n\t$authors = Author::where('id','>','0')->orderBy('surname', 'asc')->get();\n\treturn view('library.edit.authors.authors')->with('authors', $authors);\n }", "public function authors()\n {\n return $this->morphedByMany(Author::class, 'entity', 'entity_category');\n }", "public function index()\n {\n //\n $author = Author::all();\n return view('admin.author.index')->with('author',$author);\n }", "public function index()\n {\n $authors = Author::paginate(6);\n return view('authors.index', compact('authors'));\n }", "public static function GetAuthors()\n {\n self::CheckBackend();\n\n return self::$backend->Get(\"authors\");\n }", "public function index()\n {\n return view('authors.index', [\n 'authors' => Author::latest('id')->get()\n ]);\n }", "public function index()\n {\n $authors = BlogAuthor::orderByDesc('id')->get();\n\n return view('admin.pages.blog.author.index',compact('authors'));\n }" ]
[ "0.7355316", "0.7241322", "0.70736873", "0.7064481", "0.70549697", "0.70170635", "0.69643974", "0.69515806", "0.6912242", "0.68959713", "0.6855745", "0.68424785", "0.6811444", "0.6789704", "0.67778325", "0.6762021", "0.6727622", "0.67179996", "0.67161924", "0.6706853", "0.6706853", "0.66857886", "0.667449", "0.66691273", "0.666721", "0.6623772", "0.6617199", "0.66011673", "0.6583483", "0.6561124" ]
0.7393343
0
Creates a new Author model. If creation is successful, the browser will be redirected to the 'view' page.
public function actionCreate() { $model = new Author(); if ($model->load(Yii::$app->request->post()) && $model->save()) { return $this->redirect(['view', 'id' => $model->id]); } return $this->render('create', [ 'model' => $model, ]); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function actionCreate()\n {\n $model = new Book();\n\n $post = Yii::$app->request->post();\n if ($model->load($post) && $model->save()) {\n // saves authors of book\n $authors = $post['Book']['authors'];\n foreach ($authors as $author) {\n $authorBook = new AuthorBook([\n 'author_id' => $author,\n 'book_id' => $model->id\n ]);\n if(!$authorBook->save()) {\n Yii::$app->session->setFlash('error', 'Author did not save. ' . implode(',', $authorBook->getErrorSummary(true)));\n }\n }\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n 'authors' => Author::find()->select(['id', 'name'])->notDeleted()->all(),\n ]);\n }", "public function create()\n {\n $data['title']='Author Create';\n return view('admin.author.create',$data);\n }", "public function actionCreate()\n\t{\n\t\t/**\n\t\t * @var Author $author\n\t\t */\n\n\t\tif ($this->session == null)\n\t\t{\n\t\t\t$this->authFailed();\n\t\t}\n\n\t\tif (!isset($this->payload->name))\n\t\t{\n\t\t\t$this->sendError(400, 'ERR_INVALID', 'Author\\'s name is required');\n\t\t}\n\n\t\tif (Author::model()->findByAttributes(array('name' => $this->payload->name)) != null)\n\t\t{\n\t\t\t$this->sendError(400, 'ERR_EXISTS', 'Author with this name already exists');\n\t\t}\n\n\t\t$author = new Author;\n\t\t$author->submitter_id = $this->session->user_id;\n\t\t$author->name = $this->payload->name;\n\t\t$author->slug = Model::slugify($author->name, 'author');\n\t\t$author->pullWikiInfo();\n\t\t$author->save();\n\n\t\t$this->send(\n\t\t\tarray(\n\t\t\t\t'author' => $author\n\t\t\t)\n\t\t);\n\t}", "public function create(){\n $author = new Author;\n return view('admin/author/edit', compact('author'));\n }", "public function create()\n {\n //\n return view('admin.author.create');\n }", "public function create()\n {\n return view('author.create');\n }", "public function create()\n {\n return view('author.create');\n }", "public function create()\n {\n return view('backend.author.create');\n }", "public function create()\n {\n\treturn view('library.edit.authors.create');\n }", "public function create()\n {\n return view('authors.create');\n }", "public function create()\n {\n return view('authors.create');\n }", "public function create()\n {\n return view('admin.content.author.create-author');\n }", "public function create()\n {\n $books = Book::all();\n return view('authors.create', compact('books'));\n }", "public function create()\n {\n return view('admin.authors.create');\n }", "public function create()\n {\n return view('admin.authors.create');\n }", "public function create()\n {\n return view('admin.pages.blog.author.create');\n }", "public function store(AuthorRequest $request)\n {\n Author::create($request->all());\n\n return redirect()->route('authors.index')->with(['success' => 'Berhasil menambahkan author']);\n }", "public function create()\n {\n $authors = Author::get();\n\n return view('admin.books.create', compact('authors'));\n }", "public function create() {\n $authors = Author::lists('author_name', 'id');\n\n return view('books.create', compact('authors'));\n }", "public function newAction()\n {\n $form = $this->createForm(new AuthorType(), new Author());\n\n return array(\n 'form' => $form->createView(),\n );\n }", "public function create()\n {\n $authors = Author::all()->sortBy('surname');\n return view('book.create', ['authors' => $authors]);\n\n }", "public function actionCreate()\n {\n $model = new Engineers();\n\n if ($model->load(Yii::$app->request->post())) {\n $model->user_id = Yii::$app->user->id;\n if($model->save()){\n return $this->redirect(['view', 'id' => $model->id]);\n } \n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function actionCreate()\n {\n $model = new Blog();\n $model->language=Yii::$app->language;\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n if ($model->status == Blog::STATUS_PUBLISHED) {\n return $this->redirect($model->viewUrl);\n }\n return $this->redirect(['manage']);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function create()\n {\n return view('panel.authors.new');\n }", "public function actionCreate()\n {\n $model = new Person();\n\n if ($model->load(Yii::$app->request->post()) && $model->save()) {\n return $this->redirect(['view', 'id' => $model->id_person]);\n } else {\n return $this->render('create', [\n 'model' => $model,\n ]);\n }\n }", "public function add() {\n\t\t$author = new Author;\n\t\treturn View::make('authors.add',array(\n\t\t\t'author'=> $author\n\t\t))->with(\"title\",\"Author Add View from controller.add\");\t\n\t}", "public function addauthorAction()\n\t{\n\t\t//display publication\n\t\t$id = $this->getRequest()->id;\n\t\t\n\t\t//get selected id\n\t\t$result = $this->_publicationModel->getPublication($id);\n\t\t$publication = $result->toArray();\n\t\t\n\t\t$test = $result->current();\n\t\t$publisher = $test->findDependentRowset('Application_Model_dbTable_Publisher', 'publication');\n\t\t//$publisherName = $publisher->publisher;\n\t\t\n\t\t$this->view->publication = $publication;\n\t\t$this->view->publisher = $publisher;\n\t\t\n\t\t//get Author\n\t\t\n\t\t\n\t\t\n\t\t//FORM\n\t}", "public function create()\n {\n //\n $role = Role::pluck('name', 'id');\n\n return view('admin.author.create', compact('role'));\n }", "public function create()\n {\n return view('books.create', [\n 'authors'=> Author::all()\n ]);\n }", "public function actionCreate()\n {\n $model = new Article();\n\n if ($model->load(Yii::$app->request->post()) && $model->saveArticle()) { //данные из формы попадают через Лоад,\n //и сохраняется через сэйв пройдя валидацию\n return $this->redirect(['view', 'id' => $model->id]);\n }\n\n return $this->render('create', [\n 'model' => $model,\n ]);\n }" ]
[ "0.7631055", "0.7579368", "0.7484839", "0.74282676", "0.73970455", "0.73311436", "0.73311436", "0.7269441", "0.7237582", "0.708487", "0.708487", "0.70411813", "0.69810694", "0.69770765", "0.69770765", "0.6793419", "0.67827535", "0.66978925", "0.66539246", "0.6635443", "0.66024536", "0.65554726", "0.6528329", "0.65265447", "0.6521933", "0.6514176", "0.6507294", "0.65035355", "0.64801466", "0.6425542" ]
0.8664539
0
Finds the Author model based on its primary key value. If the model is not found, a 404 HTTP exception will be thrown.
protected function findModel($id) { if (($model = Author::findOne($id)) !== null) { return $model; } throw new NotFoundHttpException('The requested page does not exist.'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function readAuthor($id){\n return Authors::findOrFail($id);\n }", "public function show($id)\n {\n $id = hashids_decode($id);\n return Author::findOrFail($id);\n }", "function getAuthorByParam($code, $param)\n\t{\n\t\tif ($code == 'id') {\n\t\t\treturn $this->authorfactory->create()->load($param);\n\t\t} else {\n\t\t\treturn $this->authorfactory->create()->load($param, $code);\n\t\t}\n\t}", "public function find($key): ?Model;", "public function show($id)\n {\n return author::findOrFail($id);\n }", "public function getAuthor(PDO $con)\n\t{\n\t\tif (null === $this->author_id) {\n\t\t\treturn null;\n\t\t}\n\t\t$sql = 'SELECT author.id, author.first_name, author.last_name\n \tFROM author \n \tWHERE author.id = :id\n \tLIMIT 1';\n $stmt = $con->prepare($sql);\n\t\t$stmt->bindValue(':id', $this->author_id, PDO::PARAM_INT);\n\t\t$stmt->execute();\n\t\tif ($row = $stmt->fetch(PDO::FETCH_NUM)) {\n\t\t\trequire_once 'Author.php';\n\t\t\t$author = new Author();\n\t\t\t$author->load($row);\n\t\t\treturn $author;\n\t\t} else {\n\t\t\tthrow new Exception(sprintf(\n\t\t\t\t'No author for this book\\'s author_id, %d',\n\t\t\t\t$this->author_id\n\t\t\t));\n\t\t}\n\t}", "public function actionGet($id)\n\t{\n\t\t/**\n\t\t * @var Author $author\n\t\t */\n\t\tif (is_numeric($id))\n\t\t{\n\t\t\t$author = Author::model()->with('poems')->findByPk($id);\n\t\t}\n\t\telse\n\t\t{\n\t\t\t$author = Author::model()->with('poems')->findByAttributes(array('slug' => $id));\n\t\t}\n\n\t\tif ($author == null)\n\t\t{\n\t\t\t$this->sendError(404, 'ERR_NOT_FOUND', 'Author is not found');\n\t\t}\n\n\t\tif ($this->request->getQuery('wiki') == 'true')\n\t\t{\n\t\t\t$api_url = 'http://en.wikipedia.org/w/api.php?format=json&action=query&prop=extracts|info&inprop=url&exsentences=10&titles=' . urlencode($author->name);\n\t\t\t$response = file_get_contents($api_url);\n\t\t\tif ($response)\n\t\t\t{\n\t\t\t\t$data = json_decode($response, true);\n\t\t\t\tif ($data && isset($data['query']) && isset($data['query']['pages']) && count($data['query']['pages']) > 0)\n\t\t\t\t{\n\t\t\t\t\t$ids = array_keys($data['query']['pages']);\n\t\t\t\t\t$page = $data['query']['pages'][$ids[0]];\n\t\t\t\t\t$author->wiki_url = $page['fullurl'];\n\t\t\t\t\t$author->wiki_excerpt = $page['extract'];\n\t\t\t\t\t$author->save();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$this->send(array('author' => $author));\n\t}", "public function getAuthorDetails($author_id);", "public function getAuthor()\n {\n return $this->hasOne(Author::className(), ['id_author' => 'id_author']);\n }", "public function view() {\n\t\t$with = array('Books');\n\t\t$conditions = array('Authors.id' => $this->request->id);\n\t\t$author = Authors::find('first', compact('conditions', 'with'));\n\n\t\t// Check Author existence\n\t\tif (!$author) {\n\t\t\t$this->redirect('Authors::index');\n\t\t}\n\t\treturn compact('author');\n\t}", "public function findBySLug($slug)\n {\n $record = $this->model->where('slug', $slug)->first();\n if ($record) {\n return $record;\n }\n throw new ModelNotFoundException();\n }", "public function find($primary);", "public function obtainAuthor($author)\n {\n return $this->performRequest('GET', \"/authors/{$author}\");\n }", "protected function findModel($id)\n {\n if (($model = Blog::findOne($id)) !== null) {\n return $model;\n } else {\n Log::record(Log::DOCUMENTS, Log::WARNING, 'The requested page does not exist', 404, true);\n }\n }", "public function getAuthor()\n {\n return $this->hasOne(User::class, ['id' => 'author_id']);\n }", "public static function findByPk($pk, $asModel = true) {\r\n try {\r\n $conn = Db::getConn();\r\n $stmt = $conn->prepare('SELECT * FROM ' . self::table() . ' WHERE id = :id LIMIT 1');\r\n $stmt->bindValue(':id', $pk);\r\n $stmt->execute();\r\n $stmt->setFetchMode(\\PDO::FETCH_ASSOC);\r\n\r\n $row = $stmt->fetch();\r\n\r\n if (!$row) {\r\n return null;\r\n }\r\n\r\n if (!$asModel) {\r\n return $row;\r\n }\r\n\r\n $className = get_called_class();\r\n $model = new $className;\r\n foreach ($row as $attr => $val) {\r\n if (property_exists($model, $attr)) {\r\n $model->{$attr} = $val;\r\n }\r\n }\r\n return $model;\r\n } catch (\\PDOException $e) {\r\n // todo throw some our custom exception instead\r\n throw new \\Exception(\"Error: {$e->getMessage()}\");\r\n }\r\n }", "protected function findModel($id)\n\t{\n\t\tif (($model = AuthItem::findOne($id)) !== null) {\n\t\t\treturn $model;\n\t\t} else {\n\t\t\tthrow new NotFoundHttpException('The requested page does not exist.');\n\t\t}\n\t}", "public function index(int $id = null)\n {\n $validator = Validator::make(['id' => $id], [\n 'id' => 'nullable|integer|exists:authors,id'\n ]);\n\n if ($validator->fails()) {\n return $this->validationError($validator);\n }\n\n return AuthorResource::collection(Author::all());\n }", "public function retrieveById($identifier){\n return $this->model::where(\"id\", $identifier)->first();\n }", "public function find(object $model);", "public function find($model);", "public function test_can_get_author_by_id()\n {\n GLOBAL $createdAuthorID;\n\n $response = $this->get(\"$this->url/$createdAuthorID\");\n\n $response->assertStatus(200);\n }", "public function get_author_by_id($authorid){\n $this->load->database();\n $sql = \"SELECT * FROM authors WHERE author_id=?\";\n $query=$this->db->query($sql,$authorid);\n $row = $query->row_array();\n //$this->db->close();\n return $row;\n }", "function findOne($id);", "function getAuthor()\n {\n //Starts@ t_books w/ id for books -> authors_books w/ book_id and matches it to the associated author_id -> takes the author id and links it to the original author id in t_authors -> looks for this specific instance of author. This results in an associated array with keys first_name, last_name, and id\n $returned_authors = $GLOBALS['DB']->query(\"SELECT t_authors.* FROM t_books\n JOIN authors_books ON (t_books.id = authors_books.books_id)\n JOIN t_authors ON (authors_books.authors_id = t_authors.id)\n WHERE t_books.id = {$this->getId()};\");\n //creates empty array to insert the linked author information\n $authors = array();\n //goes through the associated array created by the join statement and builds a new author object from that information\n foreach ($returned_authors as $author) {\n $first_name = $author['first_name'];\n $last_name = $author['last_name'];\n $id = $author['id'];\n $new_author = new Author($first_name, $last_name, $id);\n //pushes the newly created author objects to the empty array\n array_push($authors, $new_author);\n }\n //returns the newly filled array with the resulting author objects\n return $authors;\n }", "public function findByID($id);", "abstract protected function checkGetId(Model $authority, $ability, $model = null);", "public function loadModel($id) {\r\n $model = Documents::model()->findByPk($id);\r\n if ($model === null)\r\n throw new CHttpException(404, 'The requested page does not exist.');\r\n return $model;\r\n }", "public function find($uid) {\n\t\ttry {\n\t\t\t$model = $this->map->get($uid);\n\t\t} catch (tx_oelib_Exception_NotFound $exception) {\n\t\t\t$model = $this->createGhost($uid);\n\t\t}\n\n\t\treturn $model;\n\t}", "public function first() : Model\n\t{\n\t\tif(count($this->results) >= 1)\n\t\t{\n\t\t\treset($this->results);\n\t\t\treturn current($this->results);\n\t\t}\n\t\telse\n\t\t\tthrow new ModelNotFoundException();\n\n\t}" ]
[ "0.65306467", "0.61246544", "0.61191285", "0.61117256", "0.60596853", "0.6020759", "0.5993108", "0.59584916", "0.5878868", "0.5760952", "0.5740583", "0.5740308", "0.5704803", "0.56846297", "0.5663507", "0.56616384", "0.56587666", "0.56008846", "0.5599265", "0.5599024", "0.5589867", "0.55867064", "0.55837476", "0.5567452", "0.5566037", "0.5555484", "0.554567", "0.55331445", "0.553163", "0.5523554" ]
0.6658924
0
Using the configuration, load (instantiate) all elements defined for the application
private function loadElements() { $template_metadata = $this->getTemplate()->getMetadata(); $this->elements = array(); $counter = 0; foreach($template_metadata['regions'] as $region) { $this->regions[$region] = array(); // Only iterate over regions defined in the app if(!array_key_exists($region, $this->configuration['elements'])) { continue; } foreach($this->configuration['elements'][$region] as $name => $element) { // Extract and unset class, so we can use the remains as configuration $class = $element['class']; unset($element['class']); $id = sprintf($this->element_id_template, $counter++); $this->regions[$region][] = new $class($id, $name, $element, $this); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function load() {\n\n\t\t$this->initialize_components();\n\t\t$this->initialize_pages();\n\n\t\tforeach ( $this->components as $component ) {\n\t\t\t$component->load();\n\t\t}\n\n\t\tforeach ( $this->pages as $page ) {\n\t\t\t$page->load();\n\t\t}\n\t}", "protected static function load()\n {\n $configs = require path('configs') . 'app' . Config::FILE_EXTENSION;\n\n // Pushes the loaded configs from the given identifier\n static::$stack = (new Collection($configs))->all();\n }", "public function load() {\r\n\t\t$this->includes();\r\n\t\t$this->inits();\r\n\t}", "public function load() {\r\n\t\t$this->includes();\r\n\t\t$this->inits();\r\n\t}", "protected function instantiateConfig()\n {\n $GLOBALS['CFG'] = & load_class('Config', 'core');\n\n // Do we have any manually set config items in the index.php file?\n if (isset($assign_to_config)) {\n $GLOBALS['CFG']->_assign_to_config($assign_to_config);\n }\n }", "private function loadConfigElement() {\n\n if ($this->allowedElement == NULL) {\n $typeEltJson = self::createFormByConfig(\\EspaceMembre\\Module::$ModuleLocation.\"/ressources/Json/typeconfig.json\");\n $this->allowedElement = json_decode($typeEltJson, true);\n }\n }", "public function load() {\n\t\t$this->build();\n\t}", "public function loadElements()\n {\n $this->add($this->getIdElement($this->translator->translate('Device')));\n\n if ($this->mode === self::MODE_ADMIN) {\n $this->add(\n array(\n 'name' => 'name',\n 'options' => array(\n 'label' => $this->translator->translate('Name'),\n 'label_attributes' => array(\n 'class' => 'form_row'\n ),\n ),\n 'attributes' => array(\n 'required' => 'true'\n )\n )\n );\n\n $this->add(\n array(\n 'name' => 'snmpVersion',\n 'type' => '\\Zend\\Form\\Element\\Select',\n 'options' => array(\n 'label' => $this->translator->translate('SNMP Version'),\n 'label_attributes' => array(\n 'class' => 'form_row'\n ),\n 'value_options' => array(\n \\SNMP::VERSION_1 => 'VERSION_1',\n \\SNMP::VERSION_2C => 'VERSION_2C',\n \\SNMP::VERSION_3 => 'VERSION_3',\n )\n ),\n 'attributes' => array()\n )\n );\n\n $this->add(\n array(\n 'name' => 'snmpCommunity',\n 'options' => array(\n 'label' => $this->translator->translate('SNMP Community'),\n 'label_attributes' => array(\n 'class' => 'form_row'\n ),\n ),\n 'attributes' => array(\n 'required' => 'true'\n )\n )\n );\n\n /**\n * -------------------------\n * DEVICE TYPE FIELDSET\n * -------------------------\n */\n $type = $this->buildFieldset(new Type());\n $type->setDenyFilters(array('name'));\n $type->loadElements();\n $this->add($type);\n\n // Changing the label of the type field\n $type->get('id')->setLabel($this->translator->translate('Device type'));\n\n /**\n * -------------------------\n * INTERFACE FIELDSET\n * -------------------------\n */\n $interface = $this->buildFieldset(new Iface());\n $interface->setDenyFilters(array('id'));\n $interface->loadElements();\n $this->add($interface);\n\n // Changing the label of the interface type field\n $interface->get('type')->get('id')->setLabel($this->translator->translate('Interface type'));\n }\n }", "protected function load()\n {\n foreach (config('shield.enabled') as $name => $class) {\n $this->register($name, $class);\n }\n }", "public function loadConfiguration()\n\t{\n\t\t$container = $this->getContainerBuilder();\n\n\t\t$container->addDefinition($this->prefix('stopwatch'))\n\t\t\t->setClass('StopwatchModule\\Stopwatch')\n\t\t\t->addSetup('Nette\\Diagnostics\\Debugger::$bar->addPanel(?)', array('@self'));\n\n\t\t$container->getDefinition('application')\n\t\t\t->addSetup('$_this; $service->onStartup[] = function () {?->start(\"application\"); }', array($this->prefix('@stopwatch')))\n\t\t\t->addSetup('$service->onRequest[] = function () {?->stop(\"application: request\", \"application\"); }', array($this->prefix('@stopwatch')))\n\t\t\t->addSetup('$service->onResponse[] = function () {?->stop(\"application: response\", \"application\"); }', array($this->prefix('@stopwatch')))\n\t\t\t->addSetup('$service->onShutdown[] = function () {?->stop(\"application: shutdown\", \"application\"); }', array($this->prefix('@stopwatch')));\n\t}", "public function load() {\n\t\t$this->load_common();\n\t\t$this->load_admin();\n\t}", "public function initialize()\n {\n // Load the components\n foreach ($this->components as $class => $null) {\n $this->components[$class] = new $class($this);\n $this->components[$class]->load();\n }\n }", "protected function setupComponents()\n {\n $components = Arr::get($this->config, 'components');\n foreach ($components as $component) {\n $instance = new $component($this->config);\n $instance->setup();\n\n $this->componentInstances[ $component ] = $instance;\n }\n }", "protected function loadConfigs()\n {\n $configs = include rtrim($this->basePath, '/') . '/config/app.php';\n Config::getInstance($configs);\n }", "public function load()\n {\n $this->getPages()->each(function ($page) {\n $action = $page->browseable ? $page->browseable->getAction()\n : $this->actionResolver->resolve($page);\n\n $route = $this->router->get($page->slug, $action)->name($page->route)->middleware('web');\n\n if ($page->browseable) {\n $route->defaults($page->browseable->getParameterName(), $page->browseable);\n }\n });\n }", "public function init()\n\t{\n\t\t\n\t\t$this->_config = $this->openConfig();\n\t\t// check for any 'bound' parameters\n\t\tforeach ($this->_config as $section => $properties) {\n\t\t\tforeach ($properties['items'] as $key => $property) {\n\t\t\t\tif (isset($property['bound']) && $property['bound']) {\n\t\t\t\t\tYii::app()->setComponent($section, array($key => $property['value']));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t// load setup configuration\n\t\tif ($this->configuration) {\n\t\t\tif (!is_array($this->configuration)) {\n\t\t\t\t$this->configuration = array($this->configuration);\n\t\t\t}\t\n\t\t\tforeach ($this->configuration as $conf) {\n\t\t\t\t$this->mergeConfig($conf);\n\t\t\t}\n\t\t}\n\t}", "abstract public function loadConfig();", "private function loadPlugins() {\n\n\t\t\t/* include all elements */\n\t\t\t$plugins = glob(Application::path('plugins') . '*' , GLOB_ONLYDIR);\n\n\t\t\tforeach($plugins as $plugin) {\n\t\t\t\t/* read metadata */\n\n\t\t\t\t$meta = json_decode(file_get_contents($plugin . '/metadata.json'));\n\n\t\t\t\t/* set view path to include plugin */\n\t\t\t\tTemplate::addPath($plugin . '/views/');\n\n\n\t\t\t\t/* include all config, controllers, language(?), models and set view path to include plugin */\n\t\t\t\tinclude($plugin . '/desmonds.php');\n\t\t\t\t\n\t\t\t\t/* include all config files */\n\n\t\t\t\t$configs = glob($plugin . '/config/*');\n\n\t\t\t\tforeach($configs as $config) {\n\n\t\t\t\t\t\tif(basename($config) != 'config') {\n\n\t\t\t\t\t\t\tif(strstr($config, 'App.php')) {\n\t\t\t\t\t\t\t\t$this->settings['app'] += include($config);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse if(strstr($config, 'Auth.php')) {\n\t\t\t\t\t\t\t\t$this->settings['auth'] += include($config);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse if(strstr($config, 'Session.php')) {\n\t\t\t\t\t\t\t\t$this->settings['session'] += include($config);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\telse if(strstr($config, 'Datastores.php')) {\n\t\t\t\t\t\t\t\t$this->settings['datastores'] += include($config);\n\t\t\t\t\t\t\t}\t\t\t\t\t\n\n\t\t\t\t\t\t\telse if(strstr($config, 'Mail.php')) {\n\t\t\t\t\t\t\t\t$this->settings['mail'] += include($config);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\n\t\t\t\t\t\t\t\t/* custom config file - decide on this later */\n\t\t\t\t\t\t\t\t//$this->settings[];\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\tinclude($config);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\n\n\n\t\t\t\t/* include all controllers */\n\t\t\t\t$controllers = glob($plugin . '/controllers/*');\n\n\t\t\t\tforeach($controllers as $controller) {\n\t\t\t\t\tif(basename($controller) != 'controllers') {\n\n\n\t\t\t\t\t\tinclude($controller);\n\t\t\t\t\t}\n\t\t\t\t}\t\t\t\t\n\n\t\t\t\t/* include all modals */\n\t\t\t\t$models = glob($plugin . '/models/*');\n\n\t\t\t\tforeach($models as $model) {\n\n\t\t\t\t\t\n\t\t\t\t\tif(basename($model) != 'models') {\n\t\t\t\t\t\tinclude($model);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* include routes */\n\t\t\t\tinclude($plugin . '/routes.php');\n\n\n\t\t\t\t/* start the plugin */\n\t\t\t\tinclude($plugin . '/start.php');\n\n\t\t\t\t/* create class */\n\t\t\t\t$plugin_class_name = 'plugin_' . $meta->name;\n\n\t\t\t\t$plugin_obj = new $plugin_class_name();\n\t\t\t\t$plugin_obj->Start();\n\n\n\t\t\t}\n\n\t}", "function __construct() {\n\n $path = dirname(dirname(__DIR__)).\"/config/\";\n\n $this->contenttypes = Yaml::parse($path.\"contenttypes.yml\");\n $this->configuration = Yaml::parse($path.\"config.yml\");\n $this->taxonomies = Yaml::parse($path.\"taxonomies.yml\");\n $this->widgets = Yaml::parse($path.\"widgets.yml\");\n\n /*\n echo \"<pre>\\n\";\n print_r($this->contenttypes);\n echo \"</pre>\\n\";\n\n echo \"<pre>\\n\";\n print_r($this->configuration);\n echo \"</pre>\\n\";\n\n echo \"<pre>\\n\";\n print_r($this->taxonomies);\n echo \"</pre>\\n\";\n */\n }", "public function loadAll()\n {\n $this->loadBuiltins();\n $this->loadApplication();\n }", "public function load() {\n $this->addShortcodes();\n\n foreach ($this->loadedShortcodes as $shortcode) {\n add_shortcode($shortcode->getBase(), array($shortcode, 'renderHolders'));\n }\n }", "protected function loadComponents()\n {\n // Load external components\n foreach ($this->callbacks as $callback) {\n $callback($this);\n }\n\n // Load module items\n foreach (System::listModules() as $module) {\n if ($provider = App::getProvider($module . '\\\\ServiceProvider')) {\n $this->loadComponentsFromArray($provider->registerComponents(), $provider);\n }\n }\n\n // Load plugin components\n foreach (PluginManager::instance()->getPlugins() as $plugin) {\n $this->loadComponentsFromArray($plugin->registerComponents(), $plugin);\n }\n\n // Load app items\n if ($app = App::getProvider(\\App\\Provider::class)) {\n $this->loadComponentsFromArray($app->registerComponents(), $app);\n }\n }", "function load_app()\n{\n global $_config, $_database, $routes, $_authenticator, $_lang;\n\n // Load all application components\n foreach (glob(__DIR__ . '/core/*.php') as $component)\n require_once $component;\n\n $_config = parse_ini_file(__DIR__ . '/../config.ini');\n \n // Load all application routes\n $routes = new App\\Core\\RoutesManager;\n require_once __DIR__ . '/routes.php';\n require_once __DIR__ . '/models/Model.php';\n require_once __DIR__ . '/controllers/Controller.php';\n \n // Load language texts\n if (config('app.enable_multi_lang')):\n $lang_file = __DIR__ . '/langs/' . (isset($_COOKIE['lang']) ? $_COOKIE['lang'] : config('app.default_lang')) . '.php';\n if (is_file($lang_file))\n require_once $lang_file;\n else\n die(\"Cannot load texts from <b>{$lang_file}</b> because file does not exists!\");\n \n $_lang = $_lang;\n endif;\n\n // Load all application models and controllers\n foreach (glob(__DIR__ . '/{models,controllers}/*.php', GLOB_BRACE) as $component):\n if ($component == (__DIR__ . '/models/Model.php') || $component == (__DIR__ . '/controllers/Controller.php'))\n continue;\n\n require_once $component;\n endforeach;\n \n $_database = new App\\Core\\Database;\n $_authenticator = new App\\Core\\Authenticator;\n}", "protected function _construct()\n { \n $this->loadFrontends();\n $this->loadPositions();\n $this->loadCustomLocations();\n $this->loadPageData();\n }", "protected function _load() {\n $file = __DIR__ . '/../../../config/'.$this->_fileName;\n if (file_exists($file)) {\n $xml = simplexml_load_file($file);\n //print_r($xml);\n foreach ($xml as $key => $_device) {\n $this->_data[$key] = array(\n 'type' => $key,\n 'active' => (int)$_device['active'],\n 'description' => (string)$_device->description,\n 'data' => array(),\n );\n\n if ($_device->data->count()) {\n $this->_data[$key]['data'] = $this->_xml2array($_device->data->children());\n }\n }\n\n } else {\n throw new \\Exception('file '.$file.' does not exist');\n }\n }", "public static function init() {\n\t\tself::load_routes();\n\t\tself::load_fields();\n\t}", "private function loadConfig()\n {\n $this->category->config = [];\n $this->loadMeta('admins', 'array');\n $this->loadMeta('members', 'array');\n $this->loadMeta('template');\n $this->loadMetaCategory();\n }", "function load() {\n\t\t\t$this->constants();\n\t\t\t/* hook into WordPress */\n\t\t\t$this->hooks();\n\t\t\t/* include the required admin files */\n\t\t\t$this->admin_includes();\n\t\t}", "private function Setup() {\n\t\t\n\t\t// place for additional sets\n\t\t// e.g. $this->aConfig[ section_key ][ value_key ] = value\n\t\t$sAppConfigIni = DOCROOT . $this->oConfig->getValue( \n\t\t\tsprintf( 'applications.%s.config_file', $this->oRouter->getApplicationName() ) \n\t\t);\n\t\t\n\t\t$this->oConfig->loadIniFile( $sAppConfigIni );\n\t\t\n\t\t$this->sLogsDirectory = $this->getConfig( 'General.Logs_directory', DOCROOT . 'logs/' );\n\t\t$this->sLogsDirectory .= date( 'Y-m-d' ) . '/';\n\t\t\n\t\t// set main framework path\n\t\t$this->addPath( 'Lithium' );\n\t\t\n\t\t// set application path received from config file\n\t\tif ( $sAppPath = $this->getConfig( 'General.App_path' ) ) {\n\t\t\t\n\t\t\t$this->addPath( $sAppPath );\n\t\t\tLoader::addPath( DOCROOT . $sAppPath );\n\t\t\t\n\t\t}\n\t\t\n\t\t// add path for external classes\n\t\tLoader::addPath( DOCROOT );\n\t\t\n\t\t// set language\n\t\tif ( $sLanguage = $this->getConfig( 'Locale.Language' ) ) {\n\t\t\t$this->sLanguage = $sLanguage;\n\t\t}\n\t\t\n\t\tCore_Model::setLithium( $this );\n\t\tCore_Module::setLithium( $this );\n\t\tDatabase_Driver::setLithium( $this );\n\t\t\n\t\t// initialize router\n\t\t$this->oRouter->init();\n\t\t\n\t\tView::setRouter( $this->oRouter );\n\t\tModule_Sorter::setRouter( $this->oRouter );\n\t\tModule_Pagination::setRouter( $this->oRouter );\n\t\t\n\t}", "protected function initElements () {\n return new Elements();\n }" ]
[ "0.6570765", "0.6491467", "0.61611074", "0.61611074", "0.61070216", "0.60618854", "0.6011854", "0.5970534", "0.5952117", "0.58897686", "0.58352524", "0.5825303", "0.58196837", "0.5816887", "0.5813417", "0.5793894", "0.5784408", "0.5778787", "0.5778275", "0.57771236", "0.57681274", "0.57537055", "0.5742412", "0.57000184", "0.56865793", "0.56835544", "0.5682803", "0.5676581", "0.56639755", "0.5658525" ]
0.7012561
0
Using the configuration, load (instantiate all layers defined for the application
private function loadLayers() { $this->layersets = array(); foreach($this->configuration['layersets'] as $name => $layers) { $this->layersets[$name] = array(); foreach($layers as $title => $layer) { //Extract and unset class, so we can use the remains as configuration $class = $layer['class']; unset($layer['class']); $this->layersets[$name][] = new $class($title, $layer); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected static function load()\n {\n $configs = require path('configs') . 'app' . Config::FILE_EXTENSION;\n\n // Pushes the loaded configs from the given identifier\n static::$stack = (new Collection($configs))->all();\n }", "public function loadConfiguration()\n {\n Compiler::loadDefinitions(\n $this->getContainerBuilder(),\n $this->loadFromFile(__DIR__.'/../config/config.neon')['services']\n );\n }", "public function loadConfiguration()\n\t{\n\t\t$container = $this->getContainerBuilder();\n\n\t\t$container->addDefinition($this->prefix('stopwatch'))\n\t\t\t->setClass('StopwatchModule\\Stopwatch')\n\t\t\t->addSetup('Nette\\Diagnostics\\Debugger::$bar->addPanel(?)', array('@self'));\n\n\t\t$container->getDefinition('application')\n\t\t\t->addSetup('$_this; $service->onStartup[] = function () {?->start(\"application\"); }', array($this->prefix('@stopwatch')))\n\t\t\t->addSetup('$service->onRequest[] = function () {?->stop(\"application: request\", \"application\"); }', array($this->prefix('@stopwatch')))\n\t\t\t->addSetup('$service->onResponse[] = function () {?->stop(\"application: response\", \"application\"); }', array($this->prefix('@stopwatch')))\n\t\t\t->addSetup('$service->onShutdown[] = function () {?->stop(\"application: shutdown\", \"application\"); }', array($this->prefix('@stopwatch')));\n\t}", "protected function loadConfigs()\n {\n $configs = include rtrim($this->basePath, '/') . '/config/app.php';\n Config::getInstance($configs);\n }", "public function initialize() {\n $this->loadModel('Players');\n $this->loadModel('Fighters');\n $this->loadModel('Surroundings');\n $this->loadModel('Events');\n $this->loadModel('Guilds');\n\n $this->loadComponent('Flash');\n\n //To regenerate the map each time we connect\n //$this->regenerateMap();\n }", "public function load() {\r\n\t\t$this->includes();\r\n\t\t$this->inits();\r\n\t}", "public function load() {\r\n\t\t$this->includes();\r\n\t\t$this->inits();\r\n\t}", "public function init()\n {\n $di = new \\Phalcon\\DI\\FactoryDefault();\n\n $eventsManager = new \\Phalcon\\Events\\Manager();\n\n //We need to customize the dispatcher to be able to call the desired controller when a URI is not found\n $eventsManager->attach('dispatch', function($event, $dispatcher, $exception) use ($di) {\n if ('beforeException' == $event->getType()) {\n switch ($exception->getCode()) {\n case \\Phalcon\\Dispatcher::EXCEPTION_HANDLER_NOT_FOUND:\n case \\Phalcon\\Dispatcher::EXCEPTION_ACTION_NOT_FOUND:\n $request = $di->get('request');\n $dispatcher->forward(array(\n 'namespace' => 'Modules',\n 'controller' => $this->_notFoundController,\n 'action' => strtolower($request->getMethod())\n ));\n return false;\n }\n }\n });\n\n //Initiating application services\n $di->set('request', \\Configuration::getRequestService(), true);\n\n $di->set('url', \\Configuration::getUrlService(), true);\n\n $di->set('session', \\Configuration::getSessionService(), true);\n\n //Using metaData cache if the application need its, must be active for production\n if (true == \\Configuration::$dbs['models']['useMetadata']) {\n $di->set('modelsMetadata', \\Configuration::getModelsMetadataService(), true);\n }\n\n $di->set('db', \\Configuration::getDBService($eventsManager), true);\n\n $di->set('router', \\Configuration::getRouterService(), true);\n\n $di->set('dispatcher', \\Configuration::getDispatcherService($eventsManager), true);\n\n $di->set('acl', \\Configuration::getACLService(), true);\n\n $this->setDI($di);\n }", "abstract public function loadConfig();", "public function load() {\n\t\t$this->build();\n\t}", "private function __construct()\n {\n $this->container = new ContainerBuilder();\n $loader = new YamlFileLoader($this->container, new FileLocator(__DIR__ . '/../../../config'));\n $loader->load('config.yml');\n $loader->load('services.yml');\n }", "public function loadAll()\n {\n $this->loadBuiltins();\n $this->loadApplication();\n }", "private function load () {\n // Routes\n $this->loadRoutesFrom($this->packagePath('src/routes/web.php'));\n\n // Translations\n $this->loadTranslationsFrom($this->packagePath('resources/lang'), 'redprint');\n\n // Views\n $this->loadViewsFrom($this->packagePath('resources/views'), 'redprint');\n }", "public static function init() {\n\t\tcore::loadClass(\"database\");\n\t\tcore::loadClass(\"person_model\");\n\t\tcore::loadClass(\"doorkey_model\");\n\t\tcore::loadClass(\"technician_model\");\n\t\tcore::loadClass(\"key_status_model\");\n\t}", "public function load() {\n\t\t$this->load_common();\n\t\t$this->load_admin();\n\t}", "public function runLoadersBoot(): void\n {\n // The config files should be loaded first from all the directories in their own loop\n $this->loadConfigsFromShip();\n $this->loadLocalsFromShip();\n $this->loadMigrationsFromShip();\n $this->loadViewsFromShip();\n $this->loadConsolesFromShip();\n $this->loadHelpersFromShip();\n $this->loadOnlyShipProviderFromShip();\n\n // Iterate over all the containers folders and autoload most of the components\n foreach (Laraneat::getAllContainerPaths() as $containerPath) {\n $this->loadConfigsFromContainers($containerPath);\n $this->loadLocalsFromContainers($containerPath);\n $this->loadOnlyMainProvidersFromContainers($containerPath);\n $this->loadMigrationsFromContainers($containerPath);\n $this->loadConsolesFromContainers($containerPath);\n $this->loadViewsFromContainers($containerPath);\n $this->loadHelpersFromContainers($containerPath);\n }\n }", "public function load(array $configs, ContainerBuilder $container)\n {\n \n }", "public function loadConfiguration(): void\n {\n }", "public function loadConfiguration(): void\n {\n }", "public static function init() {\n\n $startTime = microtime(true);\n\n // Load Configuration\n Configuration::load();\n\n // Init DependencyLoader\n require_once Configuration::coreDir . 'DependencyLoader.php';\n $dependencyLoader = new DependencyLoader();\n $dependencyLoader->loadDependencies();\n \n // Circular dependency\n $installerContainer = new InstallerContainer();\n $classFactory = new ClassFactory();\n $installerContainer->setClassFactory($classFactory);\n $classFactory->setInstallerContainer($installerContainer);\n \n $cacheService = new CacheService(Configuration::coreCachesDir);\n $routeContainer = new RouteContainer($classFactory);\n \n // Register implemented dependencies\n $installerContainer->register('IInstallerContainer', $installerContainer);\n $installerContainer->register('IClassFactory', $classFactory);\n $installerContainer->register('IRouteContainer', $routeContainer);\n\n // Load Routes\n if (!$cacheService->load('RouteContainer', $routeContainer))\n {\n $classFactory->loadInstaller('RouteInstaller');\n\n $cacheService->save('RouteContainer', $routeContainer);\n }\n\n // Load DependencyInstallers\n if (!$cacheService->load('InstallerContainer', $installerContainer))\n {\n $applicationFiles = $dependencyLoader->getApplicationFiles();\n\n // Core\n $classFactory->loadInstaller('CoreInstaller');\n\n // Modules\n foreach ($applicationFiles as $fileName => $paths)\n {\n $fileName = substr($fileName, 0, strlen($fileName) - 4);\n if (ValidationHelper::endsWith($fileName, 'Installer'))\n {\n foreach ($paths as $path)\n {\n $path = str_replace('\\\\', '/', $path);\n if (ValidationHelper::startsWith($path, Configuration::modulesDir))\n {\n $classFactory->loadInstaller($fileName);\n }\n }\n }\n }\n\n // Application\n if (ArrayHelper::keyExists($applicationFiles, 'ApplicationInstaller.php'))\n {\n $classFactory->loadInstaller('ApplicationInstaller');\n }\n\n $cacheService->save('InstallerContainer', $installerContainer);\n }\n \n self::$coreLoadTime = round((microtime(true) - $startTime) * 1000, 2);\n\n // Run Application\n $classFactory->call('Application', 'run');\n }", "function load_app()\n{\n global $_config, $_database, $routes, $_authenticator, $_lang;\n\n // Load all application components\n foreach (glob(__DIR__ . '/core/*.php') as $component)\n require_once $component;\n\n $_config = parse_ini_file(__DIR__ . '/../config.ini');\n \n // Load all application routes\n $routes = new App\\Core\\RoutesManager;\n require_once __DIR__ . '/routes.php';\n require_once __DIR__ . '/models/Model.php';\n require_once __DIR__ . '/controllers/Controller.php';\n \n // Load language texts\n if (config('app.enable_multi_lang')):\n $lang_file = __DIR__ . '/langs/' . (isset($_COOKIE['lang']) ? $_COOKIE['lang'] : config('app.default_lang')) . '.php';\n if (is_file($lang_file))\n require_once $lang_file;\n else\n die(\"Cannot load texts from <b>{$lang_file}</b> because file does not exists!\");\n \n $_lang = $_lang;\n endif;\n\n // Load all application models and controllers\n foreach (glob(__DIR__ . '/{models,controllers}/*.php', GLOB_BRACE) as $component):\n if ($component == (__DIR__ . '/models/Model.php') || $component == (__DIR__ . '/controllers/Controller.php'))\n continue;\n\n require_once $component;\n endforeach;\n \n $_database = new App\\Core\\Database;\n $_authenticator = new App\\Core\\Authenticator;\n}", "public function testLoad() {\n\n\t\t$container = new ContainerBuilder();\n\t\t$extension = new MonubitMapExtension();\n\n\t\t$extension->load(array(), $container);\n\n\t}", "protected function loadFactories()\n {\n $this->withFactories(__DIR__ . '/../factories');\n }", "protected function load()\n {\n foreach (config('shield.enabled') as $name => $class) {\n $this->register($name, $class);\n }\n }", "private function load_dependencies()\n {\n\n /**\n * The class responsible for orchestrating the actions and filters of the\n * core plugin.\n */\n require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-flo-launch-loader.php';\n\n /**\n * The class responsible for defining internationalization functionality\n * of the plugin.\n */\n require_once plugin_dir_path(dirname(__FILE__)) . 'includes/class-flo-launch-i18n.php';\n\n /**\n * The class responsible for defining all actions that occur in the admin area.\n */\n require_once plugin_dir_path(dirname(__FILE__)) . 'admin/class-flo-launch-admin.php';\n\n /**\n * The class responsible for defining all actions that occur in the public-facing\n * side of the site.\n */\n require_once plugin_dir_path(dirname(__FILE__)) . 'public/class-flo-launch-public.php';\n\n $this->loader = new Flo_Launch_Loader();\n\n }", "private function loadConfig() {\n $configClass = $this->input->getOption('configclass');\n if (is_null($configClass)) {\n $configClass = DefaultBuilderConfig::class;\n }\n try {\n $this->config = $this->container->get($configClass, [\n 'projectFolder' => $this->getApplication()->getProjectFolder()\n ]);\n } catch (ReflectionException $ex) {\n $this->output->writeln([\n \"<warn>Unable to load the provided configuration [{$configClass}]</warn>\",\n \"<warn>Will continue with the default configuration.</warn>\"\n ]);\n $configClass = DefaultBuilderConfig::class;\n $this->config = $this->container->get($configClass, [\n 'projectFolder' => $this->getApplication()->getProjectFolder()\n ]);\n }\n $this->output->writeln('<info>Using the ' . get_class($this->config) . ' as configuration</info>');\n }", "public function startup() \n\t{\n\t\t//load component classes\n\t\t$this->_loadFiles($this->config->getConfigValue('controller_dir', '/controllers'));\n\t\t$this->_loadFiles($this->config->getConfigValue('model_dir', '/models'));\n\t\t\n\t\t$this->addEventListenerTo('Router', 'router_collect_routes', array(&$this, 'routes'));\n\t}", "public function initializeContainer()\n {\n $this->container = new ContainerBuilder;\n $loader = new YamlFileLoader($this->container, new FileLocator($this->getRootDir() . '/app/config/'));\n $loader->load('services.yml');\n\n $this->container->setParameter('root_dir', $this->getRootDir());\n $this->container->setParameter('env', $this->getEnvironment());\n $this->container->compile();\n }", "public static function init() {\n\t\tcore::loadClass(\"database\");\n\t\tcore::loadClass(\"device_history_model\");\n\t}", "function load_app()\n{\n global $routes, $_config;\n\n // Load all application components\n foreach (glob(__DIR__ . '/core/*.php') as $component)\n require_once $component;\n\n $_config = parse_ini_file(__DIR__ . '/config.ini');\n $routes = new Core\\RoutesManager;\n\n // Load all application routes\n require_once __DIR__ . '/routes.php';\n\n // Load all application models and controllers\n foreach (glob(__DIR__ . '/{models,controllers}/*.php', GLOB_BRACE) as $component)\n require_once $component;\n}" ]
[ "0.67558074", "0.64339936", "0.61736864", "0.60623753", "0.6049427", "0.6003575", "0.6003575", "0.59348816", "0.5845337", "0.5832401", "0.5817407", "0.5753189", "0.57290965", "0.5710772", "0.5699845", "0.56935847", "0.56849676", "0.5682074", "0.5682074", "0.56779706", "0.56684494", "0.5664883", "0.56583256", "0.56520915", "0.56432277", "0.5642744", "0.56230056", "0.5616395", "0.561397", "0.5604348" ]
0.72036225
0
Gets the link's relation type.
public function getLinkRelationType() { return reset($this->rel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLinkType();", "public function getType()\n {\n switch($this->relationType) {\n case \"belongsto\":\n return \"belongsTo\";\n break;\n case \"hasone\":\n return \"hasOne\";\n break;\n case \"belongstomany\":\n return \"belongsToMany\";\n break;\n case \"hasmany\":\n return \"hasMany\";\n break;\n }\n\n return \"\";\n }", "public function getLinkType()\n {\n return $this->linkType;\n }", "public function getLinkType()\n {\n return null;\n }", "public function getXsiTypeName() {\n return \"LinkType\";\n }", "public function getLinkRelationTypes() {\n @trigger_error(__METHOD__ . '() is deprecated in drupal:8.8.0 and will be removed in drupal:9.0.0. Use getLinkRelationType() instead. See https://www.drupal.org/node/3087821.', E_USER_DEPRECATED);\n return $this->rel;\n }", "public function getType() {\n\t\tif ($this instanceof ManyToMany) {\n\t\t\treturn Relationship::TYPE_MANYTOMANY;\n\t\t} else if ($this instanceof ManyToOne) {\n\t\t\treturn Relationship::TYPE_MANYTOONE;\n\t\t} else if ($this instanceof OneToMany) {\n\t\t\treturn Relationship::TYPE_ONETOMANY;\n\t\t} else {\n\t\t\t$class = get_class($this);\n\t\t\tassert(\"false /* Unrecognized Relationship implementation: $class */\");\n\t\t}\n\t}", "public function getLinkedProductType()\n {\n return $this->_get(self::KEY_LINKED_PRODUCT_TYPE);\n }", "public function getLinkTypeId () {\n\t\t$val = $this->cacheGetPlain('link_type_id');\n \tif (is_null($val))\n \t\treturn $this->cacheSetPlain('link_type_id', $this->getOffering()->getLinkTypeId());\n \telse\n \t\treturn $val;\n\t}", "protected function getClass()\n {\n return $this->definition[static::RELATION_TYPE];\n }", "protected function getRelationType($relation)\n {\n if ($relation instanceof HasOne) {\n return 'HasOne';\n }\n\n if ($relation instanceof HasMany) {\n return 'HasMany';\n }\n\n if ($relation instanceof BelongsTo) {\n return 'BelongsTo';\n }\n\n if ($relation instanceof BelongsToMany) {\n return 'BelongsToMany';\n }\n\n if ($relation instanceof HasManyThrough) {\n return 'HasManyThrough';\n }\n\n if ($relation instanceof MorphOne) {\n return 'MorphOne';\n }\n\n if ($relation instanceof MorphMany) {\n return 'MorphMany';\n }\n }", "public function relation()\n {\n return $this->getAttribute('relation');\n }", "public function getLinkTypeRepository()\n {\n return $this->linkTypeRepository;\n }", "public function getLinkTypes();", "protected function getPath()\n\t{\n\t\treturn '/relationship/types';\n\t}", "public function type(): string\n {\n return self::MANY_TO_MANY;\n }", "public function getLinkTypes()\n {\n return $this->getLinkTypeRepository()->findAll();\n }", "public function getXsiTypeName() {\n return \"Link\";\n }", "public function getRelation()\n {\n return $this->relation;\n }", "public function getRelation()\n {\n return $this->relation;\n }", "public function getRelationshipTypes()\n {\n return $this->relationship_types;\n }", "protected function getRelation()\n {\n return $this->relation;\n }", "public function getTypeRef() {\n\t\treturn $this->type;\n\t}", "public function getRelation()\n {\n return $this->attributes[0]->getRelation();\n }", "public function getRelatedPluralTypeName() {\n\t\treturn NameUtils::pluralize($this->getRelatedTypeName());\n\t}", "public function getReverseRelatedTypeName() {\n\t\treturn NameUtils::dasherize($this->getReverseRelatedName());\n\t}", "public function getLinkTypeRepository();", "public function getRelatedTypeName() {\n\t\treturn NameUtils::dasherize($this->getRelatedName());\n\t}", "public function getReverseRelatedPluralTypeName() {\n\t\treturn NameUtils::pluralize($this->getReverseRelatedTypeName());\n\t}", "function get_relation_class($attr, $tabla){\n $relacion = $tabla->get_relationship($attr);\n $cn = $relacion->class_name;\n return $cn;\n}" ]
[ "0.7670537", "0.7493296", "0.74038243", "0.6830232", "0.6756897", "0.66710997", "0.6594187", "0.6551503", "0.65449226", "0.64924306", "0.645693", "0.63094705", "0.62722635", "0.6250034", "0.6215064", "0.61974555", "0.6157208", "0.6148738", "0.6142161", "0.6142161", "0.61218596", "0.60920215", "0.6082979", "0.6070393", "0.598972", "0.5985385", "0.5980751", "0.59788775", "0.59305346", "0.58608395" ]
0.8539034
0
Gets the link's target attributes.
public function getTargetAttributes() { return $this->attributes; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getLinkAttributes();", "public function getLinkAttributes()\n {\n return $this->linkAttributes;\n }", "public function getLinkAttributes()\n {\n return $this->getLinkAttributeRepository()->findAll();\n }", "public function getTarget(): ?string {\n return $this->attributes()->getValue('target');\n }", "public function getTarget() {\n\t\treturn $this->_parsed['target'];\n\t}", "function origin_target_attr ($link = [])\n {\n if (empty($link)) {\n return '';\n }\n\n $rel = !empty($link['target']) && $link['target'] === '_blank' ? 'rel=\"noopenner noreferrer\" ' : '';\n\n return !empty($link['target']) ? ' target=\"' . esc_attr($link['target']) . '\" ' . $rel : '';\n }", "public function attributes()\n {\n $link = new Link();\n $attributes = $link->attributeNames;\n\n return $attributes;\n }", "public function getTargetUrl() {\n return $this->targetUrl;\n }", "public function getTargetUrl()\n {\n return $this->targetUrl;\n }", "public function getTarget()\n\t{\n\t\treturn substr( $this->Link, 0, 1 ) == '/' ? '_self' : '_blank';\n\t}", "public function linkAttributes();", "public function getLinkDataAttributes()\n {\n return array();\n }", "public function getUrlAttributes(): array {\n\t\treturn $this->urlAttributes;\n\t}", "public function getTarget()\n {\n return isset($this->target) ? $this->target : '';\n }", "public function getTarget() {\n\t\treturn $this->get('target');\n\t}", "function getTarget() { return $this->_target; }", "public function getTarget() {\n\t\treturn $this->target;\n\t}", "public function getTarget() {\n\t\treturn $this->target;\n\t}", "public function getTarget()\r\n {\r\n return $this->target;\r\n }", "public function getTarget() {\n return $this->target;\n }", "public function getTarget() {\n return $this->target;\n }", "public function getTarget() {\n return $this->target;\n }", "public function getTarget()\n {\n return $this->target;\n }", "public function getTarget()\n {\n return $this->target;\n }", "public function getTarget()\n {\n return $this->target;\n }", "public function getTarget()\n {\n return $this->target;\n }", "public function getTarget()\n {\n return $this->target;\n }", "public function getTarget()\n {\n return $this->target;\n }", "public function getTarget()\n {\n return $this->target;\n }", "public function getTarget()\n {\n return $this->target;\n }" ]
[ "0.71615225", "0.7101152", "0.6580031", "0.6399873", "0.6390538", "0.63543814", "0.6326238", "0.6263934", "0.6224749", "0.6154202", "0.6133791", "0.60836816", "0.60333", "0.5984273", "0.5960214", "0.59399074", "0.57991344", "0.57991344", "0.5791689", "0.5772329", "0.5772329", "0.5772329", "0.5762319", "0.5762319", "0.5762319", "0.5762319", "0.5762319", "0.5762319", "0.5762319", "0.5762319" ]
0.71571046
1
Merges two equivalent links into one link with the merged cacheability. The links must share the same URI, link relation type and attributes.
public static function merge(Link $a, Link $b) { assert(static::compare($a, $b) === 0, 'Only equivalent links can be merged.'); $merged_cacheability = (new CacheableMetadata())->addCacheableDependency($a)->addCacheableDependency($b); return new static($merged_cacheability, $a->getUri(), $a->getLinkRelationType(), $a->getTargetAttributes()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function rewriteLinks ( &$url, &$text, &$link, &$attributes ) {\n\t\tif ( isset( $attributes['rel'] ) && $attributes['rel'] === 'nofollow' ) {\n\t\t\tglobal $wgArchiveLinksConfig;\n\t\t\tif ( $wgArchiveLinksConfig['use_multiple_archives'] ) {\n\t\t\t\t//need to add support for more than one archival service at once\n\t\t\t\t// (a page where you can select one from a list of choices)\n\t\t\t} else {\n\t\t\t\tswitch ( $wgArchiveLinksConfig['archive_service'] ) {\n\t\t\t\t\tcase 'local':\n\t\t\t\t\t\t//We need to have something to figure out where the filestore is...\n\t\t\t\t\t\t$link_to_archive = urlencode( substr_replace( $url, '', 0, 7 ) );\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'wikiwix':\n\t\t\t\t\t\t$link_to_archive = 'http://archive.wikiwix.com/cache/?url=' . $url;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'webcitation':\n\t\t\t\t\t\t$link_to_archive = 'http://webcitation.org/query?url=' . $url;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase 'internet_archive':\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tif ( /*$wgArchiveLinksConfig['generate_feed'] === true*/ false ) {\n\t\t\t\t\t\t\t$db_slave = wfGetDB( DB_SLAVE );\n\t\t\t\t\t\t\t$db_slave->select( 'el_archive_link_history','*');\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t$link_to_archive = 'http://wayback.archive.org/web/*/' . $url;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t$link = HTML::element('a', array ( 'rel' => 'nofollow', 'class' => $attributes['class'], 'href' => $url ), $text )\n\t\t\t\t. HTML::openElement('sup')\n\t\t\t\t. HTML::openElement('small')\n\t\t\t\t. '&#160;'\n\t\t\t\t. HTML::element('a', array ( 'rel' => 'nofollow', 'href' => $link_to_archive ), '[' . wfMsg( 'archivelinks-cache-title') . ']')\n\t\t\t\t. HTML::closeElement('small')\n\t\t\t\t. HTML::closeElement('sup');\n\n\t\t\treturn false;\n\t\t} else {\n\t\t\treturn true;\n\t\t}\n\t}", "public function addLinks() {\n $original = $this->tweet;\n $this->tweet = $this->addLinksToURLs();\n $this->tweet = $this->addLinksToHashtags();\n $this->tweet = $this->addLinksToUsernamesAndLists();\n $modified = $this->tweet;\n $this->tweet = $original;\n return $modified;\n }", "function setLinkAttributes(array $linkAttributes);", "function make_link(&sys1,&sys2) {\n\tif((string)sys1['links'] != \"\") {\n\t\tsys1warps = explode(',',sys1['links']);\n\t\tif(!in_array(sys2['num'],sys1warps)) {\n\t\t\tsys1warps[] = sys2['num'];\n\t\t\tsys1['links'] = implode(',',sys1warps);\n\t\t}\n\t} else {\n\t\tsys1['links'] = sys2['num'];\n\t}\n\tif((string)sys2['links'] != \"\") {\n\t\tsys2warps = explode(',',sys2['links']);\n\t\tif(!in_array(sys1['num'],sys2warps)) {\n\t\t\tsys2warps[] = sys1['num'];\n\t\t\tsys2['links'] = implode(',',sys2warps);\n\t\t}\n\t} else {\n\t\tsys2['links'] = sys1['num'];\n\t}\n}", "public function linkAttributes();", "public function getLinkAttributes();", "public static function setLinkAttributes($attributes)\n\t{\n\t\tif (!is_object(static::$utilityLinks)) {\n\t\t\treturn;\n\t\t}\n\t\tstatic::$utilityLinks->last->attributes = $attributes;\n\t}", "public static function rebuild_links( $html ) {\n preg_match_all('/href=\"([^\\s\"]+)/', $html, $links);\n\n if (!$links) {\n return $html;\n }\n\n /* Iterate over the extracted links and display their URLs */\n foreach ($links[1] as $link){\n\n /* Do not modify unsubscribe links or non links */\n if ( strstr( $link , '?token=') || !strstr($link,'://') ) {\n continue;\n }\n\n $safe_link = Inbound_API::analytics_track_links( array(\n 'email_id' => self::$row->email_id,\n 'lead_lists' => implode( ',' , self::$email_settings['recipients'] ),\n 'id' => self::$row->lead_id ,\n 'lead_id' => self::$row->lead_id ,\n 'page_id' => 0,\n 'vid' => self::$row->variation_id ,\n 'url' => $link,\n 'utm_source' => urlencode(self::$email['email_title']),\n 'utm_medium' => 'email',\n 'utm_campaign' => '',\n 'tracking_id' => urlencode(self::$email['email_title'])\n ));\n\n $html = str_replace( \"'\".$link.\"'\" , \"'\".$safe_link['url'].\"'\" , $html );\n $html = str_replace( '\"'.$link.'\"' , '\"'.$safe_link['url'].'\"' , $html );\n\n }\n\n return $html;\n }", "function merge(iUriSequence $mergeUri);", "public function testLinkSaveAppendSharedTarget(): void\n {\n $articles = $this->getTableLocator()->get('Articles');\n $tags = $this->getTableLocator()->get('Tags');\n $articlesTags = $this->getTableLocator()->get('ArticlesTags');\n $articlesTags->deleteAll('1=1');\n\n $config = [\n 'sourceTable' => $articles,\n 'targetTable' => $tags,\n 'saveStrategy' => BelongsToMany::SAVE_APPEND,\n ];\n $assoc = $articles->belongsToMany('Tags', $config);\n\n $articleOne = $articles->get(1);\n $articleTwo = $articles->get(2);\n\n $tagTwo = $tags->get(2);\n $tagThree = $tags->get(3);\n\n $this->assertTrue($assoc->link($articleOne, [$tagThree, $tagTwo]));\n $this->assertTrue($assoc->link($articleTwo, [$tagThree]));\n\n $this->assertCount(2, $articleOne->tags, 'In-memory tags are incorrect');\n $this->assertSame([3, 2], collection($articleOne->tags)->extract('id')->toList());\n\n $this->assertCount(1, $articleTwo->tags, 'In-memory tags are incorrect');\n $this->assertSame([3], collection($articleTwo->tags)->extract('id')->toList());\n $rows = $articlesTags->find()->all();\n $this->assertCount(3, $rows, '3 link rows should be created.');\n }", "function expandLinks($post_html) {\r\n $href_regex = \"/<a\\s[^>]*href=\\\"([^\\\"]*)\\\"[^>]*>(.*)<\\/a>/siU\";\r\n if (preg_match_all($href_regex, $post_html, $matches, PREG_PATTERN_ORDER)) {\r\n $hrefs = array_unique($matches[1]); // avoid duplicate curl'ing\r\n foreach ($hrefs as $href) {\r\n $post_html = str_replace($href, unshorten($href), $post_html);\r\n }\r\n }\r\n return $post_html;\r\n}", "function link_execlude($camp_id,$source_link){\r\n\t\t\t\tupdate_post_meta($camp_id,'_execluded_links', get_post_meta($camp_id,'_execluded_links',1).','.$source_link );\r\n\t\t\t}", "function make_link(&$sys1,&$sys2) {\n\tif((string)$sys1['links'] != \"\") {\n\t\t$sys1warps = explode(',',$sys1['links']);\n\t\tif(!in_array($sys2['num'],$sys1warps)) {\n\t\t\t$sys1warps[] = $sys2['num'];\n\t\t\t$sys1['links'] = implode(',',$sys1warps);\n\t\t}\n\t} else {\n\t\t$sys1['links'] = $sys2['num'];\n\t}\n\tif((string)$sys2['links'] != \"\") {\n\t\t$sys2warps = explode(',',$sys2['links']);\n\t\tif(!in_array($sys1['num'],$sys2warps)) {\n\t\t\t$sys2warps[] = $sys1['num'];\n\t\t\t$sys2['links'] = implode(',',$sys2warps);\n\t\t}\n\t} else {\n\t\t$sys2['links'] = $sys1['num'];\n\t}\n}", "public function addLink(SpanContext $context, ?Attributes $attributes = null): Links;", "public function link(string $uri, string|array $rel, array $attributes = []): string;", "public function testGetProductLinks()\n {\n $this->markTestIncomplete('Skipped due to https://jira.corp.x.com/browse/MAGETWO-36926');\n $linkTypes = ['related' => 1, 'upsell' => 4, 'crosssell' => 5, 'associated' => 3];\n $this->linkTypeProviderMock->expects($this->once())->method('getLinkTypes')->willReturn($linkTypes);\n\n $inputRelatedLink = $this->objectManagerHelper->getObject(\\Magento\\Catalog\\Model\\ProductLink\\Link::class);\n $inputRelatedLink->setProductSku(\"Simple Product 1\");\n $inputRelatedLink->setLinkType(\"related\");\n $inputRelatedLink->setData(\"sku\", \"Simple Product 2\");\n $inputRelatedLink->setData(\"type\", \"simple\");\n $inputRelatedLink->setPosition(0);\n\n $customData = [\"attribute_code\" => \"qty\", \"value\" => 1];\n $inputGroupLink = $this->objectManagerHelper->getObject(\\Magento\\Catalog\\Model\\ProductLink\\Link::class);\n $inputGroupLink->setProductSku(\"Simple Product 1\");\n $inputGroupLink->setLinkType(\"associated\");\n $inputGroupLink->setData(\"sku\", \"Simple Product 2\");\n $inputGroupLink->setData(\"type\", \"simple\");\n $inputGroupLink->setPosition(0);\n $inputGroupLink[\"custom_attributes\"] = [$customData];\n\n $outputRelatedLink = $this->objectManagerHelper->getObject(\\Magento\\Catalog\\Model\\ProductLink\\Link::class);\n $outputRelatedLink->setProductSku(\"Simple Product 1\");\n $outputRelatedLink->setLinkType(\"related\");\n $outputRelatedLink->setLinkedProductSku(\"Simple Product 2\");\n $outputRelatedLink->setLinkedProductType(\"simple\");\n $outputRelatedLink->setPosition(0);\n\n $groupExtension = $this->objectManagerHelper->getObject(\\Magento\\Catalog\\Api\\Data\\ProductLinkExtension::class);\n $reflectionOfExtension = new \\ReflectionClass(\\Magento\\Catalog\\Api\\Data\\ProductLinkExtension::class);\n $method = $reflectionOfExtension->getMethod('setData');\n $method->setAccessible(true);\n $method->invokeArgs($groupExtension, ['qty', 1]);\n\n $outputGroupLink = $this->objectManagerHelper->getObject(\\Magento\\Catalog\\Model\\ProductLink\\Link::class);\n $outputGroupLink->setProductSku(\"Simple Product 1\");\n $outputGroupLink->setLinkType(\"associated\");\n $outputGroupLink->setLinkedProductSku(\"Simple Product 2\");\n $outputGroupLink->setLinkedProductType(\"simple\");\n $outputGroupLink->setPosition(0);\n $outputGroupLink->setExtensionAttributes($groupExtension);\n\n $this->entityCollectionProviderMock->expects($this->at(0))\n ->method('getCollection')\n ->with($this->model, 'related')\n ->willReturn([$inputRelatedLink]);\n $this->entityCollectionProviderMock->expects($this->at(1))\n ->method('getCollection')\n ->with($this->model, 'upsell')\n ->willReturn([]);\n $this->entityCollectionProviderMock->expects($this->at(2))\n ->method('getCollection')\n ->with($this->model, 'crosssell')\n ->willReturn([]);\n $this->entityCollectionProviderMock->expects($this->at(3))\n ->method('getCollection')\n ->with($this->model, 'associated')\n ->willReturn([$inputGroupLink]);\n\n $expectedOutput = [$outputRelatedLink, $outputGroupLink];\n $typeInstanceMock = $this->getMockBuilder(\\Magento\\ConfigurableProduct\\Model\\Product\\Type\\Simple::class)\n ->setMethods([\"getSku\"])\n ->getMock();\n $typeInstanceMock->expects($this->atLeastOnce())->method('getSku')->willReturn(\"Simple Product 1\");\n $this->model->setTypeInstance($typeInstanceMock);\n\n $productLink1 = $this->objectManagerHelper->getObject(\\Magento\\Catalog\\Model\\ProductLink\\Link::class);\n $productLink2 = $this->objectManagerHelper->getObject(\\Magento\\Catalog\\Model\\ProductLink\\Link::class);\n $this->productLinkFactory->expects($this->at(0))\n ->method('create')\n ->willReturn($productLink1);\n $this->productLinkFactory->expects($this->at(1))\n ->method('create')\n ->willReturn($productLink2);\n\n $extension = $this->objectManagerHelper->getObject(\\Magento\\Catalog\\Api\\Data\\ProductLinkExtension::class);\n $productLink2->setExtensionAttributes($extension);\n\n $links = $this->model->getProductLinks();\n // Match the links\n $matches = 0;\n foreach ($links as $link) {\n foreach ($expectedOutput as $expected) {\n if ($expected->getData() == $link->getData()) {\n $matches++;\n }\n }\n }\n $this->assertEquals($matches, 2);\n }", "function build_link( $matches, $link_attributes = array() ) {\n $link = \"<a\";\n foreach ( $link_attributes as $name => $value ) {\n $link .= \" \" . esc_attr( $name ) . \"=\\\"\" . esc_attr( $value ) . \"\\\"\";\n }\n $link .= \">\" . esc_html( $matches ) . \"</a>\";\n return $link;\n }", "public function setLinkAttributes($linkAttributes)\n {\n $this->linkAttributes = $linkAttributes;\n\n return $this;\n }", "private function mergeBothAvailability ()\n {\n ( new AssetAvailabilityManagement([\n 'end_time' => $this->nextAvailability->end_time,\n ], $this->previousAvailability) )->update();\n\n $this->nextAvailability->forceDelete();\n }", "public function addLinks($loose = false) {\n if (!$loose) {\n return $this->autoLink();\n }\n\n // loose mode\n $original = $this->tweet;\n $this->tweet = $this->addLinksToURLs($loose);\n $this->tweet = $this->addLinksToHashtags($loose);\n $this->tweet = $this->addLinksToCashtags($loose);\n $this->tweet = $this->addLinksToUsernamesAndLists($loose);\n $modified = $this->tweet;\n $this->tweet = $original;\n return $modified;\n }", "public function getLinkAttributes()\n {\n return $this->linkAttributes;\n }", "function cr_make_links_clickable ($value, $protocols = array('http', 'mail','hashtag'), array $attributes = array())\n{\n // Link attributes\n $attr = '';\n foreach ($attributes as $key => $val) {\n $attr = ' ' . $key . '=\"' . htmlentities($val) . '\"';\n }\n \n $links = array();\n \n // Extract existing links and tags\n $value = preg_replace_callback('~(<a .*?>.*?</a>|<.*?>)~i', function ($match) use (&$links) { return '<' . array_push($links, $match[1]) . '>'; }, $value);\n \n // Extract text links for each protocol\n foreach ((array)$protocols as $protocol) {\n switch ($protocol) {\n case 'http':\n case 'https': $value = preg_replace_callback('~(?:(https?)://([^\\s<]+)|(www\\.[^\\s<]+?\\.[^\\s<]+))(?<![\\.,:])~i', function ($match) use ($protocol, &$links, $attr) { if ($match[1]) $protocol = $match[1]; $link = $match[2] ?: $match[3]; return '<' . array_push($links, \"<a $attr href=\\\"$protocol://$link\\\">$link</a>\") . '>'; }, $value); break;\n case 'mail': $value = preg_replace_callback('~([^\\s<]+?@[^\\s<]+?\\.[^\\s<]+)(?<![\\.,:])~', function ($match) use (&$links, $attr) { return '<' . array_push($links, \"<a $attr href=\\\"mailto:{$match[1]}\\\">{$match[1]}</a>\") . '>'; }, $value); break;\n case 'twitter': $value = preg_replace_callback('~(?<!\\w)[@#](\\w++)~', function ($match) use (&$links, $attr) { return '<' . array_push($links, \"<a $attr href=\\\"https://twitter.com/\" . ($match[0][0] == '@' ? '' : 'search/%23') . $match[1] . \"\\\">{$match[0]}</a>\") . '>'; }, $value); break;\n case 'hashtag': $value = preg_replace_callback('~(^|\\\\s)#(\\\\w*[a-zA-Z0-9_]+\\\\w*)~', function ($match) use (&$links, $attr) { return '<' . array_push($links, ($match[0][0]==\" \"? \"&nbsp;\":\"\").\"<a $attr href=\\\"/hashtag.php?tag=\" . ($match[0][0]==\" \"? substr($match[0],2,strlen($match[0])-2):substr($match[0],1,strlen($match[0])-1)) . \"\\\">\".($match[0][0]==\" \"? substr($match[0],1,strlen($match[0])-1):$match[0]).\"</a>\") . '>'; }, $value); break;\n default: $value = preg_replace_callback('~' . preg_quote($protocol, '~') . '://([^\\s<]+?)(?<![\\.,:])~i', function ($match) use ($protocol, &$links, $attr) { return '<' . array_push($links, \"<a $attr href=\\\"$protocol://{$match[1]}\\\">{$match[1]}</a>\") . '>'; }, $value); break;\n }\n }\n \n // Insert all link\n return preg_replace_callback('/<(\\d+)>/', function ($match) use (&$links) { return $links[$match[1] - 1]; }, $value);\n}", "function linkify($value, $protocols = array('http', 'mail'), array $attributes = array(), $mode = 'normal') {\n // Link attributes\n $attr = '';\n foreach ($attributes as $key => $val) {\n $attr = ' ' . $key . '=\"' . htmlentities($val) . '\"';\n }\n\n $links = array();\n\n // Extract existing links and tags\n $value = preg_replace_callback('~(<a .*?>.*?</a>|<.*?>)~i', function ($match) use (&$links) {\n return '<' . array_push($links, $match[1]) . '>';\n }, $value);\n\n // Extract text links for each protocol\n foreach ((array) $protocols as $protocol) {\n switch ($protocol) {\n case 'http':\n case 'https': $value = preg_replace_callback($mode != 'all' ? '~(?:(https?)://([^\\s<]+)|(www\\.[^\\s<]+?\\.[^\\s<]+))(?<![\\.,:])~i' : '~([^\\s<]+\\.[^\\s<]+)(?<![\\.,:])~i', function ($match) use ($protocol, &$links, $attr) {\n if ($match[1])\n $protocol = $match[1];\n $link = $match[2] ? : $match[3];\n return '<' . array_push($links, '<a' . $attr . ' target=\"_blank\" href=\"' . $protocol . '://' . $link . '\">' . $link . '</a>') . '>';\n }, $value);\n break;\n case 'mail': $value = preg_replace_callback('~([^\\s<]+?@[^\\s<]+?\\.[^\\s<]+)(?<![\\.,:])~', function ($match) use (&$links, $attr) {\n return '<' . array_push($links, '<a' . $attr . ' target=\"_blank\" href=\"mailto:' . $match[1] . '\">' . $match[1] . '</a>') . '>';\n }, $value);\n break;\n case 'twitter': $value = preg_replace_callback('~(?<!\\w)[@#](\\w++)~', function ($match) use (&$links, $attr) {\n return '<' . array_push($links, '<a' . $attr . ' target=\"_blank\" href=\"https://twitter.com/' . ($match[0][0] == '@' ? '' : 'search/%23') . $match[1] . '\">' . $match[0] . '</a>') . '>';\n }, $value);\n break;\n default: $value = preg_replace_callback($mode != 'all' ? '~' . preg_quote($protocol, '~') . '://([^\\s<]+?)(?<![\\.,:])~i' : '~([^\\s<]+)(?<![\\.,:])~i', function ($match) use ($protocol, &$links, $attr) {\n return '<' . array_push($links, '<a' . $attr . ' target=\"_blank\" href=\"' . $protocol . '://' . $match[1] . '\">' . $match[1] . '</a>') . '>';\n }, $value);\n break;\n }\n }\n\n // Insert all link\n return preg_replace_callback('/<(\\d+)>/', function ($match) use (&$links) {\n return $links[$match[1] - 1];\n }, $value);\n}", "public function generateCache() \n {\n $temp = array();\n \n $this->searchCriteriaBuilder->addFilter('status', \\PiotrJaworski\\InternalLinking\\Model\\Link::STATUS_ENABLE, 'eq');\n $searchCriteria = $this->searchCriteriaBuilder->create();\n \n foreach($this->linkRepository->getList($searchCriteria)->getItems() as $link){\n $temp[$link['keyword']] = $link;\n }\n \n return $this->cache->save(json_encode($temp), \\PiotrJaworski\\InternalLinking\\Model\\Cache::CACHE_NAME);\n }", "public function updateAccessTimes( $links ) {\n\t\t$toGet = array();\n\t\tforeach( $links as $tid=>$link ) {\n\t\t\tif( !isset( $this->commObject->db->dbValues[$tid]['create'] ) && $link['access_time'] == \"x\" ) $links[$tid]['access_time'] = $this->commObject->db->dbValues[$tid]['access_time'];\n\t\t\telseif( $link['access_time'] == \"x\" ) {\n\t\t \t$toGet[$tid] = $link['url'];\n\t\t\t} else {\n\t\t\t\t$this->commObject->db->dbValues[$tid]['access_time'] = $link['access_time'];\t\n\t\t\t\tif( !isset( $this->commObject->db->dbValues[$tid]['create'] ) ) $this->commObject->db->dbValues[$tid]['update'] = true;\n\t\t\t}\t\n\t\t}\t\n\t\tif( !empty( $toGet ) ) $toGet = $this->commObject->getTimesAdded( $toGet );\n\t\tforeach( $toGet as $tid=>$time ) { \n\t\t\tif( !isset( $this->commObject->db->dbValues[$tid]['create'] ) ) $this->commObject->db->dbValues[$tid]['update'] = true; \n\t\t\t$this->commObject->db->dbValues[$tid]['access_time'] = $links[$tid]['access_time'] = $time;\t\n\t\t}\n\t\treturn $links;\n\t}", "public function getLinkData()\n {\n $linkArr = [];\n if ($this->getProduct()->getTypeId() !== \\Magento\\Downloadable\\Model\\Product\\Type::TYPE_DOWNLOADABLE) {\n return $linkArr;\n }\n $links = $this->getProduct()->getTypeInstance()->getLinks($this->getProduct());\n $priceWebsiteScope = $this->getIsPriceWebsiteScope();\n $fileHelper = $this->_downloadableFile;\n foreach ($links as $item) {\n $tmpLinkItem = [\n 'link_id' => $item->getId(),\n 'title' => $this->escapeHtml($item->getTitle()),\n 'price' => $this->getCanReadPrice() ? $this->getPriceValue($item->getPrice()) : '',\n 'number_of_downloads' => $item->getNumberOfDownloads(),\n 'is_shareable' => $item->getIsShareable(),\n 'link_url' => $item->getLinkUrl(),\n 'link_type' => $item->getLinkType(),\n 'sample_file' => $item->getSampleFile(),\n 'sample_url' => $item->getSampleUrl(),\n 'sample_type' => $item->getSampleType(),\n 'sort_order' => $item->getSortOrder(),\n ];\n\n $linkFile = $item->getLinkFile();\n if ($linkFile) {\n $file = $fileHelper->getFilePath($this->_link->getBasePath(), $linkFile);\n\n $fileExist = $fileHelper->ensureFileInFilesystem($file);\n\n if ($fileExist) {\n $name = '<a href=\"' . $this->getUrl(\n 'adminhtml/downloadable_product_edit/link',\n ['id' => $item->getId(), 'type' => 'link', '_secure' => true]\n ) . '\">' . $fileHelper->getFileFromPathFile(\n $linkFile\n ) . '</a>';\n $tmpLinkItem['file_save'] = [\n [\n 'file' => $linkFile,\n 'name' => $name,\n 'size' => $fileHelper->getFileSize($file),\n 'status' => 'old',\n ],\n ];\n }\n }\n\n $sampleFile = $item->getSampleFile();\n if ($sampleFile) {\n $file = $fileHelper->getFilePath($this->_link->getBaseSamplePath(), $sampleFile);\n\n $fileExist = $fileHelper->ensureFileInFilesystem($file);\n\n if ($fileExist) {\n $name = '<a href=\"' . $this->getUrl(\n 'adminhtml/downloadable_product_edit/link',\n ['id' => $item->getId(), 'type' => 'sample', '_secure' => true]\n ) . '\">' . $fileHelper->getFileFromPathFile(\n $sampleFile\n ) . '</a>';\n $tmpLinkItem['sample_file_save'] = [\n [\n 'file' => $item->getSampleFile(),\n 'name' => $name,\n 'size' => $fileHelper->getFileSize($file),\n 'status' => 'old',\n ],\n ];\n }\n }\n\n if ($item->getNumberOfDownloads() == '0') {\n $tmpLinkItem['is_unlimited'] = ' checked=\"checked\"';\n }\n if ($this->getProduct()->getStoreId() && $item->getStoreTitle()) {\n $tmpLinkItem['store_title'] = $item->getStoreTitle();\n }\n if ($this->getProduct()->getStoreId() && $priceWebsiteScope) {\n $tmpLinkItem['website_price'] = $item->getWebsitePrice();\n }\n $linkArr[] = new \\Magento\\Framework\\DataObject($tmpLinkItem);\n }\n return $linkArr;\n }", "public function shorten(LinkInterface $link);", "public function merge();", "public function call_parse_link( $matches ) {\r\n $link = $matches[ 0 ];\r\n $label = $matches[ 2 ];\r\n $created_link = $link;\r\n\r\n // parse attributes\r\n\t\t$attrs = $matches[ 1 ];\r\n\t\t$attrs = stripslashes( $attrs );\r\n\t\t$attrs = $this->parse_attrs( $attrs );\r\n\r\n\t\t$rel = ( isset( $attrs[ 'rel' ] ) ) ? strtolower( $attrs[ 'rel' ] ) : '';\r\n\r\n\t\t// href preperation\r\n\t\t$href = $attrs[ 'href' ];\r\n\t\t$href = strtolower( $href );\r\n\t\t$href = trim( $href );\r\n\r\n // checks\r\n $is_external = $this->is_external( $href, $rel );\r\n $is_ignored = $this->is_ignored( $href );\r\n $has_rel_external = (strpos( $rel, 'external' ) !== FALSE);\r\n\r\n\t\t// is an internal link?\r\n // rel=external will be threaded as external link\r\n\t\tif ( ! $is_external && ! $has_rel_external) {\r\n \t\treturn apply_filters('wpel_internal_link', $created_link, $label, $attrs);\r\n }\r\n\r\n // is an ignored link?\r\n // rel=external will be threaded as external link\r\n if ( $is_ignored && ! $has_rel_external ) {\r\n \t\treturn apply_filters('wpel_external_link', $created_link, $link, $label, $attrs, TRUE);\r\n }\r\n\r\n\t\t// set rel=\"external\" (when not already set)\r\n\t\tif ( $this->get_opt( 'external' ) )\r\n\t\t\t$this->add_attr_value( $attrs, 'rel', 'external' );\r\n\r\n\t\t// set rel=\"nofollow\" when doesn't have \"follow\" (or already \"nofollow\")\r\n\t\tif ( $this->get_opt( 'nofollow' ) AND strpos( $rel, 'follow' ) === FALSE )\r\n\t\t\t$this->add_attr_value( $attrs, 'rel', 'nofollow' );\r\n\r\n\t\t// set title\r\n\t\t$title_format = $this->get_opt( 'title' );\r\n $title = ( isset( $attrs[ 'title' ] ) ) ? $attrs[ 'title' ] : '';\r\n\t\t$attrs[ 'title' ] = str_replace( '%title%', $title, $title_format );\r\n\r\n\t\t// set user-defined class\r\n\t\t$class = $this->get_opt( 'class_name' );\r\n\t\tif ( $class )\r\n\t\t\t$this->add_attr_value( $attrs, 'class', $class );\r\n\r\n\t\t// set icon class, unless no-icon class isset or another icon class ('ext-icon-...') is found or content contains image\r\n\t\tif ( $this->get_opt( 'icon' ) > 0\r\n\t\t\t\t\tAND ( ! $this->get_opt( 'no_icon_class' ) OR strpos( $attrs[ 'class' ], $this->get_opt( 'no_icon_class' ) ) === FALSE )\r\n\t\t\t\t\tAND strpos( $attrs[ 'class' ], 'ext-icon-' ) === FALSE\r\n\t\t\t\t\tAND !( $this->get_opt( 'image_no_icon' ) AND (bool) preg_match( '/<img([^>]*)>/is', $label )) ){\r\n\t\t\t$icon_class = 'ext-icon-'. $this->get_opt( 'icon', 'style' );\r\n\t\t\t$this->add_attr_value( $attrs, 'class', $icon_class );\r\n\t\t}\r\n\r\n // set target\r\n $no_icon_class = $this->get_opt( 'no_icon_class' );\r\n $target = $this->get_opt( 'target' );\r\n\r\n // remove target\r\n unset($attrs[ 'target' ]);\r\n\r\n if ($this->get_opt( 'no_icon_same_window' )\r\n\t\t\t\t\tAND $no_icon_class AND strpos( $attrs[ 'class' ], $no_icon_class ) !== FALSE) {\r\n // open in same window\r\n } elseif ($target && $target !== '_none') {\r\n if ($this->get_opt( 'use_js' )) {\r\n // add data-attr for javascript\r\n $attrs['data-wpel-target'] = $target;\r\n } else {\r\n // set target value\r\n $attrs[ 'target' ] = $this->get_opt( 'target' );\r\n }\r\n }\r\n\r\n\t\t// create element code\r\n\t\t$created_link = '<a';\r\n\r\n\t\tforeach ( $attrs AS $key => $value ) {\r\n\t\t\t$created_link .= ' '. $key .'=\"'. $value .'\"';\r\n }\r\n\r\n\t\t$created_link .= '>'. $label .'</a>';\r\n\r\n\t\t// filter\r\n\t\t$created_link = apply_filters('wpel_external_link', $created_link, $link, $label, $attrs, FALSE);\r\n\r\n\t\treturn $created_link;\r\n\t}", "public function getAssurantLinkCollection()\n {\n Mage::getSingleton('core/session')->setByPassAssurantLock(true);\n $collection = $this->getLinkInstance()->useAssurantLinks()\n ->getLinkCollection();\n $collection->setProduct($this);\n $collection->addLinkTypeIdFilter();\n $collection->addProductIdFilter();\n $collection->joinAttributes();\n return $collection;\n }" ]
[ "0.5752913", "0.55790967", "0.52981114", "0.51589954", "0.5113481", "0.506303", "0.49603364", "0.48932144", "0.48783937", "0.4876567", "0.48379955", "0.48372227", "0.48222566", "0.48027396", "0.47692856", "0.47505784", "0.47486332", "0.47227085", "0.47171897", "0.4706549", "0.47049525", "0.47020274", "0.47000578", "0.46788418", "0.46758017", "0.46745807", "0.46454394", "0.46362162", "0.46315086", "0.46284175" ]
0.70056844
0
Get the value of nbMsg
public function getNbMsg() { return $this->nbMsg; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNbMessages()\r\n {\r\n return $this->nbMessages;\r\n }", "public function getNbMessages()\n {\n return $this->nbMessages;\n }", "public function getMsgCount()\n {\n return $this->count(self::MSG);\n }", "public function getMsg ()\n {\n return $this->msg;\n }", "public function num_msg() {\n return imap_num_msg($this->conn);\n }", "public function getMsg()\n {\n return $this->msg;\n }", "public function getMsg() {\n\t\treturn $this->msg;\n\t}", "function getMessageCount() {\n\t\treturn $this->data_array['total'];\n\t}", "public function getTbcMsgCount()\r\n {\r\n return $this->count(self::_TBC_MSG);\r\n }", "public function getMessageNumbers()\n {\n return $this->messages;\n }", "public function getMessageNumbers()\n {\n return $this->messages;\n }", "function displayMessageNumber()\n\t{\n\t\t$query = 'SELECT COUNT(*) as nb FROM Message WHERE idDestinataire = '.$_SESSION['idCompte'].' AND lu = 0;';\n\t\t$bdd = createPDO();\n\t\t$reponse = $bdd->query($query);\n\t\t\n\t\t$nb = $reponse->fetch(PDO::FETCH_ASSOC);\n\t\t\n\t\tif($nb['nb'] > 99)\n\t\t\treturn '<span class = \"notifNumber\"> 99+ </span>';\n\t\telse if($nb['nb'] > 0)\n\t\t\treturn '<span class = \"notifNumber\">'.$nb['nb'].'</span>';\n\t\telse return null;\n\t}", "public function getMsg(){\n\t\treturn $this->message;\n\t}", "public function getClasseMsg(): ?int {\n return $this->classeMsg;\n }", "public function getMsg()\n {\n return $this->get(self::MSG);\n }", "function getMsgCod() {\n return $this->msg_cod;\n }", "public function getIdMsg()\n {\n return $this->idMsg;\n }", "function messageCount()\r\n {\r\n return $this->_pop3->numMsg();\r\n }", "public function getMessagesCount()\n {\n return $this->getState('__messageCounter', 0);\n }", "public function getMsg(): string\n {\n return $this->msg;\n }", "public function getMessageCount()\n {\n return $this->messageCount;\n }", "public function getNumberOfMessages();", "protected function getMessage() {\n\t\t$msg = parent::getMessage();\n\t\t// do not increment the offset for internal iterators\n\t\t$this->validByteCount = 0;\n\t\treturn $msg;\n\t}", "public final function getResultMSG() {\n return $this->resultMsg;\n }", "public function getResultMsg() {\n\t\t$xpath = $this->XPath();\n\n\t\treturn $xpath->query('/epp:epp/epp:response/epp:result/epp:msg/text()')->item(0)->nodeValue;\n\t}", "public function getPveMsgCount()\r\n {\r\n return $this->count(self::_PVE_MSG);\r\n }", "public function getNumberOfMessages()\n {\n return $this->numberOfMessages;\n }", "function num_message(){\n return imap_num_msg($this->link);\n }", "public function message()\n\t{\n\t\treturn $this->msg;\n\t}", "public function getMsgId()\n {\n return $this->get(self::MSGID);\n }" ]
[ "0.71314156", "0.7058197", "0.70341945", "0.7013341", "0.7009582", "0.69727534", "0.6959349", "0.69027525", "0.68837744", "0.6860523", "0.6860523", "0.6841934", "0.6839172", "0.6825957", "0.68034273", "0.6777449", "0.66278255", "0.65240085", "0.652021", "0.65178627", "0.6505424", "0.6495515", "0.6483795", "0.64416397", "0.64349365", "0.6426511", "0.6397224", "0.637217", "0.6351138", "0.63453156" ]
0.8590603
0
Set the value of nbMsg
public function setNbMsg($nbMsg) { $this->nbMsg = $nbMsg; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getNbMsg()\n {\n return $this->nbMsg;\n }", "public function testSetNbSignalement() \r\n { \r\n $message = new Message(); \r\n $resultat = $message->setNbSignalement(22 + 8); \r\n $this->assertEquals(30, $resultat); \r\n }", "function SetError($msg) {\r\n $this->error_count++;\r\n $this->ErrorInfo = $msg;\r\n }", "public function setNbMessages($nbMessages)\r\n {\r\n $this->nbMessages = $nbMessages;\r\n\r\n return $this;\r\n }", "public function setMessage($msg){\n $this->_warning_message = $msg;\n }", "function SetError($msg) {\n $this->error_count++;\n $this->ErrorInfo = $msg;\n }", "public function getNbMessages()\r\n {\r\n return $this->nbMessages;\r\n }", "function setCurrMsg($idmsg)\n\t{\n\t\t$this->curr_msg = $idmsg;\n\t}", "abstract public function setMessage();", "public function getNbMessages()\n {\n return $this->nbMessages;\n }", "protected function SetError($msg) {\n $this->error_count++;\n $this->ErrorInfo = $msg;\n }", "public function setNbMessages($nbMessages)\n {\n $this->nbMessages = $nbMessages;\n\n return $this;\n }", "public function setMessage($value);", "public function setMensaje($msg);", "public function setClasseMsg(?int $classeMsg): self {\n if (null !== $classeMsg && false === in_array($classeMsg, $this->enumClasseMsg())) {\n throw new InvalidArgumentException(sprintf('The classe msg \"%s\" is invalid', $classeMsg));\n }\n $this->classeMsg = $classeMsg;\n return $this;\n }", "function getDefaultNumMessages() {\n return ((int) ParameterProvider::getParam('num_msg', PARAMETERPROVIDER_NUM_MSG));\n }", "public function setMsgId($value)\n {\n return $this->set(self::MSGID, $value);\n }", "public function setMsg($value)\n {\n return $this->set(self::MSG, $value);\n }", "protected function SetError($msg)\n\t {\n\t $this->error_count++;\n\t $this->errorInfo = $msg;\n\t }", "public function setMessage($aMsg)\n\t{\n\t\t$this->message = $aMsg;\n\t\t\n\t}", "protected static function SET_ERROR($msg)\n {\n ++self::$error_count;\n if ('smtp' === self::$Mailer && null !== self::$smtp) {\n $lasterror = self::$smtp::GET_ERROR();\n // if (!empty($lasterror['error'])) {\n\n // $msg .= self::$lang('smtp_error') . $lasterror['error'];\n // if (!empty($lasterror['detail'])) {\n // $msg .= ' ' . self::$lang('smtp_detail') . $lasterror['detail'];\n // }\n // if (!empty($lasterror['smtp_code'])) {\n // $msg .= ' ' . self::$lang('smtp_code') . $lasterror['smtp_code'];\n // }\n // if (!empty($lasterror['smtp_code_ex'])) {\n // $msg .= ' ' . self::$lang('smtp_code_ex') . $lasterror['smtp_code_ex'];\n // }\n // }\n }\n self::$ErrorInfo = $msg;\n }", "public function num_msg() {\n return imap_num_msg($this->conn);\n }", "function setErrorMessage($msg){\n $this->_errormessage = $msg;\n }", "protected function setMessage()\n {\n $this->message = sprintf($this->message, $this->providedValue, $this->currentDomain);\n }", "public function setMsg ($msg)\n {\n $this->msg = $msg;\n return $this;\n }", "public function set_message($inVal){\r\n\t\t\t$this->message = $inVal;\t\t\t//assign input to message\r\n\t\t}", "protected function setMessage ($msg) {\n\t\n\t\tif ($msg != \"\") {\n\t\t\tif (is_array($this->message)) {\n\t\t\t\t$this->message[] = $msg;\n\t\t\t} elseif ($this->message != \"\") {\n\t\t\t\t$this->message = array($this->message, $msg);\n\t\t\t} else {\n\t\t\t\t$this->message = $msg;\n\t\t\t}\n\t\t\t\n\t\t\treturn true;\n\t\t}\n\t\t\n\t\treturn false;\n\t\n\t}", "public function getMsgCount()\n {\n return $this->count(self::MSG);\n }", "public static function setMessegeError($msg){\n\n\t\t$_SESSION[Message::MESSAGEM_ERRO] = $msg;\n\n\t}", "private function message()\n\t{\n\t\t$this->msg_type = $this->phpsess->get('msg_type');\n\t\t$this->msg = $this->phpsess->get('msg');\n\t\t$this->phpsess->save('msg_type', null);\n\t\t$this->phpsess->save('msg', null);\n\n\t}" ]
[ "0.7269301", "0.6251449", "0.6112347", "0.6110229", "0.6095263", "0.608619", "0.60829365", "0.6022626", "0.60218155", "0.5968828", "0.5898091", "0.58816826", "0.58645713", "0.5833946", "0.57797974", "0.5775675", "0.5774386", "0.57520455", "0.5748501", "0.5737615", "0.57221967", "0.5718312", "0.5707284", "0.57007474", "0.5641209", "0.56307757", "0.5518491", "0.5460108", "0.54303753", "0.5426811" ]
0.70340097
1
Get the value of contenuSujet
public function getContenuSujet() { return $this->contenuSujet; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getSujet()\r\n {\r\n return $this->sujet;\r\n }", "public function getSujet()\n {\n return $this->sujet;\n }", "public function getSujet()\n {\n return $this->sujet;\n }", "public function getSujet()\n {\n return $this->sujet;\n }", "public function getSujet()\n\t{\n\t\treturn $this->sujet;\n\t}", "public function getContenu()\r\n {\r\n return $this->contenu;\r\n }", "function getContenu(){\n return $this->contenu;\n }", "public function getConteur()\r\n {\r\n return $this->conteur;\r\n }", "public function getContenu()\n {\n return $this->contenu;\n }", "public function getValeur() : string{\n return $this->valeur;\n }", "public function getConteur()\n {\n return $this->_conteur;\n }", "public function quiSuisJe(){\n return 'Je suis un chat'; \n }", "public function getMandatSuiviEditva() {\n return $this->mandatSuiviEditva;\n }", "public function getContenu() : string\r\n\t{\r\n\t\treturn $this->Contenu ?? '';\r\n\t}", "public function getMandatSuiviDucsedi() {\n return $this->mandatSuiviDucsedi;\n }", "public function cestaTicket()\n {\n return Variables::where('nombre', 'Unidad Tributaria')->first();\n }", "public function getStrCuenta()\r\n {\r\n return $this->strCuenta;\r\n }", "public function getSenha(){\n return $this->senha;\n }", "public function getValeur($cle) {\r\n\t\treturn $this->$cle;\r\n\t}", "public function getLibelle():string{\n return $this->libelle;\n }", "public function getContCommSuj(): ?string\n {\n return $this->contCommSuj;\n }", "public function actionNoi_dung_tu_van()\n {\n $model_setting_app_key_content = Setting::find()->where(['key_value' => AppMyauris::SETTING_APP_KEY_CONTENT])->one();\n if ($model_setting_app_key_content != null) {\n return $model_setting_app_key_content->value;\n }\n return \"\";\n }", "public function getNomProduit()\n {\n return $this->Nom_produit;\n }", "public function getMandatSuiviPedi() {\n return $this->mandatSuiviPedi;\n }", "public function getSlepani() {\n return $this->uslepu;\n }", "public function getCouleur() {\n return strval($this->couleur);\n }", "function getsenha() {\n\t\treturn (string) $this->senha;\n\t}", "public function getValor();", "public function getSenha() {\r\n\t return $this->senha;\r\n\t }", "public function getCintura() {\n return $this->iCintura;\n }" ]
[ "0.81669563", "0.80825406", "0.80825406", "0.80825406", "0.8013364", "0.7143979", "0.70913386", "0.70692205", "0.6999048", "0.6948551", "0.6918625", "0.65586543", "0.65502864", "0.6449281", "0.6407047", "0.63984007", "0.63302135", "0.6289166", "0.6284701", "0.62724835", "0.6215317", "0.6213171", "0.6200027", "0.6167873", "0.6142454", "0.6127373", "0.60789394", "0.6070803", "0.60598963", "0.6054542" ]
0.8202816
0
Get the value of categorieId
public function getCategorieId() { return $this->categorieId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function categorie_id()\n {\n return $this->_categorie_id;\n }", "public function getIdCategory(){\n\t\treturn $this->idCategory;\t\n\t}", "public function getCategoria_idcategoria(){\n return $this->categoria_idcategoria;\n }", "public function getIdCategoria()\n {\n return $this->idCategoria;\n }", "public function getIdCategoria()\n {\n return $this->idCategoria;\n }", "public function getIdCategoria()\n {\n return $this->idCategoria;\n }", "public function getIdCategorie()\n {\n return $this->idCategorie;\n }", "public function getIdCategorie()\n {\n return $this->idCategorie;\n }", "public function getIdcategory()\n {\n return $this->idcategory;\n }", "public function getId_categorie()\n {\n return $this->id_categorie;\n }", "public function getCategid()\n {\n return $this->categid;\n }", "public function categoria($id)\r\n\t{\r\n\t\treturn $id;\r\n }", "public function getCategorie_id()\n {\n return $this->categorie_id;\n }", "public function getId_category()\n {\n return $this->id_category;\n }", "public function getIdCategory()\n {\n return $this->idCategory;\n }", "public function get_id_category()\n\t{\n\t\treturn $this->id_category;\n\t}", "public function getidcategorias()\n {\n return $this->idcategorias;\n }", "public function getCategorias_id(){\n return $this->categorias_id;\n }", "function get_categoryid() {\n \tglobal $conn;\n \n $sql = \"SELECT id FROM itemcategory\";\n $result = $conn->Execute($sql);\n $catpk = $result->fields[0];\n\t//print_r($result);\n\n//\tif (!$catpk) $catpk = 1;\n return $catpk;\n }", "public function getCategory_id()\n {\n return $this->category_id;\n }", "public function getCategoriaID()\n {\n return is_null($this->e_id_categoria) ? \"NULL\":$this->e_id_categoria;\n }", "public function getCategoriaID($id)\n {\n $stmt = Conexion::conectar()->prepare('SELECT *from categorias where idCategoria=:id');\n $stmt->bindParam(\":id\",$id);\n $stmt->execute();\n $resultado=$stmt->fetch();\n return $resultado;\n //return $resultado;\n }", "function category($id) {\n\treturn $_ENV['dbi']->getfield('categoriess','category','cid',$id);\n}", "public function getCategoryId()\n {\n return (new CategoriesModel)->find($this->category_id, Categories::class);\n }", "public function getIdCategory()\r\n {\r\n return $this->id_category;\r\n}", "public function getCategoryId()\n {\n return $this->category_id;\n }", "public function getEntityId()\n {\n return $this->categoryId;\n }", "public function getCategorie();", "public function getCategoryID()\n {\n return $this->categoryID;\n }", "public function id()\n {\n return $this->category->term_id;\n }" ]
[ "0.7430608", "0.7386668", "0.73786473", "0.72867423", "0.72867423", "0.72867423", "0.7267293", "0.7267293", "0.72638077", "0.7263206", "0.72331154", "0.71978456", "0.7157653", "0.7144112", "0.7127068", "0.69511956", "0.6948656", "0.6923706", "0.6889095", "0.6824598", "0.676725", "0.6705018", "0.667743", "0.6675385", "0.66609085", "0.6642562", "0.6618796", "0.6580171", "0.6555546", "0.6546241" ]
0.7491959
0
Get the value of utilisateurId
public function getUtilisateurId() { return $this->utilisateurId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function getIdUtilisateur()\n {\n return $this->Id_utilisateur;\n }", "public function getId_utilisateur()\n {\n return $this->id_utilisateur;\n }", "public function getIdUtilisateur()\n {\n return $this->id_utilisateur;\n }", "public function getIdUtilisateur()\n {\n return $this->m_idUtilisateur;\n }", "public function getUtilisateur_id_utilisateur()\n {\n return $this->utilisateur_id_utilisateur;\n }", "public function getIdUtilisateur()\n\t{\n\t\treturn $this->_idUtilisateur;\n\t}", "public function getID() { // GET ID \n return $this->utilisateur_id; // SET ID\n }", "public function getIduser()\r\n {\r\n return $this->iduser;\r\n }", "public function getIduser()\n {\n return $this->iduser;\n }", "public function getUserId()\r\r\n {\r\r\n return $this->get('user_id');\r\r\n }", "public function getIdUser(){\n return $this->id_user;\n }", "public function getUsuarioId(){\n\t\treturn $this->usuario_id;\n\t}", "public function getIdUtente(){\n return $this->id_utente;\n }", "public function getLutilisateur_idlutilisateur():int\n {\n return $this->lutilisateur_idlutilisateur;\n }", "public function GetIdUser() {\n return $this->idUser;\n }", "private function getuserid() {\n\n\n $em = $this->getDoctrine()->getManager();\n $user_security = $this->container->get('security.context');\n // authenticated REMEMBERED, FULLY will imply REMEMBERED (NON anonymous)\n if ($user_security->isGranted('IS_AUTHENTICATED_FULLY')) {\n $user = $this->get('security.context')->getToken()->getUser();\n $user_id = $user->getId();\n } else {\n $user_id = 0;\n \n }\n\n return ($user_id);\n \n }", "public function getId_usuario()\n {\n return $this->id_usuario;\n }", "private function getuserid() {\n\n\n $em = $this->getDoctrine()->getManager();\n $user_security = $this->container->get('security.context');\n // authenticated REMEMBERED, FULLY will imply REMEMBERED (NON anonymous)\n if ($user_security->isGranted('IS_AUTHENTICATED_FULLY')) {\n $user = $this->get('security.context')->getToken()->getUser();\n $user_id = $user->getId();\n /*$group = $user->getIdgroup();*/\n /*if (isset($group)) {\n $group_id = $group->getId();\n } else {\n $group_id = 0;\n }*/\n } else {\n $user_id = 0;\n // $group_id = 0;\n }\n return $user_id;\n }", "public function getIdUser()\n {\n return $this->id_user;\n }", "public function getIdusuario()\n {\n return $this->idusuario;\n }", "public function getIdusuario()\n {\n return $this->idusuario;\n }", "public function getIdUser()\n {\n return $this->idUser;\n }", "public function getIdUser()\n {\n return $this->idUser;\n }", "function _usersId(){\n $admin = false;\n if($this->Auth->user())\n return $this->Auth->user('nhanvien_id');\n }", "public function getUserId()\n {\n return (int)$this->request->getAttribute('user_id');\n }", "public function getIdUsuario()\n {\n return $this->id_usuario;\n }", "public function getId_user()\n\t{\n\t\treturn $this->id_user;\n\t}", "function getUserId() {\n\t\treturn $this->getData('userId');\n\t}", "function getUserId() {\n\t\treturn $this->getData('userId');\n\t}", "public function getIdUserSesion()\r\n {\r\n \t$id = $this->getContainerSession()->offsetGet('id');\r\n\r\n \treturn $id;\r\n }" ]
[ "0.84523016", "0.8408369", "0.8362377", "0.816987", "0.8151111", "0.8131079", "0.78855795", "0.7403165", "0.73811674", "0.7369755", "0.7356365", "0.73142606", "0.7312008", "0.72776896", "0.72772324", "0.7252797", "0.7244278", "0.7238779", "0.7234194", "0.72321373", "0.72321373", "0.7229518", "0.7229518", "0.722812", "0.7197634", "0.71858424", "0.7176189", "0.7171431", "0.7171431", "0.7166487" ]
0.85005414
0
Injects the $findMatchResultsCache frontend
public function injectFindMatchResultsCache(\F3\FLOW3\Cache\Frontend\VariableFrontend $cache) { $this->findMatchResultsCache = $cache; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function searchResults(){\n\t\n\t//grab the default search params (set in the snippet call)\n\t$callParams = $this->qStrArr($this->searchParams);\n\t//default params as set by default for a home output\n\t$defaultParams = $this->qStrArr($this->modeData['searchParams']);\n\t//merge the call params with the default params\n\t$defaultParams = array_merge($defaultParams,$callParams);\n\t//set the get parameters\n\t$getParams = $_GET;\n\t//merge the get parameters with the default paramaters\n\t$params = array_merge($defaultParams,$getParams);\n\t\n\t//set the results numbers\n\t$nres = ($defaultParams['nres'] ? $defaultParams['nres'] : 30);\n\t\n\tif(isset($_POST['startRow'])){\n\t\t$page = ceil($_POST['startRow']/$nres)+1;\n\t\t$params['resgroup'] = $page;\n\t}\n\t\n\tunset($params['q']);\n\t\n\t//put the query string back together\n\t$qString = $this->arrQStr($params);\n\t\n\t//grab all property data with an askig price over 600k\n\t$preTime = microtime(true);\n\t$props = $this->api->getProperties($qString);\n\t$postTime = microtime(true);\n\t//echo json_encode($props); exit;\n\t$apiTimeTaken = $postTime - $preTime;\n\t\n\t//$display = 'API Time: '. $timeTaken .' seconds.';\n\t\n\t$resultsOutput = '';\n\t\n\t//echo 'template: '. $this->tmp;\n\tif(is_array($props['properties'])){\n\t\tforeach($props['properties'] as $key => $prop){\n\t\t\t\n\t\t\t//run logic on the property\n\t\t\t$prop = $this->applyLogic($prop);\n\t\t\t\t\t\t\n\t\t\t//$display .= $key .'_'. $prop['streetName'];\n\t\t\t$resultsOutput .= $this->processModeTpl($this->tpl,'tpl',$prop);\t\n\t\t}\n\t}\n\telse{\n\t\t$resultsOutput .='Results could not be parsed';\n\t}\n\t\n\tif(isset($_POST['lazyLoadRes'])){\n\t\tif($props['nRes'] <= $nres){\n\t\t\t$resultsOutput = '';\n\t\t}\n\t\t$this->jsonEcho($resultsOutput);\n\t}\n\t\n\t//put the ordering fields together\n\t$orderingFields = '';\n\tif(is_array($this->orderingOptions)){\n\t\tforeach($this->orderingOptions as $option){\n\t\t\t//detect if the field is active\n\t\t\t$selected = false;\n\t\t\tif(isset($params['ord'])){\n\t\t\t\tif($params['ord'] == $option['value']){\n\t\t\t\t\t$selected = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//create the field\n\t\t\t$orderingFields .= '<option value=\"'. $option['value'] .'\" '. ($selected ? 'selected = \"selected\"' : '') .'>'. $option['label'] .'</option>';\n\t\t}\n\t}\n\t\n\t//echo 'Mode: '. $this->mode;\n\t\n\t//integrate the outer template\n\t$display = $this->processModeTpl($this->outerTpl,'outerTpl',array(\n\t\t'resTotal'=>$props['nRes'],\n\t\t'resOutput'=>$resultsOutput,\n\t\t'orderingFields'=>$orderingFields,\n\t\t'lazyLoadingPath'=>$this->modx->makeUrl($this->enqDocId,'','','full')\n\t));\n\t\n\treturn $display;\n}", "public function rewriteMatchCache($params)\n {\n if (!empty($params))\n {\n // Init model Footbal\n $modelFootball = new Thethao_Model_Match();\n $modelFootball->rewriteMatchCache($params);\n }\n }", "public function search()\n {\n $definedModels = $this->classFinder->findClasses();\n $this->cacheManager->store(\n static::STORE_KEY,\n $this->formatClassReferences($definedModels)\n );\n }", "public function define_caching(){}", "public function applySearch();", "protected function initUserSearchCache()\r\n\t{\r\n\t \tinclude_once('Services/Search/classes/class.ilUserSearchCache.php');\r\n\t \t$this->search_cache = ilUserSearchCache::_getInstance($this->getUserId());\r\n\t \t$this->offset = $this->getMaxHits() * ($this->search_cache->getResultPageNumber() - 1) ;\r\n\t}", "function doSearch() {\n\t\t$this->_SearchResult = $this->getVideoSearch()->search();\n\t\treturn $this->_SearchResult;\n\t}", "protected function initUserSearchCache()\n\t{\n\t\tglobal $ilUser;\n\t\t\n\t\tinclude_once('Services/Search/classes/class.ilUserSearchCache.php');\n\t\t$this->search_cache = ilUserSearchCache::_getInstance($ilUser->getId());\n\t\t$this->search_cache->switchSearchType(ilUserSearchCache::DEFAULT_SEARCH);\n\t\tif($_GET['page_number'])\n\t\t{\n\t\t\t$this->search_cache->setResultPageNumber((int) $_GET['page_number']);\n\t\t}\n\t\tif(isset($_POST['cmd']['performSearch']))\n\t\t{\n\t\t\t$this->search_cache->setQuery(ilUtil::stripSlashes($_POST['term']));\n\t\t\t$this->search_cache->save();\n\t\t}\n\t\t\n\t}", "public function search_load($condition,$limit=NULL,$offset=NULL,$order_by=NULL)\r\n {\r\n global $search_condition;\r\n //pr($condition);\r\n /**\r\n * We need to alter the $condition array\r\n * for creating the $sphinx_condition \r\n */\r\n $search_condition=array(\"original_condition\"=>$condition,\"sphinx_condition\"=>\"\");\r\n array_walk($condition,\"Search_model::refine_search\");\r\n //pr($search_condition[\"sphinx_condition\"]);\r\n\r\n\r\n /**\r\n * First check the cache if any one already\r\n * searched earlier. \r\n * Parse the $condition into sphinx search query.\r\n */\r\n $sphinx_condition=$search_condition[\"sphinx_condition\"];\r\n\r\n //pr($condition);\r\n //pr($sphinx_condition);\r\n \r\n ///end parsing\r\n /**\r\n * The file caching is not working because \r\n * $sphinx_condition is a very large string\r\n * so md5 is always returning the same value \r\n * for different filters\r\n */\r\n /*$cache_=md5($sphinx_condition.\"-\".$limit.\"-\".$offset.\"-\".$order_by);\r\n $ret=cache_var($cache_);//TODO : remove comment after testing service\r\n if(!empty($ret))//found from file caching system, now return\r\n return $ret;*/\r\n /////End step1//////\r\n\r\n\r\n /**\r\n * Second we are trying to get the results from the search cache table\r\n */\r\n $cache_condition=array(\r\n \"s_search_field_value\"=>serialize($condition),\r\n \"s_sess_id\"=>$this->session->userdata('session_id'),\r\n \"i_page_number\"=>$offset,\r\n );\r\n $ret=$this->load_(\"search_cache\",$cache_condition);\r\n if(!empty($ret))//result found in cache\r\n {\r\n $ret=unserialize($ret[0]->s_search_result);\r\n //cache_var($cache_,$ret);\r\n //For auto pagination//\r\n if(!empty($this->pager))//means auto pager is requested\r\n {\r\n $this->pager[\"per_page\"]=$limit;\r\n $this->pager[\"total_rows\"]=count($ret);//total of the above query including where clause.\r\n }\r\n //pr($this->pager);\r\n //For auto pagination// \r\n return $ret;\r\n }\r\n /*elseif(trim($condition[\"search_type\"])==\"user\")///search into user\r\n $ret=$this->search_user($sphinx_condition,$limit,$offset,$order_by);*/\r\n else//search into services, only\r\n $ret=$this->search_service($sphinx_condition,$limit,$offset,$order_by); \r\n\r\n if(!empty($ret))\r\n {\r\n /**\r\n * Inserting into search cache\r\n */\r\n $cache_condition[\"dt_cache_time\"]=date(\"Y-m-d H:i\");\r\n $cache_condition[\"s_search_result\"]=serialize($ret);\r\n $this->add_(\"search_cache\",$cache_condition);\r\n //pr($cache_condition);\r\n /**\r\n * Inserting into file caching system \r\n */\r\n //cache_var($cache_,$ret); \r\n } \r\n\r\n return $ret;\r\n }", "function matchList($param)\n{\n unset($param);\n\n $ec = new ExtractorConfig();\n\n $matches = [];\n foreach ($ec->getConfig('matches') as $match) {\n $matches[] = [\n 'match' => $match['match'],\n 'teamNum' => $match[$ec->getConfig('team')],\n 'current' => ($ec->getConfig('currentMatch') === $match['match'])\n ];\n }\n\n // Handle any extra matches.\n $extra = ExtractorStorage::fetch('sys', 'extraMatches');\n if ($extra !== false) {\n foreach ($extra as $match) {\n $matches[] = [\n 'match' => $match['match'],\n 'teamNum' => $match['team'],\n 'current' => ($ec->getConfig('currentMatch') === $match['match'])\n ];\n }\n }\n\n $context = [\n 'team' => ExtractorUtil::teamNiceName($ec->getConfig('team')),\n 'teamColor' => ExtractorUtil::teamColor($ec->getConfig('team')),\n 'matches' => $matches,\n ];\n\n echo render('matchList', $context, 'Match List');\n\n return;\n}", "function quebx_route_livesearch_handler($hook, $type, $return_value, $params) {\n\t\n\t// only return results to logged in users.\n\tif (!$user = elgg_get_logged_in_user_entity()) {\n\t\texit;\n\t}\n\t\n\tif (!$q = get_input(\"term\", get_input(\"q\"))) {\n\t\texit;\n\t}\n\t\n\t$input_name = get_input(\"name\", \"assets\");\n\t\n\t$q = sanitise_string($q);\n\t\n\t// replace mysql vars with escaped strings\n\t$q = str_replace(array(\"_\", \"%\"), array(\"\\_\", \"\\%\"), $q);\n\t\n\t$match_on = get_input(\"match_on\", \"all\");\n\t\n\tif (!is_array($match_on)) {\n\t\t$match_on = array($match_on);\n\t}\n\t\n\t// only take over assets search\n\tif (count($match_on) > 1 || !in_array(\"assets\", $match_on)) {\n\t\treturn $return_value;\n\t}\n\t\n\tif (get_input(\"match_owner\", false)) {\n\t\t$owner_guid = $user->getGUID();\n\t} else {\n\t\t$owner_guid = ELGG_ENTITIES_ANY_VALUE;\n\t}\n\t\n\t$limit = sanitise_int(get_input(\"limit\", 10));\n\t\n\t// grab a list of entities and send them in json.\n\t$results = array();\n\t\n\t$options = array(\n\t\t\"type\" => \"object\",\n\t\t\"limit\" => $limit,\n\t\t\"owner_guid\" => $owner_guid,\n\t\t\"joins\" => array(\"JOIN \" . elgg_get_config(\"dbprefix\") . \"objects_entity oe ON e.guid = oe.guid\"),\n\t\t\"wheres\" => array(\"(oe.name LIKE '%\" . $q . \"%' OR oe.description LIKE '%\" . $q . \"%')\")\n\t);\n\t\n\t$entities = elgg_get_entities($options);\n\tif (!empty($entities)) {\n\t\tforeach ($entities as $entity) {\n\t\t\t$output = elgg_view_list_item($entity, array(\n\t\t\t\t\"use_hover\" => false,\n\t\t\t\t\"class\" => \"elgg-autocomplete-item\",\n\t\t\t\t\"full_view\" => false,\n\t\t\t));\n\t\t\t\n\t\t\t$icon = elgg_view_entity_icon($entity, \"tiny\", array(\n\t\t\t\t\"use_hover\" => false,\n\t\t\t));\n\t\t\t\n\t\t\t$result = array(\n\t\t\t\t\"type\" => \"group\",\n\t\t\t\t\"name\" => $entity->name,\n\t\t\t\t\"desc\" => $entity->description,\n\t\t\t\t\"guid\" => $entity->getGUID(),\n\t\t\t\t\"label\" => $output,\n\t\t\t\t\"value\" => $entity->getGUID(),\n\t\t\t\t\"icon\" => $icon,\n\t\t\t\t\"url\" => $entity->getURL(),\n\t\t\t\t\"html\" => elgg_view(\"input/assetpicker/item\", array(\n\t\t\t\t\t\"entity\" => $entity,\n\t\t\t\t\t\"input_name\" => $input_name,\n\t\t\t\t)),\n\t\t\t);\n\t\t\t\n\t\t\t$results[$entity->name . rand(1, 100)] = $result;\n\t\t}\n\t}\n\t\n\tksort($results);\n\theader(\"Content-Type: application/json\");\n\techo json_encode(array_values($results));\n\texit;\n}", "private function search()\r\n {\r\n if (!eval(Hooks::get('ACTIVITY_SEARCH'))) return;\r\n\r\n $this->_template->assign('isResultsMode', false);\r\n $this->_template->assign('wildCardString', '');\r\n $this->_template->assign('active', $this);\r\n $this->_template->display('./modules/activity/Search.tpl');\r\n }", "public function cache();", "public static function setup_search(){return array();}", "function avelsieve_search_integration() {\n\tinclude_once(SM_PATH . 'plugins/avelsieve/include/search_integration.inc.php');\n\tavelsieve_search_integration_do();\n}", "public function getMatches()\n {\n $this->_matches;\n }", "function advancedResults() {\n\t\t$this->validate();\n\t\t$this->setupTemplate(true);\n\n\t\t$query = Request::getUserVar('query');\n\t\t$fromDate = Request::getUserDateVar('dateFrom', 1, 1);\n\t\tif ($fromDate !== null) $fromDate = date('Y-m-d H:i:s', $fromDate);\n\t\t$toDate = Request::getUserDateVar('dateTo', 32, 12, null, 23, 59, 59);\n\t\tif ($toDate !== null) $toDate = date('Y-m-d H:i:s', $toDate);\n\t\t$articleDao =& DAORegistry::getDAO('ArticleDAO');\n\n\t\t$results =& $articleDao->searchProposalsPublic($query, $fromDate, $toDate);\n\n\t\t$templateMgr =& TemplateManager::getManager();\n\t\t$templateMgr->assign_by_ref('results', $results);\n\t\t$templateMgr->assign('query', Request::getUserVar('query'));\n\t\t\n\t\t$templateMgr->assign('dateFrom', $fromDate);\n\t\t$templateMgr->assign('dateTo', $toDate);\n\t\t$templateMgr->assign('count', count($results));\n\n\t\t$templateMgr->display('search/searchResults.tpl');\n\t}", "public function configureSearch(): void\n {\n }", "public function search() {\n }", "public function fetchSearchResults($input) {\n \n $inputArray = explode(\" \", $input);\n\n // these settings are for the custom LengthAwarePaginator\n $currentPage = LengthAwarePaginator::resolveCurrentPage();\n $perPage = 30;\n\n $results = [];\n $pinyinResults = [];\n $translationResults = [];\n $actualResults = [];\n\n // Actual results, items that match exactly\n foreach ($inputArray as $inputItem) {\n\n $actualResults = \\App\\Character::where('char', $inputItem)\n ->orWhere('pinyin', $inputItem)\n ->orWhere('radical', $inputItem)\n ->orWhere('pinyin_normalised', $inputItem)->orderBy('freq', 'asc')->get();\n\n // for each result in the above collections, add to results array\n\n foreach($actualResults as $result) {\n if (! in_array($result, $results)) {\n array_push($results, $result);\n }\n }\n }\n\n // pinyin and char results using \"like\" operator\n foreach ($inputArray as $inputItem) {\n \n $pinyinResults = \\App\\Character::where('char', 'like', '%' . $inputItem .'%')\n ->orWhere('pinyin', 'like', '%' . $inputItem .'%')\n ->orWhere('radical', 'like', '%' . $inputItem .'%')\n ->orWhere('pinyin_normalised', 'like', '%' . $inputItem .'%')->orderBy('freq', 'asc')->get();\n\n // for each result in the above collections, add to results array\n\n foreach($pinyinResults as $result) {\n if (! in_array($result, $results)) {\n array_push($results, $result);\n }\n }\n }\n\n // translation and heisig results using \"like\" operator\n foreach ($inputArray as $inputItem) {\n\n $translationResults = \\App\\Character::where('heisig_keyword', 'like', '%' . $inputItem .'%')\n ->orWhere('translations', 'like', '%' . $inputItem .'%')\n ->orWhere('heisig_number', 'like', '%' . $inputItem .'%')->get();\n\n // for each result in the above collections, add to results array\n foreach($translationResults as $result) {\n if (! in_array($result, $results)) {\n array_push($results, $result);\n }\n }\n }\n \n // return the results array as a paginatior\n $results = collect($results);\n $results = new LengthAwarePaginator($results->forPage($currentPage, $perPage), $results->count(), $perPage, $currentPage, ['path' => \"/search/$input\"]);\n return $results;\n }", "private function get_results_from_storage() {\n\t\t$this->results = get_option( 'rank_math_seo_analysis_results' );\n\t\t$this->build_results();\n\t}", "public function getEntries($searchResult);", "protected function resolveCache(): Collection\n {\n $_this = $this;\n return \\FieldLayout::getCache($this->object, function () use ($_this) {\n return $_this->loadGroups();\n });\n }", "function mediadesk_edge_get_search() {\n\t\tmediadesk_edge_load_search_template();\n\t}", "public function search();", "private static function cacheResult($result)\n {\n\t\n }", "public function injectResolveCache(\\F3\\FLOW3\\Cache\\Frontend\\StringFrontend $cache) {\n\t\t$this->resolveCache = $cache;\n\t}", "private function getMatchlist($threshold){\n\t\t\n\t\t// Make sure the user is logged in.\n\t\tif(! Auth::check()){\n\t\t\treturn redirect('/')->with('error', 'Unauthorised Page: Access Denied');\n\t\t}\n\t\t\n\t\t$userID = self::getID();\n\t\t\n\t\t$user = User::find($userID);\n\t\t\n\t\t// Make sure the user has set their preferences so we can calculate matches.\n\t\tif($user->preferenceSet==0){\n\t\t\treturn redirect('preferences')->with('error', \"You can't find matches until you have set your preferences.\");\n\t\t}\n\t\t\n\t\t// Get the potential matches.\n\t\t$array = self::getMatchArray($threshold);\n\t\t\n\t\t// Return the page with a list of matches.\n\t\treturn view('matchlist')->with('array', $array);\n\t}", "function adventure_tours_render_tour_search_form( $allow_cache = true ) {\n\t\tstatic $cache;\n\n\t\tif ( ! $allow_cache || null === $cache ) {\n\t\t\t$title = adventure_tours_get_option( 'tours_search_form_title' );\n\t\t\t$note = adventure_tours_get_option( 'tours_search_form_note' );\n\n\t\t\t$cache = do_shortcode( sprintf('[tour_search_form title=\"%s\" note=\"%s\"]',\n\t\t\t\t$title,\n\t\t\t\t$note\n\t\t\t) );\n\t\t}\n\n\t\treturn $cache;\n\t}", "public static function enableSubstCache()\n {\n self::$substCacheEnabled = true;\n }" ]
[ "0.55518013", "0.55485046", "0.54881865", "0.532579", "0.51706856", "0.516968", "0.5136662", "0.50877374", "0.5065037", "0.5061404", "0.5061118", "0.50449145", "0.50365376", "0.49861753", "0.4981541", "0.49752578", "0.49726003", "0.49416557", "0.4933661", "0.49208552", "0.4916118", "0.49072486", "0.48466745", "0.48418278", "0.48226637", "0.48222867", "0.4819234", "0.48171815", "0.48051283", "0.47972193" ]
0.7662561
0
Injects the $resolveCache drontend
public function injectResolveCache(\F3\FLOW3\Cache\Frontend\StringFrontend $cache) { $this->resolveCache = $cache; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function define_caching(){}", "protected function registerCacheProvider()\n {\n $this->app->singleton('kolay-auth-provider-cache', function () {\n return $this->getConfigInstance('providers.cache');\n });\n }", "public function setProviderData($cache): void;", "protected function registerResolver()\n {\n $this->app->singleton('cache.resolver', function ($app) {\n $adapter = $app['cache.adapter'];\n $path = $app['path.storage'].'/analysis-cache';\n\n return new CacheResolver($adapter, $path);\n });\n\n $this->app->alias('cache.resolver', CacheResolver::class);\n }", "public function injectFindMatchResultsCache(\\F3\\FLOW3\\Cache\\Frontend\\VariableFrontend $cache) {\n\t\t$this->findMatchResultsCache = $cache;\n\t}", "protected function registerCacheServiceProvider()\n {\n $this->registerCacheManager();\n\n $this->registerMemcachedConnector();\n }", "protected function _postConstruct()\n {\n parent::_postConstruct();\n $this->_cache = Solar::dependency(\n 'Solar_Cache',\n $this->_config['cache']\n );\n }", "public function initCache(): void\n {\n $this->cache = self::createAdapter();\n }", "public function __construct()\n {\n $this->setCacheable(true);\n }", "public function __construct() {\n $this->maybeByPassCache();\n\n // Load cache\n $this->loadCache();\n }", "public function resolve();", "public function resolve();", "private function registerCacheUpdate()\n\n {\n\n $this->cacheService->getPageIdStack()->push(\n\n $this->getFrontendController()->id\n\n );\n\n }", "abstract protected function resolve();", "public function cache();", "protected function resolveCache(): Collection\n {\n $_this = $this;\n return \\FieldLayout::getCache($this->object, function () use ($_this) {\n return $_this->loadGroups();\n });\n }", "private function _getDI()\n\t{\n\t\t$di = new Di;\n\t\t$frontendCache = new FrontendCache(array('lifetime' => 2));\n\t\t$backendCache = new BackendCache($frontendCache, array('cacheDir' => 'unit-tests/cache/'));\n\t\t$di->set('viewCache', $backendCache);\n\t\treturn $di;\n\t}", "public function store_dependency_value(): ICacheDependency;", "public function changeCache() {\n if ($this->cache === NULL) {\n return;\n }\n \n $data = $this->cache->load('_configLoader');\n \n $data['parameters'][$this->namespace] = $this;\n \n $this->cache->save('_configLoader', $data);\n }", "public function loadCache();", "public function init()\n {\n $this->getFromCache();\n parent::init();\n }", "private function addResolveConfig(): void\n {\n $aliases = $this->tracker->getAliases();\n $this->generator->addBlock(\n (new CodeBlock())->set(CodeBlock::RESOLVE, ['alias' => $aliases, 'root' => array_values($aliases)])\n );\n }", "public function getCache();", "public function getCache();", "public function getCache();", "public function cache()\n\t{\n\t\t$sources = $this->getSources();\n\t\tforeach ($sources as $source) {\n\t\t\t$source->cache();\n\t\t};\n\t}", "private function _configureSuperCache()\n {\n if (sfSympalConfig::get('page_cache', 'super') && sfConfig::get('sf_cache'))\n {\n $superCache = new sfSympalSuperCache();\n $this->_dispatcher->connect('response.filter_content', array($superCache, 'listenToResponseFilterContent'));\n }\n }", "function recompileCache()\n {\n }", "public function setCache(Cache $cache);", "private function __construct( ){\n $this->generateCache( );\n }" ]
[ "0.635354", "0.603423", "0.6028633", "0.5991684", "0.59786063", "0.59343165", "0.58941287", "0.57884026", "0.57832783", "0.5764127", "0.5746357", "0.5746357", "0.56973267", "0.56771874", "0.5673476", "0.56327134", "0.5623043", "0.56005776", "0.55686176", "0.55492485", "0.5531381", "0.5515153", "0.5514019", "0.5514019", "0.5514019", "0.55071265", "0.5492025", "0.54437083", "0.54429257", "0.5431354" ]
0.7102934
0
Handle output from this dispatcher. If there's an error in _this_ dispatcher, use the standard surroundings. If not, don't put anything around the output the chained dispatcher will take care of that.
function handleOutput ($data) { if ($this->bJSONMode || $this->error) { parent::handleOutput($data); } else { print $data; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function decorateOutput() {\n if ($this->_responseType == Halcyon::RESPONSE_NONE) {\n // nothing, just nothing...\n \n } elseif ($this->_responseType == Halcyon::RESPONSE_JSON) {\n header(\"Content-Type: application/json\");\n echo json_encode($this->_controllerReturnValue);\n \n } elseif ($this->_responseType == Halcyon::RESPONSE_TEMPLATED) {\n header(\"Content-Type: \" . $this->_responseContentType);\n // We're throwing away the return value...\n\n $templatefilename = null;\n \n if ($this->_templateBody === null) {\n\t$this->_templateBody = ucfirst($this->_calleeMethod);\n\t\n\t$templatefilename = $this->_templateDirectory . \"/\" .\n\t $this->_controllerFilename . $this->_templateBody . \".tpl\";\n\n } else {\n\t$templatefilename = $this->_templateDirectory . \"/\" .\n\t $this->_templateBody . \".tpl\";\n }\n\n if ($templatefilename !== null) {\n\t$body = ___captureFileOutput($this->_handler, $templatefilename);\n\n\n\tif ($this->_templateLayout !== null) {\n\t $values = (array) $this->_handler;\n\t $values[\"___body___\"] = $body;\n\n\t $layout = ___captureFileOutput($values, $this->_templateDirectory . \"/\" . $this->_templateLayout . \".tpl\");\n\n\t echo $layout;\n\t \n\t} else {\n\t echo $body;\n\t}\n }\n }\n }", "protected function _makeOutputProcessing()\n {\n $oOutput = oxNew(\"oxOutput\");\n $this->setBody($oOutput->process($this->getBody(), \"oxemail\"));\n $this->setAltBody($oOutput->process($this->getAltBody(), \"oxemail\"));\n $oOutput->processEmail($this);\n }", "abstract protected function output();", "abstract protected function output();", "public function handleException($exception)\n {\n // Walk the registered handlers in the reverse order\n // they were registered, and pass off the exception\n $inspector = $this->getInspector($exception);\n\n // Capture output produced while handling the exception,\n // we might want to send it straight away to the client,\n // or return it silently.\n $this->system->startOutputBuffering();\n\n // Just in case there are no handlers:\n $handlerResponse = null;\n $handlerContentType = null;\n\n try {\n foreach (array_reverse($this->handlerStack) as $handler) {\n $handler->setRun($this);\n $handler->setInspector($inspector);\n $handler->setException($exception);\n\n // The HandlerInterface does not require an Exception passed to handle()\n // and neither of our bundled handlers use it.\n // However, 3rd party handlers may have already relied on this parameter,\n // and removing it would be possibly breaking for users.\n $handlerResponse = $handler->handle($exception);\n\n // Collect the content type for possible sending in the headers.\n $handlerContentType = method_exists($handler, 'contentType') ? $handler->contentType() : null;\n\n if (in_array($handlerResponse, [Handler::LAST_HANDLER, Handler::QUIT])) {\n // The Handler has handled the exception in some way, and\n // wishes to quit execution (Handler::QUIT), or skip any\n // other handlers (Handler::LAST_HANDLER). If $this->allowQuit\n // is false, Handler::QUIT behaves like Handler::LAST_HANDLER\n break;\n }\n }\n\n $willQuit = $handlerResponse == Handler::QUIT && $this->allowQuit();\n } finally {\n $output = $this->system->cleanOutputBuffer();\n }\n\n // If we're allowed to, send output generated by handlers directly\n // to the output, otherwise, and if the script doesn't quit, return\n // it so that it may be used by the caller\n if ($this->writeToOutput()) {\n // @todo Might be able to clean this up a bit better\n if ($willQuit) {\n // Cleanup all other output buffers before sending our output:\n while ($this->system->getOutputBufferLevel() > 0) {\n $this->system->endOutputBuffering();\n }\n\n // Send any headers if needed:\n if (Misc::canSendHeaders() && $handlerContentType) {\n header(\"Content-Type: {$handlerContentType}\");\n }\n }\n\n $this->writeToOutputNow($output);\n }\n\n if ($willQuit) {\n // HHVM fix for https://github.com/facebook/hhvm/issues/4055\n $this->system->flushOutputBuffer();\n\n $this->system->stopExecution(\n $this->sendExitCode()\n );\n }\n\n return $output;\n }", "public function postoutput()\r\n\t\t/* set message/post html output code\r\n\t\t *\r\n\t\t */\r\n\t\t{\r\n\t\t\t$this->output_message();\r\n\t\t}", "protected function process()\n {\n $this->result = $this[self::RESPONSE_PROCESSING] == self::TYPE_RAW\n ? $this->request->getResponse()\n : $this->getResponseParser()->parse($this);\n }", "public function renderOutput(){\n\t\tif($GLOBALS['TSFE']->isINTincScript()) {\n\t\t\t$this->renderHttp2PushHeader();\n\t\t}\n\t}", "function render () {\n\t\t/**\n\t\t * Protection from double calling\n\t\t */\n\t\tif ($this->finish_called_once) {\n\t\t\treturn;\n\t\t}\n\t\t$this->finish_called_once = true;\n\t\t$Response = Response::instance();\n\t\tif (is_resource($Response->body_stream)) {\n\t\t\treturn;\n\t\t}\n\t\t/**\n\t\t * For CLI, API and generally JSON responses only content without page template\n\t\t */\n\t\t$Request = Request::instance();\n\t\tif ($Request->cli_path || $Request->api_path || !$this->interface) {\n\t\t\t/**\n\t\t\t * Processing of replacing in content\n\t\t\t */\n\t\t\t/** @noinspection NestedTernaryOperatorInspection */\n\t\t\t$Response->body = $this->process_replacing(strlen($this->Content) ? $this->Content : ($Request->api_path ? 'null' : ''));\n\t\t} else {\n\t\t\tEvent::instance()->fire('System/Page/render/before');\n\t\t\t/**\n\t\t\t * Processing of template, substituting of content, preparing for the output\n\t\t\t */\n\t\t\t$this->prepare();\n\t\t\t/**\n\t\t\t * Processing of replacing in content\n\t\t\t */\n\t\t\t$this->Html = $this->process_replacing($this->Html);\n\t\t\tEvent::instance()->fire('System/Page/render/after');\n\t\t\t$Response->body = rtrim($this->Html);\n\t\t}\n\t}", "protected function executeActionWithErrorHandling() {\r\n\r\n\t\t// In case an error occurs during data output,\r\n\t\t// clear the output buffer and print just the error information\r\n\t\tob_start();\r\n\r\n\t\ttry {\r\n\t\t\t$this->executeAction();\r\n\t\t} catch (Exception $e) {\r\n\t\t\t//\r\n\t\t\t// Handle any kind of exception by outputing properly formatted error message.\r\n\t\t\t// If this fails, an unhandled exception should be thrown so that global error\r\n\t\t\t// handler will process and log it.\r\n\t\t\t//\r\n\r\n\t\t\t$errCode = $this->substituteResultWithError($e);\r\n\r\n\t\t\t// Error results should not be cached\r\n\t\t\t$this->setCacheMaxAge(0);\r\n\r\n\t\t\t$headerStr = 'MediaWiki-API-Error: ' . $errCode;\r\n\t\t\tif ($e->getCode() === 0)\r\n\t\t\t\theader($headerStr, true);\r\n\t\t\telse\r\n\t\t\t\theader($headerStr, true, $e->getCode());\r\n\r\n\t\t\t// Reset and print just the error message\r\n\t\t\tob_clean();\r\n\r\n\t\t\t// If the error occured during printing, do a printer->profileOut()\r\n\t\t\t$this->mPrinter->safeProfileOut();\r\n\t\t\t$this->printResult(true);\r\n\t\t}\r\n\r\n\t\t// Set the cache expiration at the last moment, as any errors may change the expiration.\r\n\t\t// if $this->mSquidMaxage == 0, the expiry time is set to the first second of unix epoch\r\n\t\t$expires = $this->mSquidMaxage == 0 ? 1 : time() + $this->mSquidMaxage;\r\n\t\theader('Expires: ' . wfTimestamp(TS_RFC2822, $expires));\r\n\t\theader('Cache-Control: s-maxage=' . $this->mSquidMaxage . ', must-revalidate, max-age=0');\r\n\r\n\t\tif($this->mPrinter->getIsHtml())\r\n\t\t\techo wfReportTime();\r\n\r\n\t\tob_end_flush();\r\n\t}", "function output(){}", "abstract public function output();", "abstract public function output();", "public function handle() {\n\t\techo \"<pre>\\n\";\n\t\techo $this->content();\n\t\techo \"</pre>\\n\";\n\t}", "public function output() {\n\t\tif ( !$this->output_json ) { // HTML METHODS\n\t\t\tswitch ( $this->action['action'] ) {\n\t\t\t\tcase \"outbox\":\n\t\t\t\t\t$this->title .= \" :: Outbox\";\n\t\t\t\t\t$this->html = $this->outbox();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"inbox\":\n\t\t\t\t\t$this->title .= \" :: Inbox\";\n\t\t\t\t\t$this->html = $this->inbox();\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"clear\":\n\t\t\t\t\t$this->clear();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->html = $this->inbox();\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tmakePage($this->html, $this->title);\n\t\t} else { \n\t\t\tswitch($this->action['action']) {\n\t\t\t\tcase \"delete\":\n\t\t\t\t\tif ( isset($this->action['id']) && is_numeric($this->action['id']) ) {\n\t\t\t\t\t\t$this->delete(intval($this->action['id']));\n\t\t\t\t\t} else {\n\t\t\t\t\t\t$this->json['success'] = false;\n\t\t\t\t\t} break;\n\t\t\t\tdefault:\n\t\t\t\t\t$this->json['success'] = false;\n\t\t\t\t\tbreak;\n\t\t\t} echo json_encode($this->json);\n\t\t}\n\t}", "public function output() {\r\n header(\"HTTP/1.1 {$this->getStatusCode()}\");\r\n \r\n foreach ($this->getHeaders() as $name => $value) {\r\n header( $name . ': ' . $value );\r\n }\r\n echo $this->getBody();\r\n // one final thing\r\n $this->setBody(null);\r\n $this->setHeaders(array());\r\n }", "public function output()\n {\n if ($this->_output === null) {\n $this->_process();\n }\n $output = $this->_output;\n \n return $output;\n }", "public function output() {\n\t\techo $this;\n\t}", "function sendOutput(){\n\t\t\tdie(json_encode($this->output, JSON_UNESCAPED_UNICODE));\n\t\t}", "protected function handle_out()\r\n {\r\n $events = EventManager::events();\r\n\r\n $reversed = new Stack();\r\n\r\n while ($events->length() != 0) {\r\n $reversed->push($events->pop());\r\n }\r\n\r\n while ($reversed->length() != 0) {\r\n $this->execute($reversed->pop());\r\n }\r\n }", "public function process() {\r\n $this->handleRequest();\r\n echo $this->genResponse();\r\n }", "protected function handleProcessOutput()\n {\n return fn ($type, $buffer) => str($buffer)->explode(\"\\n\")->each(function ($line) {\n if (str($line)->contains('Development Server (http')) {\n if ($this->serverRunningHasBeenDisplayed) {\n return;\n }\n\n $this->io->info(\"Server running on [http://{$this->host()}:{$this->port()}].\");\n $this->io->comment(' <fg=yellow;options=bold>Press Ctrl+C to stop the server</>');\n\n $this->io->newLine();\n\n $this->serverRunningHasBeenDisplayed = true;\n } elseif (str($line)->contains(' Accepted')) {\n $requestPort = $this->getRequestPortFromLine($line);\n\n $this->requestsPool[$requestPort] = [\n $this->getDateFromLine($line),\n false,\n ];\n } elseif (str($line)->contains([' [200]: GET '])) {\n $requestPort = $this->getRequestPortFromLine($line);\n\n $this->requestsPool[$requestPort][1] = trim(explode('[200]: GET', $line)[1]);\n } elseif (str($line)->contains(' Closing')) {\n $requestPort = $this->getRequestPortFromLine($line);\n $request = $this->requestsPool[$requestPort];\n//\n// [$startDate, $file] = $request;\n//\n// $formattedStartedAt = $startDate->format('Y-m-d H:i:s');\n//\n// unset($this->requestsPool[$requestPort]);\n//\n// [$date, $time] = explode(' ', $formattedStartedAt);\n//\n// $this->output->write(\" <fg=gray>$date</> $time\");\n//\n// $runTime = $this->getDateFromLine($line)->diffInSeconds($startDate);\n//\n// if ($file) {\n// $this->output->write($file = \" $file\");\n// }\n//\n// $dots = max(\n// $this->terminal->getWidth()\n// - mb_strlen($formattedStartedAt)\n// - mb_strlen($file)\n// - mb_strlen($runTime)\n// - 9,\n// 0\n// );\n\n// $this->output->write(' '.str_repeat('<fg=gray>.</>', $dots));\n// $this->output->writeln(\" <fg=gray>~ {$runTime}s</>\");\n } elseif (str($line)->contains(['Closed without sending a request'])) {\n // ...\n } elseif (! empty($line)) {\n $warning = explode('] ', $line);\n $this->io->warning(count($warning) > 1 ? $warning[1] : $warning[0]);\n }\n });\n }", "public function __invoke()\n {\n return $this->render();\n }", "public function parseOutputForDisplay( &$output )\r\n\t{\r\n\r\n\t\t/* Do we actually have any? */\r\n\t\tif( !\\count( $this->outputStack ) )\r\n\t\t{\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t$this->outputStack = array_reverse( $this->outputStack );\r\n\r\n\t\t$this->replaceWords( $output );\r\n\t}", "public abstract function displayOutput();", "private function render() : void\n {\n $this->handle();\n }", "private function sendOutput()\n\t{\n\t\t$this->registry->output->html .= $this->html->convertFooter();\n\t\t$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();\n\t\t$this->registry->output->sendOutput();\n\t\texit;\n\t}", "private function sendOutput()\r\n\t\t{\r\n\t\t\t$this->registry->output->html .= $this->html->convertFooter();\r\n\t\t\t$this->registry->output->html_main .= $this->registry->output->global_template->global_frame_wrapper();\r\n\t\t\t$this->registry->output->sendOutput();\r\n\t\t\texit;\r\n\t\t}", "public abstract function getOutput($data, array $context);", "public function format()\n {\n if(!empty($this->getInput())) {\n $this->setOutput($this->getInput());\n return;\n }\n }" ]
[ "0.59885794", "0.5785414", "0.56725323", "0.56725323", "0.5600105", "0.54992056", "0.5492675", "0.5445962", "0.5383705", "0.5364973", "0.52070564", "0.52044094", "0.52044094", "0.5170345", "0.5154895", "0.5133175", "0.50833976", "0.5083268", "0.5074552", "0.5068189", "0.50655484", "0.50422114", "0.50412786", "0.50350165", "0.50084835", "0.49836352", "0.4957914", "0.49230686", "0.49201515", "0.49163252" ]
0.5990888
0
Runs the product delta
public function runDelta() : void { try { $pc = PureClarity::getInstance(); $active = $pc->isActive(); $deltasEnabled = $pc->getConfigFlag(PureClarity::CONFIG_FEEDS_DELTAS); $state = State::getInstance(); $running = $state->getStateValue('product_delta_running'); if ($deltasEnabled === false || $active === false || $running === '1') { return; } $state->setStateValue('product_delta_running', '1'); $productData = Row::getInstance(); $deltaRepo = Database::getRepo('XLite\Module\PureClarity\Personalization\Model\Product\Delta'); $deltas = $deltaRepo->findAll(); $productRepo = Database::getRepo('XLite\Model\Product'); if (count($deltas) > 0) { $deltaHandler = new ProductDelta( $pc->getConfig(PureClarity::CONFIG_ACCESS_KEY), $pc->getConfig(PureClarity::CONFIG_SECRET_KEY), $pc->getConfig(PureClarity::CONFIG_REGION) ); foreach ($deltas as $delta) { /** @var $delta Delta */ if ($delta->getterProperty('type') === 'D') { $deltaHandler->addDelete($delta->getterProperty('productId')); } else { /** @var $product \XLite\Model\Product */ $product = $productRepo->findOneBy( [ 'product_id' => $delta->getterProperty('productId') ] ); if (!$product) { $deltaHandler->addDelete($delta->getterProperty('productId')); } else { $data = $productData->getRowData($product); if ($data !== null) { $deltaHandler->addData($data); } else { $deltaHandler->addDelete($delta->getterProperty('productId')); } } } } $deltaHandler->send(); $deltaRepo->deleteInBatch($deltas); } $state->setStateValue('product_delta_running', ''); } catch (Exception $e) { Logger::logCustom('pureclarity', 'PC Delta ERROR:' . $e->getMessage(), false); $state = State::getInstance(); $state->setStateValue('product_delta_error', $e->getMessage()); $state->setStateValue('product_delta_running', ''); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function run($_delta);", "public function calculateProduct();", "public function updater()\n {\n // if($this->tester())\n // {\n $get_array = $this->select_model->select_product_master(1);\n $imploder = array();\n array_pop($get_array);\n for($r = 0; $r < count($get_array); $r++)\n {\n //a = a - (a-b);\n\n $imploder[$r] = \"dp.\".$get_array[$r].\" = CAST(dp.\".$get_array[$r].\" AS SIGNED) - (CAST(old.\".$get_array[$r].\" AS SIGNED) - CAST(adp.\".$get_array[$r].\" AS SIGNED))\";\n }\n $imploder_string = implode(\",\",$imploder);\n $updater = $this->update_model->update_date_products_assigned($imploder_string);\n // if($updater >= 0)\n // {\n // $this->delete_model->drop_assigned_date_products();\n // }\n // }\n }", "public static function PRODUCT(...$args)\n {\n return MathTrig\\Operations::product(...$args);\n }", "public function run()\n {\n $product = new Product([\n \t'sku' => '2000373859395',\n \t'description' => 'POLE DAY INX NAC',\n \t'price' => '16990',\n ]);\n\n $product->save();\n\n $second_product = new Product([\n \t'sku' => '2000373859432',\n \t'description' => 'POLE DAY INX NAC',\n \t'price' => '16990',\n ]);\n\n $second_product->save();\n }", "function calculate() \r\n\t{\r\n\t\t$this->total = 0;\r\n\r\n\t\tforeach ($this->contents as $product_id=>$product)\r\n\t\t{\r\n\t\t\t$this->total += $product['price'] * $product['quantity'];\r\n\t\t}\r\n }", "public function product(array $product);", "public function multiplication()\n {\n //self production\n }", "public function testMultiply(){\n $calc = new Calculator();\n $product = $calc->multiply(array(1,3,5,6));\n $this->assertEquals(90, $product); //check if 1*3*5*6 is equal to 90\n\n //BillyBrown @ 1-12-2017\n //test if multiply class correctly returns a zero if any of the values passed in the array is a zero\n $product = $calc->multiply(array(2,4,0,8));\n $this->assertEquals(0, $product); //check if 2*4*0*8 is equal to 0\n\n //BillyBrown @ 1-12-2017\n //test if multiply class correctly returns a negative product if an ODD (3) number of negative values were passed in\n $product = $calc->multiply(array(3,-6,9,-12,15,-18));\n $this->assertEquals(-524880, $product); //check if 3*(-6)*9*(-12)*15*(-18) is equal to -524880\n\n //BillyBrown @ 1-12-2017\n //test if multiply class correctly returns a positive product if an EVEN (4) number of negative values were passed in\n $product = $calc->multiply(array(1,-2,3,-4,5,-6,7,-8,9));\n $this->assertEquals(362880, $product); //check if 1*(-2)*3*(-4)*5*(-6)*7*(-8)*9 is equal to 362880\n\n }", "function multiply()\r\n {\r\n }", "function multiply()\r\n {\r\n }", "function multiply()\r\n {\r\n }", "function multiply()\r\n {\r\n }", "function multiply()\r\n {\r\n }", "function multiply()\r\n {\r\n }", "function multiply()\r\n {\r\n }", "function multiply()\r\n {\r\n }", "function multiply()\r\n {\r\n }", "function multiply()\r\n {\r\n }", "function multiply()\r\n {\r\n }", "function multiply()\r\n {\r\n }", "function multiply()\r\n {\r\n }", "public static function product( $args ) {\n\t\t$args = func_get_args();\n\t\treturn array_product( $args );\n\t}", "public function run()\n {\n $this->attach_order_product(3);\n $this->attach_order_product(4);\n }", "public function do_algorithm() {\n //yang dipanggil pertama kali adalah function init\n //kemudian melakukan proses tahap pertama.\n $this->init();\n $this->process(null, null, 1);\n //dibawah ini adalah testing iterasi secara bertahap\n //$this->process(array('product_time_delay' => 2,), array(1));\n //$this->process(array('product_time_delay' => 2, 'product_stock_buffer' => '>=0<=15'), array(1, 2));\n //$this->process(array('product_time_delay' => 2, 'product_stock_buffer' => '>=0<=15', 'product_result_sales' => '>=31<=60'), array(1, 2, 3));\n //$this->process(array('product_time_delay' => 2, 'product_stock_buffer' => '>=0<=15', 'product_result_sales' => '>=31<=60', 'product_stock_rest' => 4), array(1, 2, 3, 4));\n }", "function testChangeProductAmount() {\n\t \n\t $this->loginAs('admin');\n\t $productA = $this->objFromFixture('Product', 'productA');\n\t $productID = $productA->ID; \n\t \n\t //Publish\n\t $productA->doPublish();\n\t $this->assertTrue($productA->isPublished());\n\n\t $versions = DB::query('SELECT * FROM \"Product_versions\" WHERE \"RecordID\" = ' . $productID);\n\t $versionsAfterPublished = array();\n\t foreach ($versions as $versionRow) $versionsAfterPublished[] = $versionRow;\n\n\t $originalAmount = $productA->Amount;\n\t \n\t $newAmount = new Money();\n\t $newAmount->setAmount($originalAmount->getAmount() + 50);\n\t $newAmount->setCurrency($originalAmount->getCurrency());\n\t \n\t $this->assertTrue($newAmount->Amount != $originalAmount->Amount);\n\t \n //Update price and publish\n\t $productA->Amount = $newAmount;\n\t $productA->doPublish();\n\n\t $versions = DB::query('SELECT * FROM \"Product_versions\" WHERE \"RecordID\" = ' . $productID);\n\t $versionsAfterPriceChange = array();\n\t foreach ($versions as $versionRow) $versionsAfterPriceChange[] = $versionRow;\n\n\t $this->assertTrue(count($versionsAfterPublished) + 1 == count($versionsAfterPriceChange));\n\t $this->assertEquals($versionsAfterPriceChange[2]['AmountAmount'], $newAmount->getAmount());\n\t}", "public function run()\n {\n if (version_compare($this->from_version, '6.7.2', '>') && version_compare($this->from_version, '6.7.6', '<')) {\n $this->fixProductBundleIndexes();\n $this->fixQuoteAndProductBundleValues();\n }\n }", "public function UpdateProductWithNewStock()\n {\n $products = $this->allDataOnBasket;\n foreach ($products as $product)\n {\n $productsFromDb= Product::find($product->product_id);\n $newStock = ($productsFromDb->stock - $product->counter);\n $arr []= $productsFromDb->update(['stock'=>$newStock]);\n }\n\n }", "public function run()\n {\n $product = $this->getAttribute('product');\n\n /// get 2 products from the same category ///\n $catProducts = array();\n if (array_key_exists('collections', $product))\n {\n $collection = $product['collections'][0];\n $catProducts = $this->getProductsByCollection($collection['pkey'], 3);\n }\n\n #alert($product, 'blue', 'product');\n\n // dd($catProducts[0]['pkey']);\n /// get 5 products from the same tag ///\n\n\n\n #if ( ! empty($product['tag']))\n #{\n $tagProducts = $this->getProductsByTag($product['tag'], 7);\n /// merg e to products array ///\n // alertd(sizeof($catProducts).\" \".sizeof($tagProducts));\n $rawProducts = array_merge($catProducts, $tagProducts);\n #}\n #else\n #{\n #$rawProducts = $catProducts;\n #}\n /// build array of related products ///\n $products = $this->buildProductsArray($rawProducts, $product);\n\n $attrs = array(\n 'products' => $products,\n );\n\n return $attrs;\n }", "protected function processChangeProductInCart()\n\t{\n\t\t$mode = (Tools::getIsset('update') && $this->id_product) ? 'update' : 'add';\n\n\t\tif (!$this->id_product)\n\t\t\t$this->errors[] = Tools::displayError('Product not found', !Tools::getValue('ajax'));\n\n\t\t$product = new Product($this->id_product, true, $this->context->language->id);\n\t\tif (!$product->id || !$product->active || !$product->checkAccess($this->context->cart->id_customer))\n\t\t{\n\t\t\t$this->errors[] = Tools::displayError('This product is no longer available.', !Tools::getValue('ajax'));\n\t\t\treturn;\n\t\t}\n\n\t\t$qty_factor = 1;\n\t\t$ext_qty_factor = 1;\n\t\t$ext_prop_quantities = null;\n\t\t$id_cart_product = 0;\n\t\t$qty_behavior = 0;\n\t\t$icp = (int)Tools::getValue('icp');\n\t\t$properties = $product->productProperties();\n\t\tif ($icp && $this->context->cart->id)\n\t\t{\n\t\t\t\t\t\t$cart_products = $this->context->cart->getProducts();\n\t\t\tif (count($cart_products))\n\t\t\t{\n\t\t\t\tforeach ($cart_products as $cart_product)\n\t\t\t\t{\n\t\t\t\t\tif ($icp == (int)$cart_product['id_cart_product'])\n\t\t\t\t\t{\n\t\t\t\t\t\t$id_cart_product = $icp;\n\t\t\t\t\t\tif ($mode == 'add')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif (Tools::getValue('qty') != 'default')\n\t\t\t\t\t\t\t\t$qty_factor = (int)Tools::getValue('qty');\n\t\t\t\t\t\t\t$_POST['qty'] = ((float)$cart_product['cart_quantity_fractional'] > 0 ? (float)$cart_product['cart_quantity_fractional'] : ($product->qtyStep() > 0 ? $product->qtyStep() : 1));\n\t\t\t\t\t\t}\n\t\t\t\t\t\telseif ($mode == 'update')\n\t\t\t\t\t\t\t$qty_behavior = PP::qtyBehavior($product, $cart_product['cart_quantity']);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tif ($properties['pp_ext'] == 1 && in_array($properties['pp_ext_policy'], array(0, 2)))\n\t\t\t{\n\t\t\t\t$ext_prop_quantities = array();\n\t\t\t\t$ext_prop_qty_ratio = array();\n\t\t\t\tif ($properties['pp_ext_policy'] == 2)\n\t\t\t\t{\n\t\t\t\t\t$prop = $product->productProp();\n\t\t\t\t\tif ($this->id_product_attribute)\n\t\t\t\t\t\t$id_product_attribute = $this->id_product_attribute;\n\t\t\t\t\telse if ($product->hasAttributes())\n\t\t\t\t\t\t$id_product_attribute = Product::getDefaultAttribute($product->id);\n\t\t\t\t\telse\n\t\t\t\t\t\t$id_product_attribute = 0;\n\t\t\t\t}\n\n\t\t\t\t$positions = count($properties['pp_ext_prop']);\n\t\t\t\tfor ($position = 1; $position <= $positions; $position++)\n\t\t\t\t{\n\t\t\t\t\t$pp_ext_prop = $properties['pp_ext_prop'][$position];\n\t\t\t\t\tif ($properties['pp_ext_policy'] == 2)\n\t\t\t\t\t{\n\t\t\t\t\t\t$q = PP::productProp($prop, $id_product_attribute, $position, 'quantity');\n\t\t\t\t\t\tif ($q === false)\n\t\t\t\t\t\t\t$q = (float)$pp_ext_prop['default_quantity'];\n\t\t\t\t\t\tif ($q <= 0)\n\t\t\t\t\t\t\t$q = 1;\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\t$q = PP::resolveInputQty(Tools::getValue('pp_ext_prop_quantity_'.$position, 'default'), $properties['pp_qty_policy'], $pp_ext_prop['qty_step'], ($pp_ext_prop['default_quantity'] > 0 ? $pp_ext_prop['default_quantity'] : 1));\n\n\t\t\t\t\t$ext_prop_quantities[$position] = $q;\n\t\t\t\t\t$ext_prop_qty_ratio[$position] = $properties['pp_ext_prop'][$position]['qty_ratio'];\n\t\t\t\t\tif ($q <= 0)\n\t\t\t\t\t\t$this->errors[] = Tools::displayError('Quantity not specified.', !Tools::getValue('ajax'));\n\t\t\t\t\t$min_qty = (float)$pp_ext_prop['minimum_quantity'];\n\t\t\t\t\tif ($min_qty > 0 && $q < $min_qty)\n\t\t\t\t\t\t$this->errors[] = Tools::displayError(sprintf('Please specify at least %s for %s', (string)PP::formatQty($min_qty), (string)$pp_ext_prop['property']), !Tools::getValue('ajax'));\n\t\t\t\t\t$max_qty = (float)$pp_ext_prop['maximum_quantity'];\n\t\t\t\t\tif ($max_qty > 0 && $q > $max_qty)\n\t\t\t\t\t\t$this->errors[] = Tools::displayError(sprintf('Please specify no more than %s for %s', (string)PP::formatQty($max_qty), (string)$pp_ext_prop['property']), !Tools::getValue('ajax'));\n\t\t\t\t}\n\t\t\t\tif (!$this->errors)\n\t\t\t\t{\n\t\t\t\t\t$ext_qty_factor = ($properties['pp_ext_method'] == 1 ? 1 : 0);\n\t\t\t\t\t$positions = count($ext_prop_quantities);\n\t\t\t\t\tfor ($position = 1; $position <= $positions; $position++)\n\t\t\t\t\t{\n\t\t\t\t\t\t$value = $ext_prop_quantities[$position];\n\t\t\t\t\t\t$qty_ratio = $ext_prop_qty_ratio[$position];\n\t\t\t\t\t\tif ($properties['pp_ext_method'] == 1)\n\t\t\t\t\t\t\t$ext_qty_factor *= ($qty_ratio > 0 ? $value / $qty_ratio : $value);\n\t\t\t\t\t\telseif ($properties['pp_ext_method'] == 2)\n\t\t\t\t\t\t\t$ext_qty_factor += ($qty_ratio > 0 ? $value / $qty_ratio : $value);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif (!$this->errors)\n\t\t{\n\t\t\t\t\t\tif ($this->id_product_attribute)\n\t\t\t{\n\t\t\t\t$default_quantity = $product->attributeDefaultQty($this->id_product_attribute);\n\t\t\t\t$this->qty = $qty_factor * $this->resolveInputQty($properties, $default_quantity);\n\t\t\t\tif ($this->qty == 0)\n\t\t\t\t\t$this->errors[] = Tools::displayError('Quantity not specified.', !Tools::getValue('ajax'));\n\t\t\t\telse if (!Product::isAvailableWhenOutOfStock($product->out_of_stock) && !Attribute::checkAttributeQty($this->id_product_attribute, $ext_qty_factor * $this->qty))\n\t\t\t\t\t$this->errors[] = Tools::displayError('There isn\\'t enough product in stock.', !Tools::getValue('ajax'));\n\t\t\t}\n\t\t\telse if ($product->hasAttributes())\n\t\t\t{\n\t\t\t\t$min_quantity = ($product->out_of_stock == 2) ? !Configuration::get('PS_ORDER_OUT_OF_STOCK') : !$product->out_of_stock;\n\t\t\t\t$this->id_product_attribute = Product::getDefaultAttribute($product->id, $min_quantity);\n\t\t\t\t\t\t\t\tif (!$this->id_product_attribute)\n\t\t\t\t\tTools::redirectAdmin($this->context->link->getProductLink($product));\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$default_quantity = $product->attributeDefaultQty($this->id_product_attribute);\n\t\t\t\t\t$this->qty = $qty_factor * $this->resolveInputQty($properties, $default_quantity);\n\t\t\t\t\tif ($this->qty == 0)\n\t\t\t\t\t\t$this->errors[] = Tools::displayError('Quantity not specified.', !Tools::getValue('ajax'));\n\t\t\t\t\telse if (!Product::isAvailableWhenOutOfStock($product->out_of_stock) && !Attribute::checkAttributeQty($this->id_product_attribute, $ext_qty_factor * $this->qty))\n\t\t\t\t\t\t$this->errors[] = Tools::displayError('There isn\\'t enough product in stock.', !Tools::getValue('ajax'));\n\t\t\t\t}\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$default_quantity = $product->defaultQty();\n\t\t\t\t$this->qty = $qty_factor * $this->resolveInputQty($properties, $default_quantity);\n\t\t\t\tif ($this->qty == 0)\n\t\t\t\t\t$this->errors[] = Tools::displayError('Quantity not specified.', !Tools::getValue('ajax'));\n\t\t\t\telse if (!$product->checkQty($ext_qty_factor * $this->qty))\n\t\t\t\t\t$this->errors[] = Tools::displayError('There isn\\'t enough product in stock.', !Tools::getValue('ajax'));\n\t\t\t}\n\t\t}\n\n\t\t\t\tif (!$this->errors && ($mode == 'add' || ($mode == 'update' && $qty_behavior)))\n\t\t{\n\t\t\t\t\t\tif ($mode == 'add' && !$this->context->cart->id)\n\t\t\t{\n\t\t\t\tif (Context::getContext()->cookie->id_guest)\n\t\t\t\t{\n\t\t\t\t\t$guest = new Guest(Context::getContext()->cookie->id_guest);\n\t\t\t\t\t$this->context->cart->mobile_theme = $guest->mobile_theme;\n\t\t\t\t}\n\t\t\t\t$this->context->cart->add();\n\t\t\t\tif ($this->context->cart->id)\n\t\t\t\t\t$this->context->cookie->id_cart = (int)$this->context->cart->id;\n\t\t\t}\n\n\t\t\t\t\t\tif (!$product->hasAllRequiredCustomizableFields() && !$this->customization_id)\n\t\t\t\t$this->errors[] = Tools::displayError('Please fill in all of the required fields, and then save your customizations.', !Tools::getValue('ajax'));\n\n\t\t\tif (!$this->errors)\n\t\t\t{\n\t\t\t\t$cart_rules = $this->context->cart->getCartRules();\n\t\t\t\t$update_quantity = $this->context->cart->updateQty(\n\t\t\t\t\t$id_cart_product ? ($mode == 'add' ? $qty_factor : $this->qty) : ($ext_prop_quantities !== null ? $ext_qty_factor : $this->qty),\n\t\t\t\t\t$this->id_product, $this->id_product_attribute, $this->customization_id,\n\t\t\t\t\t($mode == 'update' ? 'update' : Tools::getValue('op', 'up')),\n\t\t\t\t\t$this->id_address_delivery, null, true, $id_cart_product, $ext_prop_quantities, $this->qty);\n\t\t\t\tif ($update_quantity < 0)\n\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$minimal_quantity = ($this->id_product_attribute) ? $product->attributeMinQty($this->id_product_attribute) : $product->minQty();\n\t\t\t\t\t$this->errors[] = Tools::displayError(sprintf('You must add %s minimum quantity', $minimal_quantity), !Tools::getValue('ajax'));\n\t\t\t\t}\n\t\t\t\telseif (!$update_quantity)\n\t\t\t\t\t$this->errors[] = Tools::displayError('You already have the maximum quantity available for this product.', !Tools::getValue('ajax'));\n\t\t\t\telseif ((int)Tools::getValue('allow_refresh'))\n\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t$cart_rules2 = $this->context->cart->getCartRules();\n\t\t\t\t\tif (count($cart_rules2) != count($cart_rules))\n\t\t\t\t\t\t$this->ajax_refresh = true;\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$rule_list = array();\n\t\t\t\t\t\tforeach ($cart_rules2 as $rule)\n\t\t\t\t\t\t\t$rule_list[] = $rule['id_cart_rule'];\n\t\t\t\t\t\tforeach ($cart_rules as $rule)\n\t\t\t\t\t\t\tif (!in_array($rule['id_cart_rule'], $rule_list))\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$this->ajax_refresh = true;\n\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\t$removed = CartRule::autoRemoveFromCart();\n\t\tCartRule::autoAddToCart();\n\t\tif (count($removed) && (int)Tools::getValue('allow_refresh'))\n\t\t\t$this->ajax_refresh = true;\n\t}" ]
[ "0.67389226", "0.6658417", "0.62788486", "0.5729091", "0.56628215", "0.53863", "0.5378988", "0.531791", "0.52816045", "0.52079475", "0.52079475", "0.52079475", "0.52079475", "0.52079475", "0.52079475", "0.52079475", "0.52079475", "0.52079475", "0.52079475", "0.52079475", "0.52079475", "0.52079475", "0.5169618", "0.5152003", "0.5127049", "0.51109976", "0.509149", "0.5075339", "0.5074485", "0.5059098" ]
0.7713533
0
Remove the content editor from ALL pages
function remove_content_editor(){ remove_post_type_support('page', 'editor'); remove_post_type_support('post', 'editor'); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function remove_content_editor()\n{\n remove_post_type_support('page', 'editor');\n}", "function remove_pages_editor(){\n if(get_the_ID() === 10864) {\n remove_post_type_support( 'page', 'editor' );\n } // end if\n}", "function hide_editor() {\n $post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ;\n if( !isset( $post_id ) ) return;\n // Hide the editor on the page titled 'Homepage'\n\n // Hide the editor on a page with a specific page template\n // Get the name of the Page Template file.\n $template_file = get_post_meta($post_id, '_wp_page_template', true);\n if($template_file == 'template-content-2.php'){ // the filename of the page template\n remove_post_type_support('page', 'editor');\n }\n\tif($template_file == 'template-content-2.php'){ // the filename of the page template\n remove_post_type_support('page', 'editor');\n }\n\tif($template_file == 'template-home-1.php'){ // the filename of the page template\n remove_post_type_support('page', 'editor');\n }\n\tif($template_file == 'template-home-2.php'){ // the filename of the page template\n remove_post_type_support('page', 'editor');\n }\n\tif($template_file == 'template-landing.php'){ // the filename of the page template\n remove_post_type_support('page', 'editor');\n }\n\tif($template_file == 'template-catalog.php'){ // the filename of the page template\n remove_post_type_support('page', 'editor');\n }\n\tif($template_file == 'template-about.php'){ // the filename of the page template\n remove_post_type_support('page', 'editor');\n }\n\tif($template_file == 'template-contact.php'){ // the filename of the page template\n remove_post_type_support('page', 'editor');\n }\n}", "function remove_theme_plugin_editor() {\n remove_submenu_page( 'themes.php', 'theme-editor.php' );\n remove_submenu_page( 'plugins.php', 'plugin-editor.php' );\n}", "function pc_remove_plugin_editor() {\n remove_submenu_page( 'plugins.php', 'plugin-editor.php' );\n}", "public function remove_admin_pages() {\n // divi project\n remove_menu_page( 'edit.php?post_type=project' );\n\n // post tag\n remove_submenu_page('edit.php', 'edit-tags.php?taxonomy=post_tag');\n }", "function hide_editor() {\n\t\t$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ;\n\t\tif( !isset( $post_id ) ) return;\n\n\t\t// Hide the editor on a page with a specific page template\n\t\t// Get the name of the Page Template file.\n\t\t$template_file = substr( get_page_template(), strrpos( get_page_template(), '/' ) + 1 );\n\t\tif($template_file == 'page-pray-with-us.php'){ // the filename of the page template\n\t\t\tremove_post_type_support('page', 'editor');\n\t\t}\n\t}", "function fix_no_editor_on_posts_page($post) {\n\n if( $post->ID != get_option( 'page_for_posts' ) ) { return; }\n\n remove_action( 'edit_form_after_title', '_wp_posts_page_notice' );\n add_post_type_support( 'page', 'editor' );\n\n}", "function hide_editor() {\r\n $post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ;\r\n if( !isset( $post_id ) ) return;\r\n\r\n // Hide the editor on the page titled 'Homepage'\r\n $homepgname = get_the_title($post_id);\r\n if($homepgname == 'home'){ \r\n remove_post_type_support('page', 'editor');\r\n }\r\n \r\n }", "function hide_editor() {\n\t$post_id = $_GET['post'] ? $_GET['post'] : $_POST['post_ID'] ;\n\tif( !isset( $post_id ) ) return;\n\n\t// Hide the editor on a page with a specific page template\n\t// Get the name of the Page Template file.\n\t$template_file = get_post_meta($post_id, '_wp_page_template', true);\n\t//var_dump($template_file);\n\tif( $template_file == 'front-page.php' ){ // the filename of the page template\n\t\tremove_post_type_support('page','editor');\n\t}\n}", "function ecovila_remove_menu_pages()\n{\n remove_menu_page('edit.php'); //Posts\n remove_menu_page('edit-comments.php'); //Comments \n}", "public function deleteContent()\n {\n //Entire section\n if ($this->docname === 'no-name') {\n foreach (glob(DOC_URI . $this->section . '/*') as $file) {\n unlink($file);\n }\n rmdir(DOC_URI . $this->section);\n unset($this->list['pages'][$this->section]);\n } else {\n if (file_exists(DOC_URI . $this->section . '/' . $this->docname . '.md')) {\n unlink(DOC_URI . $this->section . '/' . $this->docname . '.md');\n unset($this->list['pages'][$this->section][array_search($this->docname, $this->list['pages'][$this->section])]);\n }\n }\n $yaml = Yaml::dump($this->list, 2);\n file_put_contents(CONFIG_URI, $yaml);\n }", "function ilusix_remove_backend_menu_items() {\n remove_menu_page( 'edit.php' );\n remove_menu_page( 'edit-comments.php' );\n}", "function delete_contenu()\n{\n if (isset($_SESSION['ADMIN']))\n {\n $mpages = new MPages($_GET['ID_CONTENU']);\n $mpages->SetValue($_POST);\n $mpages->Delete();\n\n $value ['ID_ITEM'] = isset($_REQUEST['ID_ITEM']) ? $_REQUEST['ID_ITEM'] : $id_item ;\n $mpages = new MPages();\n $mpages ->SetValue($value);\n $data = $mpages->SelectAll();\n\n global $content;\n\n $content['title'] = 'Page Clinique';\n $content['class'] = 'VPages';\n $content['method'] = 'showPage';\n $content['arg'] = $data;\n }\n else\n {\n forbidden();\n }\n\n return;\n\n}", "function remove_menus(){\r\n // remove_menu_page( 'edit.php' );\r\n remove_menu_page( 'edit-comments.php' );\r\n}", "function osc_reset_static_pages() {\n return View::newInstance()->_erase('pages');\n }", "function remove_menus(){\n\t\t remove_menu_page( 'edit.php' );\n\t\t}", "function post_remove(){\n // remove_menu_page( 'jetpack' ); //Jetpack* \n remove_menu_page( 'edit.php' ); //Posts\n // remove_menu_page( 'upload.php' ); //Media\n // remove_menu_page( 'edit.php?post_type=page' ); //Pages\n remove_menu_page( 'edit-comments.php' ); //Comments\n // remove_menu_page( 'themes.php' ); //Appearance\n // remove_menu_page( 'plugins.php' ); //Plugins\n // remove_menu_page( 'users.php' ); //Users\n // remove_menu_page( 'tools.php' ); //Tools\n // remove_menu_page( 'options-general.php' ); //Settings\n }", "function remove_menu_items() {\n remove_menu_page('edit.php'); // Posts\n}", "function remove_editor_menu()\n\t{\n\t\t//remove_action('admin_menu', '_add_themes_utility_last', 101);\n\t}", "function remove_menus() {\n // Ajouter la notion de rôle pour chaques modifications\n global $pages;\n\n foreach( $pages as $page )\n remove_menu_page($page.'.php');\n}", "public function remove_menu_items() {\n remove_menu_page(\"edit-comments.php\");\n remove_menu_page(\"edit.php\");\n }", "function remove_links_tab_menu_pages() {\n remove_menu_page('link-manager.php'); // ajouter la fonction qui supprimera les onglets :\n remove_menu_page('edit.php'); // Pour supprimer l’onglet articles: \n remove_menu_page('upload.php'); // Pour supprimer l’onglet Médias :\n remove_menu_page('edit-comments.php'); // Pour supprimer l’onglet Commentaires \n remove_menu_page('themes.php'); // Pour supprimer l’onglet Apparence :\n remove_menu_page('plugins.php'); // Pour supprimer l’onglet Extensions :\n remove_menu_page('users.php'); // Pour supprimer l’onglet Utilisateurs :\n remove_menu_page('tools.php'); // Pour supprimer l’onglet Outils :\n remove_menu_page('options-general.php'); // Pour supprimer l’onglet Réglages :\n remove_menu_page( 'edit.php?post_type=page' ); // Pour supprimer l’onglet page:\n}", "function prop_remove_pages()\n{\n\n // remove_menu_page( 'index.php' ); // Dashboard\n // remove_menu_page( 'edit.php' ); // Posts\n // remove_menu_page( 'upload.php' ); // Media\n // remove_menu_page( 'edit.php?post_type=page' ); // Pages\n // remove_menu_page( 'themes.php' ); // Appearance\n // remove_menu_page( 'plugins.php' ); // Plugins\n // remove_menu_page( 'users.php' ); // Users\n // remove_menu_page( 'tools.php' ); // Tools\n // remove_menu_page( 'options-general.php' ); // Settings\n\n // Remove Competitions CPT from admin for non-admins\n // remove_menu_page('edit.php?post_type=acf-field-group'); // ACF\n \n}", "public function deleteContents() { // Delete all children chapters of this article\n $contents = $this->getContents();\n foreach ($contents as $content) {\n $content->delete(false);\n }\n }", "public function onBeforeUnpublish() {\n\t\t\\Injector::inst()->get( 'OpenSemanticSearchService' )->removePage( $this->Link() );\n\t}", "function muiteer_remove_new_page_item() {\n global $wp_admin_bar; \n $wp_admin_bar->remove_node('new-page');\n }", "function muiteer_remove_new_page_item() {\n global $wp_admin_bar; \n $wp_admin_bar->remove_node('new-page');\n }", "public function sr_remove_posts_menu()\n\t\t{\n\t\t\tremove_menu_page('edit.php');\n\t\t}", "function post_remove() { \n\n remove_menu_page('edit.php');\n\n}" ]
[ "0.7685832", "0.7541514", "0.6820426", "0.6800152", "0.6595993", "0.6564285", "0.6439728", "0.6434952", "0.6424867", "0.63766456", "0.63699734", "0.63467187", "0.6079252", "0.6041496", "0.6002169", "0.598168", "0.5980141", "0.5974136", "0.59635895", "0.59616286", "0.5933532", "0.59229654", "0.59211093", "0.59018826", "0.5865325", "0.58615863", "0.5840161", "0.5830313", "0.58240986", "0.58211434" ]
0.7607378
1
Function to display the add more msrp link
function addMoreMsrpLink($result) { if((count($result))>0) { $output='<a href="?do=msrpmgt&id='.$result.'" onc>Add More Msrp</a>&nbsp;&nbsp;<a href="?do=home">Add More Features</a>'; } return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function addMoreFeaturesLink($result)\n\t{\n\t if((count($result))>0)\n\t\t{\n\t\t $output='<a href=\"?do=msrpmgt&id='.$result.'\">Add More Msrp</a>';\n\t\t}\n\t\t\n\t\treturn $output;\t \n\t}", "function kloe_qodef_modify_read_more_link() {\n\t\t$link = '<div class=\"qodef-more-link-container\">';\n\t\t$link .= kloe_qodef_get_button_html(array(\n\t\t\t'link' => get_permalink().'#more-'.get_the_ID(),\n\t\t\t'text' => esc_html__('Continue reading', 'kloe')\n\t\t));\n\n\t\t$link .= '</div>';\n\n\t\treturn $link;\n\t}", "public function more();", "function dgd7_more_link($variables) {\n return '<div class=\"more\">' . l(t('Show me More'), $variables['url'], array('attributes'\n => array('title' => $variables['title']))) . '</div>';\n}", "function bp_load_more_shortcode() {\n\t\tglobal $wp_query;\n\t\tif ( $wp_query->max_num_pages > 1 ) {\n\t\t\t$bp_output = wp_nonce_field( 'bp_load_more_check', 'bp_load_more' );\n\t\t\t$bp_output .= '<div class=\"bp_load_more\">More posts</div>';\n\t\t\treturn $bp_output;\n\t\t}\n\t}", "function grv_modify_read_more_link() {\n return '<div class=\"post-actions\"><a class=\"btn\" href=\"' . esc_url(get_permalink()) . '\">'.__('Read More', 'uniqueGravity').'</a></div>';\n}", "function udesign_more_link( $more_link, $more_link_text ) {\n global $post;\n $html = ' <a title=\"'.$more_link_text.'\" href=\"'.get_permalink().'#more-'.$post->ID.'\" class=\"read-more-align-left\"><span>'.$more_link_text.'</span> &rarr;</a>';\n $html .= '<div class=\"clear\"></div>';\n return $html;\n}", "function read_more_link()\n{\n\tglobal $post;\n \t$read_more = technews_hybrid_get_setting('content_excerpt_readmore');\n\tif (function_exists('icl_register_string')) {\n\t\ticl_register_string('templatic', 'content_excerpt_readmore',$read_more );\n\t\t$read_more = icl_t('templatic', 'content_excerpt_readmore',$read_more);\n\t}\n\t\n\n \tif(technews_hybrid_get_setting('content_excerpt_readmore')) { \n \t\treturn \" <a href='\".get_permalink($post->ID).\"' class='read_more'>\". sprintf(__('%s','templatic'), $read_more).\"</a>\";\n \t}\n}", "function modify_read_more_link() {\n\t\treturn '<a class=\"more-link link-button link-button--border link-button--centered\" href=\"' . get_permalink() . '\">Continue Reading</a>';\n}", "function adventure_tours_excerpt_more_link() {\n\t\tif ( adventure_tours_di( 'register' )->getVar( 'disable_excerpt_more_link' ) ) {\n\t\t\treturn '';\n\t\t}\n\t\tstatic $moreText;\n\t\tif ( null === $moreText ) {\n\t\t\t$moreText = esc_html( adventure_tours_get_option( 'excerpt_text' ) );\n\t\t}\n\n\t\treturn sprintf(\n\t\t\t'<div class=\"padding-top text-center\"><a href=\"%s\" class=\"atbtn atbtn--medium atbtn--rounded atbtn--transparent\">%s<i class=\"atbtn__icon atbtn__icon--right fa fa-long-arrow-right\"></i></a></div>',\n\t\t\tesc_url( get_permalink() ),\n\t\t\tesc_html( $moreText )\n\t\t);\n\t}", "function all_business_post_more($cmsmasters_id, $show = true) {\r\n\t$cmsmasters_post_read_more = get_post_meta($cmsmasters_id, 'cmsmasters_post_read_more', true);\r\n\t\r\n\t\r\n\tif ($cmsmasters_post_read_more == '') {\r\n\t\t$cmsmasters_post_read_more = esc_html__('Continue reading', 'all-business');\r\n\t}\r\n\t\r\n\t\r\n\t$out = '<a class=\"cmsmasters_post_read_more\" href=\"' . esc_url(get_permalink($cmsmasters_id)) . '\">' . esc_html($cmsmasters_post_read_more) . '</a>';\r\n\t\r\n\t\r\n\tif ($show) {\r\n\t\techo $out;\r\n\t} else {\r\n\t\treturn $out;\r\n\t}\r\n}", "function cmsms_post_more($cmsms_id, $layout_type = 'default', $show = true) {\r\n\t$cmsms_post_read_more = get_post_meta($cmsms_id, 'cmsms_post_read_more', true);\r\n\t\r\n\t\r\n\tif ($cmsms_post_read_more == '') {\r\n\t\t$cmsms_post_read_more = esc_attr__('Read More', 'yoga-fit');\r\n\t}\r\n\t\r\n\t\r\n\t$out = '<a class=\"cmsms_post_read_more' . ($layout_type == 'default' ? ' button' : '') . '\" href=\"' . esc_url(get_permalink($cmsms_id)) . '\">' . esc_html($cmsms_post_read_more) . '</a>';\r\n\t\r\n\t\r\n\tif ($show) {\r\n\t\techo $out;\r\n\t} else {\r\n\t\treturn $out;\r\n\t}\r\n}", "public function addMoreButton() {\n\n return array(\n '#type' => 'button',\n '#value' => $this->t('Add a Link Field'),\n '#is_button' => TRUE,\n '#description' => '',\n '#prefix' => '<div id=\"secnav-addlinkarea\">',\n '#suffix' => '</div>',\n '#executes_submit_callback' => FALSE,\n '#attributes' => array(\n 'class' => array(''),\n 'type' => 'button',\n 'name' => 'secnav-addmore-links'\n ),\n );\n }", "function pxls_excerpt_more( $more = NULL ) {\n global $post;\n $more = 'More...';\n\treturn ' <a class=\"more-link\" href=\"'. get_permalink( $post->ID ) . '\">'.$more.'</a>';\n}", "function modify_read_more_link() {\n return '<ul class=\"pagination pagination-lg\"><li class=\"page-item\"><a class=\"page-link read-more\" href=\"'. get_permalink() . '\">' . __('Read More', 'your-text-domain') . '</a></li></ul>';\n}", "function grv_excerpt_more($more) {\n global $post;\n return '<div class=\"post-actions\"><a class=\"btn\" href=\"' . esc_url(get_permalink($post->ID)) . '\">'.__('Read More', 'uniqueGravity').'</a></div>';\n}", "function new_excerpt_more($more) {\n \t global $post;\n\t return '...<br/><a href=\"'. get_permalink($post->ID) . '\">Read the full post</a>';\n }", "function excerpt_more_link($more) {\n\tglobal $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read more &raquo; </a>';\n}", "function new_excerpt_more($more) {\n global $post;\n return '...';\n // return '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> ...read more.</a>';\n }", "function cosmos_excerpt_more() {\n\n\t//return '<a href=\"' . esc_url(get_permalink()) . '\" title=\"\" class=\"btn\">' . esc_html__('Continue Reading', 'cosmos') . '</a>';\n\treturn '&hellip;';\n}", "function kadima_content_more($more) {\n\t return '<div class=\"blog-post-details-item\"><a class=\"kadima_blog_read_btn\" href=\"'.get_permalink().'\"><i class=\"fa fa-plus-circle\"></i>\"'.__('Read More', 'kadima' ).'\"</a></div>';\n\t}", "function renderShowMore($show, $itemcritera, $itemtype) {\n // option to show more\n $show = urlencode($show);\n $itemcritera = urlencode($itemcritera);\n $itemtype = urlencode($itemtype);\n echo \"<p><a href=\\\"?task=onelist&show=$show&critera=$itemcritera&criteratype=$itemtype\\\">more...</a></p>\\n\";\n \n}", "function vu_core_paragraphs_item_set_more_link($entity, $link_field, $component) {\n\n // Get more link destination from paragraph.\n $item = vu_core_extract_single_field_value($entity, 'paragraphs_item', $link_field, 'revision_id');\n if ($item) {\n $paragraph = paragraphs_item_revision_load($item);\n\n switch ($paragraph->bundle()) {\n case 'link_external':\n $_SESSION[$component]['more']['url'] = vu_core_extract_single_field_value($paragraph, 'paragraphs_item', 'field_link_link', 'url');\n break;\n\n case 'link_internal':\n $_SESSION[$component]['more']['url'] = 'node/' . vu_core_extract_single_field_value($paragraph, 'paragraphs_item', 'field_node_entity_ref', 'target_id');\n break;\n }\n\n // Handle button text.\n $button_text = $paragraph->field_link_text;\n $button_text = $button_text[LANGUAGE_NONE][0]['value'];\n if ($button_text) {\n $_SESSION[$component]['btn_more_text'] = $button_text;\n }\n\n }\n\n}", "function bavotasan_content_more_link( $link, $text ) {\n\treturn '<p class=\"more-link-p\"><a class=\"btn btn-default\" href=\"' . get_permalink( get_the_ID() ) . '\">' . $text . '</a></p>';\n}", "function vantage_read_more_link() {\n\treturn '<a class=\"more-link\" href=\"' . get_permalink() . '\">' . esc_html( siteorigin_setting('blog_read_more') ) .'<span class=\"meta-nav\">&rarr;</span></a></span';\n}", "function new_excerpt_more( $more ) {\n\treturn ' <a class=\"read-more\" href=\"'. get_permalink( get_the_ID() ) . '\">[Lees meer ...]</a>';\n}", "function new_excerpt_more($more) {\n global $post;\n return '<br><a class=\"btn btn-default btn-xs\" role=\"button\" href=\"'. get_permalink($post->ID) . '\">Read more &raquo;</a>';\n}", "function new_excerpt_more($more) {\n\treturn ' &hellip; <a class=\"read-more\" href=\"'. get_permalink(get_the_ID()) . '\">Read More</a>';\n}", "function redhs_read_more_link( $more ) {\n\t$new_a11y_read_more_title = sprintf( '<span class=\"screen-reader-text\">%s %s</span>', __( 'about', 'hallowstone' ), get_the_title() );\n\treturn sprintf( ' ... <a href=\"%s\" class=\"btn btn-more\">%s %s</a>', get_permalink(), __( 'Read more', 'hallowstone' ), $new_a11y_read_more_title );\n}", "function new_excerpt_more($more) {\n\tglobal $post;\n\treturn '… <p><a href=\"'. get_permalink($post->ID) . '\">' . 'Read More &raquo;' . '</a></p>';\n}" ]
[ "0.74420494", "0.7138425", "0.6813258", "0.67570686", "0.67283326", "0.672691", "0.6649037", "0.6647967", "0.66443187", "0.6631992", "0.6615032", "0.6602334", "0.6590027", "0.6580178", "0.6579231", "0.6548298", "0.65482634", "0.65394795", "0.6536314", "0.6520547", "0.6503603", "0.6502079", "0.6473832", "0.6465502", "0.64402974", "0.64230686", "0.6406248", "0.64009225", "0.638321", "0.63711536" ]
0.7741628
0
Function to display the add more features link
function addMoreFeaturesLink($result) { if((count($result))>0) { $output='<a href="?do=msrpmgt&id='.$result.'">Add More Msrp</a>'; } return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function show(AddFeature $addFeature)\n {\n //\n }", "function featurelink_add() {\n\tadd_meta_box( 'featurelink_control', 'Link this feature', 'featurelink_cb', 'feature', 'side', 'default' );\n}", "function addMoreMsrpLink($result)\n\t{\n\t if((count($result))>0)\n\t\t{\n\t\t $output='<a href=\"?do=msrpmgt&id='.$result.'\" onc>Add More Msrp</a>&nbsp;&nbsp;<a href=\"?do=home\">Add More Features</a>';\n\t\t}\n\t\t\n\t\treturn $output;\t \n\t}", "function dgd7_more_link($variables) {\n return '<div class=\"more\">' . l(t('Show me More'), $variables['url'], array('attributes'\n => array('title' => $variables['title']))) . '</div>';\n}", "function adventure_tours_excerpt_more_link() {\n\t\tif ( adventure_tours_di( 'register' )->getVar( 'disable_excerpt_more_link' ) ) {\n\t\t\treturn '';\n\t\t}\n\t\tstatic $moreText;\n\t\tif ( null === $moreText ) {\n\t\t\t$moreText = esc_html( adventure_tours_get_option( 'excerpt_text' ) );\n\t\t}\n\n\t\treturn sprintf(\n\t\t\t'<div class=\"padding-top text-center\"><a href=\"%s\" class=\"atbtn atbtn--medium atbtn--rounded atbtn--transparent\">%s<i class=\"atbtn__icon atbtn__icon--right fa fa-long-arrow-right\"></i></a></div>',\n\t\t\tesc_url( get_permalink() ),\n\t\t\tesc_html( $moreText )\n\t\t);\n\t}", "public function show(Features $Features)\n {\n //\n }", "function cp_add_view_more_btn($image_excerpt, $thumbnail_id, $post_id) {\n if ( is_front_page() && !is_gallery_search() ) {\n $galleryUrl = home_url( 'gallery' );\n $image_excerpt .= '<a href=' . $galleryUrl . ' class=view-more-btn>Go To Gallery</a>';\n }\n return $image_excerpt;\n}", "function grv_excerpt_more($more) {\n global $post;\n return '<div class=\"post-actions\"><a class=\"btn\" href=\"' . esc_url(get_permalink($post->ID)) . '\">'.__('Read More', 'uniqueGravity').'</a></div>';\n}", "public function addMoreButton() {\n\n return array(\n '#type' => 'button',\n '#value' => $this->t('Add a Link Field'),\n '#is_button' => TRUE,\n '#description' => '',\n '#prefix' => '<div id=\"secnav-addlinkarea\">',\n '#suffix' => '</div>',\n '#executes_submit_callback' => FALSE,\n '#attributes' => array(\n 'class' => array(''),\n 'type' => 'button',\n 'name' => 'secnav-addmore-links'\n ),\n );\n }", "function new_excerpt_more($more) {\n\treturn ' &hellip; <a class=\"read-more\" href=\"'. get_permalink(get_the_ID()) . '\">Read More</a>';\n}", "function pxls_excerpt_more( $more = NULL ) {\n global $post;\n $more = 'More...';\n\treturn ' <a class=\"more-link\" href=\"'. get_permalink( $post->ID ) . '\">'.$more.'</a>';\n}", "function bavotasan_content_more_link( $link, $text ) {\n\treturn '<p class=\"more-link-p\"><a class=\"btn btn-default\" href=\"' . get_permalink( get_the_ID() ) . '\">' . $text . '</a></p>';\n}", "public function more();", "function new_excerpt_more($more) {\n global $post;\n return '...';\n // return '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> ...read more.</a>';\n }", "function cosmos_excerpt_more() {\n\n\t//return '<a href=\"' . esc_url(get_permalink()) . '\" title=\"\" class=\"btn\">' . esc_html__('Continue Reading', 'cosmos') . '</a>';\n\treturn '&hellip;';\n}", "function udesign_more_link( $more_link, $more_link_text ) {\n global $post;\n $html = ' <a title=\"'.$more_link_text.'\" href=\"'.get_permalink().'#more-'.$post->ID.'\" class=\"read-more-align-left\"><span>'.$more_link_text.'</span> &rarr;</a>';\n $html .= '<div class=\"clear\"></div>';\n return $html;\n}", "function new_excerpt_more($more) {\r\n\tglobal $post;\r\n\treturn ' ... <a href=\"'. get_permalink($post->ID) . '\">' . __( 'Read More &raquo;', 'planuswp' ) . '</a>';\r\n}", "function kloe_qodef_modify_read_more_link() {\n\t\t$link = '<div class=\"qodef-more-link-container\">';\n\t\t$link .= kloe_qodef_get_button_html(array(\n\t\t\t'link' => get_permalink().'#more-'.get_the_ID(),\n\t\t\t'text' => esc_html__('Continue reading', 'kloe')\n\t\t));\n\n\t\t$link .= '</div>';\n\n\t\treturn $link;\n\t}", "function new_excerpt_more($more) {\n\tglobal $post;\n\treturn '… <p><a href=\"'. get_permalink($post->ID) . '\">' . 'Read More &raquo;' . '</a></p>';\n}", "function new_excerpt_more($more) {\n \t global $post;\n\t return '...<br/><a href=\"'. get_permalink($post->ID) . '\">Read the full post</a>';\n }", "function read_more_link()\n{\n\tglobal $post;\n \t$read_more = technews_hybrid_get_setting('content_excerpt_readmore');\n\tif (function_exists('icl_register_string')) {\n\t\ticl_register_string('templatic', 'content_excerpt_readmore',$read_more );\n\t\t$read_more = icl_t('templatic', 'content_excerpt_readmore',$read_more);\n\t}\n\t\n\n \tif(technews_hybrid_get_setting('content_excerpt_readmore')) { \n \t\treturn \" <a href='\".get_permalink($post->ID).\"' class='read_more'>\". sprintf(__('%s','templatic'), $read_more).\"</a>\";\n \t}\n}", "function new_excerpt_more( $more ) {\n\treturn ' <a class=\"read-more\" href=\"'. get_permalink( get_the_ID() ) . '\">[Lees meer ...]</a>';\n}", "public function features()\n {\n\n /**\n * Post\n */\n $post = $this->request->getPost();\n\n /**\n * Data\n */\n $features = $this->VLM->getCompanyFeatures(['main_company_id' => $this->session->current_main_company]);\n\n /**\n * Form New\n */\n $form_new_feature = $this->VLM->formFeatures($post);\n\n if (isset($post['add_feature']) || isset($post['edit_feature'])):\n if ($this->validate($form_new_feature)):\n //Si ok on valide\n $id_feature = !empty($post['id_client_feature']) ? [\n 'id_client_feature' => $post['id_client_feature']] : false;\n if ($send = $this->utils->insertOrUpdate($post, 'visuals_company_features', $id_feature)):\n return redirect()->back();\n endif;\n endif;\n endif;\n\n /**\n * View\n */\n $this->data += [\n 'page_title' => '<i class=\"nav-icon far fa-images\"></i> Visuals Library',\n 'post' => $post,\n 'new_feature' => $form_new_feature,\n 'features' => $features,\n 'validation' => $this->validation\n ];\n return $this->layout->view(\n 'visualsLib/features',\n $this->data\n );\n }", "function grv_modify_read_more_link() {\n return '<div class=\"post-actions\"><a class=\"btn\" href=\"' . esc_url(get_permalink()) . '\">'.__('Read More', 'uniqueGravity').'</a></div>';\n}", "function excerpt_more_link($more) {\n\tglobal $post;\n\treturn '<a class=\"moretag\" href=\"'. get_permalink($post->ID) . '\"> Read more &raquo; </a>';\n}", "public function featured(){\n $this->output->setPageTitle(\"Featured\");\n \n $form = \"Featured Content\";\n \n\n $this->output->addToPosition(\"body\" , $form); \n }", "function new_excerpt_more($more) {\n global $post;\n return '<br><a class=\"btn btn-default btn-xs\" role=\"button\" href=\"'. get_permalink($post->ID) . '\">Read more &raquo;</a>';\n}", "function new_excerpt_more($more) {\n global $post;\n return '<div class=\"more\">' . '<a href=\"'. get_permalink($post->ID) . '\">' . 'Read more &rsaquo;' . '</a>' . '</div>';\n}", "function vantage_read_more_link() {\n\treturn '<a class=\"more-link\" href=\"' . get_permalink() . '\">' . esc_html( siteorigin_setting('blog_read_more') ) .'<span class=\"meta-nav\">&rarr;</span></a></span';\n}", "function understrap_all_excerpts_get_more_link( $post_excerpt ) {\n\t\treturn $post_excerpt . '...';\n\t}" ]
[ "0.71858615", "0.71716225", "0.6843943", "0.6805091", "0.6701892", "0.6688956", "0.6624537", "0.66030014", "0.6578694", "0.6494263", "0.6479705", "0.64737093", "0.64723337", "0.6456373", "0.6454097", "0.6453984", "0.6432605", "0.6408383", "0.6408345", "0.64022934", "0.63757217", "0.6347825", "0.63069427", "0.62932336", "0.6276624", "0.62714046", "0.62668425", "0.6258701", "0.62518233", "0.62473077" ]
0.76504177
0
CSS sanitization callback example. Sanitization: css Control: text, textarea Sanitization callback for 'css' type textarea inputs. This callback sanitizes `$css` for valid CSS. NOTE: wp_strip_all_tags() can be passed directly as `$wp_customize>add_setting()` 'sanitize_callback'. It is wrapped in a callback here merely for example purposes.
function mdlwp_sanitize_css( $css ) { return wp_strip_all_tags( $css ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function sunset_sanitize_custom_css( $input ) {\r\n\t$output = esc_textarea( $input );\r\n\treturn $output;\r\n}", "function lunar_sanitize_custom_css( $input ){\n $output = esc_textarea( $input );\n return $output;\n}", "function minify_css($css)\n { \n if(class_exists(\\MatthiasMullie\\Minify\\CSS::class)) {\n return (new \\MatthiasMullie\\Minify\\CSS($css))->minify();\n } \n \n return trim( $css ); \n }", "function templatic_customize_supreme_customcss( $setting, $object ) {\r\n\t\tif ( \"customcss\" == $object->id && !current_user_can( 'unfiltered_html' ) )\r\n\t\t\t$setting = stripslashes( wp_filter_post_kses( addslashes( $setting ) ) );\r\n\t\t/* Return the sanitized setting and apply filters. */\r\n\t\treturn apply_filters( \"templatic_customize_supreme_customcss\", $setting, $object );\r\n\t}", "function editor_styles( $css ) {\n\t$css = array_map( 'trim', explode( ',', $css ) );\n\t$css = implode( ',', $css );\n\treturn $css;\n}", "function jacqueline_prepare_custom_styles() {\n\t\t$css = apply_filters('jacqueline_filter_add_styles_inline', jacqueline_get_custom_styles());\n\t\t// Minify css string\n\t\t//$css = str_replace(array(\"\\n\", \"\\r\", \"\\t\"), '', $css);\n\t\t$css = jacqueline_minify_css($css);\n\t\treturn $css;\n\t}", "function themerex_prepare_custom_styles() {\n\t\t$css = apply_filters('themerex_filter_add_styles_inline', themerex_get_custom_styles());\n\t\t// Minify css string\n\t\t//$css = str_replace(array(\"\\n\", \"\\r\", \"\\t\"), '', $css);\n\t\t$css = themerex_minify_css($css);\n\t\treturn $css;\n\t}", "function ot_normalize_css( $css ) {\n $css = str_replace( \"\\r\\n\", \"\\n\", $css );\n $css = str_replace( \"\\r\", \"\\n\", $css );\n \n /* Don't allow out-of-control blank lines */\n $css = preg_replace( \"/\\n{2,}/\", \"\\n\\n\", $css );\n \n return $css;\n }", "public function clean() {\n $sanitized = '';\n /**\n * Add additional santization before the default sanitization\n */\n do_action( 'slushman_pre_sanitize', $sanitized );\n switch ( $this->type ) {\n case 'color'\t\t\t:\n case 'radio'\t\t\t:\n case 'select'\t\t\t: $sanitized = $this->sanitize_random( $this->data ); break;\n case 'date'\t\t\t\t:\n case 'datetime'\t\t\t:\n case 'datetime-local'\t:\n case 'time'\t\t\t\t:\n case 'week'\t\t\t\t: $sanitized = strtotime( $this->data ); break;\n case 'number'\t\t\t:\n case 'range'\t\t\t: $sanitized = intval( $this->data ); break;\n case 'hidden'\t\t\t:\n case 'month'\t\t\t:\n case 'text'\t\t\t\t: $sanitized = sanitize_text_field( $this->data ); break;\n case 'checkbox'\t\t\t: $sanitized = ( isset( $this->data ) ? 1 : 0 ); break;\n case 'editor' \t\t\t: $sanitized = wp_kses_post( $this->data ); break;\n case 'email'\t\t\t: $sanitized = sanitize_email( $this->data ); break;\n case 'file'\t\t\t\t: $sanitized = sanitize_file_name( $this->data ); break;\n case 'tel'\t\t\t\t: $sanitized = $this->sanitize_phone( $this->data ); break;\n case 'textarea'\t\t\t: $sanitized = esc_textarea( $this->data ); break;\n case 'url'\t\t\t\t: $sanitized = esc_url( $this->data ); break;\n } // switch\n /**\n * Add additional santization after the default .\n */\n do_action( 'slushman_post_sanitize', $sanitized );\n return $sanitized;\n }", "protected function normalizeCssOutput($css)\n {\n // short colors are expanded for comparison purpose\n $css = preg_replace(\",#([0-9a-f])([0-9a-f])([0-9a-f])\\b,i\", \"#\\\\1\\\\1\\\\2\\\\2\\\\3\\\\3\", $css);\n return rtrim($css);\n }", "function decaf_process_css($css, $theme) {\n\n if (!empty($theme->settings->backgroundcolor)) {\n $backgroundcolor = $theme->settings->backgroundcolor;\n } else {\n $backgroundcolor = null;\n }\n $css = decaf_set_backgroundcolor($css, $backgroundcolor);\n\n if (!empty($theme->settings->customcss)) {\n $customcss = $theme->settings->customcss;\n } else {\n $customcss = null;\n }\n $css = decaf_set_customcss($css, $customcss);\n\n return $css;\n}", "private function get_sanitize_callback( $args ) {\n\t\t\t$type = $args['field_type'];\n\t\t\tif ( ! empty( $args['sanitize'] ) ) {\n\t\t\t\treturn $args['sanitize'];\n\t\t\t} else {\n\t\t\t\tif ( 'text' === $type ) {\n\t\t\t\t\treturn 'sanitize_text_field';\n\t\t\t\t} elseif ( 'textarea' === $type ) {\n\t\t\t\t\treturn 'sanitize_textarea_field';\n\t\t\t\t} elseif ( 'checkbox' === $type ) {\n\t\t\t\t\treturn array( $this, 'sanitize_checkbox' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t}", "function atm_cd_sanitize($input) {\n if (is_array($input)) {\n foreach($input as $var=>$val) {\n $output[$var] = $this->atm_cd_sanitize($val);\n }\n }\n else {\n $search = array(\n '@<script[^>]*?>.*?</script>@si', // Strip out javascript\n '@<style[^>]*?>.*?</style>@siU', // Strip style tags properly\n '@<![\\s\\S]*?--[ \\t\\n\\r]*>@' // Strip multi-line comments\n );\n \n $output = preg_replace($search, '', $input);\n $output = strip_tags($output, '<br>');\n $output = trim($output);\n }\n return $output;\n }", "function anomaly_process_css($css, $theme) {\n\n // Set custom CSS.\n if (!empty($theme->settings->customcss)) {\n $customcss = $theme->settings->customcss;\n } else {\n $customcss = null;\n }\n $css = anomaly_set_customcss($css, $customcss);\n\n return $css;\n}", "public function sanitize( $input ) {\n\t\t$new_input = array();\n\t\tif( isset( $input['adpr_bg_color'] ) ) {\n\t\t\tif(!$this->adpr_check_color($input['adpr_bg_color'])) {\n\t\t\t\tadd_settings_error( 'adpr_admin_options', esc_attr( 'adpr_bg_color_error'), __('Insert a valid color for Background', ADPR_TEXT_DOMAIN), 'error' );\n\t\t\t\t$new_input['adpr_bg_color'] = $this->options['adpr_bg_color'];\n\t\t\t} else {\n\t\t\t\t$new_input['adpr_bg_color'] = sanitize_text_field( $input['adpr_bg_color'] );\n\t\t\t}\n\t\t}\n\t\tif( isset( $input['adpr_font_color'] ) ) {\n\t\t\tif(!$this->adpr_check_color($input['adpr_font_color'])) {\n\t\t\t\tadd_settings_error( 'adpr_admin_options', esc_attr( 'adpr_font_color_error'), __('Insert a valid color for Font', ADPR_TEXT_DOMAIN), 'error' );\n\t\t\t\t$new_input['adpr_font_color'] = $this->options['adpr_font_color'];\n\t\t\t} else {\n\t\t\t\t$new_input['adpr_font_color'] = sanitize_text_field( $input['adpr_font_color'] );\n\t\t\t}\n\t\t}\n\t\tif( isset( $input['adpr_css_field'] ) )\n\t\t\t$new_input['adpr_css_field'] = sanitize_text_field( $input['adpr_css_field'] );\n\t\treturn $new_input;\n\t}", "function asdb_clean_style_tag( $input ) {\n preg_match_all(\"!<link rel='stylesheet'\\s?(id='[^']+')?\\s+href='(.*)' type='text/css' media='(.*)' />!\", $input, $matches);\n // Only display media if it is meaningful\n $media = $matches[3][0] !== '' && $matches[3][0] !== 'all' ? ' media=\"' . $matches[3][0] . '\"' : '';\n return '<link rel=\"stylesheet\" href=\"' . $matches[2][0] . '\"' . $media . '>' . \"\\n\";\n}", "protected function preComprime() {\r\n\t$this->css = str_replace(', ', ',', $this->css);\r\n\t/* remove comments */\r\n\t$this->css = preg_replace('!/\\*[^*]*\\*+([^/][^*]*\\*+)*/!', '', $this->css);\r\n\t/* remove tabs, spaces, newlines, etc. */\r\n\t$this->css = str_replace(array(\"\\r\\n\", \"\\r\", \"\\n\", \"\\t\", ' ', ' ', ' '), '', $this->css);\r\n }", "function theme_essential_set_customcss($css, $customcss)\r\n{\r\n $tag = '[[setting:customcss]]';\r\n $replacement = $customcss;\r\n $css = str_replace($tag, $replacement, $css);\r\n return $css;\r\n}", "function me_rb4_sanitize_customizer_text( $input ) {\n\treturn sanitize_text_field( force_balance_tags( $input ) );\n}", "private function _optimize($contents)\n\t{\n\t\t// Perform some safe CSS optimizations.\n\t\t// Regexp to match comment blocks.\n\t\t$comment = '/\\*[^*]*\\*+(?:[^/*][^*]*\\*+)*/';\n\t\t// Regexp to match double quoted strings.\n\t\t$double_quot = '\"[^\"\\\\\\\\]*(?:\\\\\\\\.[^\"\\\\\\\\]*)*\"';\n\t\t// Regexp to match single quoted strings.\n\t\t$single_quot = \"'[^'\\\\\\\\]*(?:\\\\\\\\.[^'\\\\\\\\]*)*'\";\n\t\t// Strip all comment blocks, but keep double/single quoted strings.\n\t\t$contents = preg_replace(\n\t\t\t\"<($double_quot|$single_quot)|$comment>Ss\",\n\t\t\t\"$1\",\n\t\t\t$contents\n\t\t);\n\t\t// Remove certain whitespace.\n\t\t// There are different conditions for removing leading and trailing\n\t\t// whitespace.\n\t\t// @see http://php.net/manual/en/regexp.reference.subpatterns.php\n\t\t$contents = preg_replace_callback(\n\t\t\t'<' .\n\t\t\t# Strip leading and trailing whitespace.\n\t\t\t'\\s*([@{};,])\\s*' .\n\t\t\t# Strip only leading whitespace from:\n\t\t\t# - Closing parenthesis: Retain \"@media (bar) and foo\".\n\t\t\t'| \\s+([\\)])' .\n\t\t\t# Strip only trailing whitespace from:\n\t\t\t# - Opening parenthesis: Retain \"@media (bar) and foo\".\n\t\t\t# - Colon: Retain :pseudo-selectors.\n\t\t\t'| ([\\(:])\\s+' .\n\t\t\t'>xS',\n\t\t\tarray(get_class($this), '_optimize_call_back'),\n\t\t\t$contents\n\t\t);\n\n\t\treturn $contents;\n\t}", "function zoom_customizer_sanitize_text($string)\n{\n global $allowedtags;\n $expandedtags = $allowedtags;\n\n // span\n $expandedtags['span'] = array();\n\n // Enable id, class, and style attributes for each tag\n foreach ($expandedtags as $tag => $attributes) {\n $expandedtags[$tag]['id'] = true;\n $expandedtags[$tag]['class'] = true;\n $expandedtags[$tag]['style'] = true;\n }\n\n // br (doesn't need attributes)\n $expandedtags['br'] = array();\n\n /**\n * Customize the tags and attributes that are allows during text sanitization.\n *\n * @param array $expandedtags The list of allowed tags and attributes.\n * @param string $string The text string being sanitized.\n */\n apply_filters('zoom_customizer_sanitize_text_allowed_tags', $expandedtags, $string);\n\n return wp_kses($string, $expandedtags);\n}", "function rad_bar_sanitize($dirty){\n\t//clean all fields\n\t$clean['bartext'] = wp_filter_nohtml_kses( $dirty['bartext'] );\n\t$clean['buttontext'] = wp_filter_nohtml_kses( $dirty['buttontext'] );\n\t$clean['url'] = wp_filter_nohtml_kses( $dirty['url'] );\n\t\n\t//added color picker\n\t$clean['barcolor'] = wp_filter_nohtml_kses( $dirty['barcolor'] );\n\t$clean['buttoncolor'] = wp_filter_nohtml_kses( $dirty['buttoncolor'] );\n\t\n\treturn $clean;\n}", "function lsu_set_customcss($css, $customcss) {\n $tag = '[[setting:customcss]]';\n $replacement = $customcss;\n if (is_null($replacement)) {\n $replacement = '';\n }\n $css = str_replace($tag, $replacement, $css);\n return $css;\n}", "function clean_style_tag( $input ) {\n\tpreg_match_all( \"!<link rel='stylesheet'\\s?(id='[^']+')?\\s+href='(.*)' type='text/css' media='(.*)' />!\", $input, $matches );\n\tif ( empty( $matches[2] ) ) {\n\t\treturn $input;\n\t}\n\t$media = '' !== $matches[3][0] && 'all' !== $matches[3][0] ? ' media=\"' . $matches[3][0] . '\"' : '';\n\n\treturn '<link rel=\"stylesheet\" href=\"' . $matches[2][0] . '\"' . $media . '>' . \"\\n\";\n}", "private function SetCleanStyle()\n {\n $content = $this->GetHtmlBody();\n $regexCleanStyle = 'style=\\\\\"[^\\\\\"]*\\\\\"';\n $content = preg_replace(\"#$regexCleanStyle#\",'',$content);\n $this->SetHtmlBody($content);\n }", "function globalXssClean()\n\t{\n\t $sanitized = arrayStripTags(Input::all());\n\t Input::merge($sanitized);\n\t}", "function magazinebook_color_escaping_option_sanitize( $input ) {\n\t$input = esc_attr( $input );\n\n\treturn $input;\n}", "function test_this() {\n\tif ( ! isset( $_POST['abc_field'] ) ) {\n\t\treturn;\n\t}\n\t\n\t$abc = sanitize_color( wp_unslash( $_POST['abc_field'] ) ); // Bad x1 - sanitize.\n\n\t// phpcs:set WordPress.Security.ValidatedSanitizedInput customSanitizingFunctions[] sanitize_color,sanitize_twitter_handle\n\n\t$abc = sanitize_color( wp_unslash( $_POST['abc_field'] ) ); // OK.\n\t$abc = sanitize_facebook_id( wp_unslash( $_POST['abc_field'] ) ); // Bad x1 - sanitize.\n\t$abc = sanitize_twitter_handle( $_POST['abc_field'] ); // Bad x1 - unslash.\n\n\t// phpcs:set WordPress.Security.ValidatedSanitizedInput customSanitizingFunctions[] sanitize_color,sanitize_facebook_id\n\t// phpcs:set WordPress.Security.ValidatedSanitizedInput customUnslashingSanitizingFunctions[] sanitize_twitter_handle\n\n\t$abc = sanitize_color( wp_unslash( $_POST['abc_field'] ) ); // OK.\n\t$abc = sanitize_facebook_id( wp_unslash( $_POST['abc_field'] ) ); // OK.\n\t$abc = sanitize_twitter_handle( $_POST['abc_field'] ); // OK.\n\n\t// phpcs:set WordPress.Security.ValidatedSanitizedInput customSanitizingFunctions[]\n\t// phpcs:set WordPress.Security.ValidatedSanitizedInput customUnslashingSanitizingFunctions[]\n\n\t$abc = sanitize_twitter_handle( $_POST['abc_field'] ); // Bad x2, sanitize + unslash.\n}", "function decaf_set_customcss($css, $customcss) {\n $tag = '[[setting:customcss]]';\n $replacement = $customcss;\n if (is_null($replacement)) {\n $replacement = '';\n }\n $css = str_replace($tag, $replacement, $css);\n return $css;\n}", "public function remove_unwanted_css(){\n }" ]
[ "0.7017974", "0.6982448", "0.602692", "0.5837944", "0.5818644", "0.5744328", "0.5728424", "0.5722825", "0.5683468", "0.56244564", "0.5571578", "0.5517448", "0.5501316", "0.5493691", "0.546889", "0.5457791", "0.54512376", "0.54281324", "0.5410066", "0.5380638", "0.5365479", "0.5350516", "0.53495353", "0.53461576", "0.5335734", "0.53031087", "0.52673984", "0.5263327", "0.52454066", "0.5237991" ]
0.7826175
0
Dropdown Pages sanitization callback example. Sanitization: dropdownpages Control: dropdownpages Sanitization callback for 'dropdownpages' type controls. This callback sanitizes `$page_id` as an absolute integer, and then validates that $input is the ID of a published page.
function mdlwp_sanitize_dropdown_pages( $page_id, $setting ) { // Ensure $input is an absolute integer. $page_id = absint( $page_id ); // If $page_id is an ID of a published page, return it; otherwise, return the default. return ( 'publish' == get_post_status( $page_id ) ? $page_id : $setting->default ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function multipurpose_magazine_sanitize_dropdown_pages( $page_id, $setting ) {\n $page_id = absint( $page_id );\n // If $page_id is an ID of a published page, return it; otherwise, return the default.\n return ( 'publish' == get_post_status( $page_id ) ? $page_id : $setting->default );\n}", "function filter_pages_input_fields(array $input)\n{\n $return = array();\n\n // page type\n $return['page-type'] = isset($input['page-type']) ? $input['page-type'] : 'custom';\n\n // title\n $return['title'] = isset($input['title']) ? trim(html2text($input['title'])) : '';\n\n // status\n $return['status'] = isset($input['status']) ? (int) $input['status'] : 0;\n\n\n // system slug\n $return['system-slug'] = slug(isset($input['system-slug']) ? trim(html2text($input['system-slug'])) : '', '-', '/');\n $return['system-slug'] = preg_replace('/\\/+/', '/', $return['system-slug']);\n $return['system-slug'] = trim($return['system-slug'], '/');\n\n // slug\n $return['slug'] = slug(isset($input['slug']) ? trim(html2text($input['slug'])) : '', '-', '/');\n\n if (!$return['slug']) {\n $return['slug'] = slug($return['title']);\n }\n\n $return['slug'] = preg_replace('/\\/+/', '/', $return['slug']);\n $return['slug'] = trim($return['slug'], '/');\n\n\n\n// // Spin through the section categories and filter the input and also create a text version\n// // from the input\n// foreach (get_pages_sections() as $section_type => $sections) {\n//\n// foreach ($sections as $name) {\n// $input_name = $section_type . '-section-' . $name;\n// $return[$input_name] = isset($input[$input_name]) ? trim($input[$input_name]) : '';\n// $text = new Html2Text($return[$input_name]);\n// $return[$input_name . '_text'] = $text->getText();\n// }\n// }\n\n // finally we merge the return with the rest of the input\n $return = array_merge($input, $return);\n\n return $return;\n}", "function sanitize_input($input){\n\t\t$output = $input;\n\t\t$output[$this->id] = strip_tags(stripslashes($output[$this->id]));\n\t\treturn apply_filters('wdh_control_sanitize', $output, $input, $this);\n\t}", "function bbp_sanitize_val($request = '', $input_type = 'text')\n{\n}", "function get_page_slug_from_input(array $input)\n{\n // system slug takes precedence over user entered slug\n if ($input['system-slug'] && $input['page-type'] === 'system') {\n return $input['system-slug'];\n }\n\n return $input['slug'];\n}", "function bbp_get_sanitize_val($request = '', $input_type = 'text')\n{\n}", "function cmb2_slug_sanitize_callback( $override_value, $value ) {\r\n return remp_slugify( $value );\r\n}", "static function normalize_field( $field )\n\t\t{\n\t\t\t$field = wp_parse_args( $field, array(\n\t\t\t\t'post_status' => 'publish',\n\t\t\t) );\n\n\t\t\t$field['std'] = empty( $field['std'] ) ? _x( 'Select a Page', 'pages', 'the7mk2' ) : $field['std'];\n\n\t\t\treturn THE7_RWMB_Select_Field::normalize_field( $field );\n\t\t}", "function business_no_sanitize( $input ) {\n}", "function haven_sanitize_select( $input, $setting ) {\n\t\n\t// Ensure input is a slug.\n\t$input = sanitize_key( $input );\n\t\n\t// Get list of choices from the control associated with the setting.\n\t$choices = $setting->manager->get_control( $setting->id )->choices;\n\t\n\t// If the input is a valid key, return it; otherwise, return the default.\n\treturn ( array_key_exists( $input, $choices ) ? $input : $setting->default );\n}", "abstract public function sanitize( $input );", "function sanitize($input) {\n\t\tif(empty($input)) {\n\t\t\t$output = $input;\n\t\t} elseif (is_array($input)) {\n\t foreach($input as $var=>$val) {\n\t $output[$var] = sanitize($val);\n\t }\n\t } else {\n\t\t\t$input = trim(htmlentities(strip_tags($input)));\n\t if (get_magic_quotes_gpc()) {\n\t $input = stripslashes($input);\n\t }\n\t $input = remove_code($input);\n\t $output = mysql_real_escape_string($input);\n\t }\n\n\t return $output;\n\t}", "function storefront_sanitize_choices( $input, $setting ) {\n\t// Ensure input is a slug.\n\t$input = sanitize_key( $input );\n\n\t// Get list of choices from the control associated with the setting.\n\t$choices = $setting->manager->get_control( $setting->id )->choices;\n\n\t// If the input is a valid key, return it; otherwise, return the default.\n\treturn ( array_key_exists( $input, $choices ) ? $input : $setting->default );\n}", "function miniva_sanitize_select( $input, $setting ) {\n\t// Ensure input is a slug.\n\t$input = sanitize_key( $input );\n\n\t// Get list of choices from the control associated with the setting.\n\t$choices = $setting->manager->get_control( $setting->id )->choices;\n\n\t// If the input is a valid key, return it; otherwise, return the default.\n\treturn ( array_key_exists( $input, $choices ) ? $input : $setting->default );\n}", "function mdlwp_sanitize_select( $input, $setting ) {\n\t\n\t// Ensure input is a slug.\n\t$input = sanitize_key( $input );\n\t\n\t// Get list of choices from the control associated with the setting.\n\t$choices = $setting->manager->get_control( $setting->id )->choices;\n\t\n\t// If the input is a valid key, return it; otherwise, return the default.\n\treturn ( array_key_exists( $input, $choices ) ? $input : $setting->default );\n}", "public function sanitize( $input )\n {\n $new_input = array();\n if( isset( $input['id_number'] ) )\n $new_input['id_number'] = absint( $input['id_number'] );\n\n if( isset( $input['title'] ) )\n $new_input['title'] = sanitize_text_field( $input['title'] );\n\n return $new_input;\n }", "function themeslug_sanitize_select( $input, $setting ) {\n $input = sanitize_key( $input );\n\n // Get list of choices from the control associated with the setting.\n $choices = $setting->manager->get_control( $setting->id )->choices;\n\n // If the input is a valid key, return it; otherwise, return the default.\n return ( array_key_exists( $input, $choices ) ? $input : $setting->default );\n}", "function dw_schemas_sanitize_options($input) {\n\t$input['allow_default_structured_data'] = sanitize_text_field(strtolower($input['allow_default_structured_data']));\n\t$input['default_posts_structured_data_schema'] = sanitize_text_field($input['default_posts_structured_data_schema']);\n\t$input['default_pages_structured_data_schema'] = sanitize_text_field($input['default_pages_structured_data_schema']);\n\t$input['structured_data']['author_type'] = sanitize_text_field($input['structured_data']['author_type']);\n\t$input['structured_data']['author_name'] = sanitize_text_field($input['structured_data']['author_name']);\n\t$input['structured_data']['author_image'] = sanitize_text_field($input['structured_data']['author_image']);\n\t$input['structured_data']['author_contact_phones'] = sanitize_text_field($input['structured_data']['author_contact_phones']);\n\t$input['structured_data']['author_contact_phone_types'] = sanitize_text_field($input['structured_data']['author_contact_phone_types']);\n\t$input['structured_data']['author_contact_emails'] = sanitize_text_field($input['structured_data']['author_contact_emails']);\n\t$input['structured_data']['author_contact_email_types'] = sanitize_text_field($input['structured_data']['author_contact_email_types']);\n\t$input['structured_data']['publisher_type'] = sanitize_text_field($input['structured_data']['publisher_type']);\n\t$input['structured_data']['publisher_name'] = sanitize_text_field($input['structured_data']['publisher_name']);\n\t$input['structured_data']['publisher_contact_phones'] = sanitize_text_field($input['structured_data']['publisher_contact_phones']);\n\t$input['structured_data']['publisher_contact_phone_types'] = sanitize_text_field($input['structured_data']['publisher_contact_phone_types']);\n\t$input['structured_data']['publisher_contact_emails'] = sanitize_text_field($input['structured_data']['publisher_contact_emails']);\n\t$input['structured_data']['publisher_contact_email_types'] = sanitize_text_field($input['structured_data']['publisher_contact_email_types']);\n\t$input['structured_data']['creator_type'] = sanitize_text_field($input['structured_data']['creator_type']);\n\t$input['structured_data']['creator_name'] = sanitize_text_field($input['structured_data']['creator_name']);\n\t$input['structured_data']['creator_image'] = sanitize_text_field($input['structured_data']['creator_image']);\n\t$input['structured_data']['creator_contact_phones'] = sanitize_text_field($input['structured_data']['creator_contact_phones']);\n\t$input['structured_data']['creator_contact_phone_types'] = sanitize_text_field($input['structured_data']['creator_contact_phone_types']);\n\t$input['structured_data']['creator_contact_emails'] = sanitize_text_field($input['structured_data']['creator_contact_emails']);\n\t$input['structured_data']['creator_contact_email_types'] = sanitize_text_field($input['structured_data']['creator_contact_email_types']);\n\treturn $input;\n}", "function wpfbogp_validate($input) {\r\n\t$input['wpfbogp_admin_ids'] = wp_filter_nohtml_kses($input['wpfbogp_admin_ids']);\r\n\t$input['wpfbogp_app_id'] = wp_filter_nohtml_kses($input['wpfbogp_app_id']);\r\n\t$input['wpfbogp_page_id'] = wp_filter_nohtml_kses($input['wpfbogp_page_id']);\r\n\t$input['wpfbogp_fallback_img'] = wp_filter_nohtml_kses($input['wpfbogp_fallback_img']);\r\n\treturn $input;\r\n}", "function mim_setting_callback_function() {\n $mim_private_page_id = esc_attr( get_option( 'mim_map_page_id' ) );\n \n $args = array(\n\t'sort_order' => 'asc',\n\t'sort_column' => 'post_title',\n\t'hierarchical' => 1,\n\t'exclude' => '',\n\t'include' => '',\n\t'meta_key' => '',\n\t'meta_value' => '',\n\t'authors' => '',\n\t'child_of' => 0,\n\t'parent' => -1,\n\t'exclude_tree' => '',\n\t'number' => '',\n\t'offset' => 0,\n\t'post_type' => 'page',\n\t'post_status' => 'publish'\n ); \n $pages = get_pages($args); \n echo \"<select name='mim_map_page_id'>\";\n foreach ($pages as $page){\n //print_r($page);\n $option_html = \"<option value='$page->ID'\";\n if ($page->ID === intval($mim_private_page_id)){\n $option_html .= \" selected='selected'\";\n }\n $option_html .= \" >$page->post_title</option>\";\n echo $option_html;\n }\n echo \"</select>\";\n}", "public function sanitize($input) {\n $new_input = array();\n if (isset($input['rp_vereins_id'])) {\n $new_input['rp_vereins_id'] = absint($input['rp_vereins_id']);\n\n $startseite = 'http://ttvbw.click-tt.de/cgi-bin/WebObjects/nuLigaTTDE.woa/wa/clubTeams?club=' . $new_input['rp_vereins_id'];\n $html = file_get_html($startseite);\n $heading = $html->find('h1', 0)->plaintext;\n $heading = str_replace('Mannschaften und Ligeneinteilung', '', $heading);\n $heading = trim($heading);\n\n $new_input['rp_vereins_name'] = $heading;\n }\n\n return $new_input;\n }", "function sanitize($input) {\n\treturn $input;\n\n}", "public static function sanitize_choice( $input, $setting ){\n\t \t# Ensure input is a slug.\n\t \t$input = sanitize_key( $input );\n\t \t# Get list of choices from the control associated with the setting.\n\t \t$choices = $setting->manager->get_control( $setting->id )->choices;\n\n\t \t# If the input is a valid key, return it; otherwise, return the default.\n\t \treturn ( array_key_exists( $input, $choices ) ? $input : $setting->default );\n\t }", "function adverts_dropdown_pages( $field ) {\r\n \r\n if(isset($field[\"value\"])) {\r\n $value = $field[\"value\"];\r\n } else {\r\n $value = null;\r\n }\r\n \r\n $args = array(\r\n 'selected' => $value, \r\n 'echo' => 1,\r\n\t'name' => $field[\"name\"], \r\n 'id' => $field[\"name\"],\r\n\t'show_option_none' => ' ',\r\n 'option_none_value' => 0\r\n );\r\n \r\n wp_dropdown_pages( $args );\r\n}", "protected function checkValue($input): void\n {\n if ('' === $input || !\\is_array($this->rootNodes)) {\n return;\n }\n\n if (false === strpos($input, ',')) {\n $ids = [(int) $input];\n } else {\n $ids = array_map('intval', array_filter(explode(',', $input)));\n }\n\n if (\\count(array_diff($ids, array_merge($this->rootNodes, Database::getInstance()->getChildRecords($this->rootNodes, 'tl_node')))) > 0) {\n $this->addError($GLOBALS['TL_LANG']['ERR']['invalidPages']);\n }\n }", "function sanitization_filters() {\n\t\t\n\t\tgenesis_add_option_filter( 'no_html', $this->settings_field,\n\t\t\tarray(\n\t\t\t\t'application_url',\n\t\t\t\t'company_nmls',\n\t\t\t\t'individual_nmls',\n\t\t\t\t'address',\n\t\t\t\t'phone',\n\t\t\t\t'company_selector',\n\t\t\t\t'website_type',\n\t\t\t\t'include_homepage_blog',\n\t\t\t\t'facebook_url',\n\t\t\t\t'twitter_url',\n\t\t\t\t'linkedin_url',\n\t\t\t\t'googleplus_url',\n\t\t\t\t'phone_checkbox',\n\t\t\t\t'locations_checkbox',\n\t\t\t) );\n\n\t\tgenesis_add_option_filter( 'safe_html', $this->settings_field,\n\t\t\tarray(\n\t\t\t\t'disclaimer',\n\t\t\t\t'locations_page',\n\t\t\t) );\n\t}", "public function sanitize( $input ) {\n $new_input = array();\n if ( isset($input['avg_tax_bill']) ) {\n if ( $input['avg_tax_bill'] != \"\" ) {\n $new_input['avg_tax_bill'] = floatval($input['avg_tax_bill']);\n } else {\n $new_input['avg_tax_bill'] = '';\n }\n }\n\n if( isset($input['default_tax_year']) ) {\n $new_input['default_tax_year']\n = sanitize_text_field($input['default_tax_year']);\n }\n\n if( isset($input['fiscal_year_start']) ) {\n $new_input['fiscal_year_start']\n = sanitize_text_field($input['fiscal_year_start']);\n }\n\n // We don't want WP to save uploaded files to the database;\n // so we intercept them in the admin and upload them ourselves locally.\n if ( isset($input['upload']) ) {\n // Do nothing.\n }\n\n // We won't save this URL forever, but we will keep it saved until\n // the dataset is retrieved, validated, & saved locally. This way we\n // know the last URL fetched, which is useful e.g. for displaying\n // retrieval errors.\n if ( isset($input['url']) ) {\n $new_input['url'] = esc_url_raw( $input['url'] );\n }\n\n return $new_input;\n }", "public function sanitize( $input )\n {\n $new_input = array();\n if( isset( $input['id_number'] ) )\n $new_input['id_number'] = absint( $input['id_number'] );\n\n return $new_input;\n }", "public function sanitize( $input ) {\n\t\t$new_input = array();\n\t\tif ( isset( $input['id_number'] ) )\n\t\t\t$new_input['id_number'] = absint( $input['id_number'] );\n\t\t\n\t\tif ( isset( $input['license_key'] ) )\n\t\t\t$new_input['license_key'] = wp_kses_post( $input['license_key'] );\n\t\t\n\t\tif ( isset( $input['maxicharts_log_level'] ) )\n\t\t\t $new_input['maxicharts_log_level'] = wp_kses_post( $input['maxicharts_log_level'] );\n\t\t\t\n\t\t\t\n\t\tif ( isset( $input['cpt_range'] ) )\n\t\t\t$new_input['cpt_range'] = $input['cpt_range'];\n\t\t\n\t\tif ( isset( $input['tags_to_replace'] ) )\n\t\t\t$new_input['tags_to_replace'] = wp_kses_post( $input['tags_to_replace'] );\n\t\tif ( isset( $input['tags_to_keep'] ) )\n\t\t\t$new_input['tags_to_keep'] = wp_kses_post( $input['tags_to_keep'] );\n\t\t\n\t\tif ( isset( $input['tag_class_to_acf'] ) )\n\t\t\t$new_input['tag_class_to_acf'] = wp_kses_post( $input['tag_class_to_acf'] );\n\t\t\n\t\tif ( isset( $input['images_block_tag'] ) )\n\t\t\t$new_input['images_block_tag'] = wp_kses_post( $input['images_block_tag'] );\n\t\t\n\t\tif ( isset( $input['legend_class_tag'] ) )\n\t\t\t$new_input['legend_class_tag'] = wp_kses_post( $input['legend_class_tag'] );\n\t\t\n\t\tif ( isset( $input['figure_call_class_tag'] ) )\n\t\t\t$new_input['figure_call_class_tag'] = wp_kses_post( $input['figure_call_class_tag'] );\n\t\t\n\t\tif ( isset( $input['featured_img_class_tag'] ) )\n\t\t\t$new_input['featured_img_class_tag'] = wp_kses_post( $input['featured_img_class_tag'] );\n\t\t\n\t\tif ( isset( $input['resize_images'] ) )\n\t\t\t$new_input['resize_images'] = wp_kses_post( $input['resize_images'] );\n\t\t\n\t\tif ( isset( $input['resize_images_width'] ) )\n\t\t\t$new_input['resize_images_width'] = wp_kses_post( $input['resize_images_width'] );\n\t\t\n\t\tif ( isset( $input['resize_images_height'] ) )\n\t\t\t$new_input['resize_images_height'] = wp_kses_post( $input['resize_images_height'] );\n\t\t\n\t\tif ( isset( $input['resize_mode'] ) )\n\t\t\t$new_input['resize_mode'] = $input['resize_mode'];\n\t\t\n\t\tif ( isset( $input['use_imagick'] ) )\n\t\t\t$new_input['use_imagick'] = $input['use_imagick'];\n\t\t\n\t\tif ( isset( $input['enable_swipe'] ) )\n\t\t\t$new_input['enable_swipe'] = $input['enable_swipe'];\n\t\t\n\t\treturn $new_input;\n\t}", "function validate_page( $page ) {\n\n\t\t\t// Allow empty arg to generate the default Options Page.\n\t\t\tif ( empty( $page ) ) {\n\t\t\t\t$page_title = __( 'Options', 'acf' );\n\t\t\t\t$page = array(\n\t\t\t\t\t'page_title' => $page_title,\n\t\t\t\t\t'menu_title' => $page_title,\n\t\t\t\t\t'menu_slug' => 'acf-options',\n\t\t\t\t);\n\n\t\t\t\t// Allow string to define Options Page name.\n\t\t\t} elseif ( is_string( $page ) ) {\n\t\t\t\t$page_title = $page;\n\t\t\t\t$page = array(\n\t\t\t\t\t'page_title' => $page_title,\n\t\t\t\t\t'menu_title' => $page_title,\n\t\t\t\t);\n\t\t\t}\n\n\t\t\t// Apply defaults.\n\t\t\t$page = wp_parse_args(\n\t\t\t\t$page,\n\t\t\t\tarray(\n\t\t\t\t\t'page_title' => '',\n\t\t\t\t\t'menu_title' => '',\n\t\t\t\t\t'menu_slug' => '',\n\t\t\t\t\t'capability' => 'edit_posts',\n\t\t\t\t\t'parent_slug' => '',\n\t\t\t\t\t'position' => null,\n\t\t\t\t\t'icon_url' => false,\n\t\t\t\t\t'redirect' => true,\n\t\t\t\t\t'post_id' => 'options',\n\t\t\t\t\t'autoload' => false,\n\t\t\t\t\t'update_button' => __( 'Update', 'acf' ),\n\t\t\t\t\t'updated_message' => __( 'Options Updated', 'acf' ),\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// Allow compatibility for changed settings.\n\t\t\t$migrate = array(\n\t\t\t\t'title' => 'page_title',\n\t\t\t\t'menu' => 'menu_title',\n\t\t\t\t'slug' => 'menu_slug',\n\t\t\t\t'parent' => 'parent_slug',\n\t\t\t);\n\t\t\tforeach ( $migrate as $old => $new ) {\n\t\t\t\tif ( ! empty( $page[ $old ] ) ) {\n\t\t\t\t\t$page[ $new ] = $page[ $old ];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// If no menu_title is set, use the page_title value.\n\t\t\tif ( empty( $page['menu_title'] ) ) {\n\t\t\t\t$page['menu_title'] = $page['page_title'];\n\t\t\t}\n\n\t\t\t// If no menu_slug is set, generate one using the menu_title value.\n\t\t\tif ( empty( $page['menu_slug'] ) ) {\n\t\t\t\t$page['menu_slug'] = 'acf-options-' . sanitize_title( $page['menu_title'] );\n\t\t\t}\n\n\t\t\t// Standardize on position being either null or int.\n\t\t\t$page['position'] = is_numeric( $page['position'] ) ? (int) $page['position'] : null;\n\n\t\t\t/**\n\t\t\t * Filters the $page array after it has been validated.\n\t\t\t *\n\t\t\t * @since 5.5.8\n\t\t\t * @param array $page The Options Page settings array.\n\t\t\t */\n\t\t\treturn apply_filters( 'acf/validate_options_page', $page );\n\t\t}" ]
[ "0.6365081", "0.5593897", "0.54609156", "0.54210925", "0.53522724", "0.52900535", "0.52561533", "0.52423435", "0.52382284", "0.517645", "0.5166668", "0.5158878", "0.5137883", "0.5089376", "0.5071239", "0.5054844", "0.50453013", "0.5023799", "0.5008248", "0.5003746", "0.49867576", "0.49732792", "0.49662444", "0.49463713", "0.49322554", "0.49248073", "0.48895016", "0.48826173", "0.48771247", "0.4859138" ]
0.69578105
0
HTML sanitization callback example. Sanitization: html Control: text, textarea Sanitization callback for 'html' type text inputs. This callback sanitizes `$html` for HTML allowable in posts. NOTE: wp_filter_post_kses() can be passed directly as `$wp_customize>add_setting()` 'sanitize_callback'. It is wrapped in a callback here merely for example purposes.
function mdlwp_sanitize_html( $html ) { return wp_filter_post_kses( $html ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static function html($html) {\n $html = filter_var($html, FILTER_SANITIZE_STRING);\n return $html;\n }", "public function sanitize( $html ) {\n\t\treturn \\strip_tags( $html, '<h1><h2><h3><h4><h5><h6><br><ol><ul><li><a><p><b><strong><i><em>' );\n\t}", "function generate_premium_sanitize_html( $input ) \n{\n\treturn wp_kses_post( $input );\n}", "public static function sanitizeHTML($string, $html = 'post', $protocols = [])\n\t{\n\t\treturn wp_kses((string)$string,$html,$protocols);\n\t}", "function safeHtml($html) {\r\n\t$html = preg_replace_callback('!<(script|object|embed)[^>]*>.*?</\\1>!s', 'encodeHtml', $html);\r\n\t// Remove potentially dangerous attributes: all those starting with 'on'\r\n\t$html = preg_replace_callback('!<[a-zA-Z]+\\s+([a-zA-Z]+(\\s*=\\s*([\"\\']).*?\\3\\s*)?)+>!s', 'stripAttribs', $html);\r\n\treturn $html;\r\n}", "function mdlwp_sanitize_nohtml( $nohtml ) {\n\treturn wp_filter_nohtml_kses( $nohtml );\n}", "function safe_html( $new_value ) {\n\n\t\treturn wp_kses_post( $new_value );\n\n\t}", "public function html_tags_callback() {\n\t\t$defaultTagsToKeep = '<h2><h3><h4><h5><ul><ol><li>';\n\t\tprintf( \n\t\t\t'<input class=\"widefat\" type=\"text\" id=\"tags_to_keep\" name=\"maxicharts_option[tags_to_keep]\" value=\"%s\" />',\n\t\t\tisset( $this->options['tags_to_keep'] ) ? esc_attr( $this->options['tags_to_keep'] ) : $defaultTagsToKeep );\n\t}", "public function sanitize( string $value, bool $html = false ) {\n\t\tif( gettype( $value ) == 'integer' ) {\n\t\t\t$value = (int)$value;\n\t\t}\n\n\t\tif( $html === true ) {\n\t\t\treturn trim( $value );\n\t\t} else {\n\t\t\tif( gettype( $value ) == 'array' ) {\n\t\t\t\treturn $value;\n\t\t\t} else {\n\t\t\t\treturn trim( htmlentities( strip_tags( stripslashes( $value ) ) ) );\n\t\t\t}\n\t\t}\n\t}", "static function sanitize_html_select( $html ) {\n\n\t\treturn wp_kses( $html, array(\n\n\t\t\t'select' => array(\n\t\t\t\t'autofocus' => true,\n\t\t\t\t'disabled' => true,\n\t\t\t\t'form' => true,\n\t\t\t\t'multiple' => true,\n\t\t\t\t'name' => true,\n\t\t\t\t'required' => true,\n\t\t\t\t'size' => true,\n\t\t\t),\n\t\t\t'option' => array(\n\t\t\t\t'value' => true,\n\t\t\t\t'label' => true,\n\t\t\t\t'disabled' => true,\n\t\t\t\t'selected' => true,\n\t\t\t),\n\n\t\t));\n\n\t}", "function unfilter_html_tags( $value, $field_args, $field ) {\n /*\n * Do your custom sanitization.\n * strip_tags can allow whitelisted tags\n * http://php.net/manual/en/function.strip-tags.php\n */\n $value = strip_tags( $value, '<p><a><br><br/><span>' );\n\n return $value;\n}", "public function sanitizeHtml($html): string\n {\n if(!$html) return '';\n\n try {\n $dom = new DOMDocument();\n $dom->loadHTML(mb_convert_encoding($html, 'HTML-ENTITIES', 'UTF-8'));\n $tags_to_remove = ['script', 'style', 'iframe', 'link'];\n foreach ($tags_to_remove as $tag) {\n $element = $dom->getElementsByTagName($tag);\n foreach ($element as $item) {\n $item->parentNode->removeChild($item);\n }\n }\n foreach ($dom->getElementsByTagname('*') as $element) {\n foreach (iterator_to_array($element->attributes) as $name => $attribute) {\n if (substr_compare((string)$name, 'on', 0, 2, true) === 0) {\n $element->removeAttribute($name);\n }\n }\n }\n\n return $dom->saveHTML();\n } catch (Exception $exception) {\n return htmlentities((string)$html);\n }\n }", "function sanitization_filters() {\n\n\t\tgenesis_add_option_filter( 'safe_html', $this->settings_field,\n\t\t\tarray(\n\t\t\t\t'footer-left',\n\t\t\t\t'footer-right',\n\t\t\t\t'disclaimer'\n\t\t\t) );\n\t}", "function sanitization_filters() {\n\t\t\n\t\tgenesis_add_option_filter( 'no_html', $this->settings_field,\n\t\t\tarray(\n\t\t\t\t'application_url',\n\t\t\t\t'company_nmls',\n\t\t\t\t'individual_nmls',\n\t\t\t\t'address',\n\t\t\t\t'phone',\n\t\t\t\t'company_selector',\n\t\t\t\t'website_type',\n\t\t\t\t'include_homepage_blog',\n\t\t\t\t'facebook_url',\n\t\t\t\t'twitter_url',\n\t\t\t\t'linkedin_url',\n\t\t\t\t'googleplus_url',\n\t\t\t\t'phone_checkbox',\n\t\t\t\t'locations_checkbox',\n\t\t\t) );\n\n\t\tgenesis_add_option_filter( 'safe_html', $this->settings_field,\n\t\t\tarray(\n\t\t\t\t'disclaimer',\n\t\t\t\t'locations_page',\n\t\t\t) );\n\t}", "public static function filter( $html ) {\n\t\tif ( ! $html || ! is_string( $html ) ) {\n\t\t\treturn $html;\n\t\t}\n\n\t\t$regexps = array(\n\t\t\t'object' => '%<object[^>]*+>(?>[^<]*+(?><(?!/object>)[^<]*+)*)</object>%i',\n\t\t\t'embed' => '%<embed[^>]*+>(?:\\s*</embed>)?%i',\n\t\t\t'iframe' => '%<iframe[^>]*+>(?>[^<]*+(?><(?!/iframe>)[^<]*+)*)</iframe>%i',\n\t\t\t'div' => '%<div[^>]*+>(?>[^<]*+(?><(?!/div>)[^<]*+)*+)(?:</div>)+%i',\n\t\t\t'script' => '%<script[^>]*+>(?>[^<]*+(?><(?!/script>)[^<]*+)*)</script>%i',\n\t\t);\n\n\t\t$unfiltered_content_tokens = array();\n\t\tself::$sh_unfiltered_content_tokens = array();\n\n\t\t// Check here to make sure that SyntaxHighlighter is still used. (Just a little future proofing).\n\t\tif ( class_exists( 'SyntaxHighlighter' ) ) {\n\t\t\t/*\n\t\t\t * Replace any \"code\" shortcode blocks with a token that we'll later replace with its original text.\n\t\t\t * This will keep the contents of the shortcode from being filtered.\n\t\t\t */\n\t\t\tglobal $SyntaxHighlighter; // phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase\n\n\t\t\t// Check to see if the $syntax_highlighter object has been created and is ready for use.\n\t\t\tif ( isset( $SyntaxHighlighter ) && is_array( $SyntaxHighlighter->shortcodes ) ) { // phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase\n\t\t\t\t$shortcode_regex = implode( '|', array_map( 'preg_quote', $SyntaxHighlighter->shortcodes ) ); // phpcs:ignore WordPress.NamingConventions.ValidVariableName.VariableNotSnakeCase\n\t\t\t\t$html = preg_replace_callback(\n\t\t\t\t\t'/\\[(' . $shortcode_regex . ')(\\s[^\\]]*)?\\][\\s\\S]*?\\[\\/\\1\\]/m',\n\t\t\t\t\tarray( __CLASS__, 'sh_regexp_callback' ),\n\t\t\t\t\t$html\n\t\t\t\t);\n\t\t\t\t$unfiltered_content_tokens = self::$sh_unfiltered_content_tokens;\n\t\t\t}\n\t\t}\n\n\t\tforeach ( $regexps as $element => $regexp ) {\n\t\t\tself::$current_element = $element;\n\n\t\t\tif ( false !== stripos( $html, \"<$element\" ) ) {\n\t\t\t\t$new_html = preg_replace_callback( $regexp, array( __CLASS__, 'dispatch' ), $html );\n\t\t\t\tif ( $new_html ) {\n\t\t\t\t\t$html = $new_html;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif ( false !== stripos( $html, \"&lt;$element\" ) ) {\n\t\t\t\t$regexp_entities = self::regexp_entities( $regexp );\n\t\t\t\t$new_html = preg_replace_callback( $regexp_entities, array( __CLASS__, 'dispatch_entities' ), $html );\n\t\t\t\tif ( $new_html ) {\n\t\t\t\t\t$html = $new_html;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tif ( count( $unfiltered_content_tokens ) > 0 ) {\n\t\t\t// Replace any tokens generated earlier with their original unfiltered text.\n\t\t\t$html = str_replace( array_keys( $unfiltered_content_tokens ), $unfiltered_content_tokens, $html );\n\t\t}\n\n\t\treturn $html;\n\t}", "private function _wash_html($html)\n {\n // Add header with charset spec., washtml cannot work without that\n $html = '<html><head>'\n . '<meta http-equiv=\"Content-Type\" content=\"text/html; charset='.RCUBE_CHARSET.'\" />'\n . '</head><body>' . $html . '</body></html>';\n\n // clean HTML with washtml by Frederic Motte\n $wash_opts = array(\n 'show_washed' => false,\n 'allow_remote' => 1,\n 'charset' => RCUBE_CHARSET,\n 'html_elements' => array('html', 'head', 'meta', 'body', 'link'),\n 'html_attribs' => array('rel', 'type', 'name', 'http-equiv'),\n );\n\n // initialize HTML washer\n $washer = new rcube_washtml($wash_opts);\n\n $washer->add_callback('form', array($this, '_washtml_callback'));\n $washer->add_callback('a', array($this, '_washtml_callback'));\n\n // Remove non-UTF8 characters\n $html = rcube_charset::clean($html);\n\n $html = $washer->wash($html);\n\n // remove unwanted comments (produced by washtml)\n $html = preg_replace('/<!--[^>]+-->/', '', $html);\n\n return $html;\n }", "public function core_filter_geoFilter_replaceDisallowedHtml($html)\n {\n //This is called on most, if not all, user input for listing details.\n //If you wanted to remove something from the listing details at the\n //point the listing is being placed, this would be a good way to do it.\n\n //FILTER Text here.\n $filtered_html = $html;\n\n return $filtered_html;\n }", "function ca_options_text_callback($input){\n\t\t$input['text'] = wp_filter_nohtml_kses($input['text']);\n\t\treturn $input;\n\t}", "function tfc_nathan_small_sanitize_text( $input ) {\r\n return esc_attr( $input );\r\n}", "private function get_sanitize_callback( $args ) {\n\t\t\t$type = $args['field_type'];\n\t\t\tif ( ! empty( $args['sanitize'] ) ) {\n\t\t\t\treturn $args['sanitize'];\n\t\t\t} else {\n\t\t\t\tif ( 'text' === $type ) {\n\t\t\t\t\treturn 'sanitize_text_field';\n\t\t\t\t} elseif ( 'textarea' === $type ) {\n\t\t\t\t\treturn 'sanitize_textarea_field';\n\t\t\t\t} elseif ( 'checkbox' === $type ) {\n\t\t\t\t\treturn array( $this, 'sanitize_checkbox' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t}", "function zoom_customizer_sanitize_text($string)\n{\n global $allowedtags;\n $expandedtags = $allowedtags;\n\n // span\n $expandedtags['span'] = array();\n\n // Enable id, class, and style attributes for each tag\n foreach ($expandedtags as $tag => $attributes) {\n $expandedtags[$tag]['id'] = true;\n $expandedtags[$tag]['class'] = true;\n $expandedtags[$tag]['style'] = true;\n }\n\n // br (doesn't need attributes)\n $expandedtags['br'] = array();\n\n /**\n * Customize the tags and attributes that are allows during text sanitization.\n *\n * @param array $expandedtags The list of allowed tags and attributes.\n * @param string $string The text string being sanitized.\n */\n apply_filters('zoom_customizer_sanitize_text_allowed_tags', $expandedtags, $string);\n\n return wp_kses($string, $expandedtags);\n}", "function phutil_safe_html($string) {\n if ($string == '') {\n return $string;\n } else if ($string instanceof PhutilSafeHTML) {\n return $string;\n } else {\n return new PhutilSafeHTML($string);\n }\n}", "public function get_allowed_html() {\n\n\t\treturn apply_filters( 'widget_title_html/allowed_html', $this->allowed_html );\n\t}", "function STD_HTML($in){\n\t\t$res=$in;\t\t\n\t\tif(is_array($res)){\n\t\t\tforeach($res as $k=>$v){\n\t\t\t\t$res[$k]=STD_HTML($v);\t\n\t\t\t}\n\t\t\treturn $res;\n\t\t}\n\t\telse{\n\t\t\t$res = trim($res);//front & back whitespace\n\t\t\t$res = preg_replace('/\\s\\s+/', ' ', $res);//trim out \" a lot of spacing\" to \"a lot of spacing\"\n\t\t\t//if server add by default\n\t\t\tif (get_magic_quotes_gpc()) {\n\t\t\t\t$res = stripslashes($res);\n\t\t\t}\n\t\t\t$res = htmlspecialchars($res);\n\t\t\t//$res = mysql_real_escape_string($res);//this throws a shit fit...idk why yet.\n\t\t return $res;\n\t\t}\n\t}", "public function safe_html( $new_value ) {\n\t\treturn wp_kses_post( $new_value );\n\t}", "function sanitize_input($input){\n return str_replace(\" \", \"\", strip_tags($input));\n}", "function clean($string, $allow_html = false)\n{\n //$string = $string;\n //$string = htmlentities($string);\n if ($allow_html == false)\n {\n $string = strip_tags($string);\n $string = Replacer($string);\n }\n // $string = utf8_encode($string);\n return $string;\n}", "function sanitize_input($input){\n\t\t$output = $input;\n\t\t$output[$this->id] = strip_tags(stripslashes($output[$this->id]));\n\t\treturn apply_filters('wdh_control_sanitize', $output, $input, $this);\n\t}", "function sanitization_filters() {\n\t\tgenesis_add_option_filter( 'no_html', $this->settings_field,\n\t\t\tarray(\n\t\t\t\t'uvasom_section_type',\n\t\t\t\t'uvasom_site_type',\n\t\t\t) );\n\t}", "function _acf_kses_allowed_html( $tags, $context ) {\n\tglobal $allowedposttags;\n\n\tif ( $context === 'acf' ) {\n\t\treturn $allowedposttags;\n\t}\n\treturn $tags;\n}" ]
[ "0.692726", "0.68487614", "0.65866905", "0.6446664", "0.640114", "0.6259636", "0.6216468", "0.61302125", "0.6123378", "0.6122708", "0.6089486", "0.59953755", "0.5965639", "0.59189427", "0.5873719", "0.58733714", "0.5858265", "0.58543605", "0.58373433", "0.5821257", "0.58192503", "0.5789232", "0.57870835", "0.5768338", "0.57500345", "0.57442373", "0.5724192", "0.5713539", "0.5703434", "0.56555367" ]
0.7775399
0
Image sanitization callback example. Checks the image's file extension and mime type against a whitelist. If they're allowed, send back the filename, otherwise, return the setting default. Sanitization: image file extension Control: text, WP_Customize_Image_Control
function mdlwp_sanitize_image( $image, $setting ) { /* * Array of valid image file types. * * The array includes image mime types that are included in wp_get_mime_types() */ $mimes = array( 'jpg|jpeg|jpe' => 'image/jpeg', 'gif' => 'image/gif', 'png' => 'image/png', 'bmp' => 'image/bmp', 'tif|tiff' => 'image/tiff', 'ico' => 'image/x-icon' ); // Return an array with file extension and mime_type. $file = wp_check_filetype( $image, $mimes ); // If $image has a valid mime_type, return it; otherwise, return the default. return ( $file['ext'] ? $image : $setting->default ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_allowed_image_file_types()\n{\n $supported = str_replace(' ', '', get_option('valid_images'));\n return $supported;\n}", "function cf_custom_image_filterer($val) {\n\tglobal $wp_current_filter, $cf_custom_image_sizes;\n\t\n\t/* Figure out which filter we're acutally running */\n\t$cur_filter = end($wp_current_filter);\n\t\n\t/* Grab the custom image sizes' handle */\n\t$custom_sizes = array_keys($cf_custom_image_sizes);\n\t\n\t/* Loop through each and see if we're doing that one */\n\tforeach ($custom_sizes as $size) {\n\t\t/* Look for the size handle in the current filter string */\n\t\tif (strpos($cur_filter, $size)) { \n\t\t\t/* trim off all but the size detail ('size_w', etc...) */\n\t\t\t$sub_filter = str_replace('pre_option_'.$size.'_', '', $cur_filter);\n\n\t\t\t/* If we got something, go ahead and return it */\n\t\t\tif (isset($cf_custom_image_sizes[$size][$sub_filter])) {\n\t\t\t\treturn $cf_custom_image_sizes[$size][$sub_filter];\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t}\n\treturn $val;\n}", "function custom_wp_check_filetype_and_ext($filetype_and_ext, $file, $filename) {\n if(!$filetype_and_ext['ext'] || !$filetype_and_ext['type'] || !$filetype_and_ext['proper_filename']) {\n $extension = pathinfo($filename)['extension'];\n $mime_type = mime_content_type($file);\n $allowed_ext = array(\n 'dwg' => array('image/vnd.dwg', 'application/octet-stream'),\n 'DWG' => array('image/vnd.dwg', 'application/octet-stream'),\n 'ai' => array('application/postscript'),\n );\n if($allowed_ext[$extension]) {\n if(in_array($mime_type, $allowed_ext[$extension])) {\n $filetype_and_ext['ext'] = $extension;\n $filetype_and_ext['type'] = $mime_type;\n $filetype_and_ext['proper_filename'] = $filename;\n }\n }\n }\n return $filetype_and_ext;\n}", "function hook_filter_secure_image_alter(&$image) {\n // Turn an invalid image into an error indicator.\n $image->setAttribute('src', base_path() . 'core/misc/icons/e32700/error.svg');\n $image->setAttribute('alt', t('Image removed.'));\n $image->setAttribute('title', t('This image has been removed. For security reasons, only images from the local domain are allowed.'));\n\n // Add a CSS class to aid in styling.\n $class = ($image->getAttribute('class') ? trim($image->getAttribute('class')) . ' ' : '');\n $class .= 'filter-image-invalid';\n $image->setAttribute('class', $class);\n}", "function sf_add_img_upload_filter($option_name, $handler) {\n\t add_filter('pre_update_option_'.$option_name, $handler, 10, 2);\n\t}", "function check_image( $image, $setting ) {\n $mimes = array(\n 'jpg|jpeg|jpe' => 'image/jpeg',\n 'gif' => 'image/gif',\n /*'png' => 'image/png',\n 'bmp' => 'image/bmp',\n 'tif|tiff' => 'image/tiff',\n 'ico' => 'image/x-icon'*/\n );\n // Return an array with file extension and mime_type.\n $file = wp_check_filetype( $image, $mimes );\n // If $image has a valid mime_type, return it; otherwise, return the default.\n //return ( $file['ext'] ? $image : $setting->default );\n if(!$file['ext']){\n return new WP_Error( 'invalid_value', __( 'Image must be in jpg format.' ) );\n }\n return $image;\n }", "function anva_customizer_get_sanitization( $type ) {\n\n\tif ( 'select' == $type || 'radio' == $type ) {\n\t\treturn 'anva_customizer_sanitize_choices';\n\t}\n\n\tif ( 'checkbox' == $type ) {\n\t\treturn 'anva_sanitize_checkbox';\n\t}\n\n\tif ( 'color' == $type ) {\n\t\treturn 'anva_sanitize_hex';\n\t}\n\n\tif ( 'upload' == $type || 'image' == $type ) {\n\t\treturn 'anva_sanitize_upload';\n\t}\n\n\tif ( 'text' == $type ) {\n\t\treturn 'sanitize_text_field';\n\t}\n\n\tif ( 'textarea' == $type ) {\n\t\treturn 'anva_sanitize_textarea';\n\t}\n\n\tif ( 'url' == $type ) {\n\t\treturn 'esc_url';\n\t}\n\n\tif ( 'range' == $type ) {\n\t\treturn 'sanitize_text_field';\n\t}\n\n\tif ( 'dropdown-pages' == $type ) {\n\t\treturn 'absint';\n\t}\n\n\tif ( 'typography' == $type ) {\n\t\treturn 'anva_sanitize_typography';\n\t}\n\n\t// If a custom option is being used, return false\n\treturn FALSE;\n}", "function sanitize_file_name( $filename ) {\n\t$filename_raw = $filename;\n\t$special_chars = array(\"?\", \"[\", \"]\", \"/\", \"\\\\\", \"=\", \"<\", \">\", \":\", \";\", \",\", \"'\", \"\\\"\", \"&\", \"$\", \"#\", \"*\", \"(\", \")\", \"|\", \"~\", \"`\", \"!\", \"{\", \"}\", chr(0));\n\n\t$filename = preg_replace( \"#\\x{00a0}#siu\", ' ', $filename );\n\t$filename = str_replace($special_chars, '', $filename);\n\t$filename = preg_replace('/[\\s-]+/', '-', $filename);\n\t$filename = trim($filename, '.-_');\n\n\t// Split the filename into a base and extension[s]\n\t$parts = explode('.', $filename);\n\n\t// Return if only one extension\n\tif ( count( $parts ) <= 2 ) {\n\t\treturn $filename;\n\t}\n\n\t// Process multiple extensions\n\t$filename = array_shift($parts);\n\t$extension = array_pop($parts);\n\t$mimes = get_allowed_mime_types();\n\n\t/*\n\t * Loop over any intermediate extensions. Postfix them with a trailing underscore\n\t * if they are a 2 - 5 character long alpha string not in the extension whitelist.\n\t */\n\tforeach ( (array) $parts as $part) {\n\t\t$filename .= '.' . $part;\n\n\t\tif ( preg_match(\"/^[a-zA-Z]{2,5}\\d?$/\", $part) ) {\n\t\t\t$allowed = false;\n\t\t\tforeach ( $mimes as $ext_preg => $mime_match ) {\n\t\t\t\t$ext_preg = '!^(' . $ext_preg . ')$!i';\n\t\t\t\tif ( preg_match( $ext_preg, $part ) ) {\n\t\t\t\t\t$allowed = true;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif ( !$allowed )\n\t\t\t\t$filename .= '_';\n\t\t}\n\t}\n\t$filename .= '.' . $extension;\n\n\treturn $filename;\n}", "function sanitize_filename($string) {\n return sanitize($string, FALSE);\n}", "function miniva_get_sanitize_callback( $type ) {\n\tswitch ( $type ) {\n\t\tcase 'text':\n\t\t\treturn 'sanitize_text_field';\n\t\tcase 'textarea':\n\t\t\treturn 'sanitize_textarea_field';\n\t\tcase 'color':\n\t\t\treturn 'sanitize_hex_color';\n\t\tcase 'radio':\n\t\tcase 'radio-image':\n\t\tcase 'select':\n\t\t\treturn 'miniva_sanitize_select';\n\t\tcase 'checkbox':\n\t\t\treturn 'miniva_sanitize_checkbox';\n\t\tdefault:\n\t\t\treturn 'sanitize_text_field';\n\t}\n}", "function sanitize_filename($filename, $forceextension=\"\"){\n /*\n * 1. Remove leading and trailing dots\n * 2. Remove dodgy characters from filename, incl. spaces & dots except last.\n * 3. Force extension if specified\n */\n $defaultfilename = \"none\";\n $accept =\"[^0-9a-zA-Z_-]\";//allow alphanum,underscore,parentheses and hyphen\n $filename = preg_replace(\"/^[.]*/\",\"\",$filename); // lose any leading dots\n $filename = preg_replace(\"/[.]*$/\",\"\",$filename); // lose any trailing dots\n $filename = $filename?$filename:$defaultfilename; // if filename is blank...\n $lastdotpos=strrpos($filename, \".\"); // save last dot position\n $filename = preg_replace(\"/$accept/\",\"_\",$filename); //filter to accepted\n $afterdot = \"\";\n if ($lastdotpos !== false) { // Split into name and extension, if any.\n $beforedot = substr($filename, 0, $lastdotpos);\n if ($lastdotpos < (strlen($filename) - 1)) {\n $afterdot = substr($filename, $lastdotpos + 1);\n }\n } else {\n // no extension\n $beforedot = $filename;\n }\n if ($forceextension) {\n $filename = $beforedot . \".\" . $forceextension;\n } else if($afterdot) {\n $filename = $beforedot . \".\" . $afterdot;\n } else {\n $filename = $beforedot;\n }\n return $filename;\n}", "function wpforms_settings_image_callback( $args ) {\n\n\t$default = isset( $args['default'] ) ? esc_html( $args['default'] ) : '';\n\t$value = wpforms_setting( $args['id'], $default );\n\t$id = wpforms_sanitize_key( $args['id'] );\n\t$output = '';\n\n\tif ( ! empty( $value ) ) {\n\t\t$output .= '<img src=\"' . esc_url_raw( $value ) . '\">';\n\t}\n\n\t$output .= '<input type=\"text\" id=\"wpforms-setting-' . $id . '\" name=\"' . $id . '\" value=\"' . esc_url_raw( $value ) . '\">';\n\t$output .= '<button class=\"wpforms-btn wpforms-btn-md wpforms-btn-light-grey\">' . esc_html__( 'Upload Image', 'wpforms-lite' ) . '</button>';\n\n\tif ( ! empty( $args['desc'] ) ) {\n\t\t$output .= '<p class=\"desc\">' . wp_kses_post( $args['desc'] ) . '</p>';\n\t}\n\n\treturn $output;\n}", "function add_userpic_fields() {\n global $user_ID, $image_extensions;\n \n // build extension check string for the js\n $image_extensions_array = explode(' ', $image_extensions);\n $checkstr = \"\";\n foreach ($image_extensions_array as $count => $exe) {\n $checkstr .= \"(ext != '.$exe') && \";\n }\n $checkstr = rtrim($checkstr, ' && ');\n \n // HTML GUI, js changes form encoding and adds error check\n ?>\n <script type=\"text/javascript\" language=\"javascript\">//<![CDATA[\n function uploadPic() {\n document.profile.enctype = \"multipart/form-data\";\n var upload = document.profile.picture.value;\n upload = upload.toLowerCase();\n var ext = upload.substring((upload.lastIndexOf('.'));\n if (<?php _e($checkstr) ?>){\n alert('Please upload an image with one of the following extentions: <?php _e($image_extensions); ?>');\n }\n }\n //]]></script>\n <fieldset>\n <legend>Profile Picture</legend>\n <p>\n <label>Current:\n <div><img src=\"<?php _e(author_image_path($user_ID)); ?>\" width=\"150\" /></div>\n </label>\n </p>\n <p><label>Upload a New Picture: <input type=\"file\" name=\"picture\" onchange=\"uploadPic();\" /></label></p>\n </fieldset>\n <?php\n}", "function vB_BbCodeParser_ImgCheck(&$registry, $tag_list = array(), $append_custom_tags = true)\n\t{\n\t\tparent::vB_BbCodeParser($registry, $tag_list, $append_custom_tags);\n\n\t\t// change all unparsable tags to use the unparsable callback\n\t\t// [img] and [attach] tags are not parsed via the normal parser\n\t\tforeach ($this->tag_list['option'] AS $tagname => $info)\n\t\t{\n\t\t\tif (isset($this->tag_list['option'][\"$tagname\"]))\n\t\t\t{\n\t\t\t\t$this->tag_list['option'][\"$tagname\"]['callback'] = 'handle_unparsable';\n\t\t\t\tunset($this->tag_list['option'][\"$tagname\"]['html']);\n\t\t\t}\n\t\t}\n\n\t\tforeach ($this->tag_list['no_option'] AS $tagname => $info)\n\t\t{\n\t\t\tif (isset($this->tag_list['no_option'][\"$tagname\"]))\n\t\t\t{\n\t\t\t\t$this->tag_list['no_option'][\"$tagname\"]['callback'] = 'handle_unparsable';\n\t\t\t\tunset($this->tag_list['no_option'][\"$tagname\"]['html']);\n\t\t\t}\n\t\t}\n\t}", "function imageExtension($image)\n{\n if (!empty($image['name'])){\n $name = $image['name'];\n $arr = explode('.', $name);\n $end = end($arr);\n return strtolower($end);\n }\n return false;\n}", "function checkimgexist($img, $type) {\n global $tconfig;\n $country_temp = 'IN';\n $img_temp = $img;\n if (!file_exists($tconfig[\"tpanel_path\"] . $img)) {\n if ($type == 1) {\n $img_temp = $tconfig[\"tsite_url\"] . \"webimages/icons/DefaultImg/\" . strtolower($country_temp) . \"_r.png\";\n } else {\n $img_temp = $tconfig[\"tsite_url\"] . \"webimages/icons/DefaultImg/\" . strtolower($country_temp) . \"_s.png\";\n }\n } else {\n $img_temp = $tconfig[\"tsite_url\"] . $img;\n }\n return $img_temp;\n}", "private function isAllowedImageExtension( &$data )\n {\n if(preg_match(\"/\\.(gif|jpg|png)$/i\",$data['postData']['name']))\n {\n return TRUE;\n }\n \n return FALSE;\n }", "function img($data){\n extract($data);\n if(!isset($noview)) $noview = '';\n if(!isset($edit)) {$edit = false;}\n if(!isset($cols)) $cols = 6;\n if(!isset($required)) $required = \"\";\n if(!isset($name)) $name = \"image\";\n if(!isset($imgFrame)) $imgFrame = true;\n\n if(!isset($transAttr)) $transAttr = false;\n if(!isset($transval)) $transval = '';\n\n if($transAttr)\n $transval = trans('validation.attributes.'.$name);\n else\n $transval = ($transval) ? $transval : trans('main.'.$trans);\n\n\n if($imgFrame){\n return imgFrame($data);\n }\n\n // $value = getvalue($name, $edit, $childe);\n $value = getvalue($name, $edit);\n $upload = ($edit)? '-upload':'';\n $src = getSrc($edit, $name, $childe);\n $create = ($edit)? \"\": 'create';\n\n $html = '\n <div class=\"col-md-'.$cols.'\">\n <div class=\"form-group '.$create.' uploadbtnDiv\">\n <label for=\"'.$name.'\">'.$transval.'\n <img id=\"thumb\" class=\"thumb-sm'.$upload.'\" src=\"'.$src.'\" alt=\"\" accept=\"image/x-png, image/gif, image/jpeg\">\n </label>\n <input '.$required.' type=\"file\" accept=\"image/x-png, image/gif, image/jpeg\"\n name=\"'.$name.'\" id=\"'.$name.'\" class=\"'.$name.' showupload uploadbtn\">\n <p class=\"inputNotes\">'.trans('main.AllowedImageExtensions').' (jpg, png, gif) </p>\n ';\n\n $html .=getErrors($errors, $name, $noview).'\n </div>\n </div>\n ';\n\n return $html;\n}", "function statsocial_upload_image( $statsocial_max_upload_size, $statsocial_max_width, $statsocial_allow_file_type ) {\n\n global $statsocial_max_upload_size, $statsocial_max_width, $statsocial_allow_file_type;\n $upload_info = wp_upload_dir();\n $propaty = '';\n $width = '';\n $height = '';\n $type = '';\n $attr = '';\n\n if ( isset( $_POST[ 'statsocial_upload' ] ) ) {\n\n if ( !isset( $_REQUEST[ '_wpnonce' ] ) ) {\n\n $result = esc_html__( \"Cannot be trusted data\", \"statsocial\" );\n return array( false, $result );\n } else {\n\n if ( !wp_verify_nonce( $_REQUEST[ '_wpnonce' ], 'update-options2' ) ) {\n $result = esc_html__( \"Can not Upload Security issue\", \"statsocial\" );\n return array( false, $result );\n }\n }\n\n if ( isset( $_POST[ 'purpose' ] ) && ( 'header' == $_POST[ 'purpose' ] || 'footer' == $_POST[ 'purpose' ] ) ) {\n\n $save_dir = $upload_info[ 'path' ] . '/statsocial-item';\n $propaty = $propaty . '-' . sanitize_key( $_POST[ 'purpose' ] );\n } else {\n\n $result = esc_html__( \"purpose no data\", \"statsocial\" );\n return array( false, $result );\n }\n\n if ( isset( $_POST[ 'style' ] ) && ( 'norepeat' == $_POST[ 'style' ] || 'repeatx' == $_POST[ 'style' ] ) ) {\n\n $style = $_POST[ 'style' ];\n $propaty = $propaty . '-style-' . sanitize_key( $_POST[ 'style' ] );\n } else {\n\n $result = esc_html__( \"style no data\", \"statsocial\" );\n return array( false, $result );\n }\n\n if ( isset( $_POST[ 'position-top' ] ) && is_numeric( $_POST[ 'position-top' ] ) ) {\n\n $top = $_POST[ 'position-top' ];\n $propaty = $propaty . '-top-' . sanitize_key( $_POST[ 'position-top' ] );\n } else {\n\n $result = esc_html__( \"position top no data\", \"statsocial\" );\n return array( false, $result . 'c' );\n }\n\n if ( isset( $_POST[ 'position-left' ] ) && is_numeric( $_POST[ 'position-left' ] ) ) {\n\n $left = $_POST[ 'position-left' ];\n $propaty = $propaty . '-left-' . sanitize_key( $_POST[ 'position-left' ] ) . '-';\n } else {\n\n $result = esc_html__( \"position no data\", \"statsocial\" );\n return array( false, $result );\n }\n\n if ( isset( $_POST[ 'height' ] ) && is_numeric( $_POST[ 'height' ] ) ) {\n\n $height = $_POST[ 'height' ];\n $propaty = $propaty . 'x-height-' . sanitize_key( $_POST[ 'height' ] ) . '-';\n } else {\n\n $result = esc_html__( \"box height no data\", \"statsocial\" );\n return array( false, $result );\n }\n\n if ( $_FILES[ 'uploadfile' ][ 'size' ] > $statsocial_max_upload_size ) {\n\n $result = \"file size over\" . $_FILES[ 'uploadfile' ][ 'size' ] . 'upload-image-size' . $statsocial_max_upload_size;\n return array( false, $result );\n }\n\n if ( false == in_array( $_FILES[ 'uploadfile' ][ 'type' ], $statsocial_allow_file_type ) ) {\n\n $result = sprintf( esc_html__( '%s is not permitted filetype.', \"statsocial\" ), $_FILES[ 'uploadfile' ][ 'type' ] ) . implode( ',', $statsocial_allow_file_type );\n return array( false, $result );\n }\n\n if ( !function_exists( 'wp_handle_upload' ) ) {\n\n $result = sprintf( esc_html__( '%s function is not exists', \"statsocial\" ), 'wp_handle_upload' );\n return array( false, $result );\n }\n\n $uploadedfile = $_FILES[ 'uploadfile' ];\n $upload_overrides = array( 'test_form' => false, );\n\n function statsocial_theme_upload_filename( $filename ) {\n\n $info = pathinfo( $filename );\n $ext = empty( $info[ 'extension' ] ) ? '' : '.' . $info[ 'extension' ];\n $name = basename( $filename, $ext );\n $propaty = 'statsocial-item';\n\n if ( isset( $_POST[ 'purpose' ] ) && ( 'header' == $_POST[ 'purpose' ] || 'footer' == $_POST[ 'purpose' ] ) ) {\n\n $propaty = $propaty . '-' . sanitize_key( $_POST[ 'purpose' ] );\n }\n\n if ( isset( $_POST[ 'style' ] ) && ( 'norepeat' == $_POST[ 'style' ] || 'repeatx' == $_POST[ 'style' ] ) ) {\n\n $style = $_POST[ 'style' ];\n $propaty = $propaty . '-style-' . sanitize_key( $_POST[ 'style' ] );\n }\n\n if ( isset( $_POST[ 'position-top' ] ) && is_numeric( $_POST[ 'position-top' ] ) ) {\n\n $top = $_POST[ 'position-top' ];\n $propaty = $propaty . '-top-' . sanitize_key( $_POST[ 'position-top' ] );\n }\n\n if ( isset( $_POST[ 'position-left' ] ) && is_numeric( $_POST[ 'position-left' ] ) ) {\n\n $left = $_POST[ 'position-left' ];\n $propaty = $propaty . '-left-' . sanitize_key( $_POST[ 'position-left' ] ) . '-';\n }\n\n if ( isset( $_POST[ 'height' ] ) && is_numeric( $_POST[ 'height' ] ) ) {\n\n $height = $_POST[ 'height' ];\n $propaty = $propaty . 'x-height-' . sanitize_key( $_POST[ 'height' ] ) . '-';\n }\n\n return $propaty . $name . $ext;\n }\n\n add_filter( 'sanitize_file_name', 'statsocial_theme_upload_filename', 10 );\n\n\n if ( ( $test = wp_handle_upload( $uploadedfile, $upload_overrides ) ) ) {\n\n if ( isset( $test[ 'error' ] ) ) {\n\n $result = $test[ 'error' ];\n return array( false, $result );\n }\n\n if ( file_exists( $save_dir . $_FILES[ 'uploadfile' ][ 'name' ] ) ) {\n\n chmod( $save_dir . $_FILES[ 'uploadfile' ][ 'name' ], 0644 );\n list( $width, $height, $type, $attr ) = getimagesize( $save_dir . $_FILES[ 'uploadfile' ][ 'name' ] );\n\n if ( $statsocial_max_width < $width || $height > $statsocial_max_width * 1.5 ) {\n\n unlink( $save_dir . $_FILES[ 'uploadfile' ][ 'name' ] );\n $result = sprintf( esc_html__( \"%d px * %d width too big. limit %d px\", \"statsocial\" ), $width, $height, $statsocial_max_width );\n return array( false, $result . 'g' );\n }\n }\n\n $uploaded_url = $upload_info[ 'url' ] . '/statsocial-item' . $propaty . $_FILES[ 'uploadfile' ][ 'name' ];\n $new_settings = get_option( 'statsocial_theme_settings' );\n\n if ( 'header' == $_POST[ 'purpose' ] ) {\n\n $new_settings[ 'statsocial_header_image' ] = 'statsocial-item' . $propaty . $_FILES[ 'uploadfile' ][ 'name' ];\n } elseif ( 'footer' == $_POST[ 'purpose' ] ) {\n\n $new_settings[ 'statsocial_footer_image' ] = 'statsocial-item' . $propaty . $_FILES[ 'uploadfile' ][ 'name' ];\n }\n\n update_option( 'statsocial_theme_settings', $new_settings );\n return array( true, 'success', $uploaded_url, $width, $height, true );\n } else {\n\n $result = esc_html__( \"It failed in up-loading.\", \"statsocial\" );\n\n foreach ( $_FILES[ 'userfile' ][ 'error' ] as $error ) {\n\n $result .= $error;\n }\n return array( false, $result );\n }\n }\n}", "function check_image_type_array($source_pic)\n{\n switch ($source_pic) {\n case 'image/gif':\n return true;\n break;\n\n case 'image/jpeg':\n return true;\n break;\n\n case 'image/png':\n return true;\n break;\n\n case 'image/wbmp':\n return true;\n break;\n\n default:\n return false;\n break;\n }\n}", "function validatePicture($fieldname)\n{\n $error = '';\n if (!empty($_FILES[$fieldname]['error'])) {\n switch ($_FILES[$fieldname]['error']) {\n case '1':\n $error = 'Upload maximum file is '.number_format(IMG_UPLOAD_MAX_SIZE/1024,2).' MB.';\n break;\n case '2':\n $error = 'File is too big, please upload with smaller size.';\n break;\n case '3':\n $error = 'File uploaded, but only halef of file.';\n break;\n case '4':\n $error = 'There is no File to upload';\n break;\n case '6':\n $error = 'Temporary folder not exists, Please try again.';\n break;\n case '7':\n $error = 'Failed to record File into disk.';\n break;\n case '8':\n $error = 'Upload file has been stop by extension.';\n break;\n case '999':\n default:\n $error = 'No error code avaiable';\n }\n } elseif (empty($_FILES[$fieldname]['tmp_name']) || $_FILES[$fieldname]['tmp_name'] == 'none') {\n $error = 'There is no File to upload.';\n } elseif ($_FILES[$fieldname]['size'] > IMG_UPLOAD_MAX_SIZE) {\n $error = 'Upload maximum file is '.number_format(IMG_UPLOAD_MAX_SIZE/1024,2).' MB.';\n } else {\n //$get_ext = substr($_FILES[$fieldname]['name'],strlen($_FILES[$fieldname]['name'])-3,3);\t\n $cekfileformat = check_image_type($_FILES[$fieldname]);\n if (!$cekfileformat) {\n $error = 'Upload Picture only allow (jpg, gif, png)';\n }\n }\n\n return $error;\n}", "public function normaliseExtension() {\r\n\t\t$this->imageExtension = strtolower (end(explode(\".\",$this->file[\"name\"])));\r\n\t}", "function check_image_type($source_pic)\n{\n $image_info = check_mime_type($source_pic);\n\n switch ($image_info) {\n case 'image/gif':\n return true;\n break;\n\n case 'image/jpeg':\n return true;\n break;\n\n case 'image/png':\n return true;\n break;\n\n case 'image/wbmp':\n return true;\n break;\n\n default:\n return false;\n break;\n }\n}", "function get_theme_img_code($type,$allow_skip=false,$field_file='file',$field_choose='theme_img_code',$db=NULL)\n{\n\tif (is_null($db)) $db=$GLOBALS['SITE_DB'];\n\n\t// TODO: Image won't upload to central site. So perhaps we should not allow uploads if not editing on central site.\n\n\tif ((substr($type,0,4)=='ocf_') && (file_exists(get_file_base().'/themes/default/images/avatars/index.html'))) // Allow debranding of theme img dirs\n\t{\n\t\t$type=substr($type,4);\n\t}\n\n\trequire_code('uploads');\n\tif ((is_swf_upload()) || (((array_key_exists($field_file,$_FILES)) && (is_uploaded_file($_FILES[$field_file]['tmp_name'])))))\n\t{\n\t\t$urls=get_url('',$field_file,'themes/default/images_custom',0,OCP_UPLOAD_IMAGE,false);\n\n\t\t$theme_img_code=$type.'/'.uniqid('',true);\n\n\t\t$db->query_insert('theme_images',array('id'=>$theme_img_code,'theme'=>'default','path'=>$urls[0],'lang'=>get_site_default_lang()));\n\n\t\tpersistant_cache_delete('THEME_IMAGES');\n\t} else\n\t{\n\t\t$theme_img_code=post_param($field_choose,'');\n\n\t\tif ($theme_img_code=='')\n\t\t{\n\t\t\tif ($allow_skip) return '';\n\t\t\twarn_exit(do_lang_tempcode('IMPROPERLY_FILLED_IN_UPLOAD'));\n\t\t}\n\t}\n\treturn $theme_img_code;\n}", "function checkimage($checkname, $custom='')\n {\n global $admin, $resize, $MESSAGE;\n\n if ($custom == '0') {$custom = '';}\n if (isset($_FILES[$checkname]['tmp_name']) && $_FILES[$checkname]['tmp_name'] != '')\n {\n // Get real filename and set new filename\n $filename = $_FILES[$checkname]['name'];\n $new_filename = WB_PATH . MEDIA_DIRECTORY . '/calendar/'.$filename;\n $st_filename = WB_URL . MEDIA_DIRECTORY . '/calendar/'.$filename;\n // Make kinda sure the image is an image - there should be something better then just to test extention\n $file4 = strtolower(substr($filename, -4, 4));\n if (($file4 != '.jpg') and ($file4 != '.png') and ($file4 != 'jpeg')) {\n $admin->print_error($MESSAGE['GENERIC_FILE_TYPE'].' JPG (JPEG) or PNG a');\n }\n // Make sure the target directory exists\n make_dir(WB_PATH . MEDIA_DIRECTORY . '/calendar');\n // Upload image\n move_uploaded_file($_FILES[$checkname]['tmp_name'], $new_filename);\n // Check if we need to create a thumb\n if ($resize != 0)\n {\n // Resize the image\n $thumb_location = WB_PATH . MEDIA_DIRECTORY . '/calendar/thumb'.$filename . '.jpg';\n if (make_thumb($new_filename, $thumb_location, $resize))\n {\n // Delete the actual image and replace with the resized version\n unlink($new_filename);\n rename($thumb_location, $new_filename);\n }\n }\n $custom = $st_filename;\n } //\n $sContent = ReplaceAbsoluteMediaUrl($custom);\n return $sContent;\n }", "function unamuno_gravatar_filter($avatar, $id_or_email, $size, $default, $alt) {\n // display unamuno_custom_avatar\n $custom_avatar = get_the_author_meta('unamuno_custom_avatar');\n if ( is_singular( 'post' ) && ($custom_avatar)) {\n $return = '<amp-img src=\"'.$custom_avatar.'\" width=\"'.$size.'\" height=\"'.$size.'\" alt=\"author avatar\" class=\"avatar\"></amp-img>';\n }\n elseif ($avatar) {\n $return = $avatar;\n }\n else {\n $return = '<amp-img src=\"'.$default.'\" width=\"'.$size.'\" height=\"'.$size.'\" alt=\"'.$alt.'\"></amp-img>';\n }\n return $return;\n}", "function main_image_upload_callback() {\n\t$options = (array) get_option('main_image');\n if( isset($options['main_image']['custom'])) {\n $html = '<input type=\"hidden\" id=\"main_image_upload\" name=\"main_image_attachment_id\" value=\"' . $options['main_image']['custom']['id'] .'\" data-url=\"'. $options['main_image']['custom']['url'] .'\"/>';\n submit_button( __( 'Remove current (use default)' ), 'button', 'remove_main_image', false );\n } else {\n\t $html = '<input type=\"file\" name=\"main_image\" /><p class=\"help\">'._('The image should be over 500px tall, but less than 2MB. A well-compressed 500K image is ideal').'</p>';\n }\n\techo $html;\n}", "public function accept_images($input) {\n\n\t\t$input = '<input name=\"input_12\" id=\"input_1_12\" type=\"file\" class=\"large\" aria-describedby=\"extensions_message_1_12\" onchange=\"javascript:gformValidateFileSize( this, 5242880 );\" tabindex=\"2\" accept=\"images/*\" capture=\"camera\">';\n\t\treturn $input;\n\t}", "function portal_sanitize_file_name($file_name, $suffix = '', $content_type = '') {\n\t\n\t// the extension is based on the content type if specified, on the original file name if not, and by default .unk\n\n\t$extension = portal_get_file_extension($file_name, $content_type);\n\t\n\t$sanitized = strtolower($file_name);\n\n\t// remove extension from filename if there\n\n\t$sanitized = str_replace($extension, '', $sanitized);\n\t\n\t// remove non-alpha-numeric characters from filename\n\t\n\t$sanitized = preg_replace('~[^-_a-z0-9]~', '', $sanitized);\n\t\n\t// add suffix if applicable\n\t\n\tif ($suffix != '') {\n\t\t$sanitized = $sanitized . '-' . $suffix;\n\t}\n\t\n\t// add extension\n\t\n\t$sanitized = $sanitized . '.' . $extension;\n\t\n\treturn $sanitized;\n\n}", "function clemo_image($img, $alt, $v = '') {\n\n if (isset($img['url']) && !empty($img)) {\n $i = $img['url'];\n $v = \"<img src=\" . $i . \" alt=\" . $alt . \" />\";\n }\n\n return $v;\n}" ]
[ "0.6349571", "0.6061584", "0.60551435", "0.60411775", "0.60279465", "0.5899055", "0.587006", "0.5820282", "0.5819299", "0.57947236", "0.5775544", "0.57725143", "0.56511104", "0.5633838", "0.5592557", "0.5540309", "0.5511799", "0.54977256", "0.54914147", "0.54900825", "0.5469137", "0.54609674", "0.5460256", "0.5447099", "0.5415844", "0.53773826", "0.5370432", "0.53677976", "0.535703", "0.5327717" ]
0.71331084
0
NoHTML sanitization callback example. Sanitization: nohtml Control: text, textarea, password Sanitization callback for 'nohtml' type text inputs. This callback sanitizes `$nohtml` to remove all HTML. NOTE: wp_filter_nohtml_kses() can be passed directly as `$wp_customize>add_setting()` 'sanitize_callback'. It is wrapped in a callback here merely for example purposes.
function mdlwp_sanitize_nohtml( $nohtml ) { return wp_filter_nohtml_kses( $nohtml ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function noHTML($input, $encoding = 'UTF-8'){\n\t\n return htmlspecialchars($input, ENT_QUOTES | ENT_HTML5, $encoding);\n}", "function mdlwp_sanitize_html( $html ) {\n\treturn wp_filter_post_kses( $html );\n}", "function sanitization_filters() {\n\t\tgenesis_add_option_filter( 'no_html', $this->settings_field,\n\t\t\tarray(\n\t\t\t\t'uvasom_section_type',\n\t\t\t\t'uvasom_site_type',\n\t\t\t) );\n\t}", "function no_html( $new_value ) {\n\n\t\treturn strip_tags( $new_value );\n\n\t}", "function sanitization_filters() {\n\t\t\n\t\tgenesis_add_option_filter( 'no_html', $this->settings_field,\n\t\t\tarray(\n\t\t\t\t'application_url',\n\t\t\t\t'company_nmls',\n\t\t\t\t'individual_nmls',\n\t\t\t\t'address',\n\t\t\t\t'phone',\n\t\t\t\t'company_selector',\n\t\t\t\t'website_type',\n\t\t\t\t'include_homepage_blog',\n\t\t\t\t'facebook_url',\n\t\t\t\t'twitter_url',\n\t\t\t\t'linkedin_url',\n\t\t\t\t'googleplus_url',\n\t\t\t\t'phone_checkbox',\n\t\t\t\t'locations_checkbox',\n\t\t\t) );\n\n\t\tgenesis_add_option_filter( 'safe_html', $this->settings_field,\n\t\t\tarray(\n\t\t\t\t'disclaimer',\n\t\t\t\t'locations_page',\n\t\t\t) );\n\t}", "function business_no_sanitize( $input ) {\n}", "function safeHtml($html) {\r\n\t$html = preg_replace_callback('!<(script|object|embed)[^>]*>.*?</\\1>!s', 'encodeHtml', $html);\r\n\t// Remove potentially dangerous attributes: all those starting with 'on'\r\n\t$html = preg_replace_callback('!<[a-zA-Z]+\\s+([a-zA-Z]+(\\s*=\\s*([\"\\']).*?\\3\\s*)?)+>!s', 'stripAttribs', $html);\r\n\treturn $html;\r\n}", "function ca_options_text_callback($input){\n\t\t$input['text'] = wp_filter_nohtml_kses($input['text']);\n\t\treturn $input;\n\t}", "function unfilter_html_tags( $value, $field_args, $field ) {\n /*\n * Do your custom sanitization.\n * strip_tags can allow whitelisted tags\n * http://php.net/manual/en/function.strip-tags.php\n */\n $value = strip_tags( $value, '<p><a><br><br/><span>' );\n\n return $value;\n}", "function acf_allow_unfiltered_html() {\n\t\n\t// Check capability.\n\t$allow_unfiltered_html = current_user_can('unfiltered_html');\n\t\n\t/**\n\t * Filters whether the current user is allowed to save unfiltered HTML.\n\t *\n\t * @date\t9/1/19\n\t * @since\t5.7.10\n\t *\n\t * @param\tbool allow_unfiltered_html The result.\n\t */\n\treturn apply_filters( 'acf/allow_unfiltered_html', $allow_unfiltered_html );\n}", "function remove_html($html, $allowable_tags=NULL)\n{\n\t$nohtml = $html;\n\n\t/** HTML-Markup optimizations before stripping HTML */\n\t$nohtml = str_ireplace('&nbsp;', ' ', $nohtml); // Replace every %nbsp; with a space\n\t$nohtml = str_ireplace('<p>', ' <p>', $nohtml); // Add a preceeding space to every <p>\n\t$nohtml = str_ireplace('&amp;', '&', $nohtml); // Replace every %amp; with &\n\t$nohtml = preg_replace('/(<\\/h\\d+.*?>)/', \"$1 \".PHP_EOL, $nohtml); // Add space and line-break after every heading-Tag (</h1>, </h2>, </h3>,...)\n\t$nohtml = preg_replace('/(<\\/p.*?>)/', \" $1\".PHP_EOL, $nohtml); // Add space and line-break after every </p>-Tag\n\t$nohtml = preg_replace('/(<li.*?>)/', \"$1 \", $nohtml); // Add a preceeding space and line-break to every <li>\n\t$nohtml = preg_replace('/(<br\\s?\\/?>)/', \"$1 \".PHP_EOL, $nohtml); // Add space and line-break after every <br>-Tag\n\t$nohtml = preg_replace('/\\s+/', ' ', trim($nohtml)); // Remove unneccessary and duplicate whitespaces\n\n\t/** Strip unwanted HTML-tags from $html */\n\t$nohtml = strip_tags($nohtml, $allowable_tags); // Strip HTML-Tags, except defined in $allowable_tags\n\t$nohtml = str_ireplace(array('http://', 'https://'), '', $nohtml); // Strip \"lonely\" HTML-Tag parts\n\n\treturn $nohtml;\n}", "private function ignoreNoscripts($html)\r\n {\r\n return preg_replace('#<noscript>(?:.+)</noscript>#Umsi', '', $html);\r\n }", "function sanitization_filters() {\n\n\t\tgenesis_add_option_filter( 'safe_html', $this->settings_field,\n\t\t\tarray(\n\t\t\t\t'footer-left',\n\t\t\t\t'footer-right',\n\t\t\t\t'disclaimer'\n\t\t\t) );\n\t}", "function generate_premium_sanitize_html( $input ) \n{\n\treturn wp_kses_post( $input );\n}", "function contactF_htmlchk($string, $html)\n{\n if ($html == \"no\") {\n $string = htmlentities($string, ENT_QUOTES);\n $string = stripslashes($string);\n }\n return $string;\n}", "private function hide_noscripts( string $html ): string {\n\t\t$replace = preg_replace( '#<noscript[^>]*>.*?<\\/noscript\\s*>#mis', '', $html );\n\n\t\tif ( null === $replace ) {\n\t\t\treturn $html;\n\t\t}\n\n\t\treturn $replace;\n\t}", "public function core_filter_geoFilter_replaceDisallowedHtml($html)\n {\n //This is called on most, if not all, user input for listing details.\n //If you wanted to remove something from the listing details at the\n //point the listing is being placed, this would be a good way to do it.\n\n //FILTER Text here.\n $filtered_html = $html;\n\n return $filtered_html;\n }", "public function html_tags_callback() {\n\t\t$defaultTagsToKeep = '<h2><h3><h4><h5><ul><ol><li>';\n\t\tprintf( \n\t\t\t'<input class=\"widefat\" type=\"text\" id=\"tags_to_keep\" name=\"maxicharts_option[tags_to_keep]\" value=\"%s\" />',\n\t\t\tisset( $this->options['tags_to_keep'] ) ? esc_attr( $this->options['tags_to_keep'] ) : $defaultTagsToKeep );\n\t}", "public function no_html( $new_value ) {\n\t\treturn strip_tags( $new_value );\n\t}", "function unfiltered_or_safe_html( $new_value, $old_value ) {\n\n\t\tif ( current_user_can( 'unfiltered_html' ) ) {\n\t\t\treturn $new_value;\n\t\t}\n\n\t\treturn wp_kses_post( $new_value );\n\n\t}", "function tfc_nathan_small_sanitize_text( $input ) {\r\n return esc_attr( $input );\r\n}", "public function unfiltered_or_safe_html( $new_value ) {\n\t\tif ( current_user_can( 'unfiltered_html' ) ) {\n\t\t\treturn $new_value;\n\t\t}\n\n\t\treturn wp_kses_post( $new_value );\n\t}", "function phutil_safe_html($string) {\n if ($string == '') {\n return $string;\n } else if ($string instanceof PhutilSafeHTML) {\n return $string;\n } else {\n return new PhutilSafeHTML($string);\n }\n}", "public function sanitize( $html ) {\n\t\treturn \\strip_tags( $html, '<h1><h2><h3><h4><h5><h6><br><ol><ul><li><a><p><b><strong><i><em>' );\n\t}", "function safe_html( $new_value ) {\n\n\t\treturn wp_kses_post( $new_value );\n\n\t}", "function sanitize_input($input){\n return str_replace(\" \", \"\", strip_tags($input));\n}", "function stripProperHTML ($input){\n if(!is_array($input)) {\n $input = stripslashes($input);\n $table = get_html_translation_table(HTML_ENTITIES);\n $table = array_flip($table);\n return strtr($input, $table);\n } else {\n array_walk($input, 'stripProperHTML');\n }\n }", "function theme_options_validate( $input ) {\n\n\t// Say our text option must be safe text with no HTML tags\n\t$input['twitter'] = wp_filter_nohtml_kses( $input['twitter'] );\n\t$input['facebook'] = wp_filter_nohtml_kses( $input['facebook'] );\n\t$input['instagram'] = wp_filter_nohtml_kses( $input['instagram'] );\n\t$input['flickr'] = wp_filter_nohtml_kses( $input['flickr'] );\n\t$input['linkedin'] = wp_filter_nohtml_kses( $input['linkedin'] );\n\t$input['youtube'] = wp_filter_nohtml_kses( $input['youtube'] );\n\t$input['vimeo'] = wp_filter_nohtml_kses( $input['vimeo'] );\n\t$input['pinterest'] = wp_filter_nohtml_kses( $input['pinterest'] );\n\n\treturn $input;\n}", "function sanitizer_filters() {\n\t\t\n\t\t$one_zero = array(\n\t\t\t\t'googlePlus',\n\t\t\t\t'facebook',\n\t\t\t\t'twitter',\n\t\t\t\t'pinterest',\n\t\t\t\t'linkedin',\n\t\t\t\t'stumbleupon',\n\t\t\t\t'general_show_archive',\n\t\t\t);\n\t\t\t\n\t\t$post_types = get_post_types( array( 'public' => true, ) );\n\t\t\t\n\t\tforeach( $post_types as $post_type ){\n\t\t\t$one_zero[] = 'general_' . $post_type;\n\t\t}\n\t\t\n\t\tgenesis_add_option_filter(\n\t\t\t'one_zero',\n\t\t\t$this->settings_field,\n\t\t\t$one_zero\n\t\t);\n\n\t\tgenesis_add_option_filter(\n\t\t\t'no_html',\n\t\t\t$this->settings_field,\n\t\t\tarray(\n\t\t\t\t'general_size',\n\t\t\t\t'general_position',\n\t\t\t\t'general_appearance',\n\t\t\t\t'twitter_id',\n\t\t\t)\n\t\t);\n\n\t\tgenesis_add_option_filter(\n\t\t\t'url',\n\t\t\t$this->settings_field,\n\t\t\tarray(\n\t\t\t\t'image_url',\n\t\t\t)\n\t\t);\n\t\t\n\t}", "protected function get_sanitize_callback() {\n\t\treturn function ( $items ) {\n\t\t\treturn $this->filter_dismissed_items( $items );\n\t\t};\n\t}" ]
[ "0.6631441", "0.64523196", "0.6396267", "0.6085326", "0.59974813", "0.5987609", "0.5970321", "0.5942777", "0.5787191", "0.57561415", "0.5747963", "0.5738644", "0.5642298", "0.5627298", "0.5614351", "0.5596934", "0.5553579", "0.55232763", "0.54668343", "0.5425151", "0.53589135", "0.535773", "0.5353645", "0.5324243", "0.5323007", "0.52940184", "0.5235723", "0.5227427", "0.51967454", "0.5196196" ]
0.81710476
0
Number sanitization callback example. Sanitization: number_absint Control: number Sanitization callback for 'number' type text inputs. This callback sanitizes `$number` as an absolute integer (whole number, zero or greater). NOTE: absint() can be passed directly as `$wp_customize>add_setting()` 'sanitize_callback'. It is wrapped in a callback here merely for example purposes.
function mdlwp_sanitize_number_absint( $number, $setting ) { // Ensure $number is an absolute integer (whole number, zero or greater). $number = absint( $number ); // If the input is an absolute integer, return it; otherwise, return the default return ( $number ? $number : $setting->default ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function themeslug_sanitize_number_absint( $number, $setting ) {\n $number = absint( $number );\n\n // If the input is an absolute integer, return it; otherwise, return the default\n return ( $number ? $number : $setting->default );\n}", "function haven_sanitize_number_absint( $number, $setting ) {\n\t// Ensure $number is an absolute integer (whole number, zero or greater).\n\t$number = absint( $number );\n\t\n\t// If the input is an absolute integer, return it; otherwise, return the default\n\treturn ( $number ? $number : $setting->default );\n}", "function clean_number( $value )\n{\n return is_numeric( $value ) ? $value : null;\n}", "function mdlwp_sanitize_number_range( $number, $setting ) {\n\t\n\t// Ensure input is an absolute integer.\n\t$number = absint( $number );\n\t\n\t// Get the input attributes associated with the setting.\n\t$atts = $setting->manager->get_control( $setting->id )->input_attrs;\n\t\n\t// Get minimum number in the range.\n\t$min = ( isset( $atts['min'] ) ? $atts['min'] : $number );\n\t\n\t// Get maximum number in the range.\n\t$max = ( isset( $atts['max'] ) ? $atts['max'] : $number );\n\t\n\t// Get step.\n\t$step = ( isset( $atts['step'] ) ? $atts['step'] : 1 );\n\t\n\t// If the number is within the valid range, return it; otherwise, return the default\n\treturn ( $min <= $number && $number <= $max && is_int( $number / $step ) ? $number : $setting->default );\n}", "public static function sanitize_number( $input, $setting ){\n\t \t$sanitized_text = sanitize_text_field( $input );\n\t \t# If the input is an number, return it; otherwise, return the default\n\t \treturn ( is_numeric( $sanitized_text ) ? $sanitized_text : $setting->default );\n\t }", "function validateint($raw_int)\r\n{\r\n return (filter_var($raw_int,FILTER_VALIDATE_INT)); \r\n}", "function valint($raw_int){\n \n return filter_var($raw_int, FILTER_VALIDATE_INT);\n \n}", "function cleanup_int($input_int) {\n\n $input_int = intval($input_int);\n\n return $input_int;\n\n}", "function royal_sanitize_number( $input ) {\n\t\t\treturn floatval( $input );\n\t\t}", "protected function sanitizeInteger(string $value): string\r\n {\r\n return filter_var($value, FILTER_SANITIZE_NUMBER_INT);\r\n }", "function sanitize_integer($int_val, $max_int, $min_int=0, $reset_default=0) {\n $error_strg = \"\";\n $err_flag = 0;\n if (! isset($max_int)) {\n $max_int = PHP_INT_MAX;\n }\n while ($err_flag < 1) {\n try {\n $len_max_int = strlen((string)$max_int);\n $result_arr = sanitize_string(addslashes((string)$int_val), \n $len_max_int,\n True);\n if (strlen($result_arr[0]) > 0) {\n $error_strg .= \"Problem with integer conversion for checking: \";\n $error_strg .= $result_arr[0];\n $err_flag = 1;\n }\n }\n catch (Exception $e) {\n $error_strg .= \"Problem with integer conversion for checking. \";\n $error_strg .= $e->getMessage() . \". \";\n $err_flag = 1;\n }\n if (! ctype_digit($test_strg)) {\n $error_strg .= \"There is an invalid character in a value meant to \";\n $error_strg .= \"be a type integer. \";\n $err_flag = 1;\n }\n try {\n $int_val = (int)$int_val;\n }\n catch (Exception $e) {\n $error_strg .= \"There was an invalid integer valued entered. \";\n $error_strg .= $e->getMessage() . \". \";\n $err_flag = 1;\n }\n if (($int_val > $max_int) || ($int_val < $min_int)) {\n $error_strg .= \"An integer value was outside the allowed range \";\n $error_strg .= \" and has been reset to \" . $reset_default . \". \";\n $err_flag = 1;\n }\n break;\n } // End of while loop.\n if ($err_flag > 0) {\n $int_val = $reset_default;\n }\n return array($error_strg, $int_val); \n }", "function clean_int( $input ){\n //get the DB connection from outside this function\n global $db;\n\n $output = filter_var( $input, FILTER_SANITIZE_NUMBER_INT );\n $output = mysqli_real_escape_string( $db, $output );\n\n return $output;\n}", "function val_int($raw_int){ //$cl_age = val_int($_POST['age']);\n\n return filter_var($raw_int, FILTER_VALIDATE_INT);\n\n }", "function check_number($string) {\n\nif (!filter_var($string, FILTER_SANITIZE_NUMBER_INT)) {\n\treturn \"ERROR\";\n\t}\n\telse\n\t{\n\treturn (int)$string;\n\t}\n\t}", "function number_check($num) {\n // Sanitize or takes everything but a number out.\n $num = filter_var($num, FILTER_SANITIZE_NUMBER_FLOAT, FILTER_FLAG_ALLOW_FRACTION);\n // Validate or makes sure it is a number.\n $num = filter_var($num, FILTER_VALIDATE_FLOAT);\n return $num;\n}", "public static function sanitizePhoneNumber($value){\n # eliminate every char except 0-9\n $phoneNum = filter_var($value, FILTER_SANITIZE_NUMBER_INT);\n # Remove \"-\" from number\n $phoneNum = str_replace(\"-\", \"\", $phoneNum);\n # remove 237 or 00237 or +237\n if( substr($phoneNum, 0, 3)=='237'){\n $phoneNum = self::strReplaceFirst('237', '', $phoneNum, 1);\n }\n if( substr($phoneNum, 0, 4)=='+237'){\n $phoneNum = self::strReplaceFirst('+237', '', $phoneNum, 1);\n }\n if( substr($phoneNum, 0, 5)=='00237'){\n $phoneNum = self::strReplaceFirst('00237', '', $phoneNum, 1);\n }\n if( substr($phoneNum, 0, 4)=='0237'){\n $phoneNum = self::strReplaceFirst('0237', '', $phoneNum, 1);\n }\n //eliminate leading 1 if its there\n if ( strlen($phoneNum) > 9 ){\n $phoneNum = substr($phoneNum, 0, 9);\n } elseif ( strlen($phoneNum) < 9 ) {\n return 'invalid';\n } else {\n return $phoneNum;\n }\n }", "public static function business_directory_sanitize_number($value) {\n $value = preg_replace(\"/[^0-9+ ]/\", \"\", $value);\n return $value;\n }", "public function sanitizeValue($value) {\n\t\tif(is_int($value) || ctype_digit(\"$value\")) return (int) $value; \n\t\tif(empty($value)) return '';\n\t\treturn strtotime($value);\n\t}", "function validate_number_field( $validity, $value ) {\r\n $value = intval( $value );\r\n if ( $value < 10 ) {\r\n $validity->add( 'too_small', __( 'Number is too small.' ) );\r\n } elseif ( $value > 100 ) {\r\n $validity->add( 'too_big', __( 'Number is too big.' ) );\r\n }\r\n return $validity;\r\n }", "function isNumber($var)\n{\n return filter_var($var,FILTER_VALIDATE_INT); \n}", "function validate_int ($key, $min, $max, $display=0)\n{\n if (0 == $display)\n $display = $key;\n\n $value = trim ($_POST[$key]);\n if (! is_numeric ($value))\n return display_error (\"You must specify a number between $min and $max for $display\");\n\n if ($value < $min)\n return display_error (\"$display must be greater than $min\");\n\n if ($value > $max)\n return display_error (\"$display must be less than $max\");\n\n return TRUE;\n}", "function crp_sanitize_numbercsv_field( $value ) {\n\n\treturn implode( ',', array_filter( array_map( 'absint', explode( ',', sanitize_text_field( wp_unslash( $value ) ) ) ) ) );\n}", "function intAbs($number)\n{\n\treturn (int)str_replace('-','',(string)$number);\n}", "function generate_premium_sanitize_decimal_integer( $input ) {\n\treturn abs( floatval( $input ) );\n}", "function clean_int($int)\n{\n\t$int += 0;\n\tif (!is_int($int)) return false;\n\tif ($int < 0) return false;\n\treturn $int;\n}", "static function cleanInteger($integer) {\n return preg_replace(\"/[^0-9-]/\", \"\", $integer);\n }", "function isNbValid($number)\n{\n if (is_int($number) ===false) {\n // si non, convertir en nombre entier\n $number = intval($number);\n }\n return $number;\n \n}", "public function normalizeNumber(string $number) : string;", "function absint( $maybeint ) {\n\treturn abs( intval( $maybeint ) );\n}", "function clean_phonenumber($num) {\n $num = str_replace(array(' ', '-', '(', ')', '+','.'), '', $num);\n if(strpos($num, '00') === 0) $num = substr($num, 2); // remove leading 00 (int'd dialing prefix)\n return $num;\n}" ]
[ "0.7494177", "0.74144965", "0.6555243", "0.6474729", "0.6306328", "0.6087555", "0.6067604", "0.6040037", "0.5991492", "0.5967075", "0.591244", "0.584016", "0.5769161", "0.5758203", "0.5687069", "0.561426", "0.5599088", "0.5525351", "0.55078167", "0.5487481", "0.5479511", "0.54508775", "0.5438272", "0.5420031", "0.5415018", "0.5400882", "0.53737545", "0.5372709", "0.5335118", "0.5334668" ]
0.74919814
1
Number Range sanitization callback example. Sanitization: number_range Control: number, tel Sanitization callback for 'number' or 'tel' type text inputs. This callback sanitizes `$number` as an absolute integer within a defined minmax range.
function mdlwp_sanitize_number_range( $number, $setting ) { // Ensure input is an absolute integer. $number = absint( $number ); // Get the input attributes associated with the setting. $atts = $setting->manager->get_control( $setting->id )->input_attrs; // Get minimum number in the range. $min = ( isset( $atts['min'] ) ? $atts['min'] : $number ); // Get maximum number in the range. $max = ( isset( $atts['max'] ) ? $atts['max'] : $number ); // Get step. $step = ( isset( $atts['step'] ) ? $atts['step'] : 1 ); // If the number is within the valid range, return it; otherwise, return the default return ( $min <= $number && $number <= $max && is_int( $number / $step ) ? $number : $setting->default ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function validator_range($field, $min, $max, $string_code = STRING_VALIDATE_RANGE) {\n return function ($val) use ($min, $max, $field, $string_code) {\n if ($val < $min || $val > $max) {\n return get_string_format($string_code, $field, $min, $max);\n }\n return null;\n };\n}", "public static function sanitize( $number, $units, $min = null, $max = null ) {\n\t\t$decoded_number = self::decode( $number );\n\t\t$units = self::decode_units( $units );\n\t\t$cur_units = current( $units );\n\t\tif ( in_array( $decoded_number['units'], $units, true ) ) {\n\t\t\t$cur_units = $decoded_number['units'];\n\t\t}\n\t\t$cur_val = (int) $decoded_number['val'];\n\t\tif ( $min !== null ) {\n\t\t\t$cur_val = max( $cur_val, $min );\n\t\t}\n\t\tif ( $max !== null ) {\n\t\t\t$cur_val = min( $cur_val, $max );\n\t\t}\n\n\t\treturn array(\n\t\t\t'val' => $cur_val,\n\t\t\t'units' => $cur_units,\n\t\t);\n\t}", "private static function validateNumberOrRange($number, $min_value, $max_value=INF){\n\n $result=false;\n\n if (filter_var($number, FILTER_VALIDATE_INT)===0 || !filter_var($number, FILTER_VALIDATE_INT)===false) //number provided\n {\n if ($number>=$min_value && $number<=$max_value)\n {\n $result=true;\n }\n else\n {\n $result=false;\n }\n }\n\n if (stristr($number, \"-\")) //range provided\n {\n $numbers_array=explode(\"-\", $number);\n if (filter_var($numbers_array[0], FILTER_VALIDATE_INT)===0 || !filter_var($numbers_array[0], FILTER_VALIDATE_INT)===false && filter_var($numbers_array[1], FILTER_VALIDATE_INT)===0 || !filter_var($numbers_array[1], FILTER_VALIDATE_INT)===false)\n {\n if ($numbers_array[0]>=$min_value && $numbers_array[1]<=$max_value && $numbers_array[0]<=$numbers_array[1])\n {\n $result=true;\n }\n else\n {\n $result=false;\n }\n }\n }\n\n return $result;\n }", "function cleanNumber($value,$min=0,$max=100) {\n $value = preg_replace('/\\D/','',$value);\n return max(min($value,$max),$min);\n }", "public function testRange(): void\n {\n $validator = new Validator();\n $this->assertProxyMethod($validator, 'range', [1, 4], [1, 4]);\n $this->assertNotEmpty($validator->validate(['username' => 5]));\n\n $fieldName = 'field_name';\n $rule = 'range';\n $expectedMessage = 'The provided value must be between `1` and `4`, inclusively';\n $range = [1, 4];\n $this->assertValidationMessage($fieldName, $rule, $expectedMessage, $range);\n }", "function ts_number_within_range($num, $min = 1, $max = 100)\n{\n // make sure max & min are placed correctly\n if($min > $max) list($min, $max) = array($max, $min);\n return ($num >= $min && $num <= $max) ? true : false;\n}", "function validate_field_range($field_value, array &$field, array $params): bool\r\n{\r\n if ($field_value >= $params['min'] && $field_value <= $params['max']) {\r\n return true;\r\n } else {\r\n $field['error'] = \"Netinkamas skaičius skaičius turi būti nuo {$params['min']} iki {$params['max']}\";\r\n return false;\r\n }\r\n}", "protected function normalizeNumberOption(array &$options)\n {\n if (isset($options['in'])) {\n if (\n is_array($options['in']) &&\n isset($options['in'][0]) &&\n isset($options['in'][1])\n ) {\n list($options['min'], $options['max']) = $options['in'];\n }\n unset($options['in']);\n }\n }", "function numericValidator($input, $minValue, $maxValue, $defaultValue)\r\n{\r\n//$variableName = numericValidator($variableName, min, max, default);\r\n//If you do not wish to pass a value, just pass a null string \"\" instead.\r\n\r\n\t//First, let's trim any possible white space that may have been left accidentally\r\n\t$input = trim($input);\r\n\r\n\t//Have to check this against \"0\" as well, otherwise skins break\r\n\tif(empty($input) && $input !== \"0\")\r\n\t{\r\n\t\t//No input given! Assume default value.\r\n\t\treturn $defaultValue;\r\n\t}\r\n\r\n\t//Make sure we actually got a number\r\n\t$input = floatval($input);\r\n\t\r\n\t//Did the user pass a minvalue? If not, move on.\r\n\tif ($minValue != \"\" && $input < $minValue)\r\n\t{\r\n\t\t$input = $minValue;\r\n\t}\r\n\t//Did the user pass a maxvalue? If not, move on.\r\n\telseif ($maxValue != \"\" && $input > $maxValue)\r\n\t{\r\n\t\t$input = $maxValue;\r\n\t}\r\n\r\n\treturn $input;\r\n}", "public function testRange($number, $min, $max, $expected)\n\t{\n\t\t$this->AssertSame(\n\t\t\t$expected,\n\t\t\tValidate::range($number, $min, $max)\n\t\t);\n\t}", "public static function validateRange(IControl $control, array $range): bool\n\t{\n\t\t$range = array_map(function ($v) {\n\t\t\treturn $v === '' ? null : $v;\n\t\t}, $range);\n\t\treturn Validators::isInRange($control->getValue(), $range);\n\t}", "public function isInRange($name, $min, $max, $msg, $callback = null);", "public function validRange($value,$args)\n {\n if($value==\"\")\n return true;\n\n $args = explode(',', $args);\n $args_count = count($args);\n if($args_count!=2 ){\n $this->form_validation->set_message('validRange', _l(\"Missing some arguments for validation rules.\", $this));\n return false;\n }\n $min = $args[0];\n $max = $args[1];\n\n if(!preg_match('/^[0-9]+\\-[0-9]+$/', $value)){\n $this->form_validation->set_message('validRange', _l(\"The {field} has not contain valid number range.\", $this));\n return false;\n }\n\n $numbers = explode('-', $value);\n if($numbers[0]<$min || $numbers[0]>$max){\n $this->form_validation->set_message('validRange', _l(\"The minimum selected of {field} is out of range.\", $this));\n return false;\n }\n if($numbers[1]<$min || $numbers[1]>$max){\n $this->form_validation->set_message('validRange', _l(\"The maximum selected of {field} is out of range.\", $this));\n return false;\n }\n if($numbers[0]>$numbers[1]){\n $this->form_validation->set_message('validRange', _l(\"The minimum selected of {field} is bigger than minimum.\", $this));\n return false;\n }\n\n return true;\n }", "function validate_field_range (string $field_value, array &$field, array $params): ?bool\n{\n\tif ((intval($field_value) < $params['min']) || (intval($field_value) > $params['max'])) {\n\t\t$field['error'] = strtr('Laukelio vertė turi būti @from iki @to', [\n\t\t\t'@from' => $params['min'],\n\t\t\t'@to' => $params['max']\n\t\t]);\n\t\treturn false;\n\t} else {\n\t\treturn true;\n\t}\n}", "function validate_int ($key, $min, $max, $display=0)\n{\n if (0 == $display)\n $display = $key;\n\n $value = trim ($_POST[$key]);\n if (! is_numeric ($value))\n return display_error (\"You must specify a number between $min and $max for $display\");\n\n if ($value < $min)\n return display_error (\"$display must be greater than $min\");\n\n if ($value > $max)\n return display_error (\"$display must be less than $max\");\n\n return TRUE;\n}", "function sanitize_integer($int_val, $max_int, $min_int=0, $reset_default=0) {\n $error_strg = \"\";\n $err_flag = 0;\n if (! isset($max_int)) {\n $max_int = PHP_INT_MAX;\n }\n while ($err_flag < 1) {\n try {\n $len_max_int = strlen((string)$max_int);\n $result_arr = sanitize_string(addslashes((string)$int_val), \n $len_max_int,\n True);\n if (strlen($result_arr[0]) > 0) {\n $error_strg .= \"Problem with integer conversion for checking: \";\n $error_strg .= $result_arr[0];\n $err_flag = 1;\n }\n }\n catch (Exception $e) {\n $error_strg .= \"Problem with integer conversion for checking. \";\n $error_strg .= $e->getMessage() . \". \";\n $err_flag = 1;\n }\n if (! ctype_digit($test_strg)) {\n $error_strg .= \"There is an invalid character in a value meant to \";\n $error_strg .= \"be a type integer. \";\n $err_flag = 1;\n }\n try {\n $int_val = (int)$int_val;\n }\n catch (Exception $e) {\n $error_strg .= \"There was an invalid integer valued entered. \";\n $error_strg .= $e->getMessage() . \". \";\n $err_flag = 1;\n }\n if (($int_val > $max_int) || ($int_val < $min_int)) {\n $error_strg .= \"An integer value was outside the allowed range \";\n $error_strg .= \" and has been reset to \" . $reset_default . \". \";\n $err_flag = 1;\n }\n break;\n } // End of while loop.\n if ($err_flag > 0) {\n $int_val = $reset_default;\n }\n return array($error_strg, $int_val); \n }", "public static function normalizeIpRange($range)\r\n\t{\r\n\t\t$iStart = null;\r\n\t\t$iEnd = null;\r\n\t\r\n\t\tif ( strpos( $range, \"-\" ) !== false )\r\n\t\t{\r\n\t\t\t// range expressed with start and stop addresses\r\n\t\r\n\t\t\t$arrLocalRange = explode( \"-\", $range );\r\n\t\r\n\t\t\t$iStart = self::normalizeIpAddress( str_replace( \"*\", \"000\", $arrLocalRange[0]) );\r\n\t\t\t$iEnd = self::normalizeIpAddress( str_replace( \"*\", \"255\", $arrLocalRange[1]) );\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t// range expressed with wildcards\r\n\t\r\n\t\t\t$strStart = str_replace( \"*\", \"000\", $range );\r\n\t\t\t$strEnd = str_replace( \"*\", \"255\", $range );\r\n\t\r\n\t\t\t$iStart = self::normalizeIpAddress( $strStart );\r\n\t\t\t$iEnd = self::normalizeIpAddress( $strEnd );\r\n\t\t}\r\n\t\r\n\t\treturn array($iStart,$iEnd);\r\n\t}", "function _checkNum($actual, $fieldname, $minmax, $min, $max)\n {\n $len=strlen($actual);\n switch($minmax)\n {\n case \"min\":\n if($len<$min)\n {\n $this->_errors[$this->_counter] = $fieldname.' is too short.';\n $this->_counter++;\n return false;\n }\n else\n {\n return true;\n }\n break;\n case \"max\":\n if($len>$max)\n {\n $this->_errors[$this->_counter] = $fieldname.' is too long.';\n $this->_counter++;\n return false;\n }\n else\n {\n return true;\n }\n break;\n case \"inside\":\n if($len<$min || $len>$max)\n {\n $this->_errors[$this->_counter] = $fieldname.' is outside of value range.';\n $this->_counter++;\n return false;\n }\n break;\n }\n }", "function validate_number_field( $validity, $value ) {\r\n $value = intval( $value );\r\n if ( $value < 10 ) {\r\n $validity->add( 'too_small', __( 'Number is too small.' ) );\r\n } elseif ( $value > 100 ) {\r\n $validity->add( 'too_big', __( 'Number is too big.' ) );\r\n }\r\n return $validity;\r\n }", "public function validateRange($var, $minRange = MIN_DEFAULT_RANGE_PRICES, $maxRange = MAX_DEFAULT_RANGE_PRICES)\n {\n if (preg_match(\"/^[\\d]{\" . $minRange . \", \" . $maxRange . \"}$/\", trim($var))) {\n return true;\n }\n\n return false;\n }", "private function validate_num($num, $field, $min = 0, $max = 1E99)\n\t{\t\n\t\tif ($num < $min || $num > $max)\n\t\t{\n\t\t\treturn 'The ' . $field . ' needs to be a number between ' . $min . ' and ' . $max;\n\t\t}\n\n\t\treturn false;\n\t}", "public function numberRange($value, $high, $low)\n {\n // return false if user input is lower than parameter $low ($low will be equal to 0 when function numberRange will be called)\n if ($value < $low) return false;\n\n // return false if user input is greater than parameter $high ($high will be equal to 99 when function numberRange will be called)\n if ($value > $high) return false;\n // If the user input is greater than or equal to $low (0) and less than or equal to $high (99)...\n //... makes it a numeric value with a state of true\n if ($value >= $low && $value <= $high) return is_numeric($value);\n\n return true;\n }", "public function handle_filter_range_requests( $comment_query ) {\n\t\tif ( isset( $_REQUEST['cpac_filter-min'] ) ) {\n\t\t\t$comment_query->meta_query->queries[] = $this->get_meta_query_range( $_REQUEST['cpac_filter-min'], $_REQUEST['cpac_filter-max'] );\n\t\t}\n\n\t\treturn $comment_query;\n\t}", "function has_number($value, $options=[])\n{\n if (!is_numeric($value)) {\n return false;\n }\n if (isset($options['max']) && ($value > (int)$options['max'])) {\n return false;\n }\n if (isset($options['min']) && ($value < (int)$options['min'])) {\n return false;\n }\n return true;\n}", "public static function mustBeBetween($num,$min,$max,$msg=NULL,$exCode=0){\n\n\t\t\t\t$num\t=\tstatic::cast($num);\n\t\t\t\t$min\t=\tstatic::cast($min);\n\t\t\t\t$max\t=\tstatic::cast($max);\n\n\t\t\t\tif($num >= $min && $num <= $max){\n\n\t\t\t\t\treturn $num;\n\n\t\t\t\t}\n\n\t\t\t\t$msg\t=\tempty($msg)\t?\t\"Number $num is not between $min and $max\"\t:\t$msg;\n\n\t\t\t\tthrow new \\apf\\exception\\Validate($msg);\n\n\t\t\t}", "public function check_numeric_input( $input=array() ) {\n\t $success = false;\n\t if ( is_numeric($input['val'] ) ) {\n\t if ( $input['min'] > $input['val'] || $input['max'] < $input['val'] ) {\n\t $success = false;\n\t }\n\t $success = true;\n\t }\n\t return $success;\n\t}", "public function numberBetween($value, $range)\n {\n $min = $range[0];\n $max = $range[1];\n \n if ((preg_match(\"/^[-+]?[0-9]*\\.?[0-9]+$/\", $value)) && $value >= $min && $value <= $max) {\n return true;\n }\n return false;\n }", "function clean_number( $value )\n{\n return is_numeric( $value ) ? $value : null;\n}", "function validateInteger($value, $message = null, $lowerLimit = null, $upperLimit = null) {\n\n $value = abs(intval($value));\n\n if($lowerLimit != null AND $value < $lowerLimit) {\n ($message != null) ? addError($message) : null;\n return false;\n }\n\n if($upperLimit != null AND $value > $upperLimit) {\n ($message != null) ? addError($message) : null;\n return false;\n }\n\n return true;\n}", "public static function sanitizePhoneNumber($value){\n # eliminate every char except 0-9\n $phoneNum = filter_var($value, FILTER_SANITIZE_NUMBER_INT);\n # Remove \"-\" from number\n $phoneNum = str_replace(\"-\", \"\", $phoneNum);\n # remove 237 or 00237 or +237\n if( substr($phoneNum, 0, 3)=='237'){\n $phoneNum = self::strReplaceFirst('237', '', $phoneNum, 1);\n }\n if( substr($phoneNum, 0, 4)=='+237'){\n $phoneNum = self::strReplaceFirst('+237', '', $phoneNum, 1);\n }\n if( substr($phoneNum, 0, 5)=='00237'){\n $phoneNum = self::strReplaceFirst('00237', '', $phoneNum, 1);\n }\n if( substr($phoneNum, 0, 4)=='0237'){\n $phoneNum = self::strReplaceFirst('0237', '', $phoneNum, 1);\n }\n //eliminate leading 1 if its there\n if ( strlen($phoneNum) > 9 ){\n $phoneNum = substr($phoneNum, 0, 9);\n } elseif ( strlen($phoneNum) < 9 ) {\n return 'invalid';\n } else {\n return $phoneNum;\n }\n }" ]
[ "0.6382236", "0.5926221", "0.58985245", "0.5834313", "0.56575865", "0.5578723", "0.55660117", "0.5555635", "0.5529526", "0.5450561", "0.5448422", "0.544715", "0.5440315", "0.5360819", "0.53144586", "0.53143734", "0.5307677", "0.52779084", "0.52723306", "0.5265635", "0.5255882", "0.5178223", "0.5170252", "0.5124609", "0.51074135", "0.5100047", "0.50901765", "0.5054219", "0.5043883", "0.5008721" ]
0.6800362
0
URL sanitization callback example. Sanitization: url Control: text, url Sanitization callback for 'url' type text inputs. This callback sanitizes `$url` as a valid URL. NOTE: esc_url_raw() can be passed directly as `$wp_customize>add_setting()` 'sanitize_callback'. It is wrapped in a callback here merely for example purposes.
function mdlwp_sanitize_url( $url ) { return esc_url_raw( $url ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function me_rb4_sanitize_customizer_url( $input ) {\n\treturn esc_url( $input );\n}", "function sanitize_url($string) {\n return urlencode(mb_strtolower(sanitize($string, FALSE)));\n}", "public function sanitizeUrl($url)\n {\n if (strpos($url, 'http') === false) {\n $url = 'http://' . $url;\n }\n\n return $url;\n }", "public static function business_directory_sanitize_url($value) {\n $value = esc_url($value);\n return $value;\n }", "public static function sanitize($url, $dropUserInfo = false)\n {\n $url = (string)$url;\n\n /* The implementation of this method is an exact replica of \\DDTrace\\Util\\Normalizer::urlSanitize() - and has to\n * be kept in sync - until \\DDTrace\\Util\\Normalizer::urlSanitize() will be removed as part of the PHP->C\n * migration.\n *\n * Definition of unreserved and sub-delims in https://datatracker.ietf.org/doc/html/rfc3986#page-18\n * Note: this implementation detects the following false positives and sanitize them even if they are valid and\n * should not be sanitized (see: https://datatracker.ietf.org/doc/html/rfc3986#section-3.3)\n * - path fragments like /before/<something>:@<anything>/after => /before/?:@<anything>/after\n * - path fragments like /before/<something>:<something>@<anything>/after => /before/?:?@<anything>/after\n * However, given how rare they are and the fact that we over-sanitize (rather than under-sanitize), it is\n * believed that this represents a good trade-off between correctness and complexity.\n */\n $userinfoPattern = \"[a-zA-Z0-9\\-._~!$&'()*+,;=%?]+\";\n /* \\ /\\ /||\n * \\ / \\ / |↳ supports urls that might already be sanitized\n * \\ / \\_____/ ↳ percent escape (hexadecimal already included in 'unreserved')\n * \\______/ ↳ sub-delims https://datatracker.ietf.org/doc/html/rfc3986#section-2.2\n * ↳ unreserved https://datatracker.ietf.org/doc/html/rfc3986#section-2.3\n */\n\n $sanitizedUserinfo = preg_replace(\n [\n \"/{$userinfoPattern}:@/\",\n \"/{$userinfoPattern}:{$userinfoPattern}@/\",\n ],\n [\n $dropUserInfo ? '' : '<sanitized>:@',\n $dropUserInfo ? '' : '<sanitized>:<sanitized>@',\n ],\n /*\n * Skip the query string. There can only be one question mark as it is a reserved word\n * and only allowed between path and query.\n * See: https://datatracker.ietf.org/doc/html/rfc3986#section-3\n */\n $url\n );\n\n return \\str_replace('<sanitized>', '?', strstr($sanitizedUserinfo, '?', true) ?: $sanitizedUserinfo);\n }", "function sanitizerUrl($param) {\n $strip = array(\"~\", \"`\", \"!\", \"@\", \"#\", \"$\", \"%\", \"^\", \"&\", \"*\", \"(\", \")\", \"[\", \"{\", \"]\",\"}\", \"\\\\\", \"|\", \";\", \":\", \"\\\"\", \"'\", \"&#8216;\", \"&#8217;\", \"&#8220;\", \"&#8221;\", \"&#8211;\", \"&#8212;\",\"—\", \"–\", \",\", \"<\", \".\", \">\", \"/\", \"?\");\n // $strip = array(\"~\", \"`\", \"^\", \"\\\\\", \"\\\"\", \"/\");\n $clean = trim(str_replace($strip, \"\", strip_tags($param)));\n\treturn $clean;\n}", "public static function sanitizeUrl($url, $protocols = null)\n\t{\n\t\treturn esc_url_raw((string)$url,$protocols);\n\t}", "function validateURL($field){\n $field = filter_var($field, FILTER_SANITIZE_URL);\n if(filter_var($field, FILTER_VALIDATE_URL)){\n return \"\";\n }else{\n return \"Invalided URL \";\n }\n}", "function esc_url($url) {\n \n if ('' == $url) {\n return $url;\n }\n \n $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\\|*\\'()\\\\x80-\\\\xff]|i', '', $url);\n \n $strip = array('%0d', '%0a', '%0D', '%0A');\n $url = (string) $url;\n \n $count = 1;\n while ($count) {\n $url = str_replace($strip, '', $url, $count);\n }\n \n $url = str_replace(';//', '://', $url);\n \n $url = htmlentities($url);\n \n $url = str_replace('&amp;', '&#038;', $url);\n $url = str_replace(\"'\", '&#039;', $url);\n \n if ($url[0] !== '/') {\n // We're only interested in relative links from $_SERVER['PHP_SELF']\n return '';\n } else {\n return $url;\n }\n}", "function esc_url( $url, $protocols = null, $_context = 'display' ) {\n $original_url = $url;\n\n if ( '' == $url )\n return $url;\n $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\\|*\\'()\\\\x80-\\\\xff]|i', '', $url);\n $strip = array('%0d', '%0a', '%0D', '%0A');\n $url = _deep_replace($strip, $url);\n $url = str_replace(';//', '://', $url);\n /* If the URL doesn't appear to contain a scheme, we\n * presume it needs http:// appended (unless a relative\n * link starting with /, # or ? or a php file).\n */\n if ( strpos($url, ':') === false && ! in_array( $url[0], array( '/', '#', '?' ) ) &&\n ! preg_match('/^[a-z0-9-]+?\\.php/i', $url) )\n $url = 'http://' . $url;\n\n // Replace ampersands and single quotes only when displaying.\n if ( 'display' == $_context ) {\n $url = wp_kses_normalize_entities( $url );\n $url = str_replace( '&amp;', '&#038;', $url );\n $url = str_replace( \"'\", '&#039;', $url );\n }\n\n if ( ! is_array( $protocols ) )\n $protocols = wp_allowed_protocols();\n if ( wp_kses_bad_protocol( $url, $protocols ) != $url )\n return '';\n\n return apply_filters('clean_url', $url, $original_url, $_context);\n}", "function esc_url( $value ) {\n $GLOBALS['wp_functions']['esc_url'] = true;\n return $value;\n }", "public function sanitizeExternalUrl($url)\n {\n return TextParser::sanitizeExternalUrl($url);\n }", "function cricket_sanitize_twitter_handler($input) {\r\n $output = sanitize_text_field( $input );\r\n $output = str_replace('@', '', $output);\r\n return $output;\r\n}", "private function _sanitizeUrl($url)\n\t{\n\t\t//unset($_GET);\n\t\t\n\t\t$url = rtrim($url, '/');\n\t\t$url = strip_tags($url);\n\t\t\n\t\treturn $url;\n\t}", "function options_sanitize($options){\r\n //debugbreak();\r\n $feedsmart_url = trim($options['feedsmart_url']);\r\n if ($feedsmart_url != '' && false === strpos($feedsmart_url, '://')) {\r\n $feedsmart_url = 'http://' . $feedsmart_url;\r\n }\r\n $options['feedsmart_url'] = $feedsmart_url;\r\n\r\n $feedsmart_comments_url = trim($options['feedsmart_comments_url']);\r\n if ($feedsmart_comments_url != '' && false === strpos($feedsmart_comments_url, '://')) {\r\n $feedsmart_comments_url = 'http://' . $feedsmart_comments_url;\r\n }\r\n $options['feedsmart_comments_url'] = $feedsmart_comments_url;\r\n // do checks here\r\n if(is_array($options['catfeeds'])){\r\n foreach($options['catfeeds'] as $cat => $fburl){\r\n $options['catfeeds'][$cat] = trim($fburl);\r\n }\r\n }\r\n if(is_array($options['catsexclude'])){\r\n foreach($options['catsexclude'] as $key => $cat){\r\n $options['catsexclude'][$key] = intval($cat);\r\n }\r\n }\r\n return $options;\r\n }", "function magazinebook_color_escaping_option_sanitize( $input ) {\n\t$input = esc_attr( $input );\n\n\treturn $input;\n}", "function cmb2_slug_sanitize_callback( $override_value, $value ) {\r\n return remp_slugify( $value );\r\n}", "function miniva_get_sanitize_callback( $type ) {\n\tswitch ( $type ) {\n\t\tcase 'text':\n\t\t\treturn 'sanitize_text_field';\n\t\tcase 'textarea':\n\t\t\treturn 'sanitize_textarea_field';\n\t\tcase 'color':\n\t\t\treturn 'sanitize_hex_color';\n\t\tcase 'radio':\n\t\tcase 'radio-image':\n\t\tcase 'select':\n\t\t\treturn 'miniva_sanitize_select';\n\t\tcase 'checkbox':\n\t\t\treturn 'miniva_sanitize_checkbox';\n\t\tdefault:\n\t\t\treturn 'sanitize_text_field';\n\t}\n}", "function esc_url($url) {\n\n if ('' == $url) {\n return $url;\n }\n\n $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\\|*\\'()\\\\x80-\\\\xff]|i', '', $url);\n\n $strip = array('%0d', '%0a', '%0D', '%0A');\n $url = (string) $url;\n\n $count = 1;\n while ($count) {\n $url = str_replace($strip, '', $url, $count);\n }\n\n $url = str_replace(';//', '://', $url);\n\n $url = htmlentities($url);\n\n $url = str_replace('&amp;', '&#038;', $url);\n $url = str_replace(\"'\", '&#039;', $url);\n\n if ($url[0] !== '/') {\n // We're only interested in relative links from $_SERVER['PHP_SELF']\n return '';\n } else {\n return $url;\n }\n}", "public function register_meta_sanitize_callback( $value ) {\n\t\treturn $value;\n\t}", "abstract public function sanitize( $input );", "function sanitize($input) {\n\treturn $input;\n\n}", "function alfa_sanitize_twitter_handler($input){\n $output = sanitize_text_field($input);\n $output = str_replace('@','',$output);\n return $output;\n}", "function esc_url($url) {\n if ('' == $url) {\n return $url;\n }\n $url = preg_replace('|[^a-z0-9-~+_.?#=!&;,/:%@$\\|*\\'()\\\\x80-\\\\xff]|i', '', $url);\n $strip = array('%0d', '%0a', '%0D', '%0A');\n $url = (string) $url;\n $count = 1;\n while ($count) {\n $url = str_replace($strip, '', $url, $count);\n }\n $url = str_replace(';//', '://', $url);\n $url = htmlentities($url);\n $url = str_replace('&amp;', '&#038;', $url);\n $url = str_replace(\"'\", '&#039;', $url);\n if ($url[0] !== '/') {\n // We're only interested in relative links from $_SERVER['PHP_SELF']\n return '';\n } else {\n return $url;\n }\n}", "public function options_display_bypass_url_callback()\r\r\n\t{\r\r\n\t\t$options = $this->get_option( NULL );\r\r\n\t\t//set a default value if no value is set\r\r\n\t\t$placeholder = '';\r\r\n\t\tif( $options === FALSE || empty( $options['bypass_url'] ) )\r\r\n\t\t{\r\r\n\t\t\t$options['bypass_url'] = '';\r\r\n\t\t\t$placeholder = __( '(currently disabled)', IPFILTER_TEXTDOMAIN );\r\r\n\t\t}\r\r\n\t\t?>\r\r\n\r\r\n\t\t<input type='text'\r\r\n\t\t id='ipfilter_setting_bypass_url'\r\r\n\t\t name='ipfilter_options[bypass_url]'\r\r\n\t\t width='60'\r\r\n\t\t placeholder='<?php echo $placeholder; ?>'\r\r\n\t\t value='<?php echo esc_textarea( $options['bypass_url'] ); ?>' />\r\r\n\r\r\n\t\t<?php\r\r\n\t}", "function check_url($string) {\n\nif (!filter_var($string, FILTER_VALIDATE_URL)) {\n\treturn \"ERROR\";\n\t}\n\telse\n\t{\n\treturn $string;\n\t}\n\t}", "private function get_sanitize_callback( $args ) {\n\t\t\t$type = $args['field_type'];\n\t\t\tif ( ! empty( $args['sanitize'] ) ) {\n\t\t\t\treturn $args['sanitize'];\n\t\t\t} else {\n\t\t\t\tif ( 'text' === $type ) {\n\t\t\t\t\treturn 'sanitize_text_field';\n\t\t\t\t} elseif ( 'textarea' === $type ) {\n\t\t\t\t\treturn 'sanitize_textarea_field';\n\t\t\t\t} elseif ( 'checkbox' === $type ) {\n\t\t\t\t\treturn array( $this, 'sanitize_checkbox' );\n\t\t\t\t}\n\t\t\t}\n\n\t\t}", "protected function get_sanitize_callback() {\n\t\treturn function ( $items ) {\n\t\t\treturn $this->filter_dismissed_items( $items );\n\t\t};\n\t}", "public function sanitizeSrcsetUrl(string $url): string\r\n\t{\r\n\t\treturn strtr($url, [\r\n\t\t\t' ' => '%20',\r\n\t\t\t',' => '%2C'\r\n\t\t]);\r\n\t}", "protected function apply_sanitize_callback( $output, $value ) {\n\t\tif ( isset( $output['sanitize_callback'] ) && null !== $output['sanitize_callback'] ) {\n\n\t\t\t// If the sanitize_callback is invalid, return the value.\n\t\t\tif ( ! is_callable( $output['sanitize_callback'] ) ) {\n\t\t\t\treturn $value;\n\t\t\t}\n\t\t\treturn call_user_func( $output['sanitize_callback'], $this->value );\n\t\t}\n\t\treturn $value;\n\t}" ]
[ "0.6721393", "0.6510238", "0.6068578", "0.6019127", "0.58587456", "0.57982963", "0.57901686", "0.5771692", "0.5762396", "0.57351476", "0.57329714", "0.57117605", "0.5691595", "0.5670513", "0.5664684", "0.5639841", "0.56372696", "0.56371254", "0.56249946", "0.56230456", "0.5616429", "0.56160533", "0.560832", "0.56009394", "0.55960643", "0.55853045", "0.55747074", "0.5569535", "0.5554215", "0.55394757" ]
0.7717754
0
fonction pour ajouter un emprunt,qui attend un objet emprunt
public function addEmprunt(emprunt $emprunt) { $now = (new DateTime('now'))->format('Y-m-d H:i:s'); $query = $this->getDb()->prepare('INSERT INTO emprunt(idEmprunteur, idMateriel, dateEmprunt) VALUES( :idEmprunteur, :idMateriel, :dateEmprunt)'); $result = $query->execute(array( 'idEmprunteur' => $emprunt->getIdEmprunteur(), 'idMateriel' => $emprunt->getIdMateriel(), 'dateEmprunt' =>$now) ); $query->closeCursor(); return $result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function add(Emprunt $emprunt) {\n $q = $this->_db->prepare('INSERT INTO emprunt(id_livre, id_adherent, date_emprunt, date_retourmax, date_retour) VALUES(:id_livre, :id_adherent, :date_emprunt, :date_retourmax, :date_retour)');\n\n $q->bindValue(':id_livre', $emprunt->id_livre(), PDO::PARAM_INT);\n $q->bindValue(':id_adherent', $emprunt->id_adherent(), PDO::PARAM_INT);\n $q->bindValue(':date_emprunt', $emprunt->date_emprunt());\n $q->bindValue(':date_retourmax', $emprunt->date_retourmax());\n $q->bindValue(':date_retour', $emprunt->date_retour());\n\n $q->execute();\n }", "private function ajoutObjectif()\n {\n if ($this->module->viewAllCoachs[$this->context->employee->id_profile]) {\n if (Tools::isSubmit('oc_submit')) {\n $data = array(\n 'id_employee' => (int)Tools::getValue('oc_id_employee'),\n 'somme' => Tools::getValue('oc_somme'),\n 'commentaire' => pSQL(Tools::getValue('oc_commentaire')),\n 'heure_absence' => Tools::getValue('oc_heure'),\n 'jour_absence' => Tools::getValue('oc_jour'),\n 'jour_ouvre' => Tools::getValue('oc_jour_ouvre'),\n 'date_start' => Tools::getValue('oc_date_start'),\n 'date_end' => date('Y-m-d 23:59:59', strtotime(Tools::getValue('oc_date_end')))\n );\n if (!Validate::isInt($data['id_employee'])) {\n $this->errors[] = 'L\\'id de l\\'employee n\\'est pas valide';\n }\n if (!empty($data['somme']) && !Validate::isFloat(str_replace(',', '.', $data['somme']))) {\n $this->errors[] = 'La somme n\\'est pas valide';\n }\n if (!Validate::isString($data['commentaire'])) {\n $this->errors[] = 'Erreur du champ commentaire';\n }\n if (!empty($data['heure_absence']) && !Validate::isFloat(str_replace(',', '.', $data['heure_absence']))) {\n $this->errors[] = 'Erreur du champ heure d\\'absence';\n }\n if (!empty($data['jour_absence']) && !Validate::isInt($data['jour_absence'])) {\n $this->errors[] = 'Erreur du champ jour d\\'absence';\n }\n if (!empty($data['jour_ouvre']) && !Validate::isInt($data['jour_ouvre'])) {\n $this->errors[] = 'Erreur du champ jour ouvré';\n }\n if (!Validate::isDate($data['date_start'])) {\n $this->errors[] = 'Erreur du champ date début';\n }\n if (!Validate::isDate($data['date_end'])) {\n $this->errors[] = 'Erreur du champ date fin';\n }\n\n\n if (empty($this->errors)) {\n // Modifie\n if (Tools::getValue('oc_id')) {\n $data['id_objectif_coach'] = (int)Tools::getValue('oc_id');\n if (!Db::getInstance()->update(\n 'objectif_coach',\n $data,\n 'id_objectif_coach = ' . (int)Tools::getValue('oc_id')\n )\n ) {\n $this->errors[] = $this->l('Erreur lors de la mise à jour');\n }\n } else {\n // Insert\n if (!Db::getInstance()->insert('objectif_coach', $data)) {\n $this->errors[] = $this->l('Erreur lors de l\\'ajout.');\n }\n }\n if (empty($this->errors)) {\n $this->confirmation = $this->l('Enregistrement éffectué.');\n unset($_POST['oc_id_employee']);\n unset($_POST['oc_somme']);\n unset($_POST['oc_commentaire']);\n unset($_POST['oc_heure']);\n unset($_POST['oc_jour']);\n unset($_POST['oc_jour_ouvre']);\n unset($_POST['oc_date_start']);\n unset($_POST['oc_date_end']);\n unset($_POST['oc_id']);\n }\n }\n // Efface\n } elseif (Tools::isSubmit('del_oc')) {\n $id = (int)Tools::getValue('id_oc');\n if (!Db::getInstance()->delete('objectif_coach', 'id_objectif_coach = ' . $id)) {\n $this->errors[] = $this->l('Erreur lors de la suppression');\n } else {\n $this->confirmation = $this->l('Objectif supprimé.');\n }\n } elseif (Tools::isSubmit('mod_oc')) {\n $oc = CaTools::getObjectifById((int)Tools::getValue('id_oc'));\n $_POST['oc_id_employee'] = $oc['id_employee'];\n $_POST['oc_somme'] = $oc['somme'];\n $_POST['oc_commentaire'] = $oc['commentaire'];\n $_POST['oc_heure'] = $oc['heure_absence'];\n $_POST['oc_jour'] = $oc['jour_absence'];\n $_POST['oc_jour_ouvre'] = $oc['jour_ouvre'];\n $_POST['oc_date_start'] = $oc['date_start'];\n $_POST['oc_date_end'] = $oc['date_end'];\n $_POST['oc_id'] = $oc['id_objectif_coach'];\n }\n }\n\n $this->smarty->assign(array(\n 'errors' => $this->errors,\n 'confirmation' => $this->confirmation,\n ));\n }", "public function insert($entitie);", "function addEmployee(Employee $employee){\n $this->employees[] = $employee; \n }", "function ajouterProduit(){\r\n\t\r\n}", "private function ajouterAffichage()\n {\n // On recupère les listes de tous les vips\n $this->_vipManager = new VipManager();\n $vips = $this->_vipManager->getAllVipsEligible();\n\n // On recupère la liste de tous les hebergements\n $this->_hebergementManager = new HebergementManager();\n $hebergements = $this->_hebergementManager->getHebergements();\n\n // On recupère l'id maximum pour l'autoIncrement\n $this->_reservationManager = new ReservationManager();\n $maxId = $this->_reservationManager->recupereMaxId();\n\n // On crée et on affiche la vue en passant en parametre les variables dont on a besoin pour l'affichage\n $this->_view = new vue('ReservationAjout');\n $this->_view->generate(array('hebergements' => $hebergements, \n 'vips' => $vips,\n 'maxId' => $maxId\n ));\n }", "function ajoutertache()\n{\n $colonnemanager = new ColonneManager();\n $tachemanager = new TacheManager();\n \n //traitement formulaire de changement de colonne pour une tache\n if (!isset($_POST['description']))\n {\n throw new Exception('Description non renseign&eacute;e');\n }\n elseif(empty($_POST['description']))\n {\n throw new Exception('La description de la t&acirc;che ne peut pas &ecirc;tre vide!');\n }\n else\n {\n $description = strip_tags($_POST['description']);\n \n //on recuepre 1ere colonne\n $colonne = $colonnemanager->get_first_colonne();\n \n //on instancie une nouvelle tache\n $tache = new Tache([\n \"description\" => $description,\n \"id_colonne\" => $colonne->getId()\n ]);\n \n //on ajoute la tache dans la bdd\n $tachemanager->add_tache($tache);\n }\n \n //on recupere les colonnes\n $colonnes = $colonnemanager->get_colonnes();\n \n //on definit la vue et on retourne le resulat\n require('vue/vueAccueil.php');\n return $donnees_vue;\n}", "public function agregar_empleado($nombreEmpleado,$apellidopEmpleado,$apellidomEmpleado,$domicilioEmpleado,$numeroextEmpleado,$coloniaEmpleado,$telefonoEmpleado,$puestoEmpleado,$correoEmpleado,$contrasenaEmpleado,$tipo_usuario)\n {\n $servidor = new Servidor();\n $conexion = $servidor->conectar();\n $sql_vericar = \"SELECT correoEmpleado FROM empleado WHERE correoEmpleado=:correoEmpleado\";\n $existe = $conexion->prepare($sql_vericar);\n $existe->bindParam(\":correoEmpleado\",$correoEmpleado);\n $existe->execute();\n $activo = \"1\";\n $str_vacio = \" \";\n\n $numero = rand(100000,999999);\n $fecha = date(\"D/m/A H:i:s\");\n $cifrado = sha1($contrasenaEmpleado);\n $cifrado = sha1($cifrado);\n\n if($existe->rowCount()==0)\n {\n $sql = \"INSERT INTO empleado\n (nombreEmpleado,\n apellidopEmpleado,\n apellidomEmpleado,\n domicilioEmpleado,\n numeroextEmpleado,\n coloniaEmpleado,\n telefonoEmpleado,\n puestoEmpleado,\n correoEmpleado,\n contrasenaEmpleado,\n idSesion,\n activo,\n tipo_usuario\n ) \n VALUE(:nombreEmpleado,\n :apellidopEmpleado,\n :apellidomEmpleado,\n :domicilioEmpleado,\n :numeroextEmpleado,\n :coloniaEmpleado,\n :telefonoEmpleado,\n :puestoEmpleado,\n :correoEmpleado,\n :contrasenaEmpleado,\n :idSesion,\n :activo,\n :tipo_usuario)\";\n\n $parametro = $conexion->prepare($sql);\n $parametro->bindParam(\":nombreEmpleado\",$nombreEmpleado);\n $parametro->bindParam(\":apellidopEmpleado\",$apellidopEmpleado);\n $parametro->bindParam(\":apellidomEmpleado\",$apellidomEmpleado);\n $parametro->bindParam(\":domicilioEmpleado\",$domicilioEmpleado);\n $parametro->bindParam(\":numeroextEmpleado\",$numeroextEmpleado);\n $parametro->bindParam(\":coloniaEmpleado\",$coloniaEmpleado);\n $parametro->bindParam(\":telefonoEmpleado\",$telefonoEmpleado);\n $parametro->bindParam(\":puestoEmpleado\",$puestoEmpleado);\n $parametro->bindParam(\":correoEmpleado\",$correoEmpleado);\n $parametro->bindParam(\":contrasenaEmpleado\",$cifrado);\n $parametro->bindParam(\":idSesion\",$str_vacio);\n $parametro->bindParam(\":activo\",$activo);\n $parametro->bindParam(\":tipo_usuario\",$tipo_usuario);\n \n if($parametro->execute())\n {\n return \"listo\";\n }\n else\n {\n return \"error\";\n }\n }\n else\n {\n return \"ya existe el usuario\";\n // $correoEmpleado = $existe->fetchAll(PDO::FETCH_ASSOC);\n // return $correoEmpleado;\n }\n }", "function ajouter($ref, $des, $prix, $image, $cat,&$tabErr)\n{\n $connexion = connecterServeurBD();\n \n // Vérifier que la référence saisie n'existe pas déja\n $requete=\"select * from produit\";\n $requete=$requete.\" where pdt_ref = '\".$ref.\"';\"; \n \n $jeuResultat=$connexion->query($requete); // on va chercher tous les membres de la table qu'on trie par ordre croissant\n \n //$jeuResultat->setFetchMode(PDO::FETCH_OBJ); // on dit qu'on veut que le résultat soit récupérable sous forme d'objet \n \n $ligne = $jeuResultat->fetch();\n if($ligne)\n {\n $message=\"Echec de l'ajout : la référence existe déjà !\";\n ajouterErreur($tabErr, $message);\n }\n else\n {\n // Créer la requête d'ajout \n $requete=\"insert into produit\"\n .\"(pdt_ref,pdt_designation,pdt_prix,pdt_image, pdt_categorie) values ('\"\n .$ref.\"','\"\n .$des.\"',\"\n .$prix.\",'\"\n .$image.\"','\"\n .$cat.\"');\";\n \n // Lancer la requête d'ajout \n $ok=$connexion->query($requete); // on va chercher tous les membres de la table qu'on trie par ordre croissant\n \n // Si la requête a échoué\n if ($ok==FALSE)\n {\n $message = \"Attention, l'ajout de la fleur a échoué !!!\";\n ajouterErreur($tabErr, $message);\n } \n \n }\n}", "function ajout_personne_morale($ident,$NUMERO_INDENTIFIANT,$TYPE_NUMERO_INDENTIFIANT,$RAISON_SOCIALE,$ADRESSE_MORALE,$TELEPHONE_MORALE,$FAX_MORALE,$VILLE_MORALE,$PAYS_MORALE,$EMAIL_MORALE){\n $requette=\"insert into personne_morale values ('$ident','$NUMERO_INDENTIFIANT','$TYPE_NUMERO_INDENTIFIANT','$RAISON_SOCIALE','$ADRESSE_MORALE','$TELEPHONE_MORALE','$FAX_MORALE','$VILLE_MORALE','$PAYS_MORALE','$EMAIL_MORALE')\";\n ExecuteRequette($requette);\n }", "abstract public function _insert($obj);", "function ajout($nom, $date, $lieu, $objet)\n {\n global $base;\n $req = \"INSERT INTO activite VALUES (null, '$nom', '$date', '$lieu', '$objet', 0)\";\n $base->exec($req);\n }", "public function add($entity){\n\n\t\t/*\n\t\t * Hacemos lo que queremos con la estado. \n\t\t * Por ejemplo, enviar un email al usuario.\n\t\t */\n\t\t\n\t\t//agregamos la estado.\n\t\tparent::add($entity);\n\t\t\n\t\t//creo una instancia \n\t\t$instanciaReclamo = new InstanciaReclamo();\n\t\t$instanciaReclamo->setReclamo($entity);\n\t\t\n\t\t\n\t\t$instanciaReclamo->setObservaciones($entity->getNombre());\t\n\t\t$instanciaReclamo->setEstadoReclamo($entity->getEstadoReclamo());\n\t\t$instanciaReclamo->setUsuario($entity->getUsuario());\n\t\t\n\t\tServiceFactory::getInstanciaReclamoService()->add( $instanciaReclamo );\n\t\t\n\t\t//notificamos al usuario y a la cooperativa que hay nuevo reclamo.\n\t\tServiceFactory::getNotificacionesService()->notificarNuevoReclamo($entity);\n\t\t\n\t\t\n\t\t\n\t}", "function __construct(){\n $this -> employes = new Employes();\n // Instance sans héritage : Je suis dans la classe Interne, qui aura accès à toutes les propriétés de Etudiant (héritage), mais également à toutes les propriétés de Employes via la propriété $employes qui contient un objet (une instance) de la class Employes.\n }", "public function salvar(){\n $query = \"insert into produto(NOME,QUANTIDADE,VALOR) values (:nome,:quantidade,:valor)\";\n $stmt = $this->db->prepare($query);\n $stmt->bindValue(':nome', $this->__get('nomeProduto'));\n $stmt->bindValue(':quantidade', $this->__get('quantidadeProduto'));\n $stmt->bindValue(':valor', $this->__get('valorProduto'));\n $stmt->execute(); \n return $this;\n }", "public function insert(equipo $equipo);", "function add(){\n\tglobal $bdd;\n\t\n\ttry{\n\t\t\n\t\t// Ajoute le pole dans la BDD\n\t\tif(!$this->getPole()->exists())\n\t\t\t$this->getPole()->add();\n\t\n\t\t// Ajoute l'EC\n\t\t$req = \"INSERT INTO ec(nom, prenom, bureau, id_pole) VALUES('\" .\n\t\t\t\tucfirst(strtolower($this->getNom())) . \"', '\" .\n\t\t\t\tucfirst(strtolower($this->getPrenom())) . \"', '\" .\n\t\t\t\tucfirst($this->getBureau()) . \"', '\" .\n\t\t\t\t$this->getPole()->getId() . \"')\";\n\t\t\t\t\n\t\t$bdd->exec($req);\n\t\t\n\t\t// Récupéres l'id de l'ec\n\t\t$req = \"SELECT id FROM ec WHERE nom = '\" . ucfirst(strtolower($this->getNom())) . \"' AND prenom = '\" . ucfirst(strtolower($this->getPrenom())) . \"'\";\n\t\t$result = $bdd->query($req);\n\t\t$id = $result->fetch()['id'];\n\t\t\n\t\t// Habilite l'EC pour le TC\n\t\t$req = \"INSERT INTO habilite(id_ec, id_programme) VALUES ('\" . $id . \"', '\" . Programme::getIdByName('TC') . \"')\";\n\t\t$bdd->exec($req);\n\t\t\n\t} catch(PDOException $e) { die (\"Erreur lors de l'exécution de la requéte\" . $e->getMessage()); }\n}", "public function store()\n {\n // store the object itself\n parent::store();\n \n // delete the related EnqueteMorador objects\n $criteria = new TCriteria;\n $criteria->add(new TFilter('enquete_id', '=', $this->id));\n $repository = new TRepository('EnqueteMorador');\n $repository->delete($criteria);\n // store the related EnqueteMorador objects\n if ($this->moradors)\n {\n foreach ($this->moradors as $morador)\n {\n $enquete_morador = new EnqueteMorador;\n $enquete_morador->morador_id = $morador->id;\n $enquete_morador->enquete_id = $this->id;\n $enquete_morador->store();\n }\n }\n }", "private function ajoutSomme()\n {\n if ($this->module->viewAllCoachs[$this->context->employee->id_profile]) {\n if (Tools::isSubmit('as_submit')) {\n $data = array(\n 'id_employee' => (int)Tools::getValue('as_id_employee'),\n 'id_order' => (int)Tools::getValue('as_order'),\n 'somme' => Tools::getValue('as_somme'),\n 'commentaire' => pSQL(Tools::getValue('as_commentaire')),\n 'date_ajout_somme' => Tools::getValue('as_date')\n );\n if (!Validate::isInt($data['id_employee'])) {\n $this->errors[] = 'L\\'id de l\\'employee n\\'est pas valide';\n }\n if (!Validate::isInt($data['id_order'])) {\n $this->errors[] = 'L\\'id de la commande n\\'est pas valide';\n }\n if (!Validate::isFloat(str_replace(',', '.', $data['somme']))) {\n $this->errors[] = 'La somme n\\'est pas valide';\n }\n if (!Validate::isString($data['commentaire'])) {\n $this->errors[] = 'Erreur du champ commentaire';\n }\n if (!Validate::isDate($data['date_ajout_somme'])) {\n $this->errors[] = 'Erreur du champ date';\n }\n\n if (!$this->errors) {\n // Modifie\n if (Tools::getValue('as_id')) {\n $data['id_ajout_somme'] = (int)Tools::getValue('as_id');\n if (!Db::getInstance()->update(\n 'ajout_somme',\n $data,\n 'id_ajout_somme = ' . (int)Tools::getValue('as_id')\n )\n ) {\n $this->errors[] = $this->l('Erreur lors de la mise à jour');\n }\n } else {\n // Insert\n if (!Db::getInstance()->insert('ajout_somme', $data)\n ) {\n $this->errors[] = $this->l('Erreur lors de l\\'ajout.');\n }\n }\n if (!$this->errors) {\n $this->confirmation = $this->l('Enregistrement éffectué.');\n unset($_POST['as_id_employee']);\n unset($_POST['as_somme']);\n unset($_POST['as_order']);\n unset($_POST['as_commentaire']);\n unset($_POST['as_date']);\n unset($_POST['as_id']);\n }\n }\n // Efface\n } elseif (Tools::isSubmit('del_as')) {\n $id = (int)Tools::getValue('id_as');\n if (!Db::getInstance()->delete('ajout_somme', 'id_ajout_somme = ' . $id)) {\n $this->errors[] = $this->l('Erreur lors de la suppression');\n } else {\n $this->confirmation = $this->l('Ajout manuel supprimé.');\n }\n } elseif (Tools::isSubmit('mod_as')) {\n $as = CaTools::getAjoutSommeById((int)Tools::getValue('id_as'));\n $_POST['as_id_employee'] = $as['id_employee'];\n $_POST['as_somme'] = $as['somme'];\n $_POST['as_order'] = $as['id_order'];\n $_POST['as_commentaire'] = $as['commentaire'];\n $_POST['as_date'] = $as['date_ajout_somme'];\n $_POST['as_id'] = $as['id_ajout_somme'];\n }\n }\n\n $this->smarty->assign(array(\n 'errors' => $this->errors,\n 'confirmation' => $this->confirmation,\n ));\n }", "public function add(){}", "public function add (object $entity);", "public function add(){ }", "abstract public function add($entity);", "function ajout_avoir_occupation_chambre($code_chamb,$code_etat,$date_ent,$datefi,$ob){\n $requette=\"insert into avoir values(null,'$code_chamb','$code_etat','$date_ent','$datefi','$ob')\";\n\tExecuteRequette($requette);\t\n}", "function ajouter($nom, $prenom, $adresse, $cd_postal, $tel, $mail, $file_url, &$tabErr)\n{\n $connexion = connecterServeurBD();\n \n // Vérifier que la référence saisie n'existe pas déja\n $requete=\"select * from formulaire\";\n $requete=$requete.\" where mail = '\".$mail.\"';\"; \n $jeuResultat=$connexion->query($requete); // on va chercher tous les membres de la table qu'on trie par ordre croissant\n \n //$jeuResultat->setFetchMode(PDO::FETCH_OBJ); // on dit qu'on veut que le résultat soit récupérable sous forme d'objet \n \n $ligne = $jeuResultat->fetch();\n if($ligne)\n {\n $message=\"Echec de l'ajout : le formulaire existe déjà !\";\n ajouterErreur($tabErr, $message);\n }\n else\n {\n // Créer la requête d'ajout \n $requete=\"insert into formulaire\"\n .\"(nom,prenom,adresse,cd_postal,tel, mail, file_url) values ('\"\n .$nom.\"','\"\n .$prenom.\"','\"\n .$adresse.\"',\"\n .$cd_postal.\",\"\n .$tel.\",'\"\n .$mail.\"','\"\n .$file_url.\"');\";\n \n // Lancer la requête d'ajout \n $ok=$connexion->query($requete); // on va chercher tous les membres de la table qu'on trie par ordre croissant\n \n // Si la requête a réussi\n if ($ok)\n {\n $message = \"Le dossier a été correctement ajoutée\";\n ajouterErreur($tabErr, $message);\n }\n else\n {\n $message = \"Attention, l'ajout du dossier a échoué !!!\";\n ajouterErreur($tabErr, $message);\n } \n \n }\n}", "function add($entity);", "public function insertarTema($tTitulo, $tContenido, $tReferencia, $cID, $uID)\n{\n $nueva = new Tema;\n $nueva->titulo = $tTitulo;\n $nueva->contenido = $tContenido;\n $nueva->referencia = $tReferencia;\n $nueva->fechapublicacion = date('Y-m-d H:i:s');\n $nueva->categoriaid = $cID;\n $nueva->usuarioid = $uID;\n $nueva->save();\n}", "function insertarSolicitudCompleta()\n {\n $this->objFunc = $this->create('MODSolicitud');\n if ($this->objParam->insertar('id_solicitud')) {\n $this->res = $this->objFunc->insertarSolicitudCompleta($this->objParam);\n } else {\n //$this->res=$this->objFunc->modificarSolicitud($this->objParam);\n //trabajar en la modificacion compelta de solicitud ....\n }\n $this->res->imprimirRespuesta($this->res->generarJson());\n }", "public function ajouterpiloteAction()\n {\n $this->_helper->actionStack('header', 'index', 'default', array('head' => $this->headStyleScript));\n\n $tPilote = new Table_Pilote();\n\n $nom = $this->getRequest()->getPost('NomPilote');\n $prenom = $this->getRequest()->getPost('PrenomPilote');\n $adresse = $this->getRequest()->getPost('AdressePilote');\n $dateNais = $this->getRequest()->getPost('dateNaissPilote');\n\n if (empty($nom) && empty($prenom) && empty($adresse) && empty($dateNais)) {\n $message = '<div class=\"erreur\">Erreur ! Veuillez remplir tous les champs.</div>';\n } else {\n $donneesPilote = array(\n 'prenomPilote' => $prenom,\n 'nomPilote' => $nom,\n 'adressePilote' => $adresse,\n 'dateNaissancePilote' => $dateNais \n );\n\n $tPilote->insert($donneesPilote);\n $message = '<div class=\"reussi\">Le pilote a bien été créé.</div>';\n }\n $this->view->message = $message;\n }", "public function inserir() {\n $query = 'insert into tb_tarefas(tarefa)values(:tarefa)';\n $stmt = $this->conexao->prepare($query);\n $stmt->bindValue(':tarefa',$this->tarefa->__get('tarefa'));//declarando a var :tarefa que foi utilizada 2 linhas acima\n $stmt->execute();\n }" ]
[ "0.67240566", "0.6502135", "0.64343095", "0.6377714", "0.63026935", "0.62207794", "0.61179423", "0.61157286", "0.6062395", "0.6045369", "0.60099816", "0.6009907", "0.59800965", "0.59676176", "0.5933955", "0.58957845", "0.58943063", "0.5891473", "0.58605534", "0.58572894", "0.5842637", "0.5831327", "0.5827842", "0.58263886", "0.5772953", "0.576782", "0.57646537", "0.575029", "0.57326174", "0.5726269" ]
0.65232486
1
Append object to a `Composable` `Component`. The appended `Component` will become a child of the parent `Component`.
public function appendTo(Composable $composable): void;
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function addComponent(Renderable $component)\n {\n $this->components[] = $component;\n\n return $this;\n }", "function AddComponent( $new_component ) {\n if ( is_array($new_component) && count($new_component) == 0 ) return;\n if ( isset($this->rendered) ) unset($this->rendered);\n if ( is_array($new_component) ) {\n foreach( $new_component AS $k => $v ) {\n $this->components[] = $v;\n }\n }\n else {\n $this->components[] = $new_component;\n }\n }", "public function addComponent($component) {\n $this->component[] = $component;\n return $this;\n }", "function addComponent($component) {\n\t\tif ($component->getSequence() == null) {\n\t\t\t$component->setSequence(count($this->components) + 1);\n\t\t}\n\t\tarray_push($this->components, $component);\n\t}", "public function addComponent(array $component);", "public function append( Snapable $in, $ref = null );", "public function append ($value)\n\t{\n\t\t$this->_dirty = true;\n\t\treturn parent::append($value);\n\t}", "public function addComponent($name, $value)\n\t{\n\t\t$this->components[] = ['name' => $name, 'value' => $value];\n\t}", "public function & append($value) {\n \t# Add\n\t\t$this->data[] =& $value;\n\t\t# Chain\n\t\treturn $this;\n }", "public function addComponent($string);", "public function addChild(CompositeInterface $child)\n {\n $this->children[] = $child;\n }", "public function append();", "public function append()\n\t{\n\n\t}", "public function addComponent(Component $component): self\n {\n if ($component instanceof ActionRow) {\n throw new \\InvalidArgumentException('You cannot add another `ActionRow` to this action row.');\n }\n\n if ($component instanceof SelectMenu) {\n throw new \\InvalidArgumentException('Cannot add a select menu to an action row.');\n }\n\n if (count($this->components) >= 5) {\n throw new \\OverflowException('You can only have 5 components per action row.');\n }\n\n $this->components[] = $component;\n\n return $this;\n }", "public function append($item);", "public function append($value = null)\r\n\t{\r\n\t\t$this->append = $value;\r\n\t\treturn $this;\r\n\t}", "public function addComponent(tx_ptgsashop_componentArticle $componentArticleObj) {\n \n return $this->componentArtCollObj->addItem($componentArticleObj);\n \n }", "abstract protected function create(Component $parent);", "public function addChild($element) {\n if($element && $element instanceof XMLCreator) {\n array_push($this->children, $element);\n }\n }", "public function append($value)\r\n {\r\n $this->storage[] = $value;\r\n \r\n return $this;\r\n }", "protected function addToParent(SymfonyCommand $command)\n\t{\n\t\treturn parent::add($command);\n\t}", "public function append($element);", "public function append($value): void {\n throw new \\Exception('This ' . __CLASS__ . ' does not support this action but it must implement it, because it is extending \\ArrayObject.');\n }", "function addChild($child, array $options = array());", "public function addComponent($name,Templator $component) {\n // Go ahead and evaluate the component. This is a depth-first evaluation\n // technique that ensures that a component is completely evaluated\n // before the context in which it is used is even considered. This is to\n // place a well-defined ordering on template evaluation which prevents\n // undefined-behavior on any operations that have side-effects.\n\n $this->components[$name] = $component;\n $component->inherit($this);\n if ($this->preeval) {\n $component->evaluate();\n }\n }", "public function add(IEntity $parent, array $add);", "function addParent(&$parent)\n {\n if (is_subclass_of($parent, 'XML_SVG_Element')) {\n $parent->addChild($this);\n }\n }", "public function add($object) {\n\t\tif ($this->isTypeOf($object)) {\n\t\t\treturn parent::append($object);\n\t\t}\n\t\tthrow new InvalidArgumentException('Object must be of the type: ' . $this->type);\n\t}", "public function append(Event $event);", "protected function addToParent(SymfonyCommand $command)\n {\n return parent::add($command);\n }" ]
[ "0.5877417", "0.5823049", "0.56604004", "0.53777367", "0.53732586", "0.536438", "0.5143068", "0.5090694", "0.49856076", "0.4952962", "0.49429324", "0.49149725", "0.48736134", "0.48669028", "0.48645252", "0.48610935", "0.48441884", "0.476253", "0.47598016", "0.47339258", "0.47256652", "0.47202837", "0.4692393", "0.46702075", "0.46609226", "0.4659994", "0.46479", "0.46346232", "0.4633635", "0.46140736" ]
0.7025929
0
Ensure that the emitter is cloned.
public function __clone() { if ($this->emitter) { $this->emitter = clone $this->emitter; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function __clone()\n {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "private function __clone() {\n\t\t// cannot be cloned\n\t\ttrigger_error( __CLASS__.' may not be cloned', E_USER_ERROR );\n\t}", "public function __clone() {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "public function __clone() {\r\n\r\n trigger_error('Clone is not allowed.', E_USER_ERROR);\r\n }", "public function __clone()\n {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "public function __clone()\n {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "private function __clone()\n {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "private function __clone()\n {\n trigger_error('Clone is not allowed.', E_USER_ERROR);\n }", "public function __clone()\n {\n // of an id as it is this instance that is used to keep data in memory\n // as long as the user needs it.\n // If a user where to duplicate an instance for a same underlying value\n // it may result in trying to insert the same aggregate twice to the\n // storage.\n throw new \\LogicException('Cloning is not allowed');\n }", "public function __clone() {\r\n trigger_error('Clone is not allowed.', E_USER_ERROR);\r\n }", "public function __clone() {\r\n trigger_error('Clone is not allowed.', E_USER_ERROR);\r\n }", "public function __clone() {\n trigger_error('La clonación de este objeto no está permitida', E_USER_ERROR);\n }", "protected function __clone() {\r\n // TODO: Output error.\r\n }", "private function __clone()\n {}", "private function __clone() {\n \n }", "final protected function __clone() {}", "public function __clone(){\n trigger_error('Can not clone this object', E_USER_ERROR);\n }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }", "private function __clone() { }" ]
[ "0.66239387", "0.6616566", "0.6598083", "0.65794724", "0.65644205", "0.65644205", "0.65602237", "0.65602237", "0.6547886", "0.65444094", "0.65444094", "0.65337396", "0.65084493", "0.6480467", "0.6471731", "0.64663154", "0.6456192", "0.6455545", "0.6455545", "0.6455545", "0.6455545", "0.6455545", "0.6455545", "0.6455545", "0.6455545", "0.6455545", "0.6455545", "0.6455545", "0.6455545", "0.6455545" ]
0.8009102
0
EXAMPLE FILE / $data = http_request( 'POST', $ip, 80, '/file.php', array(), array('lol' => 'lol1'), array(), array( 0 => array( 'key' => 'test', 'filename' => 'test.txt', 'contenttype' => 'test/test', 'value' => 'teststring' ) ), array(), 50000, false, false);
function http_request( $verb = 'GET', /* HTTP Request Method (GET and POST supported) */ $ip, /* Target IP/proxy */ $host, /* Target IP/site */ $port = 80, /* Target TCP port */ $uri = '/', /* Target URI */ $getdata = array(), /* HTTP GET Data ie. array('var1' => 'val1', 'var2' => 'val2') */ $postdata = array(), /* HTTP POST Data ie. array('var1' => 'val1', 'var2' => 'val2') */ $cookie = array(), /* HTTP Cookie Data ie. array('var1' => 'val1', 'var2' => 'val2') */ $files = array(), $custom_headers = array(), /* Custom HTTP headers ie. array('Referer: http://localhost/ */ $timeout = 20000, /* Socket timeout in milliseconds */ $req_hdr = false, /* Include HTTP request headers */ $res_hdr = false /* Include HTTP response headers */ ) { global $settings; $ret = ''; $verb = strtoupper($verb); $cookie_str = ''; $getdata_str = count($getdata) ? '?' : ''; $postdata_str = ''; $boundary = (string)abs(rand()); $crlf = "\r\n"; foreach ($getdata as $k => $v) $getdata_str .= urlencode($k) .'='. $v .'&'; if(count($files) == 0) { foreach ($postdata as $k => $v) $postdata_str .= urlencode($k) .'='. $v .'&'; } else { foreach ($postdata as $k => $v) { $postdata_str .= '--' . $boundary . $crlf; $postdata_str .= 'Content-Disposition: form-data; name="'.urlencode($k).'"' . $crlf; $postdata_str .= $crlf; $postdata_str .= $v . $crlf; } foreach ($files as $v) { $postdata_str .= '--' . $boundary . $crlf; $postdata_str .= 'Content-Disposition: form-data; name="'.urlencode($v['key']).'"; filename="'.$v['filename'].'"' . $crlf; $postdata_str .= 'Content-Type: ' . $v['content-type'] . $crlf; $postdata_str .= $crlf; $postdata_str .= $v['value'] . $crlf; } $postdata_str .= '--' . $boundary . '--' . $crlf; } foreach ($cookie as $k => $v) $cookie_str .= urlencode($k) .'='. $v .'; '; $req = $verb .' '. $uri . $getdata_str .' HTTP/1.1' . $crlf; $req .= 'Host: '. $host . $crlf; $req .= 'User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_7; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.205 Safari/534.16' . $crlf; $req .= 'Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1' . $crlf; $req .= 'Accept-Language: ru-RU,ru;q=0.9,en;q=0.8' . $crlf; $req .= 'Accept-Encoding: deflate' . $crlf; $req .= 'Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1' . $crlf; foreach ($custom_headers as $k => $v) $req .= $k .': '. $v . $crlf; if (!empty($cookie_str)) $req .= 'Cookie: '. substr($cookie_str, 0, -2) . $crlf; $req .= 'Cookie2: $Version=1' . $crlf; $req .= 'Connection: Close' . $crlf; if ($verb == 'POST' && !empty($postdata_str)) { if(count($files) == 0) { $postdata_str = substr($postdata_str, 0, -1); $req .= 'Content-Type: application/x-www-form-urlencoded' . $crlf; $req .= 'Content-Length: '. strlen($postdata_str) . $crlf . $crlf; $req .= $postdata_str; } else { $postdata_str = substr($postdata_str, 0, -1); $req .= 'Content-Type: multipart/form-data; boundary="'.$boundary.'"' . $crlf; $req .= 'Content-Length: '. strlen($postdata_str) . $crlf . $crlf; $req .= $postdata_str; } } else $req .= $crlf.$crlf; if ($req_hdr) $ret .= $req; while(!($fp = @fsockopen($ip, $port, $errno, $errstr,7))) { echo "Error in connection, sleep ".$settings['sleepPerError'].PHP_EOL; sleep($settings['sleepPerError']); } stream_set_timeout($fp, 0, $timeout * 1000); @fwrite($fp, $req); while ($line = fgets($fp)) $ret .= $line; fclose($fp); if (!$res_hdr and strpos($ret, "\r\n\r\n") !== FALSE) $ret = substr($ret, strpos($ret, "\r\n\r\n") + 4); if($settings['sleepPerQuery'] !== 0) sleep($settings['sleepPerQuery']); return $ret; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function post_request($url, $data, $referer='') {\n $data = http_build_query($data);\n\n // parse the given URL\n $url = parse_url($url);\n\n if ($url['scheme'] != 'http') {\n die('Error: Only HTTP request are supported !');\n }\n\n // extract host and path:\n $host = $url['host'];\n $path = $url['path'];\n\n // open a socket connection on port 80 - timeout: 30 sec\n $fp = fsockopen($host, 80, $errno, $errstr, 30);\n\n if ($fp){\n\n // send the request headers:\n fputs($fp, \"POST $path HTTP/1.1\\r\\n\");\n fputs($fp, \"Host: $host\\r\\n\");\n\n if ($referer != '')\n fputs($fp, \"Referer: $referer\\r\\n\");\n\n fputs($fp, \"Content-type: application/x-www-form-urlencoded\\r\\n\");\n fputs($fp, \"Content-length: \". strlen($data) .\"\\r\\n\");\n fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n fputs($fp, $data);\n\n $result = '';\n while(!feof($fp)) {\n // receive the results of the request\n $result .= fgets($fp, 128);\n }\n }\n else {\n return array(\n 'status' => 'err',\n 'error' => \"$errstr ($errno)\"\n );\n }\n\n // close the socket connection:\n fclose($fp);\n\n // split the result header from the content\n $result = explode(\"\\r\\n\\r\\n\", $result, 2);\n\n $header = isset($result[0]) ? $result[0] : '';\n $content = isset($result[1]) ? $result[1] : '';\n\n // return as structured array:\n return array(\n 'status' => 'ok',\n 'header' => $header,\n 'content' => $content\n );\n}", "function http_request($add_headers = false) {\n \n $this->retrieve_headers($add_headers);\n $this->body = @file_get_contents('php://input');\n }", "function _picatcha_http_post($host, $path, $data, $port = 80) {\n $http_request = \"POST $path HTTP/1.0\\r\\n\";\n $http_request .= \"Host: $host\\r\\n\";\n $http_request .= \"User-Agent: Picatcha/PHP\\r\\n\";\n $http_request .= \"Content-Length: \" . strlen($data) . \"\\r\\n\";\n $http_request .= \"Content-Type: application/x-www-form-urlencoded;\\r\\n\";\n $http_request .= \"\\r\\n\";\n $http_request .= $data;\n\n $response = '';\n if ( FALSE == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) {\n die('Could not open socket');\n }\n\n fwrite($fs, $http_request);\n\n // 1160: One TCP-IP packet\n while ( !feof($fs) )\n $response .= fgets($fs, 1160);\n fclose($fs);\n $response = explode(\"\\r\\n\\r\\n\", $response, 2);\n return $response;\n}", "function http_request($method, $uri, $data=NULL, array $query_params=array(), array $headers=array()) {\n $copts = array(CURLOPT_CUSTOMREQUEST => $method);\n\n if(isset($data)) {\n $stream = fopen('data:text/plain;base64,' . base64_encode($data), 'r');\n $copts[CURLOPT_UPLOAD] = TRUE;\n $copts[CURLOPT_INFILE] = $stream;\n $copts[CURLOPT_INFILESIZE] = strlen($data);\n }\n\n return $this->request($uri, $query_params, $headers, $copts);\n }", "private static function _http_post($http_request) {\n $response = '';\n if (false !== ($fs = @fsockopen(self::$api_host, 80, $errno, $errstr, 5))) {\n fwrite($fs, $http_request);\n while ( !feof($fs) ) {\n $response .= fgets($fs, 1160); // One TCP-IP packet\n }\n fclose($fs);\n list($headers, $body) = explode(\"\\r\\n\\r\\n\", $response);\n $headers = explode(\"\\r\\n\", $headers);\n $body = explode(\"\\r\\n\", $body);\n $response = new ArrayObject(\n array(\"headers\" => $headers, \"body\" => $body), ArrayObject::ARRAY_AS_PROPS);\n } else {\n throw new Exception(\"@todo CONNECTION TO URL SHORTENING SERVICE FAILED\");\n }\n Kohana_Log::add(\"debug\", \"Received response\\n\" . print_r($response, 1));\n\n return $response;\n }", "function do_post_request($url, $data, $optional_headers = null)\n{\n $params = array('http' => array(\n\t\t\t\t 'method' => 'POST',\n\t\t\t\t 'content' => $data\n\t\t\t\t ));\n if ($optional_headers!== null) $params['http']['header'] = $optional_headers;\n $ctx = stream_context_create($params);\n $fp = @fopen($url, 'rb', false, $ctx);\n if (!$fp) return false;\n $response = @stream_get_contents($fp);\n if ($response === false) return false;\n return $response;\n}", "function drupal_http_request($url, $headers = array(), $method = 'GET', $data = NULL, $retry = 3) {\n $result = new StdClass();\n\n // Parse the URL, and make sure we can handle the schema.\n $uri = parse_url($url);\n switch ($uri['scheme']) {\n case 'http':\n $fp = @fsockopen($uri['host'], ($uri['port'] ? $uri['port'] : 80), $errno, $errstr, 15);\n break;\n case 'https':\n // Note: Only works for PHP 4.3 compiled with OpenSSL.\n $fp = @fsockopen('ssl://'. $uri['host'], ($uri['port'] ? $uri['port'] : 443), $errno, $errstr, 20);\n break;\n default:\n $result->error = 'invalid schema '. $uri['scheme'];\n return $result;\n }\n\n // Make sure the socket opened properly.\n if (!$fp) {\n $result->error = trim($errno .' '. $errstr);\n return $result;\n }\n\n // Construct the path to act on.\n $path = $uri['path'] ? $uri['path'] : '/';\n// replaced the following line to avoid a warning being sent: if ($uri['query']) {\n if (isset($uri['query']) && !empty($uri['query'])) {\n $path .= '?'. $uri['query'];\n }\n\n // Create HTTP request.\n $defaults = array(\n 'Host' => 'Host: '. $uri['host'],\n 'User-Agent' => 'User-Agent: Drupal (+http://www.drupal.org/)',\n 'Content-Length' => 'Content-Length: '. strlen($data)\n );\n\n foreach ($headers as $header => $value) {\n $defaults[$header] = $header .': '. $value;\n }\n\n $request = $method .' '. $path .\" HTTP/1.0\\r\\n\";\n $request .= implode(\"\\r\\n\", $defaults);\n $request .= \"\\r\\n\\r\\n\";\n if ($data) {\n $request .= $data .\"\\r\\n\";\n }\n $result->request = $request;\n\n fwrite($fp, $request);\n\n // Fetch response.\n $response = '';\n while (!feof($fp) && $data = fread($fp, 1024)) {\n $response .= $data;\n }\n fclose($fp);\n//global $agi;\n//$agi->conlog(\"common.inc :: size of http response: \" . strlen($response));\n//$agi->conlog(\"raw http response: $response\\n\\n\");\n // Parse response.\n list($headers, $result->data) = explode(\"\\r\\n\\r\\n\", $response, 2);\n $headers = preg_split(\"/\\r\\n|\\n|\\r/\", $headers);\n\n list($protocol, $code, $text) = explode(' ', trim(array_shift($headers)), 3);\n $result->headers = array();\n\n // Parse headers.\n while ($line = trim(array_shift($headers))) {\n list($header, $value) = explode(':', $line, 2);\n if (isset($result->headers[$header]) && $header == 'Set-Cookie') {\n // RFC 2109: the Set-Cookie response header comprises the token Set-\n // Cookie:, followed by a comma-separated list of one or more cookies.\n $result->headers[$header] .= ','. trim($value);\n }\n else {\n $result->headers[$header] = trim($value);\n }\n }\n\n $responses = array(\n 100 => 'Continue', 101 => 'Switching Protocols',\n 200 => 'OK', 201 => 'Created', 202 => 'Accepted', 203 => 'Non-Authoritative Information', 204 => 'No Content', 205 => 'Reset Content', 206 => 'Partial Content',\n 300 => 'Multiple Choices', 301 => 'Moved Permanently', 302 => 'Found', 303 => 'See Other', 304 => 'Not Modified', 305 => 'Use Proxy', 307 => 'Temporary Redirect',\n 400 => 'Bad Request', 401 => 'Unauthorized', 402 => 'Payment Required', 403 => 'Forbidden', 404 => 'Not Found', 405 => 'Method Not Allowed', 406 => 'Not Acceptable', 407 => 'Proxy Authentication Required', 408 => 'Request Time-out', 409 => 'Conflict', 410 => 'Gone', 411 => 'Length Required', 412 => 'Precondition Failed', 413 => 'Request Entity Too Large', 414 => 'Request-URI Too Large', 415 => 'Unsupported Media Type', 416 => 'Requested range not satisfiable', 417 => 'Expectation Failed',\n 500 => 'Internal Server Error', 501 => 'Not Implemented', 502 => 'Bad Gateway', 503 => 'Service Unavailable', 504 => 'Gateway Time-out', 505 => 'HTTP Version not supported'\n );\n // RFC 2616 states that all unknown HTTP codes must be treated the same as\n // the base code in their class.\n if (!isset($responses[$code])) {\n $code = floor($code / 100) * 100;\n }\n//$agi->conlog(\"original HTTP response code: $code\"); \n switch ($code) {\n case 200: // OK\n case 304: // Not modified\n break;\n case 301: // Moved permanently\n case 302: // Moved temporarily\n case 307: // Moved temporarily\n $location = $result->headers['Location'];\n\n if ($retry) {\n $result = drupal_http_request($result->headers['Location'], $headers, $method, $data, --$retry);\n $result->redirect_code = $result->code;\n }\n $result->redirect_url = $location;\n\n break;\n default:\n $result->error = $text;\n }\n\n $result->code = $code;\n//$agi->conlog(\"common.inc :: http request result code: $result->code, with size: \" . sizeof($result));\n return $result;\n}", "function http_request($url, $postvars=NULL) {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_COOKIEFILE, '/dev/null'); // necessary to enable cookies\n curl_setopt($curl, CURLOPT_POST, !empty($postvars));\n if ($postvars) {\n $fields = array();\n foreach($postvars as $key=>$value) {\n $fields[] = $key.'='.$value;\n }\n curl_setopt($curl, CURLOPT_POSTFIELDS, join($fields, '&'));\n }\n return curl_exec($curl);\n}", "function http_request($url, $postvars=NULL) {\n $curl = curl_init();\n curl_setopt($curl, CURLOPT_URL, $url);\n curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);\n curl_setopt($curl, CURLOPT_COOKIEFILE, '/dev/null'); // necessary to enable cookies\n curl_setopt($curl, CURLOPT_POST, !empty($postvars));\n if ($postvars) {\n $fields = array();\n foreach($postvars as $key=>$value) {\n $fields[] = $key.'='.$value;\n }\n curl_setopt($curl, CURLOPT_POSTFIELDS, join($fields, '&'));\n }\n return curl_exec($curl);\n}", "function ez_post($url, $data, $referer='') {\n $data = http_build_query($data);\n \n // parse the given URL\n $url = parse_url($url);\n \n if ($url['scheme'] != 'http') { \n die('Error: Only HTTP request are supported !');\n }\n \n // extract host and path:\n $host = $url['host'];\n $path = $url['path'];\n \n \n if( !isset($url['port'])) $port = 80;\n else $port = $url['port'];\n // open a socket connection on port 80 - timeout: 30 sec\n\n\n $fp = fsockopen($host, $port, $errno, $errstr, 30);\n \n if ($fp){\n \n // send the request headers:\n fputs($fp, \"POST $path HTTP/1.1\\r\\n\");\n fputs($fp, \"Host: $host\\r\\n\");\n \n if ($referer != '')\n fputs($fp, \"Referer: $referer\\r\\n\");\n \n fputs($fp, \"Content-type: application/x-www-form-urlencoded\\r\\n\");\n fputs($fp, \"Content-length: \". strlen($data) .\"\\r\\n\");\n fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n fputs($fp, $data);\n \n $result = ''; \n while(!feof($fp)) {\n // receive the results of the request\n $result .= fgets($fp, 128);\n }\n }\n else { \n return array(\n 'status' => 'err', \n 'error' => \"$errstr ($errno)\"\n );\n }\n \n // close the socket connection:\n fclose($fp);\n \n // split the result header from the content\n $result = explode(\"\\r\\n\\r\\n\", $result, 2);\n \n $header = isset($result[0]) ? $result[0] : '';\n $content = isset($result[1]) ? $result[1] : '';\n \n // return as structured array:\n return array(\n 'status' => 'ok',\n 'header' => $header,\n 'content' => $content\n );\n}", "function get($what,$method,$type='GET',$file=0){\n $this->what = $what;\n $this->req = \"$type $this->what HTTP/1.0\\r\\n\";\n\n\t \n\t if ( $this->userHeadersOnly)\n\t {\n\t // user headers\n\t $this->req.= $this->getUserHeaders();\n\t }else{\n// $this->req.= \"Accept: */*\\r\\n\";\n $this->req.= (isset($this->referrer)) ? (\"Referer: $this->referrer\\r\\n\") : (\"\") ;\n $this->req.=\"Accept-Language: en-us\\r\\n\";\n// $this->req.=\"Accept-Encoding: gzip, deflate\\r\\n\"; // HTTP 1.1\n $this->req.=\"User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1)\\r\\n\";\n $this->req.=\"Host: $this->url\\r\\n\";\n $this->req.=\"Connection: Keep-Alive\\r\\n\";\n $this->req.= (isset($this->cookie)) ? (\"Cookie: $this->cookie\\r\\n\") : ( \"\" ) ;\n $this->req.= (isset($this->post)) ? (\"$this->post\\r\\n\") : ( \"\" ) ;\n\t }\n\t \n $this->req.=\"\\r\\n\";\n $this->bugout(\"Request Header:\\n$this->req\\n\\n\");\n\n switch($method){\n case 'fopen':\n switch($this->port){\n case '80':\n $this->proto = \"http://\";\n break;\n }//implement further later\n $what = $this->proto . $this->url . \"/\" . $this->what;\n $this->rFp = fopen($what,\"rb\");\n while($buf =fgets($this->rFp)){\n $this->data .= $buf;\n }\n \n\t\t fclose($this->rFp);\n break;\n\t case 'check':\n if(! fputs( $this->sFp, $this->req) )\n\t { die(\"Errors speaking with remote host \" . $this->url );}\n //NEW METHOD (fast)\n //get header from socket\n\t\t $this->get_http_header();\n\t\t if(eregi('ok',$this->headerblock[0][0])){\n\t\t\t $this->bugout(\"File OK\\n\");\n print \"FILE \" . $this->domain . $this->doc . \" FOUND !!!!!<br>\\n\";\n\t\t }else{\n print \"ERROR: http://\" . $this->domain . $this->doc . \" NOT FOUND<br>\\n\";\n\t\t }\n\n break;\n case 'socket':\n //write request to open socket\n if( !fputs( $this->sFp, $this->req) )\n\t { die(\"Errors speaking with remote host \" . $this->url );}\n //NEW METHOD (fast)\n //get header from socket\n\t\t $this->get_http_header();\n\n $this->bugout(\"SERVER RESPONSE:\\n\" . $this->header);\n\n //determine length of content from conten-length header field\n\t\t $redirect = $this->headerscan(\"location\");\n\t\t\t\n if($cookie = $this->headerscan(\"cookie\"))//write cookies dynamically\n\t\t\t $this->setCookie($cookie);\n //follow redirects \n\t\t\t\n\t\t\t if($this->headerscan(\"location\")){//check for redirect 301/2s \n if($this->rd==1){\n $this->bugout(\"302 found redirecting\");\n $this->sget($redirect);\n }else{\n $this->bugout(\"302 found not redirecting\");\n\t\t\t\t break;\n\t\t\t\t }\n }\n\n\n if(($this->length > 0)&&($this->length > $this->sizelimit)){\n $this->bugout(\"0 % of \" . $this->length . \" in \" . $this->url . $this->what);\n $funk =0;\n $start = $this->mrtime();\n while($l = fread($this->sFp,$this->length)){\n $funk = ( $funk < count($this->chars) - 1) ? $funk++ : 0;\n $this->data .= $l;\n $this->got = strlen($this->data);\n $this->percentage = round( ($this->got / $this->length) * 100 );\n\n // add logic to output status information in CLI mode only.\n $this->cliout(\"\\r\" . $this->percentage . $this->chars[$funk] . \"\\r\");\n \n if ($this->got>=$this->length){\n ####print $this->percentage . \"%\\n\";\n $time = ($this->mrtime() - $start);\n $this->cliout(\"GOT $this->length kb in $time \");\n break;\n }\n } \n }else{\n //$this->cliout(\"No 'content-length' in header, using S L O W fgets!!\\n\");\n $start = $this->mrtime();\n //$this->cliout(\"START $start\\n\");\n $tmpcnt = 0;\n while($l = fgets($this->sFp)){ \n $this->data .= $l;\n $time = ($this->mrtime() - $start);\n $this->tmparr[] = ($time - $old) . \" $tmpcnt \" . ereg_replace(\"\\n\",\"\",$l);\n $old = $time;\n\n $funk = ($funk<count($this->chars) - 1) ? $funk + 1 : 0;\n $this->cliout(\" \" . strlen($this->data) . $this->chars[$funk] . \"\\r\");\n\n $tmpcnt++;\n }\n $timer .= \" Length: \" . strlen($this->data) . \"\\n\";\n $timer .= \" Ending: \" .($this->mrtime() - $start) . \"\\n\";\n $timer .= \" First time measure in get: \" . $this->tmparr[0] . \"\\n\"; \n\t\t $timer .= \" Total time to get page: \" . array_sum($this->tmparr) . \"\\n\";\n\t\t $timer .= \"Average get time (by line): \" . array_sum($this->tmparr) / count($this->tmparr) . \"\\n\";\n \t array_multisort($this->tmparr);\n $timer .= \" shortest: \" . $this->tmparr[0] . \"\\n\";\n $timer .= \" longest : \" . $this->tmparr[(count($this->tmparr)-1)]. \"\\n\";\n //$this->cliout($timer);\n }\n break;\n case 'socketdump':\n fputs($this->sFp,$this->req);\n\n $uniquefile = $_SERVER[PHP_SELF] . \".dat\";\n $newptr=fopen($uniquefile,\"w+\");\n $this->get_http_header();\n while($new=fgets($this->sFp)){\n fwrite($newptr,$new);\n (isset($this->debug))?(print $l):(print \"\");\n }//end data while\n fclose($newptr);\n break;\n\t case 'dump':\n fputs($this->sFp,$this->req);\n\n $uniquefile = \"/usr/www/tmp/tmp/uploads/\" . $this->domain . $file; \n $dirs = explode(\"/\",$uniquefile);\t\t \n\t\t array_pop($dirs);\n $dir_to_create = join(\"/\",$dirs);\n\t\t $this->makedir($dir_to_create);\n\n if(file_exists($uniquefile)){\n\t\t\t $this->cliout(\"file '$uniquefile' exists.. moving on\\n\");\n\t\t\t break;\n\t\t $this->timer=1;\n\t\t }else{\n\t\t\t$this->timer=0;\n\t\t }\n if($newptr=fopen($uniquefile,\"w+\")){\n $this->get_http_header(); \n\n\t\t if(($this->length > 0)&&($this->length > $this->sizelimit)){\n\t\t\t while($new = fread($this->sFp,$this->length)){\n fwrite($newptr,$new);\n $this->output_graph($this->length , ftell($newptr) , $file) ;\n }\n\n\t\t\t }else{\n \t\t\t\t \n \n while($new=fgets($this->sFp)){\n fwrite($newptr,$new);\n }//end data while \n }\n fclose($newptr);\n }\n\t\t\t $this->cliout(\"\\n\");\n break;\n default:\n $this->bugout(\"please choose method for function get() in class spider\");\n die(\"terminating ...\");\n break;\n }//end switch\n\n if(isset($this->what)&&!isset($this->cwd)){\n $this->cwd = eregi_replace(\"/(.*\\..*)$\",\"/\",$this->what);\n $this->tmp = $this->cwd;\n $dir = explode(\"/\", $this->what);\n //print_r($dir);\n\n //DETERMINE DEPTH IN SERVER REDO !!!\n if((count($dir)==\"1\")){\n $this->cwd = $dir[0] . \"/\";\n\t}else{\n array_pop($dir);\n for($i=0;$i<count($dir);$i++)\n\t {$this->cwd.=$dir[$i] . \"/\";}\n //print \"cwd=\" . $this->cwd . \"/\";\n }//end for\n }//end if \n}", "function _http_post($host, $path, $data, $port = 80)\n\t{\n $req = $this->_qsencode ($data);\n\n $http_request = \"POST $path HTTP/1.0\\r\\n\";\n $http_request .= \"Host: $host\\r\\n\";\n $http_request .= \"Content-Type: application/x-www-form-urlencoded;\\r\\n\";\n $http_request .= \"Content-Length: \" . strlen($req) . \"\\r\\n\";\n $http_request .= \"User-Agent: reCAPTCHA/PHP\\r\\n\";\n $http_request .= \"\\r\\n\";\n $http_request .= $req;\n\n $response = '';\n if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) {\n die ('Could not open socket');\n }\n\n fwrite($fs, $http_request);\n\n while ( !feof($fs) )\n $response .= fgets($fs, 1160); // One TCP-IP packet\n fclose($fs);\n $response = explode(\"\\r\\n\\r\\n\", $response, 2);\n\n return $response;\n\t}", "function HTTP_Post($URL,$data, $referrer=\"\") {\n $URL_Info=parse_url($URL);\n\n // Building referrer\n if($referrer==\"\") // if not given use this script as referrer\n $referrer=$_SERVER[\"SCRIPT_URI\"];\n\n // making string from $data\n foreach($data as $key=>$value)\n $values[]=\"$key=\".urlencode($value);\n $data_string=implode(\"&\",$values);\n\n // Find out which port is needed - if not given use standard (=80)\n if(!isset($URL_Info[\"port\"]))\n $URL_Info[\"port\"]=80;\n\n // building POST-request:\n $request.=\"POST \".$URL_Info[\"path\"].\" HTTP/1.1\\n\";\n $request.=\"Host: \".$URL_Info[\"host\"].\"\\n\";\n $request.=\"Referer: $referer\\n\";\n $request.=\"Content-type: application/x-www-form-urlencoded\\n\";\n $request.=\"Content-length: \".strlen($data_string).\"\\n\";\n $request.=\"Connection: close\\n\";\n $request.=\"\\n\";\n $request.=$data_string.\"\\n\";\n\n $fp = fsockopen($URL_Info[\"host\"],$URL_Info[\"port\"]);\n fputs($fp, $request);\n while(!feof($fp)) {\n $result .= fgets($fp, 128);\n }\n fclose($fp);\n\n return $result;\n }", "public function sendGetRequest();", "function _httprequest($url,$fp,$URI,$http_method,$content_type=\"\",$body=\"\")\n\t{\n\t\t$cookie_headers = '';\n\t\tif ($this->passcookies && $this->_redirectaddr)\n\t\t{\n\t\t\t$this->setcookies();\n\t\t}\n\n\t\t$URI_PARTS = parse_url($URI);\n\t\tif (empty($url))\n\t\t{\n\t\t\t$url = \"/\";\n\t\t}\n\n\t\t$headers = $http_method.\" \".$url.\" \".$this->_httpversion.\"\\r\\n\";\n\n\t\tif ( ! empty($this->agent))\n\t\t{\n\t\t\t$headers .= \"User-Agent: \".$this->agent.\"\\r\\n\";\n\t\t}\n\n\t\tif ( ! empty($this->host) && !isset($this->rawheaders['Host']))\n\t\t{\n\t\t\t$headers .= \"Host: \".$this->host;\n\n\t\t\tif ( ! empty($this->port))\n\t\t\t{\n\t\t\t\t$headers .= \":\".$this->port;\n\t\t\t}\n\n\t\t\t$headers .= \"\\r\\n\";\n\t\t}\n\n\t\tif ( ! empty($this->accept))\n\t\t{\n\t\t\t$headers .= \"Accept: \".$this->accept.\"\\r\\n\";\n\t\t}\n\n\t\tif ( ! empty($this->referer))\n\t\t{\n\t\t\t$headers .= \"Referer: \".$this->referer.\"\\r\\n\";\n\t\t}\n\n\t\tif ( ! empty($this->cookies))\n\t\t{\n\t\t\tif ( ! is_array($this->cookies))\n\t\t\t{\n\t\t\t\t$this->cookies = (array)$this->cookies;\n\t\t\t}\n\n\t\t\treset($this->cookies);\n\n\t\t\tif (count($this->cookies) > 0)\n\t\t\t{\n\n\t\t\t\t$cookie_headers .= 'Cookie: ';\n\n\t\t\t\tforeach ($this->cookies as $cookieKey => $cookieVal)\n\t\t\t\t{\n\t\t\t\t\t$cookie_headers .= $cookieKey.\"=\".urlencode($cookieVal).\"; \";\n\t\t\t\t}\n\n\t\t\t\t$headers .= substr($cookie_headers,0,-2) . \"\\r\\n\";\n\t\t\t}\n\t\t}\n\n\t\tif ( ! empty($this->rawheaders))\n\t\t{\n\t\t\tif ( ! is_array($this->rawheaders))\n\t\t\t{\n\t\t\t\t$this->rawheaders = (array)$this->rawheaders;\n\t\t\t}\n\n\t\t\twhile (list($headerKey,$headerVal) = each($this->rawheaders))\n\t\t\t{\n\t\t\t\t$headers .= $headerKey.\": \".$headerVal.\"\\r\\n\";\n\t\t\t}\n\t\t}\n\n\t\tif ( ! empty($content_type))\n\t\t{\n\t\t\t$headers .= \"Content-type: $content_type\";\n\n\t\t\tif ($content_type == \"multipart/form-data\")\n\t\t\t{\n\t\t\t\t$headers .= \"; boundary=\".$this->_mime_boundary;\n\t\t\t}\n\n\t\t\t$headers .= \"\\r\\n\";\n\t\t}\n\n\t\tif ( ! empty($body))\n\t\t{\n\t\t\t$headers .= \"Content-length: \".strlen($body).\"\\r\\n\";\n\t\t}\n\n\t\tif ( ! empty($this->user) || !empty($this->pass))\n\t\t{\n\t\t\t$headers .= \"Authorization: Basic \".base64_encode($this->user.\":\".$this->pass).\"\\r\\n\";\n\t\t}\n\n\t\t//add proxy auth headers\n\t\tif ( ! empty($this->proxy_user))\n\t\t{\n\t\t\t$headers .= 'Proxy-Authorization: ' . 'Basic ' . base64_encode($this->proxy_user . ':' . $this->proxy_pass).\"\\r\\n\";\n\t\t}\n\n\t\t$headers .= \"\\r\\n\";\n\n\t\t// set the read timeout if needed\n\t\tif ($this->read_timeout > 0)\n\t\t{\n\t\t\tsocket_set_timeout($fp, $this->read_timeout);\n\t\t}\n\n\t\t$this->timed_out = false;\n\n\t\tfwrite($fp,$headers.$body,strlen($headers.$body));\n\n\t\t$this->_redirectaddr = false;\n\t\tunset($this->headers);\n\n\t\twhile($currentHeader = fgets($fp,$this->_maxlinelen))\n\t\t{\n\t\t\tif ($this->read_timeout > 0 && $this->_check_timeout($fp))\n\t\t\t{\n\t\t\t\t$this->status=-100;\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif ($currentHeader == \"\\r\\n\")\n\t\t\t{\n\t\t\t\tbreak;\n\t\t\t}\n\n\t\t\t// if a header begins with Location: or URI:, set the redirect\n\t\t\tif (preg_match(\"/^(Location:|URI:)/i\",$currentHeader))\n\t\t\t{\n\t\t\t\t// get URL portion of the redirect\n\t\t\t\tpreg_match(\"/^(Location:|URI:)[ ]+(.*)/i\",chop($currentHeader),$matches);\n\t\t\t\t// look for :// in the Location header to see if hostname is included\n\t\t\t\tif ( ! preg_match(\"|\\:\\/\\/|\",$matches[2]))\n\t\t\t\t{\n\t\t\t\t\t// no host in the path, so prepend\n\t\t\t\t\t$this->_redirectaddr = $URI_PARTS[\"scheme\"].\"://\".$this->host.\":\".$this->port;\n\t\t\t\t\t// eliminate double slash\n\t\t\t\t\tif ( ! preg_match(\"|^/|\",$matches[2]))\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->_redirectaddr .= \"/\".$matches[2];\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\t$this->_redirectaddr .= $matches[2];\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$this->_redirectaddr = $matches[2];\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tif (preg_match(\"|^HTTP/|\",$currentHeader))\n\t\t\t{\n if (preg_match(\"|^HTTP/[^\\s]*\\s(.*?)\\s|\",$currentHeader, $status))\n\t\t\t\t{\n\t\t\t\t\t$this->status= $status[1];\n }\n\t\t\t\t$this->response_code = $currentHeader;\n\t\t\t}\n\n\t\t\t$this->headers[] = $currentHeader;\n\t\t}\n\n\t\t$results = '';\n\n\t\tdo {\n \t\t$_data = fread($fp, $this->maxlength);\n\n \t\tif (strlen($_data) == 0)\n \t\t{\n \t\tbreak;\n \t\t}\n\n \t\t$results .= $_data;\n\t\t} while(true);\n\n\t\tif ($this->read_timeout > 0 && $this->_check_timeout($fp))\n\t\t{\n\t\t\t$this->status=-100;\n\t\t\treturn false;\n\t\t}\n\n\t\t// check if there is a a redirect meta tag\n\n\t\tif (preg_match(\"'<meta[\\s]*http-equiv[^>]*?content[\\s]*=[\\s]*[\\\"\\']?\\d+;[\\s]*URL[\\s]*=[\\s]*([^\\\"\\']*?)[\\\"\\']?>'i\",$results,$match))\n\n\t\t{\n\t\t\t$this->_redirectaddr = $this->_expandlinks($match[1],$URI);\n\t\t}\n\n\t\t// have we hit our frame depth and is there frame src to fetch?\n\t\tif (($this->_framedepth < $this->maxframes) && preg_match_all(\"'<frame\\s+.*src[\\s]*=[\\'\\\"]?([^\\'\\\"\\>]+)'i\",$results,$match))\n\t\t{\n\t\t\t$this->results[] = $results;\n\t\t\tfor($x=0; $x<count($match[1]); $x++)\n\t\t\t{\n\t\t\t\t$this->_frameurls[] = $this->_expandlinks($match[1][$x],$URI_PARTS[\"scheme\"].\"://\".$this->host);\n\t\t\t}\n\t\t}\n\t\t// have we already fetched framed content?\n\t\telseif (is_array($this->results))\n\t\t{\n\t\t\t$this->results[] = $results;\n\t\t}\n\t\t// no framed content\n\t\telse\n\t\t{\n\t\t\t$this->results = $results;\n\t\t}\n\n\t\treturn true;\n\t}", "function http_post ($url, $data, $json_decode = false, $debug = false)\n{\n if ( ! is_array( $data ) ) $data_url = $data;\n else $data_url = http_build_query ($data);\n $data_len = strlen ($data_url);\n $context = stream_context_create (\n array (\n 'http'=> array (\n 'method' => 'POST',\n 'protocol_version' => 1.1,\n 'header' =>\"Content-Type: application/x-www-form-urlencoded\\r\\nConnection: close\\r\\nContent-Length: $data_len\\r\\n\",\n 'content' => $data_url,\n 'timeout' => 4\n )\n )\n );\n if ($debug) {\n echo \"request url: \" . SERVER_URL . \"?$data_url\\n\";\n }\n $content = file_get_contents ( $url, false, $context );\n if ( $json_decode ) {\n $re = @json_decode( $content, true );\n if ( $error = json_decode_error() ) {\n return ['code' => -11, 'message' => \" >> Failed on decode JSON data from server $error - It may be server error. Data from server: $content\"];\n }\n else return $re;\n }\n else return $content;\n}", "public function requestPost($url, $_data, $referer = NULL)\n\t{\n\t $data = array();\n\t while(list($n,$v) = each($_data)){\n\t $data[] = \"$n=$v\";\n\t }\n\t $data = implode('&', $data);\n\t // format --> test1=a&test2=b etc.\n\n\t // parse the given URL\n\t $url = parse_url($url);\n\t if ($url['scheme'] != 'http') {\n\t die('Only HTTP request are supported !');\n\t }\n\n\t // extract host and path:\n\t $host = $url['host'];\n\t $path = $url['path'];\n\n\t // open a socket connection on port 80\n\t $fp = fsockopen($host, $this->getPort(), $errno, $errstr);\n\n if(!$fp) {\n throw new Exception(\"Communication error: $errno $errstr ($host).\");\n }\n\n\t // send the request headers:\n\t fputs($fp, \"POST $path HTTP/1.1\\r\\n\");\n\t fputs($fp, \"Host: $host\\r\\n\");\n\t if(!empty($referer)) fputs($fp, \"Referer: $referer\\r\\n\");\n\t fputs($fp, \"Content-type: application/x-www-form-urlencoded\\r\\n\");\n\t fputs($fp, \"Content-length: \". strlen($data) .\"\\r\\n\");\n\t fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n\t fputs($fp, $data);\n\n\t \tif($fp)\n\t \t{\n\t\t\t$result = fgets($fp);\n\n\t\t\twhile(!feof($fp))\n\t\t\t{\n\t\t\t\t// receive the results of the request\n\t\t\t\t$result .= fgets($fp, 128);\n\t\t\t}\n\t\t}\n\n\t // close the socket connection:\n\t fclose($fp);\n\n\t // split the result header from the content\n\t $result = explode(\"\\r\\n\\r\\n\", $result, 2);\n\t $header = isset($result[0]) ? $result[0] : '';\n\t $content = isset($result[1]) ? $result[1] : '';\n\n\t // return as array:\n\t return $content;\n\t}", "public function post_request($url, $data, $referer='') {\n $data = http_build_query($data);\n \n // parse the given URL\n $url = parse_url($url);\n \n if ($url['scheme'] != 'http') { \n die('Error: Only HTTP request are supported !');\n }\n \n // extract host and path:\n $host = $url['host'];\n $path = $url['path'];\n \n // open a socket connection on port 80 - timeout: 30 sec\n $fp = fsockopen($host, 80, $errno, $errstr, 30);\n \n if ($fp){\n \n // send the request headers:\n fputs($fp, \"POST $path HTTP/1.1\\r\\n\");\n fputs($fp, \"Host: $host\\r\\n\");\n \n if ($referer != '')\n fputs($fp, \"Referer: $referer\\r\\n\");\n \n fputs($fp, \"Content-type: application/x-www-form-urlencoded\\r\\n\");\n fputs($fp, \"Content-length: \". strlen($data) .\"\\r\\n\");\n fputs($fp, \"Connection: close\\r\\n\\r\\n\");\n fputs($fp, $data);\n \n $result = ''; \n while(!feof($fp)) {\n // receive the results of the request\n $result .= fgets($fp, 128);\n }\n }\n else { \n return array(\n 'status' => 'err', \n 'error' => \"$errstr ($errno)\"\n );\n }\n \n // close the socket connection:\n fclose($fp);\n \n // split the result header from the content\n $result = explode(\"\\r\\n\\r\\n\", $result, 2);\n \n $header = isset($result[0]) ? $result[0] : '';\n $content = isset($result[1]) ? $result[1] : '';\n \n // return as structured array:\n return array(\n 'status' => 'ok',\n 'header' => $header,\n 'content' => $content\n );\n }", "function getRequest();", "function executeRequest($url, $header, $audio)\n{\n // First, we need to set a few SSL options\n $sslOptions = array();\n $sslOptions['verifypeer'] = \"0\";\n $sslOptions['verifyhost'] = \"0\";\n // Create an HttpRequest object\n $r = new HttpRequest($url, HttpRequest::METH_POST);\n // Set the SSL options, Headers, Content-Type, and body\n $r->setSslOptions($sslOptions);\n $r->setHeaders($header);\n $r->setContentType($header['Content-Type']);\n $r->setBody($audio);\n try {\n // Send the request\n $m = $r->send();\n // Return the response object\n return $m;\n } catch (HttpException $ex) {\n // If an error occurs, just display it to the web page\n echo '<br><br><font color=\"red\" Exception: ' . $ex . '</font><br><br>';\n }\n}", "function httpPost($host, $path, $data_to_send,\n $opts=array('cert'=>\"\", 'headers'=>0, 'transport' =>'ssl', 'port'=>443),\n $auth=array('username'=>\"\", 'password'=>\"\", 'type'=>\"\")\n ) \n#######################################\n\t\t\t\t\t\t\t\t \n{\n $transport=''; $port=80;\n if (!empty($opts['transport'])) $transport=$opts['transport'];\n if (!empty($opts['port'])) $port=$opts['port'];\n \n\tif (empty($opts['transport']))\n\t\t\n\t\t$remote = \"$host:$port\";\n\n\telse\n\t\t$remote=$transport.'://'.$host.':'.$port;\n\n $context = stream_context_create();\n $result = stream_context_set_option($context, 'ssl', 'verify_host', true);\n if (!empty($opts['cert'])) {\n $result = stream_context_set_option($context, 'ssl', 'cafile', $opts['cert']);\n $result = stream_context_set_option($context, 'ssl', 'verify_peer', true);\n } else {\n $result = stream_context_set_option($context, 'ssl', 'allow_self_signed', true);\n }\n $fp = stream_socket_client($remote, $err, $errstr, 60, STREAM_CLIENT_CONNECT, $context);\n\n if (!$fp) {\n trigger_error('httpPost error: '.$errstr);\n return NULL;\n }\n\n $req='';\n $req.=\"POST $path HTTP/1.1\\r\\n\";\n $req.=\"Host: $host\\r\\n\";\n if ($auth['type']=='basic' && !empty($auth['username'])) {\n $req.=\"Authorization: Basic \";\n $req.=base64_encode($auth['username'].':'.$auth['password']).\"\\r\\n\";\n }\n elseif ($auth['type']=='digest' && !empty($auth['username'])) {\n $req.='Authorization: Digest ';\n foreach ($auth as $k => $v) {\n if (empty($k) || empty($v)) continue;\n if ($k=='password') continue;\n $req.=$k.'=\"'.$v.'\", ';\n }\n $req.=\"\\r\\n\";\n }\n $req.=\"Content-type: text/xml\\r\\n\";\n $req.='Content-length: '. strlen($data_to_send) .\"\\r\\n\";\n $req.=\"Connection: close\\r\\n\\r\\n\";\n\n fputs($fp, $req);\n fputs($fp, $data_to_send);\n\n while(!feof($fp)) { $res .= fgets($fp, 128); }\n fclose($fp);\n\n if ($auth['type']!='nodigest'\n && !empty($auth['username'])\n && $auth['type']!='digest' # prev. digest AUTH failed.\n && preg_match(\"/^HTTP\\/[0-9\\.]* 401 /\", $res)) {\n if (1 == preg_match(\"/WWW-Authenticate: Digest ([^\\n\\r]*)\\r\\n/Us\", $res, $matches)) {\n foreach (explode(\",\", $matches[1]) as $i) {\n $ii=explode(\"=\",trim($i),2);\n if (!empty($ii[1]) && !empty($ii[0])) {\n $auth[$ii[0]]=preg_replace(\"/^\\\"/\",'', preg_replace(\"/\\\"$/\",'', $ii[1]));\n }\n }\n $auth['type']='digest';\n $auth['uri']='https://'.$host.$path;\n $auth['cnonce']=randomNonce();\n $auth['nc']=1;\n $a1=md5($auth['username'].':'.$auth['realm'].':'.$auth['password']);\n $a2=md5('POST'.':'.$auth['uri']);\n $auth['response']=md5($a1.':'\n .$auth['nonce'].':'.$auth['nc'].':'\n .$auth['cnonce'].':'.$auth['qop'].':'.$a2);\n return httpPost($host, $path, $data_to_send, $opts, $auth);\n }\n }\n\n if (1 != preg_match(\"/^HTTP\\/[0-9\\.]* ([0-9]{3}) ([^\\r\\n]*)/\", $res, $matches)) {\n trigger_error('httpPost: invalid HTTP reply.');\n return NULL;\n }\n\n if ($matches[1] != '200') {\n trigger_error('httpPost: HTTP error: '.$matches[1].' '.$matches[2]);\n return NULL;\n }\n\n if (!$opts['headers']) {\n $res=preg_replace(\"/^.*\\r\\n\\r\\n/Us\",'',$res);\n }\n return $res;\n}", "function wpdynabox_http_post($request, $host, $path, $port = 80) {\n\n global $wp_version;\n global $wpdynabox_options;\n\n $http_request = \"POST $path HTTP/1.0\\r\\n\";\n $http_request .= \"Host: $host\\r\\n\";\n $http_request .= \"Content-Type: application/x-www-form-urlencoded; charset=\" . get_option('blog_charset') . \"\\r\\n\";\n $http_request .= \"Content-Length: \" . strlen($request) . \"\\r\\n\";\n $http_request .= \"User-Agent: WordPress/$wp_version | wp-dynabox/\" . $wpdynabox_options['version'] . \"\\r\\n\";\n $http_request .= \"\\r\\n\";\n $http_request .= $request;\n\n $response = '';\n if (false != ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) )) {\n fwrite($fs, $http_request);\n\n while (!feof($fs))\n $response .= fgets($fs, 1160); // One TCP-IP packet\n fclose($fs);\n $response = explode(\"\\r\\n\\r\\n\", $response, 2);\n }\n return $response;\n}", "function _recaptcha_http_post($host, $path, $data, $port = 80) {\n\n $req = _recaptcha_qsencode ($data);\n\n $http_request = \"POST $path HTTP/1.0\\r\\n\";\n $http_request .= \"Host: $host\\r\\n\";\n $http_request .= \"Content-Type: application/x-www-form-urlencoded;\\r\\n\";\n $http_request .= \"Content-Length: \" . strlen($req) . \"\\r\\n\";\n $http_request .= \"User-Agent: reCAPTCHA/PHP\\r\\n\";\n $http_request .= \"\\r\\n\";\n $http_request .= $req;\n\n $response = '';\n if( false == ( $fs = @fsockopen($host, $port, $errno, $errstr, 10) ) ) {\n die ('Could not open socket');\n }\n\n fwrite($fs, $http_request);\n\n while ( !feof($fs) )\n $response .= fgets($fs, 1160); // One TCP-IP packet\n fclose($fs);\n $response = explode(\"\\r\\n\\r\\n\", $response, 2);\n\n return $response;\n}", "function post_request_without_curl_php4($data) {\r\n\t$start = strpos( $this->server_addr, '//' ) + 2;\r\n\t$end = strpos( $this->server_addr, '/', $start );\r\n\t$host = substr( $this->server_addr, $start, $end - $start );\r\n\t$post_path = substr( $this->server_addr, $end );\r\n $fp = @fsockopen( $host, 80 );\r\n if (!$fp) {\r\n $this->errMsg = 'HTTP Error';\r\n $this->errID = $this->API_E_HTTP;\r\n return null;\r\n }\r\n fputs( $fp, \"POST $post_path HTTP/1.0\\n\" .\r\n \"Host: $host\\n\" .\r\n 'User-Agent: OpenidGO PHP REST Client 1.0 (non-curl) '. phpversion() . \"\\n\" .\r\n \"Content-Type: application/x-www-form-urlencoded\\n\" .\r\n \"Content-Length: \" . strlen($data) . \"\\n\\n\" .\r\n \"$data\\n\\n\" );\r\n\t$response = '';\r\n\twhile(!feof($fp)) {\r\n\t\t$response .= fgets($fp, 4096);\r\n\t}\r\n\tfclose ($fp);\r\n // get response code\r\n preg_match( '/^\\S+\\s(\\S+)/', $response, $matches );\r\n if( $matches[1] != \"200\" ) {\r\n $this->errMsg = 'HTTP Error';\r\n $this->errID = $this->API_E_HTTP;\r\n return null;\r\n }\r\n // get response body\r\n preg_match( '/\\r?\\n\\r?\\n(.*?)$/sD', $response, $matches );\r\n $response = $matches[1];\r\n\treturn $response;\r\n }", "public function request();", "function send_request_via_fsockopen($host,$path,$content) {\n\t\t$posturl = \"ssl://\" . $host;\n\t\t$header = \"Host: $host\\r\\n\";\n\t\t$header .= \"User-Agent: PHP Script\\r\\n\";\n\t\t$header .= \"Content-Type: text/xml\\r\\n\";\n\t\t$header .= \"Content-Length: \".strlen($content).\"\\r\\n\";\n\t\t$header .= \"Connection: close\\r\\n\\r\\n\";\n\t\t$fp = fsockopen($posturl, 443, $errno, $errstr, 30);\n\t\t$out = '';\n\t\tif (!$fp) {\n\t\t\t$body = false;\n\t\t} else {\n\t\t\terror_reporting(E_ERROR);\n\t\t\tfputs($fp, \"POST $path HTTP/1.1\\r\\n\");\n\t\t\tfputs($fp, $header.$content);\n\t\t\tfwrite($fp, $out);\n\t\t\t$response = \"\";\n\t\t\twhile (!feof($fp)) {\n\t\t\t\t$response = $response . fgets($fp, 128);\n\t\t\t}\n\t\t\tfclose($fp);\n\t\t\terror_reporting(E_ALL ^ E_NOTICE);\n\t\t\t\n\t\t\t$len = strlen($response);\n\t\t\t$bodypos = strpos($response, \"\\r\\n\\r\\n\");\n\t\t\tif ($bodypos <= 0) {\n\t\t\t\t$bodypos = strpos($response, \"\\n\\n\");\n\t\t\t}\n\t\t\twhile ($bodypos < $len && $response[$bodypos] != '<') {\n\t\t\t\t$bodypos++;\n\t\t\t}\n\t\t\t$body = substr($response, $bodypos);\n\t\t}\n\t\treturn $body;\n\t}", "function _http_post($host, $path, $data, $port = 80) {\n\t\tlog_message ( 'debug', 'Recaptcha::http_post(' . $host . ',' . $path . ',' . print_r ( $data, TRUE ) . ',' . $port . ')' );\n\t\t\n\t\t$req = $this->_qsencode ( $data );\n\t\t$http_request = implode ( '', array (\n\t\t\t\t\"POST $path HTTP/1.0\\r\\n\",\n\t\t\t\t\"Host: $host\\r\\n\",\n\t\t\t\t\"Content-Type: application/x-www-form-urlencoded;\\r\\n\",\n\t\t\t\t\"Content-Length:\" . strlen ( $req ) . \"\\r\\n\",\n\t\t\t\t\"User-Agent: reCAPTCHA/PHP\\r\\n\",\n\t\t\t\t\"\\r\\n\",\n\t\t\t\t$req \n\t\t) );\n\t\t$response = '';\n\t\tif (false == ($fs = @fsockopen ( $host, $port, $errno, $errstr, 10 ))) {\n\t\t\tlog_message ( 'error', $this->_CI->lang->line ( 'recaptcha_socket_fail' ) );\n\t\t}\n\t\t\n\t\tfwrite ( $fs, $http_request );\n\t\twhile ( ! feof ( $fs ) ) {\n\t\t\t$response .= fgets ( $fs, 1160 ); // One TCP-IP packet\n\t\t}\n\t\tfclose ( $fs );\n\t\t$response = explode ( \"\\r\\n\\r\\n\", $response, 2 );\n\t\t\n\t\treturn $response;\n\t}", "function send_request_via_fsockopen($host,$path,$content)\n{\n\t$CI = &get_instance();\n\t\n\t$CI->\n\t\n\t$posturl = \"ssl://\" . $host;\n\t$header = \"Host: $host\\r\\n\";\n\t$header .= \"User-Agent: PHP Script\\r\\n\";\n\t$header .= \"Content-Type: text/xml\\r\\n\";\n\t$header .= \"Content-Length: \".strlen($content).\"\\r\\n\";\n\t$header .= \"Connection: close\\r\\n\\r\\n\";\n\t$fp = fsockopen($posturl, 443, $errno, $errstr, 30);\n\tif (!$fp)\n\t{\n\t\t$response = false;\n\t}\n\telse\n\t{\n\t\terror_reporting(E_ERROR);\n\t\tfputs($fp, \"POST $path HTTP/1.1\\r\\n\");\n\t\tfputs($fp, $header.$content);\n\t\tfwrite($fp, $out);\n\t\t$response = \"\";\n\t\twhile (!feof($fp))\n\t\t{\n\t\t\t$response = $response . fgets($fp, 128);\n\t\t}\n\t\tfclose($fp);\n\t\terror_reporting(E_ALL ^ E_NOTICE);\n\t}\n\treturn $response;\n}", "public static function postRequest($url, $referer, $_data, $header=array()) {\n\t\t$data = array();\n\t\twhile(list($n,$v) = each($_data)){\n\t\t\t\t$data[] = \"$n=$v\";\n\t\t}\n\t\t$data = implode('&', $data);\n\t\t// format --> test1=a&test2=b etc.\n\n\t\t// parse the given URL\n\t\t$url = parse_url($url);\n\t\tif ($url['scheme'] != 'http') {\n\t\t\t\tdie('Only HTTP request are supported !');\n\t\t}\n\n\t\t// extract host and path:\n\t\t$host = $url['host'];\n\t\t$path = $url['path'];\n\n\t\t// open a socket connection on port 80\n\t\t$fp = fsockopen($host, 80);\n\n\t\t// send the request headers:\n\t\tfputs($fp, \"POST $path HTTP/1.1\\r\\n\");\n\t\tfputs($fp, \"Host: $host\\r\\n\");\n\t\tfputs($fp, \"Referer: $referer\\r\\n\");\n\t\tforeach($header as $h)\n\t\t\tfputs($fp, $h.\"\\r\\n\");\n\t\tfputs($fp, \"Content-type: application/x-www-form-urlencoded\\r\\n\");\n\t\tfputs($fp, \"Content-length: \". strlen($data) .\"\\r\\n\");\n\t\tfputs($fp, \"Connection: close\\r\\n\\r\\n\");\n\t\tfputs($fp, $data);\n\n\t\t$result = '';\n\t\twhile(!feof($fp)) {\n\t\t\t\t// receive the results of the request\n\t\t\t\t$result .= fgets($fp, 128);\n\t\t}\n\n\t\t// close the socket connection:\n\t\tfclose($fp);\n\n\t\t// split the result header from the content\n\t\t$result = explode(\"\\r\\n\\r\\n\", $result, 2);\n\n\t\t$header = isset($result[0]) ? $result[0] : '';\n\t\t$content = isset($result[1]) ? $result[1] : '';\n\n\t\t// return as array:\n\t\treturn array($header, $content);\n\t}", "function test_callback($evhttp_request)\n{\n echo \"script-land memory: \".memory_get_usage().\" and real memory from system: \".memory_get_usage(true).\"\\n\";\n\n $uri = evhttp_request_uri($evhttp_request);\n\n $ct = evhttp_request_find_header($evhttp_request, 'Content-Type');\n echo \"URI: $uri\\n\";\n echo \"Content-Type: $ct\\n\";\n\n print_r(evhttp_request_headers($evhttp_request));\n echo evhttp_request_body($evhttp_request);\n\tevhttp_response_add_header($evhttp_request, \"Content-Type\", \"text/plain\");\n\n \treturn evhttp_response_set(\"Hello World!\", 200, \"OK\");\n}" ]
[ "0.7058739", "0.68515193", "0.67918944", "0.6700359", "0.6578472", "0.6510932", "0.65074146", "0.642529", "0.642529", "0.6419172", "0.63653183", "0.6234215", "0.6214998", "0.61854506", "0.61833256", "0.61805594", "0.6176731", "0.6159802", "0.6138987", "0.6125456", "0.6083471", "0.6079429", "0.6047265", "0.6040701", "0.60235417", "0.60198134", "0.60029095", "0.59813976", "0.59698194", "0.596826" ]
0.7269307
0
El ef maneja el concepto de etiqueta?
function tiene_etiqueta() { return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_etiqueta()\n\t{\n\t\treturn $this->etiqueta;\n\t}", "abstract protected function getEntityDescriptor();", "function hook_ENTITY_TYPE_create(\\Drupal\\Core\\Entity\\EntityInterface $entity) {\n \\Drupal::logger('example')->info('ENTITY_TYPE created: @label', ['@label' => $entity->label()]);\n}", "public function entity()\n {\n return Prova::class;\n }", "public function entityDescription()\r\n {\r\n return $this->getIntro();\r\n }", "function get_descripcion()\n\t{\n\t\t//1 empleado tiene N tareas, 1 Tarea puede estar en N empleados\n\t\t//1 tarea puede estar en N departamentos, 1 departamento tiene N tareas\n\t\treturn \"OBJETO datos_relacion (N-N Deptos.)\";\n\t}", "function hook_entity_create(\\Drupal\\Core\\Entity\\EntityInterface $entity) {\n \\Drupal::logger('example')->info('Entity created: @label', ['@label' => $entity->label()]);\n}", "abstract function entity();", "public function __construct()\n\t{\n\t $this->entity = new ConceptosViaje;\n\t}", "public function getEntityType(): string;", "public function etiquetas(){\n\t\treturn $this->belongsToMany('App\\Etiqueta');\n\t}", "function uc_taxes_ca_entity() {\n $entities['tax'] = array(\n '#title' => t('Tax rule'),\n '#type' => 'object',\n );\n return $entities;\n}", "function get_estilo_etiqueta()\n\t{\n\t\treturn $this->estilo_etiqueta;\t\n\t}", "public function entity();", "function hook_ENTITY_TYPE_translation_create(\\Drupal\\Core\\Entity\\EntityInterface $translation) {\n \\Drupal::logger('example')->info('ENTITY_TYPE translation created: @label', ['@label' => $translation->label()]);\n}", "function set_etiqueta($etiqueta)\n\t{\n\t\t$this->etiqueta = $etiqueta;\n\t}", "public function GetEntityType();", "public function getEntityField();", "final protected function _tableDefinition() {\n $annotation = Annotation::getClass($this);\n\n /** @var \\ReflectionClass $fieldClass */\n $fieldClass = new \\ReflectionClass('\\\\Gcs\\Framework\\Core\\\\Orm\\\\Entity\\\\Field');\n /** @var \\ReflectionClass $foreignKeyClass */\n $foreignKeyClass = new \\ReflectionClass('\\\\Gcs\\Framework\\Core\\\\Orm\\\\Entity\\\\ForeignKey');\n /** @var \\ReflectionClass $builderClass */\n $builderClass = new \\ReflectionClass('\\\\Gcs\\Framework\\Core\\\\Orm\\\\Builder');\n\n foreach ($annotation['class'] as $annotationClass) {\n $instance = $annotationClass[0]['instance'];\n\n switch ($annotationClass[0]['annotation']) {\n case 'Table':\n $this->name($instance->name);\n break;\n\n case 'Form':\n $this->form($instance->name);\n break;\n }\n }\n\n foreach ($annotation['properties'] as $name => $annotationProperties) {\n foreach ($annotationProperties as $annotationProperty) {\n $instance = $annotationProperty['instance'];\n\n if ($annotationProperty['annotation'] == 'Column') {\n $this->field($name)->type($fieldClass->getConstant($instance->type))->size($instance->size)->beNull($instance->null == 'true' ? true : false)->primary($instance->primary == 'true' ? true : false)->unique($instance->unique == 'true' ? true : false)->precision($instance->precision)->defaultValue($instance->default)->enum($instance->enum != '' ? explode(',', $instance->enum) : []);\n\n $fieldType = $fieldClass->getConstant($instance->type);\n\n if (in_array($fieldType, [Field::DATETIME, Field::DATE, Field::TIMESTAMP])) {\n $this->set($name, new \\DateTime());\n }\n }\n else {\n $this->field($name)->foreign(['type' => $foreignKeyClass->getConstant($instance->type), 'reference' => explode('.', $instance->to), 'current' => explode('.', $instance->from), 'belong' => $foreignKeyClass->getConstant($instance->belong), 'join' => $builderClass->getConstant($instance->join),]);\n\n $foreignType = $foreignKeyClass->getConstant($instance->type);\n\n if (in_array($foreignType, [ForeignKey::MANY_TO_MANY, ForeignKey::ONE_TO_MANY])) {\n $this->set($name, new Collection());\n }\n }\n }\n }\n }", "function instancia__cambios_estructura()\n\t{\n\t\t$sql = 'SET CONSTRAINTS ALL IMMEDIATE;';\n\t\t$this->elemento->get_db()->ejecutar($sql);\n\t\t$sql = array();\t\t\n\t\t\n\t\t$sql[] = 'ALTER TABLE apex_objeto_ei_formulario_ef ADD COLUMN placeholder TEXT NULL;';\n\t\t$sql[] = 'ALTER TABLE apex_objeto_ei_filtro_col ADD COLUMN placeholder TEXT NULL;';\n\t\t$this->elemento->get_db()->ejecutar($sql);\n\t\t\n\t\t$sql = 'SET CONSTRAINTS ALL DEFERRED;';\n\t\t$this->elemento->get_db()->ejecutar($sql);\n\t}", "public function definition()\n {\n return [\n 'article_translation_id' => 1,\n 'name' => $this->faker->word,\n 'childa_category' => 1,\n 'childa_text' => 'Text modifiée',\n 'childb_category' => 1,\n 'childb_text' => null,\n 'childc_category' => 1,\n 'childc_text' => null,\n 'absorption' => $this->faker->text,\n 'distribution' => $this->faker->text,\n 'metabolisme' => $this->faker->text,\n 'elimination' => $this->faker->text,\n 'official' => $this->faker->text,\n 'litterature' => $this->faker->text,\n 'active' => 1\n ];\n }", "public function getEntityType();", "function hook_entity_translation_create(\\Drupal\\Core\\Entity\\EntityInterface $translation) {\n \\Drupal::logger('example')->info('Entity translation created: @label', ['@label' => $translation->label()]);\n}", "public function getEtiquetas()\n {\n return $this->hasMany(Etiquetas::className(), ['id' => 'etiqueta_id'])->viaTable('juegos_etiquetas', ['juego_id' => 'id']);\n }", "function set_etiqueta ($valor)\n\t{\n\t\t$this->etiqueta = $valor;\n\t}", "public function TechniqueType()\n{\n$com['seq'][0]=[];\n$com['seq'][0]['ele'][0]=['minOccurs'=>'0','ref'=>'Documentation'];\n$com['seq'][0]['ele'][1]=['minOccurs'=>'0','ref'=>'ExtensionScope'];\n$com['seq'][0]['ele'][2]=['minOccurs'=>'0','maxOccurs'=>'unbounded','ref'=>'SampleRoleBlueprint'];\n$com['seq'][0]['ele'][3]=['minOccurs'=>'0','maxOccurs'=>'unbounded','ref'=>'ExperimentDataRoleBlueprint'];\n$com['seq'][0]['ele'][4]=['minOccurs'=>'0','ref'=>'MethodBlueprint'];\n$com['seq'][0]['ele'][5]=['minOccurs'=>'0','maxOccurs'=>'unbounded','ref'=>'ResultBlueprint'];\n$com['seq'][0]['ele'][6]=['minOccurs'=>'0','ref'=>'Bibliography'];\n// Version number of the AnIML Technique Schema used in this document. Must be \"0.90\".\n$com['att'][0]=['fixed'=>'0.9','name'=>'version','type'=>'xsd:string','use'=>'required'];\n// Technique Definition name (human-readable).\n$com['att'][1]=['name'=>'name','type'=>'ShortTokenType','use'=>'required'];\n// Is this document an extension? If false, it is a Technique Definition. If true, it is a Technique Extension.\n$com['att'][2]=['default'=>'','name'=>'extension','type'=>'xsd:boolean','use'=>'optional'];\n// Whether this Technique Definition or Extension needs to be used with an Extension to be valid. If true, at least one non-abstract extension is required in the ExperimentStep.\n$com['att'][3]=['default'=>'','name'=>'abstract','type'=>'xsd:boolean','use'=>'optional'];\nreturn $com;\n}", "public function definition()\n {\n $prefectureLastId = Prefecture::orderBy('id', 'desc')->limit(1)->first()->id;\n $budgetLastId = Budget::orderBy('id', 'desc')->limit(1)->first()->id;\n $targetLastId = Target::orderBy('id', 'desc')->limit(1)->first()->id;\n\n return [\n 'title' => $this->faker->word,\n 'prefecture_id' => rand(1, $prefectureLastId),\n 'budget_id' => rand(1, $budgetLastId),\n 'target_id' => rand(1, $targetLastId),\n 'flow_chart' => json_decode('{\"id\": 1, \"name\": \"root\", \"type\": 1, \"value\": \"\", \"children\": [{\"id\": 2, \"name\": \"集合\", \"type\": 2, \"value\": \"\", \"children\": []}, {\"id\": 4, \"name\": \"行動を入力\", \"type\": 4, \"value\": \"動物園に行く\", \"children\": []}, {\"id\": 3, \"name\": \"解散\", \"type\": 3, \"value\": \"\", \"children\": []}]}'),\n ];\n }", "function actualites_libelle_association_mots($flux){\r\n\t// On recupere le flux, ici le tableau des libelles,\r\n\t// et on ajoute nos trois objets.\r\n\t$flux['actualites'] = 'actualites:info_vu_libelle_actualite';\r\n\r\n\treturn $flux;\r\n}", "public function CategoryBlueprintType()\n{\n$com['seq'][0]=[];\n$com['seq'][0]['ele'][0]=['minOccurs'=>'0','ref'=>'Documentation'];\n$com['seq'][0]['ele'][1]=['minOccurs'=>'0','maxOccurs'=>'unbounded','ref'=>'SeriesSetBlueprint'];\n$com['seq'][0]['ele'][2]=['minOccurs'=>'0','maxOccurs'=>'unbounded','ref'=>'ParameterBlueprint'];\n$com['seq'][0]['ele'][3]=['minOccurs'=>'0','maxOccurs'=>'unbounded','ref'=>'CategoryBlueprint'];\n$com['att'][0]=['name'=>'name','type'=>'ShortTokenType','use'=>'required'];\n$com['att'][1]=['default'=>'required','name'=>'modality','type'=>'ModalityType','use'=>'optional'];\n$com['att'][2]=['default'=>'1','name'=>'maxOccurs','type'=>'MaxOccursType','use'=>'optional'];\nreturn $com;\n}", "abstract protected function entityName();" ]
[ "0.5911122", "0.57835567", "0.56614166", "0.56220436", "0.5577264", "0.55253035", "0.5471375", "0.5411964", "0.5378256", "0.53617924", "0.53592455", "0.53520215", "0.5329916", "0.5328232", "0.53110385", "0.529338", "0.5247652", "0.52309245", "0.51655835", "0.51461875", "0.5127979", "0.5125246", "0.5118881", "0.5114439", "0.510868", "0.508859", "0.50777835", "0.5076139", "0.50741726", "0.5064276" ]
0.59641755
0
Retorna true si tanto los campos clave como valor son posicionales
function son_campos_posicionales() { if (! is_numeric($this->campo_valor)) { return false; } foreach ($this->campos_clave as $campo) { if (! is_numeric($campo)) { return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function validar_campos(){\n if ($this->UsuarioId == '' || $this->password == '' || $this->password_anterior == '') \n {\n return 0;\n }\n else{\n return 1;\n }\n }", "public function validaCamposObrigatorios(){\n\t\tforeach ($this->arAtributos as $chave => $valor)\n\t\tif( isset($this->arAtributosObrigatorios[$chave])) {\n\t\t\tif (empty($this->arAtributos[$chave]) ){\n\t\t\t\tver($chave);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\n\t\treturn true;\n\t}", "function CompruebaCamposVacios(){\n\n\tif(empty($_POST[\"nombre\"]) || empty($_POST[\"ape\"]) || empty($_POST[\"sexo\"])\n\t\t\t|| empty($_POST[\"cursos\"])|| empty($_POST[\"fecha\"])){\n\t\treturn true; //Existen campos vacios\n\t}\n\telse //NO existen campos vacios\n\t\treturn false;\n}", "public function validar() {\n $sentencia = $this->bd->prepare(\"SELECT * FROM usuario WHERE correo=? AND contraseña=? AND estado = 'activo'\");\n $sentencia->execute([$this->correo, $this->contraseña]);\n $datos = $sentencia->fetch(\\PDO::FETCH_ASSOC);\n $this->poblar($datos);\n return $sentencia->rowCount() ? TRUE : FALSE;\n }", "public function validarCadastro() {\r\n\t\t$valido = true;\r\n\r\n\t\tif(strlen($this->__get('nome') < 3)) {\r\n\t\t\t$valido = false;\r\n\t\t};\r\n\r\n\t\tif(strlen($this->__get('email') < 3)) {\r\n\t\t\t$valido = false;\r\n\t\t};\r\n\r\n\t\tif(strlen($this->__get('senha') < 3)) {\r\n\t\t\t$valido = false;\r\n\t\t};\r\n\r\n\t\treturn $valido;\r\n\t}", "protected function validate() {\n //\n $valid = true;\n foreach ($this->getSubmittedValues() as $key => $field) {\n $valid &= !empty($field);\n }\n \n return $valid;\n }", "private function checkValues()\n {\n if (!$this->insertVals) {\n return false;\n }\n\n return true;\n }", "public function convalida(): bool\n {\n $valido = true;\n\n /*if (empty($this->id_utente)) {\n Notifica::accoda(\"Inserire identificativo utente\", Notifica::TIPO_ERRORE);\n $valido = false;\n }*/\n\n $valido = $valido && AiutoConvalida::LunghezzaTesto($this->username, \"La lunghezza del nome utente deve essere compresa tra 1 e 45 caratteri\", 1, 45);\n $valido = $valido && AiutoConvalida::LunghezzaTesto($this->email, \"La lunghezza dell'indirizzo e-mail deve essere compresa tra 1 e 100 caratteri\", 1, 100);\n $valido = $valido && AiutoConvalida::LunghezzaTesto($this->telefono, \"La lunghezza del numero di telefono deve essere compresa tra 1 e 45 caratteri\", 1, 45);\n\n return $valido;\n }", "public function hasOnlyDefaultValues()\n {\n if ($this->reap_r_usuario !== 1) {\n return false;\n }\n\n // otherwise, everything was equal, so return TRUE\n return true;\n }", "function valideer() {\n foreach($this->forms as $x => $form) {\n if (!$form->get_status()) {\n // echo $form->get_naam() . \" gefaald<br>\";\n return false;\n }\n }\n\n return true;\n }", "public function valid()\r\n {\r\n $valid = isset($this->data[$this->position]);\r\n echo \"判断当前值是否有效: {$valid}\",\"<br />\";\r\n return $valid;\r\n }", "public function valid()\n {\n return key($this->fields) !== null;\n }", "public function valid()\n {\n return key($this->fields) !== null;\n }", "public function valid()\n {\n\n if ($this->container['lob_id'] === null) {\n return false;\n }\n if ($this->container['carrier'] === null) {\n return false;\n }\n if ($this->container['account_no'] === null) {\n return false;\n }\n if ($this->container['account_name'] === null) {\n return false;\n }\n if ($this->container['billing_company'] === null) {\n return false;\n }\n if ($this->container['street1'] === null) {\n return false;\n }\n if ($this->container['city'] === null) {\n return false;\n }\n if ($this->container['country'] === null) {\n return false;\n }\n if ($this->container['zip_code'] === null) {\n return false;\n }\n if ($this->container['active'] === null) {\n return false;\n }\n return true;\n }", "public function validarCadastro()\n\t{\n\t\t$valido = true;\n\n\t\tif(strlen($this->__get('nome')) < 3 )\n\t\t{\n\t\t\t$valido = false;\n\t\t}\n\n\t\tif(strlen($this->__get('email')) < 3)\n\t\t{\n\t\t\t$valido = false;\n\t\t}\n\n\n\t\tif(strlen($this->__get('senha')) < 3)\n\t\t{\n\t\t\t$valido = false;\n\t\t}\n\n\t\treturn $valido;\n\t}", "function checkSet(){\n return isset($_POST['address'], $_POST['city'], $_POST['state'], $_POST['landlord_fname'], $_POST['landlord_lname']);\n }", "function verificarCampo($campo,$valor)\n\t\t{\n\t\t\t$conexion=$this->conexionDB;\n\t\t\t$q=\"select $campo from usuarios where $campo='\".$valor.\"'\";\n\t\t\t\n\t\t\t$resultado=$conexion->query($q);\n\n\t\t\tif($resultado->num_rows)\n\t\t\t{\n\t\t\t\treturn true;\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t}", "function validarParametros($parametros) {\r\n\t$puedoUsar=true;\r\n\tforeach ($parametros as $nombre) {\r\n\t\t$puedoUsar=isset($_GET[$nombre]) && !empty($_GET[$nombre]);\r\n\t\tif($puedoUsar == false) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}\r\n\treturn $puedoUsar;\r\n}", "public function validarDatos()\n\t\t{\n\t\t\treturn true;\n\t\t}", "public function validarDatos()\n\t\t{\n\t\t\treturn true;\n\t\t}", "public function valid()\n {\n\n if ($this->container['line1'] === null) {\n return false;\n }\n if (strlen($this->container['line1']) > 200) {\n return false;\n }\n if (strlen($this->container['line2']) > 200) {\n return false;\n }\n if ($this->container['city'] === null) {\n return false;\n }\n if (strlen($this->container['city']) > 50) {\n return false;\n }\n if ($this->container['state'] === null) {\n return false;\n }\n if (strlen($this->container['state']) > 50) {\n return false;\n }\n if ($this->container['postal_code'] === null) {\n return false;\n }\n if (strlen($this->container['postal_code']) > 15) {\n return false;\n }\n if ($this->container['country'] === null) {\n return false;\n }\n if (strlen($this->container['country']) > 2) {\n return false;\n }\n if (strlen($this->container['country']) < 2) {\n return false;\n }\n if (strlen($this->container['first_name']) > 200) {\n return false;\n }\n return true;\n }", "function check_posisi_lap()\n {\t\t\t\t\n\t\tif($this->input->post('users_posisi_id') == '0'){\n\t\t\t$this->form_validation->set_message('check_posisi_lap', 'Kolom %s belum dipilih');\n\t\t\treturn FALSE;\t\t\t\t\t\t\t\t\t\t\t\n\t\t}else{\n\t\t\treturn TRUE;\n\t\t}\t\t\t\t \n }", "public function valid()\n {\n return (null !== key($this->fields));\n }", "public function valid ()\n {\n return isset( $this->key );\n }", "public function valid()\n {\n $key = key($this->data);\n return $key !== null && $key !== false;\n }", "public function valid()\n {\n\n if ($this->container['address_city'] === null) {\n return false;\n }\n if ($this->container['address_number'] === null) {\n return false;\n }\n if ($this->container['address_postal_code'] === null) {\n return false;\n }\n if ($this->container['address_state'] === null) {\n return false;\n }\n if ($this->container['address_street'] === null) {\n return false;\n }\n if ($this->container['brand'] === null) {\n return false;\n }\n if ($this->container['cpf'] === null) {\n return false;\n }\n if ($this->container['crt'] === null) {\n return false;\n }\n if ($this->container['email'] === null) {\n return false;\n }\n if ($this->container['ie'] === null) {\n return false;\n }\n if ($this->container['mobile_phone'] === null) {\n return false;\n }\n if ($this->container['name'] === null) {\n return false;\n }\n if ($this->container['password'] === null) {\n return false;\n }\n return true;\n }", "public function valid() : bool\n {\n return !is_null( $this->getValue() );\n }", "public function valid()\n {\n\n if ($this->container['molecularEndPosition'] === null) {\n return false;\n }\n if ($this->container['molecularEndPosition'] < 0) {\n return false;\n }\n if ($this->container['snpIds'] === null) {\n return false;\n }\n if ($this->container['symbol'] === null) {\n return false;\n }\n if (strlen($this->container['symbol']) < 1) {\n return false;\n }\n if ($this->container['molecularStartPosition'] === null) {\n return false;\n }\n if ($this->container['molecularStartPosition'] < 0) {\n return false;\n }\n if ($this->container['parentAccession'] === null) {\n return false;\n }\n if (strlen($this->container['parentAccession']) < 1) {\n return false;\n }\n if ($this->container['chromosome'] === null) {\n return false;\n }\n if (strlen($this->container['chromosome']) < 1) {\n return false;\n }\n return true;\n }", "private function modelProcessing(){\r\n $arr = array('firstName' ,'lastName','password','email');\r\n for($i = 0;$i < sizeof($arr);$i++){\r\n if(!isset($_POST[$arr[$i]])){\r\n return false ;\r\n }\r\n }\r\n return true ;\r\n }", "public function validate(){\n //Fields checked in reverse order for efficiency\n if ($this->password != null && $this->password != \"\" &&\n $this->email != null && $this->email != \"\" &&\n $this->username != null && $this->username != \"\" &&\n $this->name_last != null && $this->name_last != \"\" &&\n $this->name_first != null && $this->name_first != \"\"\n )\n {\n return true;\n }\n \n //The default behavior is to return false, errors may return false negatives\n return false;\n }" ]
[ "0.6893401", "0.682704", "0.6448005", "0.6386067", "0.6235221", "0.6232886", "0.6194655", "0.6184361", "0.6122576", "0.6067376", "0.6041848", "0.6041493", "0.6041493", "0.6032246", "0.60173064", "0.6001044", "0.59983546", "0.5991273", "0.5965756", "0.5965756", "0.59582657", "0.5958214", "0.5936062", "0.59338117", "0.59282506", "0.5923237", "0.5912026", "0.59026337", "0.58680254", "0.5864927" ]
0.6920132
0
Retorna el texto de la etiqueta asociada
function get_etiqueta() { return $this->etiqueta; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function get_estilo_etiqueta()\n\t{\n\t\treturn $this->estilo_etiqueta;\t\n\t}", "public function getLabel()\n {\n return strtoupper($this->CamposFormato->etiqueta);\n }", "public function __toString()\n {\n return $this->getText();\n }", "public function getInfo()\n {\n $str = \"{$this->judul} | {$this->getLabel()} (Rp. {$this->harga})\";\n\n return $str;\n }", "public function toText() {\r\n\t\t$text = \"\";\r\n\t\tforeach ( $this->events as $label ) $text .= $label.\". \";\r\n\t\tforeach ( $this->functions as $label ) $text .= $label.\". \";\r\n\t\tforeach ( $this->orgUnits as $label ) $text .= $label.\". \";\r\n\t\treturn $text;\r\n\t}", "function toString( $contentObjectAttribute )\n {\n return $contentObjectAttribute->attribute( 'data_text' );\n }", "public function getText()\n {\n return $this->readOneof(1);\n }", "public function getText()\n {\n return $this->readOneof(2);\n }", "public function __toString() {\n\t\ttry {\n\t\t\treturn (string) $this->titreannonce;\n\t\t} catch (Exception $exception) {\n\t\t\treturn '';\n\t\t}\n\t}", "public function __toString()\n {\n $cadena = \"\\n===========================================\";\n $cadena .= \"\\nTeatro: \" . $this->getNombreTeatro();\n $cadena .= \"\\nDirección: \" . $this->getDireccionTeatro();\n $cadena .= \"\\nFunciones: \" . $this->mostrarColeccion($this->getColObjFunciones());\n return $cadena;\n }", "public function toString() \n {\n return $this->getID().\" (\".$this->getPurpose().\") \".$this->getText();\n }", "public function __toString()\n {\n return $this->text;\n }", "public function __toString()\n {\n return $this->text;\n }", "public function getText()\n {\n return $this->__get(\"text\");\n }", "public function getInfo(){\n $str = $this->judul .\" | \".$this->getLabel().\" (Rp. {$this->harga})\";\n \n return $str; \n }", "public function getInfo(){\n $str = $this->judul .\" | \".$this->getLabel().\" (Rp. {$this->harga})\";\n \n return $str; \n }", "public function __toString() {\n return $this->tag();\n }", "public function getText(){\r\n $wordAttributes = new wordAttributes();\r\n if ($this->space == false) {\r\n return sprintf('<w:r><w:rPr>%s</w:rPr><w:t>%s</w:t></w:r>', $wordAttributes->getNodes($this->option), $this->text);\r\n }else{\r\n return sprintf('<w:r><w:rPr>%s</w:rPr><w:t xml:space=\"preserve\">%s</w:t></w:r>', $wordAttributes->getNodes($this->option), $this->text);\r\n }\r\n }", "public function getText() {\n return $this->TEXT;\n }", "public function __toString() {\n \t\t$retString=\"\n [ TYPE: Picasa_Tag \n ID: \".$this->id.\"\n UPDATED: \".$this->updated.\"\n TITLE: \".$this->title.\" \n SUMMARY: \".$this->summary.\"\n WEIGHT: \".$this->weight.\"\n AUTHOR: \".$this->author.\"\n ]\";\n\n\t \treturn $retString;\n\t}", "public function entityDescription()\r\n {\r\n return $this->getIntro();\r\n }", "public function __toString() {\n return \"{$this->nome} tem {$this->idade} anos.\";\n }", "public function __toString(){\n return $this->text;\n }", "public function __toString() {\n\t\t\t$string = \"FR\". $this->getSaisie()->getId() . \"-Type\" . $this->getTypologie()->getId();\n\t\t\tif(isset($string)) return $string;\t\t\t\n\t\t}", "public function getString()\n {\n return $this->tag->getString();\n }", "public function __toString()\n {\n if($this->getNom())\n return $this->getNom();\n else\n return \"\";\n }", "function getText($a_short_mode = false)\n\t{\n\t\tif (is_object($this->par_node))\n\t\t{\n\t\t\t$content = \"\";\n\t\t\t$childs = $this->par_node->child_nodes();\n\t\t\tfor($i=0; $i<count($childs); $i++)\n\t\t\t{\n\t\t\t\t$content .= $this->dom->dump_node($childs[$i]);\n\t\t\t}\n\t\t\treturn $content;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn \"\";\n\t\t}\n\t}", "public function getText()\n {\n $value = $this->get(self::text);\n return $value === null ? (string)$value : $value;\n }", "public function __toString()\n {\n //Sirve pa mostrar todos los tipos de herramienta en el formulario de herramientas\n return $this->getIdiomaName() ? $this->getIdiomaName() : \"\";\n }", "public function text()\n {\n return $this->attributes['text'] ?? null;\n }" ]
[ "0.671781", "0.6663584", "0.6621191", "0.6532114", "0.65048575", "0.64964783", "0.64585924", "0.6457654", "0.6425613", "0.64062387", "0.64030325", "0.63899374", "0.63899374", "0.6386733", "0.63638455", "0.63638455", "0.63631636", "0.6351914", "0.63498694", "0.63489795", "0.6347799", "0.6345901", "0.6344137", "0.6323732", "0.63154656", "0.6311434", "0.6307371", "0.6263778", "0.6248557", "0.624822" ]
0.7561503
0
Permite chequear si el valor del ef cae dentro de las excepciones
protected function confirma_excepcion_validacion() { if (isset(self::$_excepciones)) { //Se fija si el valor es parte de las excepciones if (in_array($this->estado, self::$_excepciones)) { return true; } } return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function chequeo_solo_lectura() {\n if(php_mocovi::instancia()->periodo_a_presupuestar_activo() ){\n $excepcion = true;\n } else {\n //print_r(toba::usuario()->get_perfiles_funcionales());\n $perfiles = toba::usuario()->get_perfiles_funcionales();\n\n //ei_arbol(toba::usuario()->get_restricciones_funcionales('admin'));\n $excepcion = false;\n foreach ($perfiles as $key => $value) {\n if ($value == 'excepcion') {\n $excepcion = true;\n break;\n }\n }\n }\n if (!$excepcion) {\n toba::notificacion()->agregar('Acceso de solo Lectura. Se ha cerrado la carga de la información. ', 'info');\n }\n return !$excepcion;\n }", "public function getExito() : bool\n {\n return $this->exito;\n }", "public function convalida(): bool\n {\n $valido = true;\n\n /*if (empty($this->id_utente)) {\n Notifica::accoda(\"Inserire identificativo utente\", Notifica::TIPO_ERRORE);\n $valido = false;\n }*/\n\n $valido = $valido && AiutoConvalida::LunghezzaTesto($this->username, \"La lunghezza del nome utente deve essere compresa tra 1 e 45 caratteri\", 1, 45);\n $valido = $valido && AiutoConvalida::LunghezzaTesto($this->email, \"La lunghezza dell'indirizzo e-mail deve essere compresa tra 1 e 100 caratteri\", 1, 100);\n $valido = $valido && AiutoConvalida::LunghezzaTesto($this->telefono, \"La lunghezza del numero di telefono deve essere compresa tra 1 e 45 caratteri\", 1, 45);\n\n return $valido;\n }", "function valideer() {\n foreach($this->forms as $x => $form) {\n if (!$form->get_status()) {\n // echo $form->get_naam() . \" gefaald<br>\";\n return false;\n }\n }\n\n return true;\n }", "public function checkBaixatQuirofan()\n {\n if ($this->codiProcAuxiliarEntradaTempsFi == null && $this->entradaQuirofanH2Real != null) {\n $this->codiProcAuxiliarEntradaTempsFi = $this->entradaQuirofanH2Real;\n }\n return $this->codiProcAuxiliarEntradaTempsFi;\n }", "public function faseFinalAlcancada() {\n\t\t$stmt= $this->db->prepare( \"SELECT * FROM concurso WHERE idconcurso=1\" );\n\t\t$stmt->execute();\n\t\t$concurso = $stmt-> fetch(PDO::FETCH_ASSOC);\n\t\tif ($concurso != null) {\n\t\t\treturn $concurso[\"elegidosfinalistas\"];\n\t\t} else {\n\t\t\treturn false;\n\t\t}\n\t}", "function tiene_estado()\n\t{\n\t\treturn isset($this->estado) && ($this->estado !== apex_ef_no_seteado);\n\t}", "public function estVide() {\n\t\t\treturn $this->contenu == null;\n\t\t}", "public function enviadaParaCliente()\n {\n foreach($this->evento as $evento) {\n $evento = (object) $evento;\n return $evento->evento === 'enviado_fatura';\n };\n }", "function VerificarClave($clave_comp){\n $claves = Conexion::conectar()->prepare(\"SELECT count(clave_comp) AS clave FROM `competencias` WHERE `clave_comp`= ?\");\n $claves ->execute(array($clave_comp));\n $clave = $claves->fetchAll(PDO::FETCH_ASSOC);\n $row_clave = array_shift($clave);\n \n\n if ($row_clave['clave'] > 0) {\n \n return 0;//la clave ingresada no existe\n\n } else {\n return 1;//la clave ingresada existe\n }\n \n }", "function verificarInscrito($retorno,$espaciosInscritos) {\n //verifica si el espacio ya ha sido inscrito\n $inscrito='ok';\n foreach ($espaciosInscritos as $inscritos) {\n if($inscritos['CODIGO']==$this->datosInscripcion['codEspacio'])\n {\n $inscrito=$inscritos['GRUPO'];\n break;\n }\n }\n if($inscrito!='ok')\n {\n $retorno['mensaje']=\"El espacio académico ya esta inscrito en el grupo \".$inscrito.\" para el periodo actual. No se puede inscribir de nuevo.\";\n $this->enlaceNoAdicion($retorno);\n }\n }", "function verificarInscrito($retorno,$espaciosInscritos) {\n //verifica si el espacio ya ha sido inscrito\n $inscrito='ok';\n foreach ($espaciosInscritos as $inscritos) {\n if($inscritos['CODIGO']==$this->datosInscripcion['codEspacio'])\n {\n $inscrito=$inscritos['GRUPO'];\n break;\n }\n }\n if($inscrito!='ok')\n {\n $retorno['mensaje']=\"El espacio académico ya esta inscrito en el grupo \".$inscrito.\" para el periodo actual. No se puede inscribir de nuevo.\";\n $this->enlaceNoAdicion($retorno);\n }\n }", "private function comprobarExistencias() {\n /* Comprobacion de Stock */\n $warnings = \"\";\n if (!empty($this->data['ArticulosAvisosrepuesto'])) {\n foreach ($this->data['ArticulosAvisosrepuesto'] as $articulo_aviso) {\n $articulo = $this->Avisosrepuesto->ArticulosAvisosrepuesto->Articulo->find('first', array('conditions' => array('Articulo.id' => $articulo_aviso['articulo_id'])));\n $existencias_al_final = intval($articulo['Articulo']['existencias']) - intval($articulo_aviso['cantidad']);\n if ($existencias_al_final < 0) {\n $warnings .= '<br/> No hay existencias suficientes del articulo ' . $articulo['Articulo']['ref'] . ' ---- ' . $articulo['Articulo']['nombre'];\n }\n }\n }\n /* Fin de comprobación de Stock */\n return $warnings;\n }", "function controlFindEntorno($nombre) {\n $validation = true;\n $bitacle = unserialize($_SESSION['bitacle']);\n\n for ($i = 0; $i < count($bitacle->getEntornos()); $i++) {\n if (($bitacle->getEntornos()[$i]->getNombre() == $nombre)) {\n $validation = false;\n } else {\n $validation = true;\n }\n }\n return $validation;\n}", "public function verifieFiliereSemestres() {\n try {\n global $bdd;\n $res = $bdd->prepare('select id_f from filiere where id_f=:idf');\n $res->execute(array('idf' => $this->idf));\n $don = $res->fetchAll();\n if (empty($don)) {\n throw new Exception('Filiere non trouve');\n }\n $res->closeCursor();\n $resSem = $bdd->prepare('select nom_s from semestre where nom_s=:si and nom_s_eq=:sj');\n $resSem->execute(array('si' => $this->si, 'sj' => $this->sj));\n $donSem = $resSem->fetchAll();\n $resSem->closeCursor();\n if (empty($donSem)) {\n throw new Exception('semestre non trouve,ou les deux semestres ne sont pas dans meme anne');\n }\n return TRUE;\n } catch (Exception $e) {\n echo '<script>alert(\"' . $e->getMessage() . '\");</script>';\n }\n $this->pretAdelibrer = FALSE;\n return FALSE;\n }", "function esiste() : bool\n {\n $utentePrenotazioneId = $this->utentePrenotazione->getId();\n $libroPrenotazioneId = $this->libroPrenotazione->getId();\n \n if(f_persistance::getInstance()->esiste(e_prenotazione::class, f_target::ESISTE_PRENOTAZIONE, $utentePrenotazioneId, $libroPrenotazioneId))\n return true;\n else \n return false;\n }", "function existeLetra($coleccionLetras, $letra){\n $letraValida = false;\n for ($i = 0; $i <count($coleccionLetras); $i++){\n if ($letra == $coleccionLetras[$i][\"letra\"]){\n $coleccionLetras[$i] = [\"descubierta\" => true];\n $letraValida = true;\n }\n }\n return $letraValida;\n}", "private function checkValues()\n {\n if (!$this->insertVals) {\n return false;\n }\n\n return true;\n }", "public function Validcrm($crm){\n //buscar crm no bd\n $this->veri = true; //caso encontre\n /*\n $this->veri1 = false; se não encontrar \n */\n}", "public function esSesionAgotada(){\n $this->_ButacaSesion_arr;\n foreach($this->_ButacaSesion_arr as $ButacaSesion){\n if($ButacaSesion->getEstado()==\"libre\"){\n return 0;\n }\n }\n return 1;\n }", "function verifFechaFin() {\r\n $expediente = new tab_expediente ();\r\n $exp_id = $_POST[\"Exp_id\"];\r\n\r\n $sql = \"SELECT exp_fecha_exf FROM tab_expediente WHERE exp_id='$exp_id'\";\r\n $row = $expediente->dbselectBySQL($sql);\r\n if ($row[0]->exp_fecha_exf) {\r\n echo 'El expediente fue cerrado';\r\n } else {\r\n echo '';\r\n }\r\n }", "private function confInserido() {\r\n\r\n $query = \"SELECT nomeAdmin,loginAdmin FROM administrador\";\r\n\r\n $stmt = $this->conn->prepare($query);\r\n $stmt->execute();\r\n $array = ($stmt->fetchAll(PDO::FETCH_ASSOC));\r\n\r\n $controle = 0;\r\n\r\n foreach ($array as $c => $vale) {\r\n if (array_search($this->getLogin(), $vale) or array_search($this->getNome(), $vale))\r\n $controle = $controle + 1;\r\n }\r\n\r\n if ($controle >= 1)\r\n return FALSE;\r\n else\r\n return TRUE;\r\n }", "function chpeso($codigo,$id){\n\t\t$entrada=floatval($this->input->post('entrada_'.$id));\n\t\t$this->validation->set_message('chpeso', 'El art&iacute;culo '.$codigo.' no tiene peso, se necesita para el c&aacute;lculo del costo');\n\t\tif($entrada>0){\n\t\t\t$dbcodigo=$this->db->escape($codigo);\n\t\t\t$peso=floatval($this->datasis->dameval('SELECT peso FROM sinv WHERE codigo='.$dbcodigo));\n\t\t\tif($peso>0){\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn false;\n\t\t}\n\t\treturn true;\n\t}", "public function sePuedeReemplazar(){\n //es enasrio que no tenga hijos; es decir que no\n //sea un punto de medida ya reemplazado \n if(!$this->isNewRecord){\n if($this->nhijos >0){\n return false;\n }\n return true;\n /*if(strtotime($this->fechafin)>0)\n return true;*/\n }else{\n return false;\n }\n \n }", "private function validarSiEstaAplicado(){\r\n\t\tif($this->importePendiente != $this->importeTotal){\r\n\t\t\tthrow new FactoryExceptionCustomException('No puede borrar un documento que ya fue aplicado.');\r\n\t\t}\r\n\t}", "function verificar_existencia_de_espacio (){\n \n $anio_lectivo=date('Y', strtotime($this->s__fecha_consulta));\n $this->s__dia_consulta=$this->obtener_dia(date('N', strtotime($this->s__fecha_consulta)));\n //Debemos usar la fecha seleccionada por el usuario. Necesitamos brindar una respuesta concreta\n //segun los espacios ocupados en ese dia.\n $periodo=$this->dep('datos')->tabla('periodo')->get_periodo_calendario(date('Y-m-d', strtotime($this->s__fecha_consulta)), $anio_lectivo, $this->s__id_sede);\n \n //Obtenemos las aulas del establecimiento.\n $aulas_ua=$this->dep('datos')->tabla('aula')->get_aulas_por_sede($this->s__id_sede);\n \n //Obtenemos las asignaciones para la fecha solicitada. En este caso necesitamos traer las \n //asignaciones para todas las aulas del establecimiento.\n $asignaciones=$this->procesar_periodo($periodo, 'hd');\n \n //Obtenemos todas las aulas que actualmente estan siendo usadas. \n $aulas=$this->obtener_aulas($asignaciones);\n \n //Guardamos el id_sede en sesion, para utilizar dentro de la clase HorariosDisponibles en la \n //operacion agregar_capacidad.\n toba::memoria()->set_dato_instancia(0, $this->s__id_sede);\n \n $horarios_disponibles=new HorariosDisponibles();\n \n $this->s__horarios_disponibles=$horarios_disponibles->calcular_horarios_disponibles($aulas, $aulas_ua, $asignaciones);\n \n //Obtenemos los horarios que coinciden con el requerimiento registrado.\n $horarios=$this->calcular_horarios_disponibles_segun_req();\n \n //Si existe al menos 1 horario libre que coincide con el requerimiento, lo mostramos en el \n //cuadro_espacio_ocupado :D, -_-\n if(count($horarios) > 0){\n $this->s__horarios_libres=$horarios; //contiene los horarios que conciden con el requerimiento\n }else{\n toba::notificacion()->agregar(\"No existen horarios disponibles alternativos\", 'info');\n return ;\n }\n \n }", "function verificarCruce($retorno,$horarioEstudiante,$horarioGrupo) {\n //verifica si hay cruce de horario\n $cruce=$this->validacion->verificarCruceHorarios($horarioEstudiante,$horarioGrupo);\n if($cruce==1)\n {\n $retorno['mensaje']=\"El horario del espacio académico presenta cruce con el horario del estudiante. No se ha realizado la inscripción\";\n $this->enlaceNoAdicion($retorno);\n exit;\n }\n }", "function verificarCruce($retorno,$horarioEstudiante,$horarioGrupo) {\n //verifica si hay cruce de horario\n $cruce=$this->validacion->verificarCruceHorarios($horarioEstudiante,$horarioGrupo);\n if($cruce==1)\n {\n $retorno['mensaje']=\"El horario del espacio académico presenta cruce con el horario del estudiante. No se ha realizado la inscripción\";\n $this->enlaceNoAdicion($retorno);\n exit;\n }\n }", "function ef_tiene_maestros_seteados($id_ef)\n\t{\n\t\tif (!array_key_exists($id_ef, $this->_efs) || !isset($this->_cascadas_maestros[$id_ef])) {\n\t\t\treturn false;\n\t\t}\n\t\tforeach ($this->_cascadas_maestros[$id_ef] as $maestro) {\n\t\t\tif (! $this->_efs[$maestro]->tiene_estado()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}\n\t\treturn true;\t\t\t\n\t}", "function tieneAistencia($id_nom, $aId_activ)\n{\n // Comprobar que no tienen alguna actividad ya asignada como propia\n $GesAsistentes = new asistentes\\GestorAsistenteDl();\n $cAsistentes = $GesAsistentes->getAsistentesDl(array('id_nom' => $id_nom, 'propio' => 't'));\n foreach ($cAsistentes as $oAsistente) {\n $id_activ = $oAsistente->getId_activ();\n if (array_key_exists($id_activ, $aId_activ)) {\n return TRUE;\n }\n }\n $GesAsistentesOut = new asistentes\\GestorAsistenteOut();\n $cAsistentesOut = $GesAsistentesOut->getAsistentesOut(array('id_nom' => $id_nom, 'propio' => 't'));\n foreach ($cAsistentesOut as $oAsistente) {\n $id_activ = $oAsistente->getId_activ();\n if (array_key_exists($id_activ, $aId_activ)) {\n return TRUE;\n }\n }\n return FALSE;\n}" ]
[ "0.65369606", "0.6236853", "0.60396206", "0.5968818", "0.5922821", "0.59217477", "0.5909502", "0.5837935", "0.5808122", "0.5804366", "0.5783709", "0.5783709", "0.5782669", "0.5744068", "0.5730993", "0.5727596", "0.5696766", "0.5675364", "0.5650128", "0.5643882", "0.5642924", "0.5614136", "0.5612801", "0.56073403", "0.5606702", "0.56004524", "0.5584009", "0.5584009", "0.55800086", "0.5579869" ]
0.63009214
1
Permite normalizar un parametro recibido de una cascada a un formato estandar
function normalizar_parametro_cascada($parametro) { return $parametro; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function formatarData($argData){\n \tif ($argData){\n \t\tif (strpos($argData, \"/\")){\n\t\t\t\t$retorno = substr($argData, 6, 4) . '-' . substr($argData, 3, 2) . '-' . substr($argData, 0, 2);\n \t\t} else {\n \t\t\t$retorno = substr($argData, 0, 10);\n \t\t}\n \t} else {\n \t\t \t$retorno = \"\";\n \t\t}\n \treturn $retorno;\n }", "function converteData($data){\r\n if (strstr($data, \"/\")){//verifica se tem a barra /\r\n $d = explode (\"/\", $data);//tira a barra\r\n $rstData = \"$d[2]-$d[1]-$d[0]\";//separa as datas $d[2] = ano $d[1] = mes etc...\r\n return $rstData;\r\n }\r\n else if(strstr($data, \"-\")){\r\n $data = substr($data, 0, 10);\r\n $d = explode (\"-\", $data);\r\n $rstData = \"$d[2]/$d[1]/$d[0]\";\r\n return $rstData;\r\n }\r\n else{\r\n return '';\r\n }\r\n}", "function cleanData($param) {\n\t\treturn preg_replace('[^0-9a-zA-Z \\-_,\\.]', '', is_null($param) ? '' : $param );\n\t}", "private static function cleanParameter($parameter)\n {\n $parameter = preg_replace(\"/[+]req$/\", \"|REQ|\", $parameter);\n $parameter = preg_replace(\"/[+]nth$/\", \"|NTH|\", $parameter);\n $parameter = str_replace(\"&\", \"%2526\", $parameter);\n $parameter = str_replace(\" \", \"%2520\", $parameter);\n $parameter = str_replace(\"/\", \"%252f\", $parameter);\n $parameter = str_replace(\"+\", \"%252b\", $parameter);\n $parameter = str_replace(\"|NTH|\", \"+nth\", $parameter);\n $parameter = str_replace(\"|REQ|\", \"+req\", $parameter);\n return $parameter;\n }", "protected function normalizeParam($param) {\n $p = str_replace('%20', ' ', $param);\n return $p;\n }", "function datareformat ($data) {\t\n \t$aa=substr($data, 0, 4);\n \t$mm=substr($data, 5, 2);\n $gg=substr($data, -2, 2);\n $datareformat= $gg.\"/\".$mm.\"/\".$aa;\n\treturn $datareformat;\n}", "static function normalizeData($data);", "function obtener_parametro($nombre_parametro) {\n\tif (isset($_REQUEST[$nombre_parametro]))\n\t\treturn trim($_REQUEST[$nombre_parametro]);\n\t\t\n\treturn '';\n}", "function ConverteDataForm($data){\r\n if ($data!=''){\r\n $data = substr($data, 6,4).'-'.substr($data, 3,2).'-'.substr($data, 0,2);\r\n }else{\r\n $data='';\r\n }\r\n return $data;\r\n }", "function convertDateTimeInput($param,$param_text,$covert_type='datetime')\n{\n\n if(empty($param))\n { \n return array('responseCode'=>400,\"data\"=>\"Please enter $param_text\");\n }\n if(strlen($param) != 10)\n {\n return array(\"responseCode\"=>400,\"data\"=>\"Please enter $param_text on 10 digit EPOCH format\");\n }\n \n switch ($covert_type)\n {\n case 'date':\n $coverted_time = date('Y-m-d',trim($param));\n break;\n case 'time':\n $coverted_time = date('H:i:s',trim($param));;\n break;\n case 'datetime':\n $coverted_time = date('Y-m-d H:i:s',trim($param));\n break;\n default :\n $coverted_time = date('Y-m-d H:i:s',trim($param));\n break;\n }\n//pr($coverted_time);\n return array(\"responseCode\"=>200,\"data\"=>$coverted_time);\n}", "private function cleanParamString($parms){\n\t\t$parms = trim(strtolower($parms));\n\t\t$p = explode('/', $parms);\n\t\t$p = array_filter($p, 'strlen');\n\t\tif(!empty($p)) {\n\t\t\t$o['str'] = implode('', $p);\n\t\t\t$o['uri'] = implode('/', $p) . '/';\n\t\t\treturn $o;\n\t\t}\n\t}", "function convertir_anc_param() {\r\n\r\n\t# correspondance anciens params (jusqu_a 2.12)\r\n\t$dw2_conv_nom_param = array(\r\n\t\t'dw_version'=>'version_installee',\r\n\t\t'anti_triche'=>'anti_triche',\r\n\t\t'fl'=>'nbr_lignes_tableau',\r\n\t\t'typ_classcat'=>'type_categorie',\r\n\t\t'ext_logo_serv'=>'extens_logo_serveur', \r\n\t\t'inclus_nouv_doc'=>'mode_enregistre_doc',\r\n\t\t'jour_inclus_doc'=>'jours_affiche_nouv',\r\n\t\t'presel_fi'=>'mode_affiche_images',\r\n\t\t'xml_maj'=>'avis_maj',\r\n\t\t'skl_cata'=>'squelette_cata_public'\r\n\t);\r\n\t\r\n\tif($fichier_config=verifier_fichier_config()) {\r\n\t\t// il est la, on recupere dw2_config.php\r\n\t\tinclude($fichier_config);\r\n\t\tforeach ($dw2_conv_nom_param as $anc => $nouv) {\r\n\t\t\tif(isset($$anc)) {\r\n\t\t\t\t// init param connu par dw_config\r\n\t\t\t\t$GLOBALS['dw2_param'][$nouv]=$$anc;\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\telse {\r\n\t\t// dw2_config absent => on deduit (!) la version\r\n\t\t$tbla = spip_mysql_showtable('dw2_stats');\r\n\t\tif($tbla['key']['PRIMARY KEY']==\"date,id_doc\"){\r\n\t\t\t$dw_version=\"2.11\";\r\n\t\t}\r\n\t\telse {\r\n\t\t\t$tblb = spip_mysql_showtable('dw2_doc');\r\n\t\t\tif($tblb['key']['PRIMARY KEY']==\"id_document\") {\r\n\t\t\t\t$dw_version=\"2.016\";\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\t$tblc = spip_mysql_showtable('dw2_serv_ftp');\r\n\t\t\t\tif($tblc['field']['designe']){\r\n\t\t\t\t\t$dw_version=\"2.013\";\r\n\t\t\t\t}\r\n\t\t\t\telse {$dw_version=\"2.012\"; }// ca fera l_affaire !\r\n\t\t\t}\r\n\t\t}\r\n\t}\r\n\t\r\n\t// puis init globale dw2_param pour def autres params version\r\n\tdw2_init_param($dw_version);\r\n\r\n}", "function cleanParam($param,$op = 0)\n {\n if ($op == 0) \n { \n $param = trim($param);\n }\n\n $param = stripcslashes($param);\n $param = htmlspecialchars($param);\n // $param_cleaned = mysqli_real_escape_string($param_cleaned);\n\n return $param;\n }", "public static function NormalDate ($data, $tipo=\"br\") {\n\t\tif(strlen($data)>8){//0123-56-89 12-45-78\n\t\t\t$data = sprintf (\"%s%s/%s%s/%s%s%s%s\", $data[8], $data[9], $data[5], $data[6], $data[0], $data[1], $data[2], $data[3]);\n\t\t\treturn $data;\n\t\t}else{\n\t\t\tswitch ($tipo) {\n\t\t\t\tcase \"br2\":\n\t\t\t\t\t//Converte uma data no formato aaaammdd para o formato mm/dd/aaaa\n\t\t\t\t\tif (!empty($data)) $data = sprintf (\"%s%s/%s%s/%s%s%s%s\", $data[7], $data[8], $data[5], $data[6], $data[0], $data[1], $data[2], $data[3]);\n\t\t\t\t\treturn $data;\n\t\t\t\tcase \"br\":\n\t\t\t\t\t//Converte uma data no formato aaaammdd para o formato mm/dd/aaaa\n\t\t\t\t\tif (!empty($data)) $data = sprintf (\"%s%s/%s%s/%s%s%s%s\", $data[6], $data[7], $data[4], $data[5], $data[0], $data[1], $data[2], $data[3]);\n\t\t\t\t\treturn $data;\n\t\t\t\tcase \"en\":\n\t\t\t\t\t//Converte uma data no formato aaaammdd para o formato mm/dd/aaaa\n\t\t\t\t\tif (!empty($data)) $data = sprintf (\"%s%s%s%s/%s%s/%s%s\", $data[0], $data[1], $data[2], $data[3], $data[4], $data[5], $data[6], $data[7]);\n\t\t\t\t\treturn $data;\n\t\t\t}//sw\n\t\t}//if\n\t}", "function traduz_data_para_exibir ($data) {\r\n\tif ($data == \"\" OR $data == \"0000-00-00\") {\r\n\t\treturn \"\";\r\n\t}\r\n\t$dados = explode(\"-\", $data);\r\n\t$data_exibir = \"{$dados[2]}/{$dados[1]}/{$dados[0]}\";\r\n\treturn $data_exibir;\r\n}", "function formata_data($data_hora, $formato=\"%c\") {\n $mapping = array(\n\t '%c' => '%d/%m/%Y %H:%M.%S',\n\t '%X' => '%H:%M.%S',\n\t '%x' => '%d/%m/%Y',\n \t);\n\n\t //Substitui\n $formato = str_replace(\n \t array_keys($mapping),\n\t array_values($mapping),\n \t $formato\n\t );\n\n //Retorna a data formatada\n return ($data_hora ? iconv('ISO-8859-1', 'UTF-8', strftime($formato, strtotime($data_hora))) : \"\");\n }", "protected function processarTransacao($linha) {\n\t\t$vlinha = parent::processarTransacao($linha);\t \n\t\t//X = ALFANUMÉRICO 9 = NUMÉRICO V = VÍRGULA DECIMAL ASSUMIDA\n\t\t\n\t\treturn $vlinha;\n\t}", "function formataData($DATA, $somenteHora = false, $somenteData = false) {\n if ($DATA and $DATA <> \"0000-00-00\") {\n if(strstr($DATA, '-')){\n $data = explode(\"-\", $DATA);\n if (strstr($data[2], \" \") == True) {\n $Data = explode(\" \", $data[2]);\n if($somenteHora){\n $hora = explode(':', $Data[1]);\n return $hora[0].':'.$hora[1];\n }elseif($somenteData){\n return $Data[0] . \"/\" . $data[1] . \"/\" . $data[0];\n }else{\n return $Data[0] . \"/\" . $data[1] . \"/\" . $data[0] . \" \" . $Data[1];\n }\n\n } else {\n return $data[2] . \"/\" . $data[1] . \"/\" . $data[0];\n }\n }else{\n return $DATA;\n }\n } else {\n return null;\n }\n}", "function recogeDato($campo){ \n return isset($_REQUEST[$campo])?$_REQUEST[$campo]:'';\n }", "function convert(&$param, $delimiter = \".\") {\n\t/*\n\t * Array fo delimiters to search for\n\t */\n\t$delimiters = array(':', '.');\n\t$del = ':';\n\n\t/*\n\t * Search string for delimiter array and store for use in formatting\n\t */\n\tforeach ( $delimiters as $item ) :\n\t\tif ( strpos($param, $item) ) {\n\t\t\t$del = $item;\n\t\t};\n\tendforeach;\n\n\t/*\n\t * Explode param with delimiter\n\t */\n\t$time = explode($del, $param);\n\n\t/*\n\t * Calculate and format with delimiter\n\t */\n\tif ( $param > 12 ) {\n\t\tif ( isset($time[1]) ) :\n\t\t\t$param = $time[0] - 12 . $delimiter . $time[1].'pm';\n\t\telse :\n\t\t\t$param = $time[0] - 12 . $delimiter .'00pm';\n\t\tendif;\n\t} elseif ( $param == 12 ) {\n\t\tif ( isset($time[1]) ) :\n\t\t\t$param = $time[0] . $delimiter . $time[1] .'pm';\n\t\telse:\n\t\t\t$param = $time[0] . $delimiter .'00pm';\n\t\tendif;\n\t} else {\n\t\tif ( isset($time[1]) ) :\n\t\t\t$param = $time[0] . $delimiter . $time[1] .'am';\n\t\telse:\n\t\t\t$param = $time[0] . $delimiter .'00am';\n\t\tendif;\n\t}\n\n\t/*\n\t * Return Param\n\t */\n\treturn $param;\n}", "function traduz_data_para_banco ($data) {\r\n\tif ($data == \"\") {\r\n\t\treturn \"\";\r\n\t}\r\n\t$dados = explode (\"/\", $data);\r\n\t$data_mysql = \"{$dados[2]}-{$dados[1]}-{$dados[0]}\";\r\n\treturn $data_mysql;\r\n}", "function limparCampos($campo){\n $campo = str_replace(\".\", \"\", $campo);\n $campo = str_replace(\"-\", \"\", $campo);\n $campo = str_replace(\"/\", \"\", $campo);\n $campo = str_replace(\" \", \"\", $campo);\n return $campo;\n }", "private function parse_input($par) {\n $par = trim($par);\n $par = stripslashes($par);\n $par = htmlspecialchars($par);\n //$par = mysql_real_escape_string($par);\n $par = htmlspecialchars($par, ENT_IGNORE, 'utf-8');\n //$par = strip_tags($par);\n return $par;\n }", "function normalizarCodificacionTipoComp($cadenaBusqueda,$cadenaReemplazo) {\n\t\t// Busca y reemplaza ocurrencias en una tabla\n\t\t\t$cnx= conectar_postgres();\n\t\t\t$cons = \"UPDATE Contabilidad.TiposComprobante SET tipo = replace( tipo,'$cadenaBusqueda','$cadenaReemplazo')\";\n\t\t\t\n\t\t\t$res = pg_query($cnx , $cons);\n\t\t\t\tif (!$res) {\n\t\t\t\t\techo \"<p class='error1'> Error en la normalizacion de la codificacion </p>\".pg_last_error().\"<br>\";\n\t\t\t\t\techo \"<p class= 'subtitulo1'>Comando SQL </p> <br>\".$cons.\"<br/> <br/> <br/>\";\n\t\t\t\t}\n\n\t\t}", "function cambiaf_a_normal($fecha){ \r\r\n \t\r\r\n $fecha_normal = explode(\"-\",$fecha);\r\r\n $lafecha=@$fecha_normal[2].\"/\".@$fecha_normal[1].\"/\".@$fecha_normal[0];\r\r\n return $lafecha;\r\r\n}", "protected function cleanArticle()\n {\n preg_match('/\\(?([\\w\\d]+)\\)?/', $this->_original, $data);\n $this->_data = strtolower($data[1]);\n $this->_original = $data[1];\n }", "function preparedata($data){\r\n $data = trim($data);\r\n $data = stripslashes($data);\r\n $data = htmlspecialchars($data);\r\n $data = urlencode($data); \r\n return $data;\r\n}", "function _extract_text($param, $lang='und'){\n\n\tif(isset($param['und'][0])){\n\t\treturn (object)array(\n\t\t\t'value' => $param['und'][0]['value'],\n\t\t\t//'safe' => $param['und'][0]['safe_value'],\n\t\t\t'format' => (isset($param['und'][0]['format']))?$param['und'][0]['format']:'string',\n\t\t\t'lang' => $lang\n\t\t);\n\t}else{\n\t\treturn (object)array(\n\t\t\t'value' => null,\n\t\t\t//'safe' => null,\n\t\t\t'format' => 'string',\n\t\t\t'lang' => $lang\n\t\t);\n\t}\n}", "function reformat_input($data) {\n $data = trim($data);\n $data = stripslashes($data);\n $data = htmlspecialchars($data);\n return $data;\n}", "function ConverteData($Data){\n if (strstr($Data, \"/\"))//verifica se tem a barra /\n {\n $d = explode (\"/\", $Data);//tira a barra\n $rstData = \"$d[2]-$d[1]-$d[0]\";//separa as datas $d[2] = ano $d[1] = mes etc...\n return $rstData;\n } elseif(strstr($Data, \"-\")){\n $d = explode (\"-\", $Data);\n $rstData = \"$d[2]/$d[1]/$d[0]\"; \n return $rstData;\n }else{\n return \"Data invalida\";\n }\n}" ]
[ "0.58156806", "0.5750178", "0.5622546", "0.55893767", "0.5492748", "0.5448216", "0.5393526", "0.53389406", "0.53253454", "0.5309519", "0.5308719", "0.5306882", "0.5292455", "0.52714", "0.52579063", "0.5245945", "0.5238108", "0.52353954", "0.52172065", "0.5207866", "0.5182301", "0.5173309", "0.5160857", "0.51513064", "0.5148288", "0.51427", "0.5140566", "0.5128634", "0.5110063", "0.5099646" ]
0.66665065
0
Obtiene la fila actual en el multiplexado en el ef (usado en el formulario_ml)
function get_fila_actual() { return $this->agregado_form; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function buscar_fila() {\r\n\t\t$temparray = array();\r\n\t\tif ( $this->consulta_ID )\r\n\t\t\t$temparray = $this->consulta_ID->FetchRow();\r\n\t\treturn $temparray;\r\n\t}", "public function abrirFactura();", "static function SamGetFroumMidila()\n {\n\t\t\t\n\t\t // get the filed of table of modelateur \n\t\t\t\n\t\t\t$SamModsFileds = implode(',',parent::$FILED['MODS']);\n\t\t\t\n\t\t\t// put in and \n\t\t\t$SamAnd = null;\n\t\t\t\n\n\t\t\tif(ULV == 2)\n\t\t\t{\n \t\t\t $Select = parent::SamSelectCount('mod_id','mods','WHERE `u_id` = \"'.UID.'\" ') ;\n\t\t\t \n\t\t\t if($Select <= 0 ) hl();\n\t\t\t\t \n\t\t\t\t \t\t\t\n\t\t\t // select rows of modolateur by modilateur id \n\t\t \t$SamSelectrows = parent::SamSelectAll($SamModsFileds,'mods','WHERE `u_id` = \"'.UID.'\" ' ); \n\t\t\t\t \n\t\t\t\t\t/* \n\t\t\t\t\t **select forum id\n\t\t\t\t\t\t** put forum id in array $forumId\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t*/\n\t\t\t\t\t$forumId = array();\n\t\t\t\t\t\n\t\t\t\t\tforeach($SamSelectrows as $mod):\n\t\t\t\t\t \n\t\t\t\t\t\t$forumId[] = $mod->f_id;\n\t\t\t\t\t\n\t\t\t\t\tendforeach;\n\t\t\t\t\t\n\t\t\t\t\t \n\t\t\t\t\t $SamAnd = null;\n\t\t\t\t\t\t \n\t\t\t \n\t\t\t\n\t\t\t\n\t\t\t\n\t\t\t}\n\t\t\t\n\t\t \n\t\t\t\n if(ULV == 3)\t\t\n {\n\t\t\t \n\t\t\t\t$SamAnd = 'AND `f_mon` = \"'.UID.'\"';\n\t\t\t \n\t\t\t\n\t\t\t}\n\t\t\tif(ULV == 4) $SamAnd = null;\n\n\t\t\t\n\t\t\t // frm filed =\n\t\t\t \n\t\t\t $Forum_Files = implode(',',parent::$FILED['FRM']);\n\t\t\t \n // select forum \n\t\t\t \n\t\t\t $SamSelectrowsFrms = parent::SamSelectAll($Forum_Files,'forum','WHERE `f_id` > 0 '.$SamAnd .' ' ); \n\t\t\t \n\t\t\t // verifier if no forum selected\n\t\t\t\t\n\t\t\t\t if(count($SamSelectrowsFrms) <= 0) die('error in modikateur');\n\t\t\t\t\t \n\t\t\t // frm modila\n\t\t\t\t$forumModerationSummary = array();\n\t\t\t\t\n\t\t\t\t // frm notification \n\t\t\t\t$forumNotifySummary = array();\n\t\t\t\t\t \n\t\t\t foreach( $SamSelectrowsFrms as $frm):\n\t\t\t\t\n\t\t\t\t // forum id \n\t\t\t\t\t \n\t\t\t\t\t $forumIdMOD = $frm->f_id;\n\t\t\t\t\t \n\t\t\t\t\t if(ULV == 2)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t if( array_search_i($forumIdMOD,$forumId) != 1) continue;\n\t\t\t\t\t\t\n\t\t\t\t\t\t} \n\t\t\t\t\t \n\t\t\t\t\t // frm name\n\t\t\t\t \n\t\t\t\t $SamFrmNam = $frm->f_name;\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t /*\n\t\t\t\t\t \t\t// 5 , 22 , 0 , 66 , 0 , 0 , 0 ,\n\t\t\t\t\t\t topic aprov aprov rep\n\t\t\t\t\t \n\t\t\t\t\t */\n\t\t\t\t\t \n\t\t\t\t\t // topic aproved \n\t\t\t\t\t $SamTopicAproved = parent::SamSelectCount('cat_id','topics','WHERE `forum_id` = \"'.$forumIdMOD .'\" AND `t_approve` = 1 ') ;\n\t\t\t\t\t \n\t\t\t\t\t // replay aproved \n\t\t\t\t\t $SamRepAproved = parent::SamSelectCount('cat_id','replies','WHERE `forum_id` = \"'.$forumIdMOD .'\" AND `r_approve` = 1 ') ;\n\t\t\t\t\t \n\t\t\t\t\t \n\t\t\t\t\t$forumModerationSummary[] .= '\"'.$forumIdMOD.'\",\"'.$SamTopicAproved.'\",\"\",\"'.$SamRepAproved.'\",\"\",\"\",\"\",'.\"\\n\";\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t // 5,12,13,14, => fid,chakaoi,chakwato admin ,new msg forum\n\t\t\t\t\t$forumNotifySummary[] .= '\"'.$forumIdMOD.'\",\"0\",\"0\",\"0\",'.\"\\n\";\n\t\t\t\t\t \n\t\t\t\tendforeach;\n\t\t\t\n \n\t return array(implode('',$forumModerationSummary),implode('',$forumNotifySummary));\n\t \n\t }", "public function filas(){\n\n $filas = \\DB::table($this->table)->where('declaracion_id','=',$this->declaracion_id)\n ->get();\n return $filas;\n }", "public function getFlujoConversacion($fechainicio, $fechafin){\n $faq = getAllConsultasFlujo($this->conMongo, $fechainicio, $fechafin);\n $numeroFaq = [];\n \n $menuConsultas=0;\n $menuFactura=0;\n $menuPagoEnLinea=0;\n $menuPuntosDeAtencion=0;\n $consultar_asesor=0;\n $otros=0;\n $tramites=0;\n $proveedores=0;\n $tarifas=0;\n $hoja_de_vida=0;\n $proyectos=0;\n $convenios=0;\n $leyes=0;\n $usuarios=0;\n $normatividad=0; \n $alumbrado_publico = 0;\n $factura = 0;\n $PagoEnlineaTenerEnCuenta = 0;\n $comoPagoEnLinea = 0;\n $sede_Garzon = 0;\n $sede_LaPlata = 0;\n $sede_Pitalito = 0;\n $sede_Saire = 0;\n //$otros_Telefonos = 0; \n $menu_asesor= 0; \n\n\n foreach ($faq as $key => $value) {\n $interaccion = $value->TIPOINTERACCION;\n \n if($interaccion=='menuConsultas'){\n\n $menuConsultas += 1;\n\n }else if($interaccion=='menuFactura'){\n \n $menuFactura += 1;\n\n }else if($interaccion=='menuPagoEnLinea'){\n \n $menuPagoEnLinea += 1;\n \n }else if($interaccion=='menuPuntosDeAtencion'){\n\n $menuPuntosDeAtencion += 1; \n \n }else if($interaccion=='consultar asesor'){\n\n $consultar_asesor += 1; \n \n }else if($interaccion=='otros'){\n \n $otros += 1;\n\n }else if($interaccion=='tramites'){\n\n $tramites += 1; \n \n }else if($interaccion=='proveedores'){\n\n $proveedores += 1; \n \n }else if($interaccion=='tarifas'){\n\n $tarifas += 1; \n \n }else if($interaccion=='hoja de vida'){\n\n $hoja_de_vida += 1; \n \n }else if($interaccion=='proyectos'){\n\n $proyectos += 1; \n \n }\n else if($interaccion=='convenios'){\n\n $convenios += 1; \n \n }else if($interaccion=='leyes'){\n\n $leyes += 1; \n \n }else if($interaccion=='usuarios'){\n\n $usuarios += 1; \n \n }else if($interaccion=='normatividad'){\n\n $normatividad += 1; \n \n }else if($interaccion=='alumbrado publico'){\n\n $alumbrado_publico += 1; \n \n }else if($interaccion=='factura'){\n\n $factura += 1; \n \n }else if($interaccion=='PagoEnlineaTenerEnCuenta'){\n\n $PagoEnlineaTenerEnCuenta += 1; \n \n }else if($interaccion=='comoPagoEnLinea'){\n\n $comoPagoEnLinea += 1; \n \n }else if($interaccion=='sede_Garzon'){\n\n $sede_Garzon += 1; \n \n }else if($interaccion=='sede_LaPlata'){\n\n $sede_LaPlata += 1; \n \n }else if($interaccion=='sede_Pitalito'){\n\n $sede_Pitalito += 1; \n \n }else if($interaccion=='sede_Saire'){\n\n $sede_Saire += 1; \n \n }/*else if($interaccion=='otros_Telefonos'){\n\n $otros_Telefonos += 1; \n \n }*/else if($interaccion=='menu_asesor'){\n\n $menu_asesor += 1; \n \n }\n }\n\n $numeroFaq[0] = $menuConsultas;\n $numeroFaq[1] = $menuFactura;\n $numeroFaq[2] = $menuPagoEnLinea;\n $numeroFaq[3] = $menuPuntosDeAtencion;\n $numeroFaq[4] = $consultar_asesor;\n $numeroFaq[5] = $otros;\n $numeroFaq[6] = $tramites;\n $numeroFaq[7] = $proveedores;\n $numeroFaq[8] = $hoja_de_vida;\n $numeroFaq[9] = $proyectos;\n $numeroFaq[10] = $convenios;\n $numeroFaq[11] = $leyes;\n $numeroFaq[12] = $usuarios;\n $numeroFaq[13] = $normatividad;\n $numeroFaq[14] = $alumbrado_publico;\n $numeroFaq[15] = $factura;\n $numeroFaq[16] = $PagoEnlineaTenerEnCuenta;\n $numeroFaq[17] = $comoPagoEnLinea;\n $numeroFaq[18] = $sede_Garzon;\n $numeroFaq[19] = $sede_LaPlata;\n $numeroFaq[20] = $sede_Pitalito;\n $numeroFaq[21] = $sede_Saire;\n //$numeroFaq[22] = $otros_Telefonos; \n $numeroFaq[22] = $tarifas; \n $numeroFaq[23] = $menu_asesor;\n\n\n return $numeroFaq;\n\n }", "function actualites_libelle_association_mots($flux){\r\n\t// On recupere le flux, ici le tableau des libelles,\r\n\t// et on ajoute nos trois objets.\r\n\t$flux['actualites'] = 'actualites:info_vu_libelle_actualite';\r\n\r\n\treturn $flux;\r\n}", "function PlantillaFicha()\n\t{\t\n\t\t// Formateo de datos\n\t\t$datos['dia']=\"____\";\n\t\t$datos['mes']=\"____\";\n\t\t$datos['anio']=\"____\";\n\t\t$datos['texto_tipo_presupuesto']=\"_______________________\";\n\t\t$datos['provincia_vivienda']=\"_______________________\";\n\t\t$datos['poblacion_vivienda']=\"________________________________________\";\n\t\t// Datos solicitados\n\t\t$datos['importe_solicitado']=\"________________\";\n\t\t$datos['precio_vivienda']=\"________________\";\n\t\t$datos['iajd']=\"_________\";\n\t\t$datos['comunidad_autonoma']=\"__________________________________\";\n\t\t// Gastos de hipoteca\n\t\t$datos['comision_apertura_hipoteca']=\"________________\";\n\t\t$datos['tasacion_hipoteca']=\"________________\";\n\t\t$datos['iajd_hipoteca']=\"_________\";\n\t\t$datos['notaria_hipoteca']=\"________________\";\n\t\t$datos['gestoria_hipoteca']=\"________________\";\n\t\t$datos['registro_hipoteca']=\"________________\";\n\t\t$datos['iva_hipoteca']=\"________________\";\n\t\t$datos['seguro_hipoteca']=\"________________\";\n\t\t// totales\n\t\t$datos['total_gastos_hipoteca']=\"________________\";\n\t\t// Gastos de compra\n\t\t$datos['iva_nueva_vivienda']=\"________________\";\n\t\t$datos['iajd_nueva_vivienda']=\"________________\";\n\t\t$datos['itp']=\"________________\";\n\t\t$datos['notaria']=\"________________\";\n\t\t$datos['gestoria']=\"________________\";\n\t\t$datos['registro']=\"________________\";\n\t\t$datos['iva_gastos_comunes']=\"________________\";\n\t\t// totales\n\t\t$datos['total_gastos_compra']=\"________________\";\n\t\t$datos['total_gastos']=\"__________________\";\n\t\t// Sección principal\n\t\t$this->CuerpoFicha($datos);\n\t\t// Salida del PDF\n\t\treturn $this->pdf->Output();\n\t}", "function fraccionar() {\n \n $codigo = $_POST['codigo'];\n $lote = $_POST['lote'];\n $suc = $_POST['suc'];\n $fraccion = $_POST['fraccion'];\n $um = $_POST['um'];\n $tara = $_POST['tara'];\n $usuario = $_POST['usuario'];\n $kg = $_POST['kg'];\n $kg_desc = $_POST['kg_desc'];\n $ancho = $_POST['ancho']; \n $gramaje_rollo = $_POST['gramaje_rollo'];\n $gramaje = $_POST['gramaje'];\n $destino = $_POST['destino'];\n $presentacion = $_POST['presentacion'];\n $total_fraccionado = $_POST['total_fraccionado'];\n $fp = $_POST['fp'];\n \n try {\n \n $ms = new My();\n $ms->Query(\"SELECT costo_prom,descrip FROM articulos WHERE codigo = '$codigo'\"); // En Productivo \n \n \n $ms->NextRecord();\n $precio_costo = $ms->Record['costo_prom'];\n $descrip = $ms->Record['descrip'] ; \n \n if($precio_costo == null || $precio_costo == 0){\n $precio_costo = 0;\n echo \"Error Precio Costo no definido\";\n die();\n }\n \n \n \n $fn = new Functions(); \n $terminacion = substr($lote,-2,2);\n $nuevo_lote = $fn->generarLote($codigo,$terminacion);\n \n if($nuevo_lote == \"\" || $nuevo_lote == null){\n echo \"Error al crear el nuevo Lote\";\n die;\n }\n\n $ms->Query(\"SELECT cantidad as stock FROM stock o where codigo = '$codigo' and o.lote = '$lote' and suc = '$suc' ;\"); //Lote\n $ms->NextRecord();\n\n //$stock = $ms->Record['Stock'] - $total_fraccionado;\n \n $stock = $ms->Record['stock'] ;\n \n \n $final = $stock - $fraccion; \n \n if($final < 0){ \n $final = 0;\n $fraccion = $stock;\n }\n $saldo = $stock - $fraccion; // 20 - 19.4 Saldo = 0.6 > 0 \n \n if($saldo > 0 && $fp == \"true\"){ // Si marco con Fin de Pieza \n $final = 0;\n $fraccion = $stock;\n }\n $valor_salida = $fraccion * $precio_costo;\n \n // Extraer el Pais de Origen del Padre si no tiene por defecto queda China\n $PaisOrigen = 'China';\n $ms->Query(\"SELECT p.codigo_pais, p.nombre as PaisOrigen FROM entrada_merc e, entrada_det d, paises p WHERE e.pais_origen = p.codigo_pais AND e.id_ent = d.id_ent AND d.codigo ='$codigo' and d.lote = '$lote'\"); //Lote\n if($ms->NumRows() > 0){\n $ms->NextRecord();\n $PaisOrigen = $ms->Record['PaisOrigen'];\n } \n \n $db = new My();\n // Salida\n $db->Query(\"insert into fraccionamientos( usuario, codigo, lote, tipo, signo, inicial, cantidad, final, um, p_costo, motivo, fecha, tara, kg_desc, gramaje, hora, estado, valor, suc,suc_destino,presentacion, padre,ancho, e_sap,cta_cont,pais_origen)\n values ('$usuario', '$codigo', '$lote', 'Salida', '-', $stock, $fraccion, $final, '$um', $precio_costo, 'Fracccionamiento Medicion de Entrada', CURRENT_DATE, 0, $kg_desc, \"\n . \"$gramaje_rollo, CURRENT_TIME, 'Pendiente',$valor_salida, '$suc','$destino','$presentacion',null,$ancho, 0,'1.1.3.1.05','$PaisOrigen');\");\n\n \n $db->Query(\"SELECT id_frac FROM fraccionamientos where codigo = '$codigo' and lote = '$lote' and usuario = '$usuario' order by id_frac desc limit 1;\");\n $db->NextRecord();\n $id_frac_neg = $db->Get(\"id_frac\");\n \n //makeLog($usuario,\"Fraccionar 1\",\"Saldo:$saldo FP: $fp Precio Costo: $precio_costo Fraccion: $fraccion\", \"\",\"\",\"\");\n \n if($saldo > 0 && $fp == \"true\"){ // Faltante\n // Generar Asiento por Faltante\n $valor_faltante = $saldo * $precio_costo;\n if($valor_faltante > 0){ \n //genAsiento($usuario,'6.1.4.1.17','Mermas en Stock','1.1.3.1.05','Fraccionamientos',$valor_faltante,\"Faltante: $saldo, Valor: $valor_faltante PrecioCosto: $precio_costo\");\n }\n }\n \n $fraccion = $_POST['fraccion']; // Aqui nuevamente para tomar la Fraccion real\n $valor_entrada = $fraccion * $precio_costo;\n $final = $fraccion;\n\n \n \n // Entrada\n \n \n $db->Query(\"insert into fraccionamientos( usuario, codigo, lote, tipo, signo, inicial, cantidad, final, um, p_costo, motivo, fecha, tara, kg_desc, gramaje, hora, estado, valor, suc,suc_destino,presentacion, padre, ancho,e_sap,cta_cont,pais_origen)\n values ('$usuario', '$codigo', '$nuevo_lote', 'Entrada', '+', 0, $fraccion, $final, '$um', $precio_costo, 'Fracccionamiento Medicion de Entrada', CURRENT_DATE, $tara, $kg, \"\n . \"$gramaje, CURRENT_TIME, 'Pendiente',$valor_entrada, '$suc','$destino','$presentacion','$lote',$ancho, 0,'113105','$PaisOrigen');\");\n \n \n $db->Query(\"SELECT id_frac FROM fraccionamientos where codigo = '$codigo' and lote = '$nuevo_lote' and usuario = '$usuario' order by id_frac desc limit 1;\");\n $db->NextRecord();\n $id_frac_pos = $db->Get(\"id_frac\");\n \n \n $saldo = $stock - $fraccion; // 20 - 21.5 = -1.5\n \n \n \n if($saldo < 0){\n //makeLog($usuario,\"Fraccionar 3\", \"Saldo:$saldo < 0 FP: $fp Stock: $stock Fraccion: $fraccion\", \"\",\"\",\"\");\n //Generar Asiento por Sobrante en Stock\n $valor_sobrante = ($saldo* $precio_costo) * -1; // Porque el Saldo es Negativo\n //makeLog($usuario,\"Fraccionar 4\", \"Saldo:$saldo < 0 valor_sobrante : $valor_sobrante precio_costo: $precio_costo\", \"\",\"\",\"\");\n if($valor_sobrante > 0){\n // genAsiento($usuario,'1.1.3.1.05','Fraccionamientos','4.1.2.1.07','Sobrante en Stock',$valor_sobrante,\"Sobrante: $saldo, Valor: $valor_sobrante PrecioCosto: $precio_costo\");\n } \n } \n \n //Insertar en la Tabla Lotes y Generar Stock\n \n registrarLote($usuario,$id_frac_pos, $id_frac_neg,$codigo,$lote,$nuevo_lote,$suc,$fp);\n \n // Actualizar estado del lote en Orden de Procesamiento\n $db->Query(\"UPDATE orden_procesamiento SET estado = 'Procesado' WHERE codigo = '$codigo' AND lote = '$lote'\");\n \n // Actualizo las fallas asignando al nuevo hijo generado.\n $db->Query(\"UPDATE fallas SET lote = '$nuevo_lote',mts_inv = $fraccion - mts,stock_actual = mts + mts_inv WHERE codigo = '$codigo' AND lote = '$lote' and padre ='$lote';\");\n \n //makeLog(\"$usuario\", \"Ajuste$signo\", \"$oper | $motivo\",'Ajuste',0);\n echo $nuevo_lote;\n \n } catch (Exception $e) {\n echo \"Error \".$e->getMessage();\n }\n \n}", "public function getFlaativo()\n {\n return $this->flaativo;\n }", "public function obtenerFechas($id_formulario) { \n\t\t$sql = \"SELECT ULTIMOA, ULTIMOM, ULTIMAS4SEM, ULTIMAS2SEM, ULTIMASEM FROM ENIG_FORM_INSCRIPCION WHERE ID_FORMULARIO='\". $id_formulario.\"'\";\n\t\t$query = $this->db->query($sql);\n\t\t$data = array();\n\t\tif ($query->num_rows() > 0) {\n\t\t\tforeach ($query->result() as $row) {\n\t\t\t\t$data['ULTIMOA'] \t\t= $row->ULTIMOA;\n\t\t\t\t$data['ULTIMOM'] \t\t= $row->ULTIMOM;\n\t\t\t\t$data['ULTIMAS4SEM']\t= $row->ULTIMAS4SEM;\n\t\t\t\t$data['ULTIMAS2SEM']\t= $row->ULTIMAS2SEM;\n\t\t\t\t$data['ULTIMASEM']\t\t= $row->ULTIMASEM;\n\t\t\t}\n\t\t}\n\t\t$this->db->close();\n\t\treturn $data;\n\t}", "public function getFmlPedidoFinan() {\n\t\t$query = \"\n\t\t\t\tselect a.cd_fmlID as cd_fml,\n\t\t\t\t\t b.nm_grp_fmlr as nm_grp_fmlr\n\t\t\t\tfrom tb_fml_pedido_finan a,\n\t\t\t\t tb_fml b\n\t\t\t\twhere a.cd_grpID = :cd_grp\n\t\t\t\tand a.cd_sbgrpID = :cd_sbgrp\n\t\t\t\tand a.seql_pedido_finanID = :seql_pedido_finan\n\t\t\t\tand a.cd_fmlID = b.cd_fmlID\n\t\t\t\torder by b.nm_grp_fmlr\";\n\t\t$stmt = $this->db->prepare($query);\n\t\t$stmt->bindValue('cd_grp', $this->__get('cd_grp'));\n\t\t$stmt->bindValue('cd_sbgrp', $this->__get('cd_sbgrp'));\n\t\t$stmt->bindValue('seql_pedido_finan', $this->__get('seql_pedido_finan'));\n\t\t$stmt->execute();\n\n\t\treturn $stmt->fetchAll(\\PDO::FETCH_ASSOC);\t\n\t\n\t}", "function setFidiCM(){\n\t\t$db=$this->db;\n\t\t$sql=\"UPDATE oneri.c_monetario SET fideiussione=(SELECT totale-coalesce(versato,0) from oneri.rate where pratica=$this->pratica and rata=6) WHERE pratica=$this->pratica;\";\n\t\t//echo $sql; \n\t\t$db->sql_query($sql);\n\t}", "function listaFacturas2()\n\t{\n\t\t$lista = $this->AlmacenModel->listaFacturas($_POST);\n\t\t$logo = $this->AlmacenModel->logo();\n\t\t$datos = array(); \n\t\t$cont = 0;\n\t\t$total_final = 0;\n\t\twhile($l = $lista->fetch_assoc())\n\t\t{\n\t\t\t$ok = 1;\n\t\t\tif(intval($l['asig']))\n\t\t\t{\n\t\t\t\t//$ok = $this->AlmacenModel->asig($l['uuid']);\n\t\t\t\t$ok = 0;\n\t\t\t\tif($archivo = glob($this->path().\"xmls/facturas/[1-9]*/*\".$l['uuid'].\".xml\",GLOB_NOSORT))\n\t\t\t\t\t$ok = 1;\n\t\t\t\t\n\t\t\t}\n\t\t\tif(intval($ok))\n\t\t\t{\n\t\t\t\t$cont++;\n\t\t\t\t\n\t\t\t\t$l['json'] = str_replace(\"\\\\\", \"\", $l['json']);\n\t\t\t\t$json = json_decode($l['json']);\n\t\t\t\t$json = $this->object_to_array($json);\n\t\t\t\t$dir = '';\n\t\t\t\t$subtotal = $ivas = 0;\n\t\t\t\t$total_final += $l['importe'];\n\n\t\t\t\tif($l['version'] == '3.2')\n\t\t\t\t{\n\t\t\t\t\t$subtotal = $json['Comprobante']['@subTotal'];\n\t\t\t\t\t$pago = $json['Comprobante']['@metodoDePago'];\n\t\t\t\t\t$metodo = $json['Comprobante']['@formaDePago'];\n\t\t\t\t\t\n\t\t\t\t\tif(strpos($metodo,'exhi') !== FALSE || strpos($metodo,'EXHI') !== FALSE)\n\t\t\t\t\t\t$metodo = \"PAGO EN UNA EXHIBICION\";\n\t\t\t\t\tif(strpos($metodo,'parcial') !== FALSE || strpos($metodo,'PARCIAL') !== FALSE)\n\t\t\t\t\t\t$metodo = \"PAGO EN PARCIALIDADES\";\n\n\t\t\t\t\t$ivas = $json['Comprobante']['cfdi:Impuestos']['@totalImpuestosTrasladados'];\n\t\t\t\t\t//Extraemos el domicilio del emisor\n\t\t\t\t\t$domicilio_emisor = $json['Comprobante']['cfdi:Emisor']['cfdi:DomicilioFiscal'];\n\t\t\t\t\t$dom_emisor = '';\n\t\t\t\t\tforeach ($domicilio_emisor as $campo => $valor) {\n\t\t\t\t\t\t$dom_emisor .= $valor.\" \";\n\t\t\t\t\t}\n\t\t\t\t\t//Extraemos el domicilio del receptor\n\t\t\t\t\t$domicilio_receptor = $json['Comprobante']['cfdi:Receptor']['cfdi:Domicilio'];\n\t\t\t\t\t$dom_receptor = '';\n\t\t\t\t\tforeach ($domicilio_receptor as $campo => $valor) {\n\t\t\t\t\t\t$dom_receptor .= $valor.\" \";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\t$subtotal = $json['Comprobante']['@SubTotal'];\n\t\t\t\t\t$pago = $json['Comprobante']['@FormaPago'];\n\t\t\t\t\t$metodo = $json['Comprobante']['@MetodoPago'];\n\t\t\t\t\t$ivas = $json['Comprobante']['cfdi:Impuestos']['@TotalImpuestosTrasladados'];\n\t\t\t\t}\t\n\n\t\t\t\t$tieneRelacionPagos = \"\";\n\t\t\t\tif(strpos($metodo,'PARCIAL') !== FALSE || strpos($metodo,'PPD') !== FALSE)\n\t\t\t\t{\n\t\t\t\t\t$tieneRelacionPagos = \"<br /><i style='opacity: 0.01;font-size:11px;'>*Si tiene pagos</i>\";\n\t\t\t\t\tif(!$this->AlmacenModel->tieneRelacionPagos($l['uuid']))\n\t\t\t\t\t\t$tieneRelacionPagos = \"<br /><i style='color:red;font-size:11px;'>*No tiene pagos</i>\";\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t$asignadas = '';\n\t\t\t\tif(intval($l['asig']))\n\t\t\t\t{\n\t\t\t\t\t$polizas = $this->AlmacenModel->polizasAsignadas($l['uuid']);\n\t\t\t\t\twhile($pol = $polizas->fetch_object())\n\t\t\t\t\t{\n\t\t\t\t\t\t$asignadas .= \"<a href='index.php?c=CaptPolizas&f=ModificarPoliza&id=$pol->id' target='_blank'>\".$pol->numpol.\" (\".$pol->idperiodo.\"-\".$pol->ejercicio.\")</a> \";\n\t\t\t\t\t\t$dir = \"$pol->id\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\t$asignadas = 'No Asignada';\n\t\t\t\t\t$dir = \"temporales\";\n\t\t\t\t}\n\n\t\t\t\tif(intval($_POST['asignadas']) == 3)\n\t\t\t\t\t$dir = \"canceladas\";\n\n\t\t\t\t$basename = '';\n\t\t\t\tif (strpos($l['xml'], '/') !== FALSE)\n\t\t\t\t{\n\t\t\t\t\t$basename = explode(\"/\", $l['xml']);\n\t\t\t\t}\n\n\t\t\t\tif (!empty($basename[3])) {\n\t\t\t\t\t$l['xml'] = $basename[3];\n\t\t\t\t}\n\n\t\t\t\tarray_push($datos,array(\n\t\t 'fecha' => utf8_encode($l['fecha']),\n\t\t 'rfc' => utf8_encode($l['rfc']),\n\t\t 'emisor' => utf8_encode($l['emisor']),\n\t\t 'receptor' => utf8_encode($l['receptor']),\n\t\t 'links' => \"<a href='xmls/facturas/$dir/\".$l['xml'].\"' target='_blank'><i class='material-icons preview' data-toggle='tooltip' data-placement='top' title='Visualizar'>remove_red_eye</i></a><a href='controllers/visorpdf.php?name=\".$l['xml'].\"&logo=$logo&id=$dir' target='_blank'><i class='material-icons preview' data-toggle='tooltip' data-placement='top' title='Ver PDF'>picture_as_pdf</i></a>\",\n\t\t 'tipo' => utf8_encode($l['tipo']),\n\t\t 'pago' => $pago,\n\t\t 'metodo' => $metodo.\" \".$tieneRelacionPagos,\n\t\t 'moneda' => $l['moneda'],\n\t\t 'subtotal' => number_format($subtotal,2),\n\t\t 'ivas' => number_format($ivas,2),\n\t\t 'total' => $l['importe'],\n\t\t 'serie' => $l['serie'],\n\t\t 'folio' => $l['folio'],\n\t\t 'uuid' => $l['uuid'],\n\t\t 'fecha_sub' => utf8_encode($l['fecha_subida']),\n\t\t 'version' => $l['version'],\n\t\t 'estatus' => $asignadas,\n\t\t 'check' => \"<input type='checkbox' idfac='\".$l['id'].\"' xml='\".\"xmls/facturas/\".$dir.\"/\".$l['xml'].\"'>\",\n\t\t 'domicilio_emisor' => $dom_emisor,\n\t\t 'domicilio_receptor' => $dom_receptor,\n\t\t 'basename'=>$basename));\n\t\t\t}\n\t\t}\n\t\tarray_push($datos, array('total_final' => $total_final));\n\t\t//Pinta aqui el json para la vista\n\t\techo json_encode($datos);\n\t}", "public function modifierFFAction(Request $request) {\n\n $date = new DateTime(\"now\");\n $dateSQL = date_format($date, 'Y-m-d');\n $mois = substr($dateSQL, 5, 2);\n $annee = substr($dateSQL, 0, 4);\n $dateSQL = $annee . \"-\" . $mois . '-01';\n\n $visiteur = $_SESSION['visiteur'];\n\n $emFiche = $this->getDoctrine()->getManager()->getRepository('FraisBundle:Fichefrais');\n $ficheFrais = $emFiche->findOneBy(array('idvisiteur' => $visiteur, 'date' => new DateTime($dateSQL)));\n\n if ($ficheFrais) {\n\n $emFF = $this->getDoctrine()->getRepository('FraisBundle:Lignefraisforfait');\n $LignesFraisF = $emFF->findBy(array('idfiche' => $ficheFrais));\n\n $nbJustificatifs = $ficheFrais->getNbjustificatifs();\n $montant = $ficheFrais->getMontantvalide();\n\n $quantite = array(\"REP\" => 0, \"NUI\" => 0, \"ETP\" => 0, \"KM\" => 0);\n if ($LignesFraisF) {\n\n foreach ($LignesFraisF as $uneLigneF) {\n\n $quantite[$uneLigneF->getIdFraisforfait()->getId()] = $uneLigneF->getQuantite();\n }\n }\n\n $builder = $this->createFormBuilder()\n ->add('REP', 'text', array('label' => 'Repas', 'data' => $quantite[\"REP\"]))\n ->add('NUI', 'text', array('label' => 'Nuitées', 'data' => $quantite[\"NUI\"]))\n ->add('ETP', 'text', array('label' => 'Etape', 'data' => $quantite[\"ETP\"]))\n ->add('KM', 'text', array('label' => 'Km', 'data' => $quantite[\"KM\"]))\n ->add('nbJustificatifs', 'text', array('label' => 'Nombre de justificatifs', 'data' => $nbJustificatifs))\n ->add('montantTotal', 'text', array('label' => 'Montant total', 'data' => $montant))\n ->add('Valider', 'submit', array('attr' => array('class' => \"btn btn-lg btn-inverse\", 'style' => 'margin-right:100px')))\n ->getForm();\n\n $builder->handleRequest($request);\n\n if ($builder->isValid()) {\n\n $this->insertFraisForfait($builder, $ficheFrais);\n }\n\n return $this->render('FraisBundle:Visiteur:renseignerFiche.html.twig', array('form' => $builder->createView()));\n } else {\n\n $this->cloturerFiche();\n return $this->renseigner($request);\n }\n }", "function PlantillaFicha()\n\t{\t\n\t\t// Datos para la fecha\n\t\t$datos['nombre']=\"________________________\";\n\t\t$datos['apellidos']=\"___________________________________\";\n\t\t$datos['nif']=\"___________\";\n\t\t$datos['dia_fecha']=\"____\";\n\t\t$datos['mes_fecha']=\"________________\";\n\t\t$datos['anio_fecha']=\"______\";\n\t\t$datos['nombre_completo_agente']=\"________________________________________\";\n\t\t$datos['nombre_completo_cliente']=\"________________________________________________\";\n\t\t// Array inmuebles\n\t\tfor($i=0;$i<=4;$i++)\n\t\t{\n\t\t\t$listado_inmuebles[$i]['hora']=\"\";\n\t\t\t$listado_inmuebles[$i]['poblacion_inmueble']=\"\";\n\t\t\t$listado_inmuebles[$i]['direccion']=\"\";\n\t\t}\n\t\t$datos['listado_inmuebles']=$listado_inmuebles;\n\t\t// Sección principal\n\t\t$this->CuerpoFicha($datos);\n\t\t// Salida del PDF\n\t\treturn $this->pdf->Output();\n\t}", "function getFalta()\n {\n if (!isset($this->bfalta) && !$this->bLoaded) {\n $this->DBCarregar();\n }\n return $this->bfalta;\n }", "function afficheSousFamilles()\n\t{\n\t\t//Eléments de connexion\n\t\tinclude (\"php_file/commun.php\");\n\n\t\t//récupérer les données de la base\n\t\t$rq=\"select * from sousfamilles order by idFamilles, ordreSousFamilles;\";\n\t\t$reponse=mysqli_query($connexion,$rq) or die (\"Execution impossible de la requete afficheSousFamilles\");\n\n\t\t//récupération du nombre de ligne de l'extraction\n\t\t$nblignes=mysqli_num_rows($reponse);\n\n\t\t//Création des en-têtes\n\t\techo \"\n\t\t\t<FORM method='post' action='adminDidi.php'>\n\t\t\t\t<p>Sous Familles</p>\n\t\t\t\t<table class=''>\n\t\t\t\t\t<tr>\n\t\t\t\t\t\t<th>id</th>\n\t\t\t\t\t\t<th>Ordre</th>\n\t\t\t\t\t\t<th class='listeCategorie'>Familles</th>\n\t\t\t\t\t\t<th>Nom</th>\n\t\t\t\t\t\t<th>Actif</th>\n\n\t\t\t\t\t</tr>\n\t\t\t\t\";\n\n\t\t\t\t//Création des différentess de lignes\n\t\t\t\tfor ($i=1;$i<=$nblignes+1;$i++)\n\t\t\t\t\t{\n\t\t\t\t\t\t//Test pour afficher les informations de la base disponible puis une ligne de cellules vides\n\t\t\t\t\t\tif ($i<=$nblignes)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t//echo \"$rq</br>\";\n\t\t\t\t\t\t\t\t$ligne=mysqli_fetch_assoc($reponse);\n\t\t\t\t\t\t\t\textract($ligne);\n\n\t\t\t\t\t\t\t\t$idSousFamillesValue=$idSousFamilles;\n\t\t\t\t\t\t\t\t$ordreSousFamillesValue=$ordreSousFamilles;\n\t\t\t\t\t\t\t\t$idFamillesValue=$idFamilles;\n\t\t\t\t\t\t\t\t$nomSousFamillesValue=$nomSousFamilles;\n\t\t\t\t\t\t\t\t$actifSousFamillesValue=$actifSousFamilles;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\telse\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t$idSousFamillesValue='';\n\t\t\t\t\t\t\t\t$ordreSousFamillesValue='';\n\t\t\t\t\t\t\t\t$idFamillesValue='';\n\t\t\t\t\t\t\t\t$nomSousFamillesValue='';\n\t\t\t\t\t\t\t\t$actifSousFamillesValue='';\n\n\t\t\t\t\t\t\t}\n\n\n\t\t\t\t\t\techo\"<tr>\n\t\t\t\t\t\t\t\t<td class=''><input maxlength='1' size='2' name='idSousFamilles$i' value='$idSousFamillesValue' readonly></td>\n\t\t\t\t\t\t\t\t<td class=''><input maxlength='3' size='4' name='ordreSousFamilles$i' value='$ordreSousFamillesValue'></td>\n\t\t\t\t\t\t\t\t<td class=''>\n\t\t\t\t\t\t\t\t\t<select name='idFamillesSousFamilles$i' class='listeCategorie'>\n\t\t\t\t\t\t\t\";\n\t\t\t\t\t\t\t\t\t\t//Requête de récupération des informations de la table familles\n\t\t\t\t\t\t\t\t\t\t\t$rq2=\"select * from familles order by ordreFamilles\";\n\t\t\t\t\t\t\t\t\t\t\t$reponse2=mysqli_query($connexion,$rq2) or die (\"Execution impossible-récupération Familles\");\n\n\t\t\t\t\t\t\t\t\t\t\twhile ($ligne2=mysqli_fetch_assoc($reponse2))\n\t\t\t\t\t\t\t\t\t\t\t\t{\n\n\t\t\t\t\t\t\t\t\t\t\t\t//Récupération des valeurs de la base et test pour sélectionner la valeur par défaut\n\t\t\t\t\t\t\t\t\t\t\t\tif ($idFamillesValue==$ligne2['idFamilles'])\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo\"<option value=$ligne2[idFamilles] selected>$ligne2[nomFamilles]</option>\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\techo\"<option value=$ligne2[idFamilles] >$ligne2[nomFamilles]</option>\";\n\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t\t\t\techo \"</select>\";\n\n\n\t\t\t\t\t\t\techo\"\n\n\t\t\t\t\t\t\t\t<td class=''><input type='text' name='nomSousFamilles$i' value='$nomSousFamillesValue'></td>\n\t\t\t\t\t\t\t\t<td class=''>\n\t\t\t\t\t\t\t\t\t<select name='actifSousFamilles$i' class='listeDeroulante'>\";\n\n\t\t\t\t\t\t\t\t\t\t//Famille active ou non\n\t\t\t\t\t\t\t\t\t\tif ($actifSousFamillesValue=='OUI')\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\techo\"<option value='OUI' selected>OUI</option>\";\n\t\t\t\t\t\t\t\t\t\t\t\techo\"<option value='NON'>NON</option>\";\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\t\t\t\t\techo\"<option value='OUI'>OUI</option>\";\n\t\t\t\t\t\t\t\t\t\t\t\techo\"<option value='NON' selected>NON</option>\";\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\techo\"\n\t\t\t\t\t\t\t\t\t</select>\n\n\t\t\t\t\t\t\t\t</td>\n\t\t\t\t\t\t\t\t<td class=''><button class='buttonAdmin' name='creerSousFamilles' value='$i' type='submit'>Créer</button></td>\n\t\t\t\t\t\t\t\t<td class=''><button class='buttonAdmin' name='majSousFamilles' value='$i' type='submit'>Mettre à jour</button></td>\n\t\t\t\t\t\t\t\t<td class=''><button class='buttonAdmin' name='supprimerSousFamilles' value='$i' type='submit'>Supprimer</button></td>\n\t\t\t\t\t\t\t</tr>\";\n\t\t\t\t\t}\n\t\techo\"\t</table>\\n\n\t\t\t\t</FORM>\";\n\n\t}", "public function getFactura()\n {\n return $this->factura;\n }", "public function vLlegeixfitxerProductes(){\n\t\techo \"<a href=index.php>Pàgina principal</a><br>\\n\";\n\t\techo \"\\n<br>Usuari actiu: $this->usuariActiu<br>\\n\";\n\t\tif($this->usuariActiu == \" \")\n\t\t\techo \"Mentre no sortiu de la sessió de i us valideu amb un usuari registrat, no podeu comprar.<br><br>\\n\";\n $arxiu = fopen($this->fitxerProductes, \"r\") or die(\"can't open file\");\n if(!($this->usuariActiu == \" \" || $this->usuariActiu == \" \")){\n?>\t\n\t\t<form method=\"post\" action=\"cataleg.php\">\n\t\t\t<p>Seleccioneu productes a comprar:</p>\n<?php\t\t\n\t\t}else{\n\t\t\tif($this->usuariActiu == \" \"){\n?>\t\n\t\t\t<p>Seleccioneu el producte a modificar la foto:</p>\n<?php\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t$PrimeraVegada = True; // Concatenem text amb imatges\n\t\tfor ($i = 0; $fila = fgetcsv($arxiu ); ++$i) {\n\t\t\t$foto = \"../imatges/$fila[2]\";\n\t\t\tif($this->usuariActiu == \" \"){\n\t\t\t\techo \"\\n<br>[ $fila[0] (Preu: $fila[1]) <br>\\n\";\n\t\t\t\techo \"<img src=\\\"\".$foto.\"\\\" alt=\\\"\".$foto.\"\\\"><br>]<br>\\n\";\n\t\t\t}else{\n\t\t\t\t$tipus = ($this->usuariActiu == \" \")?\"radio\":\"checkbox\";\n\t\t\t\t$seleccionat = \"\";\n\t\t\t\tif($PrimeraVegada && $this->usuariActiu == \" \"){\n\t\t\t\t\t$PrimeraVegada = False;\n\t\t\t\t\t$seleccionat = \" checked=\\\"checked\\\"\";\n\t\t\t\t}\n?>\n <form method='post' action='fitxers.php' enctype='multipart/form-data'>\n\t<input type='hidden' name='max_file_size' value='2500000'> \n\n\t\t\t\t<br><input type=\"<?php echo $tipus?>\" <?php echo $seleccionat?> name=\"seleccioBotiga[]\" value=\"<?php echo \"$fila[0]\"?>\" /><?php echo \"[ $fila[0] (Preu: $fila[1])\"?><br />\n<?php\t\t\n\t\t\t\techo \"<img src=\\\"\".$foto.\"\\\" alt=\\\"\".$foto.\"\\\"><br>]<br>\\n\"; // Concatenacions\n\t\t\t}\n\t\t}\n\t\tfclose($arxiu);\n if(!($this->usuariActiu == \" \" || $this->usuariActiu == \" \")){\n?>\t\n\t\t\t<br><br><input class=\"button button5\" type=\"submit\" name=\"submit\" value=\"Afegiu al carret\" /><br>\n\t\t</form>\t\n<?php\t\t\n\t\t}else{\n\t\t\tif($this->usuariActiu == \" \"){\n?>\t\n\t<br><br>\n\t<input type='file' name='arxiu'><br>\n\t</b><input type ='submit' value='Tramet arxiu al servidor'>\n </form>\t\t\n<?php\t\t\t\t\n\t\t\t}\n\t\t}\n\t}", "function getFechainicio() {\n return $this->fechainicio;\n }", "public function getImagemTitulo(){\r\n\t\t\t// OBS A fkPosição = 3 refere-se a posição de layout 3 = foto titulo item\r\n\t\t$table = new RelCPMMapper();\r\n\t\t$imagens= $table->imagens($this->_idItem,3,1);\r\n\t\treturn $imagens;\t\t\t\r\n \t\t// FOTOS ESTABELECIMENTO FIM\r\n\r\n\t}", "function reporteElaboracionFormC31(){\n //Definicion de variables para ejecucion del procedimiento\n $this->procedimiento='plani.ft_planilla_sel';\n $this->transaccion='PLA_REP_SIGMAC31_SEL';\n $this->tipo_procedimiento='SEL';\n\n //Define los parametros para la funcion\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n\n $this->captura('categoria_prog', 'varchar');\n $this->captura('programa', 'varchar');\n $this->captura('proyecto', 'varchar');\n $this->captura('actividad', 'varchar');\n $this->captura('fuente_fin', 'varchar');\n $this->captura('origen_fin', 'varchar');\n\n $this->captura('codigo_transf', 'varchar');\n $this->captura('cod_partida', 'varchar');\n $this->captura('nombre_partida', 'varchar');\n $this->captura('precio_total', 'numeric');\n\n $this->captura('gestion', 'varchar');\n $this->captura('entidad', 'varchar');\n $this->captura('direccion_admin', 'varchar');\n $this->captura('unidad_ejecutora', 'varchar');\n $this->captura('clase_gasto', 'varchar');\n $this->captura('tipo_proceso', 'varchar');\n $this->captura('desc_programa', 'varchar');\n $this->captura('periodo', 'integer');\n $this->captura('tipo_planilla', 'varchar');\n $this->captura('observaciones', 'varchar');\n //Ejecuta la instruccion\n $this->armarConsulta();\n //echo($this->consulta);exit;\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public static function gestioneProgrammazione()\n {\n self::checkAdmin();\n\n $pm = FPersistentManager::getInstance();\n\n $films = $pm->loadAll(\"EFilm\");\n $sale = $pm->load(true, \"disponibile\", \"ESala\");\n $utente = CUtente::getUtente();\n $film = null;\n $nSala = null;\n $orario = null;\n $dataInizio = null;\n $dataFine = null;\n $error = null;\n\n $method = $_SERVER[\"REQUEST_METHOD\"];\n if($method === \"POST\"){\n $idFilm = $_POST[\"film\"];\n $nSala = $_POST[\"sala\"];\n $orario = $_POST[\"orario\"];\n $dataInizio = $_POST[\"dataInizio\"];\n $dataFine = $_POST[\"dataFine\"];\n\n $film = $pm->load($idFilm, \"id\", \"EFilm\")[0];\n $inizio = DateTime::createFromFormat('Y-m-d', $dataInizio);\n $fine = DateTime::createFromFormat('Y-m-d', $dataFine);\n\n $now = new DateTime('now');\n if ($film === null) {\n $error = \"Film non valido\";\n } elseif ($inizio === false) {\n $error = \"Data di inizio non valida\";\n } elseif ($fine === false) {\n $error = \"Data di fine non valida\";\n } elseif ($inizio->getTimestamp() > $fine->getTimestamp()) {\n $error = \"La data di fine è prima di quella d'inizio!\";\n } elseif ($inizio->getTimestamp() < $now->getTimestamp()) {\n $error = \"La data di inizio è antecedente ad oggi!\";\n } else {\n try {\n $Hm = explode(\":\", $orario);\n $ora = new DateInterval(\"PT{$Hm[0]}H{$Hm[1]}M\");\n $inizio->setTime(0, 0, 0);\n $fine->setTime(0, 0, 0);\n $inizio->add($ora);\n $fine->add($ora);\n } catch (Exception $e) {\n $error = \"Orario non valido\";\n }\n }\n $salaF = null;\n foreach ($sale as $s) {\n if ($s->getNumeroSala() == $nSala && $s->isDisponibile()) {\n $salaF = $s;\n break;\n }\n }\n\n if ($salaF === null) {\n $error = \"La sala non esiste o non è disponibile\";\n }\n\n if ($error === null) {\n $programmazione = new EProgrammazioneFilm();\n do {\n $salaV = ESalaVirtuale::fromSalaFisica($salaF);\n $proiezione = new EProiezione($film, $salaV, $inizio);\n $inizio->modify(\"+1 day\");\n\n $programmazione->addProiezione($proiezione);\n } while ($inizio->getTimestamp() <= $fine->getTimestamp());\n\n $result = $pm->saveProgrammazione($programmazione);\n if (!$result) {\n $error = \"La programmazione si sovrappone con altre già esistenti\";\n } else {\n $programmazioni = $pm->loadAll(\"EElencoProgrammazioni\");\n $locandine = [];\n\n foreach ($programmazioni->getElencoProgrammazioni() as $prog) {\n array_push($locandine, $pm->load($prog->getFilm()->getId(), \"idFilm\", \"EMedia\"));\n }\n\n $film = null;\n $nSala = null;\n $orario = null;\n $dataInizio = null;\n $dataFine = null;\n $error = null;\n }\n }\n }\n\n $programmazioni = $pm->loadAll(\"EElencoProgrammazioni\");\n $locandine = [];\n\n foreach ($programmazioni->getElencoProgrammazioni() as $prog) {\n array_push($locandine, $pm->load($prog->getFilm()->getId(), \"idFilm\", \"EMedia\"));\n }\n\n VAdmin::gestioneProgrammazione($utente, $films, $sale, $programmazioni, $locandine, $film, $nSala, $orario, $dataInizio, $dataFine, $error);\n }", "public function Facmultas_fcfuepre_fcdefins() {\n $sql = \"Select * from fcdefins\";\n if (Herramientas::BuscarDatos($sql, $result)) {\n $this->c = new Criteria();\n $this->sqlnew = \"CODFUE='\" . $result[0][\"codpic\"] . \"' OR CODFUE='\" . $result[0][\"codveh\"] . \"' OR CODFUE='\" . $result[0][\"codinm\"] . \"' OR CODFUE='\" . $result[0][\"codpro\"] . \"' OR CODFUE='\" . $result[0][\"codesp\"] . \"' OR CODFUE='\" . $result[0][\"codapu\"] . \"' OR CODFUE='\" . $result[0][\"codajupic\"] . \"'\";\n $this->c->add(FcfueprePeer::CODFUE, $this->sqlnew, Criteria :: CUSTOM);\n $this->c->addAscendingOrderByColumn(FcfueprePeer::CODFUE);\n $this->columnas = array(\n FcfueprePeer::CODFUE => 'Código',\n FcfueprePeer::NOMFUE => 'Descripción'\n );\n } else {\n $this->c = new Criteria();\n $this->columnas = array(\n FcfueprePeer::CODFUE => 'Código',\n FcfueprePeer::NOMFUE => 'Descripción'\n );\n }\n }", "public function PDFResumenPro($fi, $ff){\n $rp=DB::select('select p.id, c.nconsulta, p.nombre, p.edad, p.sexo, pr.procedimiento from consulta c, paciente p, procedimientos pr, datoprevio dp\n where p.id=c.paciente_id and pr.consulta_id=c.id and dp.consulta_id=c.id and dp.fechacon between :fi and :ff order by c.id',['fi'=>$fi, 'ff'=>$ff]);\n $vista=view('vendor.adminlte.pages.reportes.procedimiento.pdfresumenprocedimiento',compact('rp','fi','ff'));\n $pdf=\\App::make('dompdf.wrapper');\n $pdf->loadHTML($vista); \n return $pdf->stream('Resumen general de procedimientos'); \n }", "private function quantum_dynamics_form() {\n $aidlink = fusion_get_aidlink();\n\n $this->field_data['field_config'] = [\n 'field_max_b' => 1000000,\n 'field_upload_type' => 'file',\n 'field_upload_path' => IMAGES,\n 'field_valid_file_ext' => '.zip,.rar,.doc,.xls,.csv,.jpg,.gif,.png,.bmp',\n 'field_valid_image_ext' => '.jpg,.gif,.png,.bmp',\n 'field_image_max_w' => 1920,\n 'field_image_max_h' => 1080,\n 'field_thumbnail' => 0,\n 'field_thumbnail_2' => 0,\n 'field_thumb_upload_path' => 'thumbs/',\n 'field_thumb2_upload_path' => 'thumbs/',\n 'field_thumb_w' => 0,\n 'field_thumb_h' => 0,\n 'field_thumb2_h' => 1024,\n 'field_thumb2_w' => 768,\n 'field_delete_original' => 0\n ];\n\n $form_action = FUSION_SELF.$aidlink;\n if (isset($_GET['action']) && $_GET['action'] == 'field_edit' && isset($_GET['field_id']) && self::validate_field($_GET['field_id'])) {\n $form_action .= \"&amp;action=\".$_GET['action'].\"&amp;field_id=\".$_GET['field_id'];\n $result = dbquery(\"SELECT * FROM \".$this->field_db.\" WHERE field_id='\".intval($_GET['field_id']).\"'\");\n if (dbrows($result) > 0) {\n $this->field_data = dbarray($result);\n if ($this->field_data['field_type'] == 'upload') {\n $this->field_data['field_config'] = \\defender::decode($this->field_data['field_config']);\n if ($this->debug) {\n print_p($this->field_data);\n }\n }\n } else {\n if (!$this->debug) {\n redirect(FUSION_SELF.$aidlink);\n }\n }\n }\n\n $this->field_data['field_type'] = isset($_POST['add_field']) ? form_sanitizer($_POST['add_field'], '') : $this->field_data['field_type'];\n\n if (isset($_POST['save_field'])) {\n\n $this->field_data = [\n 'field_type' => isset($_POST['add_field']) ? form_sanitizer($_POST['add_field'], '') : $this->field_data['field_type'],\n 'field_id' => form_sanitizer($_POST['field_id'], '0', 'field_id'),\n 'field_title' => form_sanitizer($_POST['field_title'], '', 'field_title', 1),\n 'field_name' => form_sanitizer($_POST['field_name'], '', 'field_name'),\n 'field_cat' => form_sanitizer($_POST['field_cat'], '0', 'field_cat'),\n 'field_options' => isset($_POST['field_options']) ? form_sanitizer($_POST['field_options'], '', 'field_options') : $this->field_data['field_options'],\n 'field_default' => isset($_POST['field_default']) ? form_sanitizer($_POST['field_default'], '', 'field_default') : $this->field_data['field_default'],\n 'field_error' => form_sanitizer($_POST['field_error'], '', 'field_error'),\n 'field_required' => isset($_POST['field_required']) ? 1 : 0,\n 'field_log' => isset($_POST['field_log']) ? 1 : 0,\n 'field_registration' => isset($_POST['field_registration']) ? 1 : 0,\n 'field_order' => form_sanitizer($_POST['field_order'], '0', 'field_order')\n ];\n\n $this->field_data['field_name'] = str_replace(' ', '_', $this->field_data['field_name']); // make sure no space.\n\n if ($this->field_data['field_type'] == 'upload') {\n\n $max_b = isset($_POST['field_max_b']) ? form_sanitizer($_POST['field_max_b'], '', 'field_max_b') : 150000;\n $calc = isset($_POST['field_calc']) ? form_sanitizer($_POST['field_calc'], '', 'field_calc') : 1;\n $this->field_data['field_upload_type'] = isset($_POST['field_upload_type']) ? form_sanitizer($_POST['field_upload_type'], '', 'field_upload_type') : '';\n if (!in_array($this->field_data['field_upload_type'], ['file', 'image'])) {\n \\defender::stop();\n addNotice('danger', $this->locale['fields_0108']);\n } else {\n $this->field_data['field_config'] = [\n 'field_upload_type' => $this->field_data['field_upload_type'],\n 'field_max_b' => isset($_POST['field_max_b']) && isset($_POST['field_calc']) ? $max_b * $calc : $this->field_data['field_max_b'],\n 'field_upload_path' => isset($_POST['field_upload_path']) ? form_sanitizer($_POST['field_upload_path'], '', 'field_upload_path') : '',\n 'field_valid_file_ext' => isset($_POST['field_valid_file_ext']) && $this->field_data['field_upload_type'] == 'file' ? form_sanitizer($_POST['field_valid_file_ext'], '', 'field_valid_file_ext') : '',\n 'field_valid_image_ext' => isset($_POST['field_valid_image_ext']) && $this->field_data['field_upload_type'] == 'image' ? form_sanitizer($_POST['field_valid_image_ext'], '', 'field_valid_image_ext') : '',\n 'field_image_max_w' => isset($_POST['field_image_max_w']) && $this->field_data['field_upload_type'] == 'image' ? form_sanitizer($_POST['field_image_max_w'], '', 'field_image_max_w') : '',\n 'field_image_max_h' => isset($_POST['field_image_max_h']) && $this->field_data['field_upload_type'] == 'image' ? form_sanitizer($_POST['field_image_max_h'], '', 'field_image_max_h') : '',\n 'field_thumbnail' => isset($_POST['field_thumbnail']) ? form_sanitizer($_POST['field_thumbnail'], 0, 'field_thumbnail') : '',\n 'field_thumb_upload_path' => isset($_POST['field_thumb_upload_path']) && $this->field_data['field_upload_type'] == 'image' && isset($this->field_data['field_thumbnail']) ? form_sanitizer($_POST['field_thumb_upload_path'], '', 'field_thumb_upload_path') : '',\n 'field_thumb_w' => isset($_POST['field_thumb_w']) && $this->field_data['field_upload_type'] == 'image' && isset($this->field_data['field_thumbnail']) ? form_sanitizer($_POST['field_thumb_w'], '', 'field_thumb_w') : '',\n 'field_thumb_h' => isset($_POST['field_thumb_h']) && $this->field_data['field_upload_type'] == 'image' && isset($this->field_data['field_thumbnail']) ? form_sanitizer($_POST['field_thumb_h'], '', 'field_thumb_h') : '',\n 'field_thumbnail_2' => (isset($_POST['field_thumbnail_2']) ? 1 : isset($_POST['field_id'])) ? 0 : $this->field_data['field_thumbnail_2'],\n 'field_thumb2_upload_path' => isset($_POST['field_thumb2_upload_path']) && $this->field_data['field_upload_type'] == 'image' && isset($this->field_data['field_thumbnail_2']) ? form_sanitizer($_POST['field_thumb2_upload_path'], '', 'field_thumb2_upload_path') : '',\n 'field_thumb2_w' => isset($_POST['field_thumb2_w']) && $this->field_data['field_upload_type'] == 'image' && isset($this->field_data['field_thumbnail_2']) ? form_sanitizer($_POST['field_thumb2_w'], '', 'field_thumb2_w') : '',\n 'field_thumb2_h' => isset($_POST['field_thumb2_h']) && $this->field_data['field_upload_type'] == 'image' && isset($this->field_data['field_thumbnail_2']) ? form_sanitizer($_POST['field_thumb2_h'], '', 'field_thumb2_h') : '',\n 'field_delete_original' => isset($_POST['field_delete_original']) && $this->field_data['field_upload_type'] == 'image' ? 1 : 0\n ];\n }\n }\n\n if (!$this->field_data['field_order']) {\n $this->field_data['field_order'] = dbresult(dbquery(\"SELECT MAX(field_order) FROM \".$this->field_db.\" WHERE field_cat=:cat_id\", [':cat_id' => $this->field_data['field_cat']]), 0) + 1;\n }\n\n if (\\defender::safe()) {\n if (!empty($this->field_data['field_config'])) {\n $this->field_data['field_config'] = \\defender::encode($this->field_data['field_config']);\n }\n $this->create_fields($this->field_data, 'dynamics'); // will redirect and refresh config\n }\n\n }\n\n echo \"<div class='m-t-20'>\\n\";\n echo openform('fieldform', 'post', $form_action);\n echo form_button('save_field', $this->locale['fields_0488'], 'save', [\n 'input_id' => \"save_field2\",\n 'class' => 'btn-primary m-b-20'\n ]);\n $disable_opts = [];\n foreach ($this->page_list as $index => $v) {\n $disable_opts[] = $index;\n }\n // ok the value generated needs to be parsed by quantum\n echo form_select_tree('field_cat', $this->locale['fields_0450'], $this->field_data['field_cat'], [\n 'no_root' => TRUE,\n 'width' => '100%',\n 'disable_opts' => $disable_opts\n ], $this->category_db, 'field_cat_name', 'field_cat_id', 'field_parent');\n\n echo self::quantum_multilocale_fields('field_title', $this->locale['fields_0451'], $this->field_data['field_title'], ['required' => 1]);\n\n echo form_text('field_name', $this->locale['fields_0453'], $this->field_data['field_name'],\n [\n 'placeholder' => $this->locale['fields_0454'],\n 'required' => TRUE\n ]\n );\n\n if ($this->field_data['field_type'] == 'select') {\n echo form_select('field_options', $this->locale['fields_0455'], $this->field_data['field_options'],\n [\n 'required' => TRUE,\n 'tags' => TRUE,\n 'multiple' => TRUE,\n 'width' => '100%',\n 'inner_width' => '100%'\n ]\n );\n }\n\n if ($this->field_data['field_type'] == 'upload') {\n\n require_once(INCLUDES.'mimetypes_include.php');\n $file_type_list = [];\n $file_image_list = [];\n foreach (mimeTypes() as $file_ext => $occ) {\n if (!in_array($file_ext, array_flip(img_mimeTypes()))) {\n $file_type_list[] = '.'.$file_ext;\n }\n }\n foreach (img_mimeTypes() as $file_ext => $occ) {\n $file_image_list[] = '.'.$file_ext;\n }\n $calc_opts = [\n 1 => $this->locale['fields_0490'],\n 1024 => $this->locale['fields_0491'],\n 1048576 => $this->locale['fields_0492']\n ];\n $calc_c = calculate_byte($this->field_data['field_config']['field_max_b']);\n $calc_b = $this->field_data['field_config']['field_max_b'] / $calc_c;\n $file_upload_type = [\n 'file' => $this->locale['fields_0456'],\n 'image' => $this->locale['fields_0489']\n ];\n echo form_select('field_upload_type', $this->locale['fields_0457'], $this->field_data['field_config']['field_upload_type'], [\"options\" => $file_upload_type]);\n echo form_text('field_upload_path', $this->locale['fields_0458'], $this->field_data['field_config']['field_upload_path'],\n [\n 'placeholder' => $this->locale['fields_0459'],\n 'required' => TRUE\n ]\n );\n echo \"<label for='field_max_b'>\".$this->locale['fields_0460'].\"</label>\\n<br/>\";\n echo \"<div class='row'>\\n\";\n echo \"<div class='col-xs-6 col-sm-6 col-md-6 col-lg-6'>\\n\";\n echo form_text('field_max_b', '', $calc_b, [\n 'class' => 'm-b-0',\n 'type' => 'number',\n 'required' => TRUE\n ]);\n echo \"</div><div class='col-xs-6 col-sm-6 col-md-6 col-lg-6 p-l-0'>\\n\";\n echo form_select('field_calc', '', $calc_c, ['options' => $calc_opts, 'width' => '100%']);\n echo \"</div>\\n</div>\\n\";\n // File Type\n echo \"<div id='file_type'>\\n\";\n echo form_select('field_valid_file_ext', $this->locale['fields_0461'], $this->field_data['field_config']['field_valid_file_ext'],\n [\n 'options' => $file_type_list,\n 'multiple' => TRUE,\n 'tags' => TRUE,\n 'required' => TRUE,\n 'width' => '100%',\n 'inner_width' => '100%'\n ]);\n echo \"</div>\\n\";\n // Image Type\n echo \"<div id='image_type'>\\n\";\n echo form_select('field_valid_image_ext', $this->locale['fields_0462'], $this->field_data['field_config']['field_valid_image_ext'],\n [\n 'options' => $file_image_list,\n 'multiple' => TRUE,\n 'tags' => TRUE,\n 'required' => TRUE\n ]);\n echo \"<label>\".$this->locale['fields_0463'].\"</label>\\n<br/>\";\n echo \"<div class='row'>\\n\";\n echo \"<div class='col-xs-6 col-sm-6 col-md-6 col-lg-6'>\\n\";\n echo form_text('field_image_max_w', $this->locale['fields_0464'], $this->field_data['field_config']['field_image_max_w'], [\n 'number' => 1,\n 'placeholder' => $this->locale['fields_0466'],\n 'required' => 1\n ]);\n echo \"</div><div class='col-xs-6 col-sm-6 col-md-6 col-lg-6 p-l-0'>\\n\";\n echo form_text('field_image_max_h', $this->locale['fields_0465'], $this->field_data['field_config']['field_image_max_h'], [\n 'number' => 1,\n 'placeholder' => $this->locale['fields_0466'],\n 'required' => 1\n ]);\n echo \"</div>\\n</div>\\n\";\n echo form_checkbox('field_thumbnail', $this->locale['fields_0467'], $this->field_data['field_config']['field_thumbnail'], ['reverse_label' => TRUE]);\n echo \"<div id='field_t1'>\\n\";\n echo form_text('field_thumb_upload_path', $this->locale['fields_0468'],\n $this->field_data['field_config']['field_thumb_upload_path'], [\n 'placeholder' => $this->locale['fields_0469'],\n 'required' => 1\n ]);\n echo \"<label>\".$this->locale['fields_0470'].\"</label>\\n<br/>\";\n echo \"<div class='row'>\\n\";\n echo \"<div class='col-xs-6 col-sm-6 col-md-6 col-lg-6'>\\n\";\n echo form_text('field_thumb_w', $this->locale['fields_0471'], $this->field_data['field_config']['field_thumb_w'], [\n 'number' => 1,\n 'placeholder' => $this->locale['fields_0466'],\n 'required' => 1\n ]);\n echo \"</div><div class='col-xs-6 col-sm-6 col-md-6 col-lg-6 p-l-0'>\\n\";\n echo form_text('field_thumb_h', $this->locale['fields_0472'], $this->field_data['field_config']['field_thumb_h'], [\n 'number' => 1,\n 'placeholder' => $this->locale['fields_0466'],\n 'required' => 1\n ]);\n echo \"</div>\\n</div>\\n\";\n echo \"</div>\\n\";\n echo form_checkbox('field_thumbnail_2', $this->locale['fields_0473'], $this->field_data['field_config']['field_thumbnail_2'], ['reverse_label' => TRUE]);\n echo \"<div id='field_t2'>\\n\";\n echo form_text('field_thumb2_upload_path', $this->locale['fields_0474'], $this->field_data['field_config']['field_thumb2_upload_path'],\n [\n 'placeholder' => $this->locale['fields_0469'],\n 'required' => TRUE,\n ]);\n echo \"<label>\".$this->locale['fields_0475'].\"</label>\\n<br/>\";\n echo \"<div class='row'>\\n\";\n echo \"<div class='col-xs-6 col-sm-6 col-md-6 col-lg-6'>\\n\";\n echo form_text('field_thumb2_w', $this->locale['fields_0476'], $this->field_data['field_config']['field_thumb2_w'], [\n 'type' => 'number',\n 'placeholder' => $this->locale['fields_0466'],\n 'required' => TRUE,\n ]);\n echo \"</div><div class='col-xs-6 col-sm-6 col-md-6 col-lg-6 p-l-0'>\\n\";/**/\n echo form_text('field_thumb2_h', $this->locale['fields_0477'], $this->field_data['field_config']['field_thumb2_h'], [\n 'type' => 'number',\n 'placeholder' => $this->locale['fields_0466'],\n 'required' => TRUE\n ]);\n echo \"</div>\\n</div>\\n\";\n echo \"</div>\\n\";\n echo form_checkbox('field_delete_original', $this->locale['fields_0478'], $this->field_data['field_config']['field_delete_original'], ['reverse_label' => TRUE]);\n echo \"</div>\\n\";\n add_to_jquery(\"\n if ($('#field_upload_type').select2().val() == 'image') {\n $('#image_type').show();\n $('#file_type').hide();\n } else {\n $('#image_type').hide();\n $('#file_type').show();\n }\n $('#field_upload_type').bind('change', function() {\n if ($(this).select2().val() == 'image') {\n $('#image_type').show();\n $('#file_type').hide();\n } else {\n $('#image_type').hide();\n $('#file_type').show();\n }\n });\n // thumbnail\n $('#field_thumbnail').is(':checked') ? $('#field_t1').show() : $('#field_t1').hide();\n $('#field_thumbnail').bind('click', function() {\n $(this).is(':checked') ? $('#field_t1').show() : $('#field_t1').hide();\n });\n // thumbnail 2\n $('#field_thumbnail_2').is(':checked') ? $('#field_t2').show() : $('#field_t2').hide();\n $('#field_thumbnail_2').bind('click', function() {\n $(this).is(':checked') ? $('#field_t2').show() : $('#field_t2').hide();\n });\n \");\n } else {\n // @todo add config for textarea\n if ($this->field_data['field_type'] !== 'textarea') {\n echo form_text('field_default', $this->locale['fields_0480'], $this->field_data['field_default']);\n }\n }\n\n echo form_text('field_error', $this->locale['fields_0481'], $this->field_data['field_error']);\n echo form_checkbox('field_required', $this->locale['fields_0482'], $this->field_data['field_required'], ['reverse_label' => TRUE]);\n echo form_checkbox('field_log', $this->locale['fields_0483'], $this->field_data['field_log'], ['reverse_label' => TRUE]);\n echo form_text('field_order', $this->locale['fields_0484'], $this->field_data['field_order'],\n ['type' => 'number', 'inner_width' => '120px']);\n echo form_checkbox('field_registration', $this->locale['fields_0485'], $this->field_data['field_registration'], ['reverse_label' => TRUE]);\n echo form_hidden('add_field', '', $this->field_data['field_type']);\n echo form_hidden('field_id', '', $this->field_data['field_id']);\n echo form_button('save_field', $this->locale['fields_0488'], 'save', ['class' => 'btn-sm btn-primary']);\n echo closeform();\n echo \"</div>\\n\";\n }", "public function filos(){\n return $this->hasMany('App\\Models\\Filo', 'reino_id', 'id');\n }", "function ConvertirSelFamilias2Articulos(){\n\t\n\t\n\t$carroprod = getSesionDato(\"CarritoFam\");\n\t\n\t//Vamos a agnadir a la seleccion actual del carro de articulos\n\t$carroarticulos = getSesionDato(\"CarritoTrans\");\n\tif (!is_array($carroarticulos))\n\t\t$carroarticulos = array();\n\t\t\t\t\t\t\n\tforeach ($carroprod as $IdFamilia){\t\t\n\t\t$res = Seleccion(\"Almacen\",\"IdFamilia='$IdFamilia'\");\t\t\n\t\tif ($res){\n\t\t\twhile($row=Row($res)){\n\t\t\t\t$id = $row[\"Id\"];\n\t\t\t\tarray_push($carroarticulos,$id);\n\t\t\t}\t\n\t\t}\n\t}\t\n\tsetSesionDato(\"CarritoTrans\",$carroarticulos);\t\t\n}", "private function obtenerSubtotalFijo()\n {\n $tamanio = $this -> camposCant;\n\n for ($i = 0 ; $i < count($tamanio) ; $i++)\n {\n array_push($this -> subtotalFijo, (int) $this-> camposCant[$i] * $this -> camposPrecio[$i]);\n }\n\n return $this -> subtotalFijo;\n }", "function obtenirReqIdFicheFrais() {\r\n\t\t\t$req = \"select visiteur.nom as nom, visiteur.id as id, visiteur.prenom as prenom from visiteur\";\r\n\t\t\t$res = PdoGsb::$monPdo->query($req);\r\n\t\t\t$visiteur = $res->fetchAll();\r\n\t\t\treturn $visiteur;\r\n\t}" ]
[ "0.5533682", "0.54561627", "0.5436706", "0.54276615", "0.5332063", "0.5307994", "0.5304834", "0.52739567", "0.5257498", "0.52435845", "0.5228238", "0.52145517", "0.5185835", "0.5170562", "0.5169397", "0.51683164", "0.5142515", "0.514121", "0.5138287", "0.51362556", "0.51065475", "0.5100077", "0.5099317", "0.50987583", "0.50982755", "0.5096943", "0.5096564", "0.50947315", "0.50884914", "0.5046385" ]
0.60093737
0
Carga el estado actual del ef a partir del $_POST dejado por este mismo componente en el pedido anterior
function cargar_estado_post() { if (isset($_POST[$this->id_form])){ $this->estado = $_POST[$this->id_form]; } else { $this->estado = null; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function estado(){\n\t\tUtils::isAdmin();//si es administrador\n\t\tif(isset($_POST['pedido_id']) && isset($_POST['estado'])){\n\t\t\t// Recoger datos form\n\t\t\t$id = $_POST['pedido_id'];\n\t\t\t$estado = $_POST['estado'];\n\n\t\t\t// Upadate del pedido\n\t\t\t$pedido = new Pedido();\n\t\t\t$pedido->setId($id);//seteo lo llegado del post\n\t\t\t$pedido->setEstado($estado);//seteo el nuevo estado llegado del post\n\t\t\t$pedido->edit();//actualiza el estado de la tabla pedidos de ese id seteado\n\n\t\t\theader(\"Location:\".base_url.'Pedido/detalle&id='.$id);//lo llevo de nuevo a ver el detalle de ese pedido\n\t\t}else{\n\t\t\theader(\"Location:\".base_url);\n\t\t}\n\t}", "static public function ctrActualizarEstadoPedido(){\r\n\r\n\t\tif(isset($_POST[\"editarIdPedido\"])){\r\n\t\t\tif($_POST[\"editarIdPedido\"] != \"\"){\r\n\r\n\t\t\t\t$tabla = \"compras\";\r\n\t\t\t\t$tabla2 = \"logistica\";\r\n\r\n\t\t\t\t$datos = array(\"idPedido\" => $_POST[\"editarIdPedido\"],\r\n\t\t\t\t\t\t\t\t\"serie\" => $_POST[\"editarSerie\"]);\r\n\r\n\t\t\t\t$respuestaC = ModeloCompras::mdlActualizarEstadoPedido($tabla, $tabla2, $datos);\r\n\t\t\t\t return $respuestaC;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\r\n\r\n\t}", "static public function ctrActualizarEstadoComprasAtencion(){\r\n\r\n\t\tif(isset($_POST[\"editarFolio\"])){\r\n\t\t\tif($_POST[\"editarFolio\"] != \"\"){\r\n\r\n\t\t\t \r\n\t\t\t\t$tabla = \"compras\";\r\n\t\t\t\t$tabla2 = \"atencionaclientes\";\r\n\r\n\t\t\t\t$datos = array(\"folio\" => $_POST[\"editarFolio\"],\r\n\t\t\t\t\t\t\t\t\"serie\" => $_POST[\"editarSerie\"]);\r\n\r\n\t\t\t\t$respuestaC = ModeloCompras::mdlActualizarEstadoComprasAtencion($tabla, $tabla2, $datos);\r\n\t\t\t\t return $respuestaC;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\r\n\r\n\t}", "function cambiarEstado($id_solicitud, $estado, $tipo){\t\t\t\t\t\t\n\t\t\t\n\t\tif ($tipo == 'correctivo') {\n\t\t\t$this->db->set('estado', $estado);\n\t\t\t$this->db->where('id_solicitud', $id_solicitud);\n\t\t\t$response = $this->db->update('solicitud_reparacion');\n\t\t}\n\n\t\tif ($tipo == 'preventivo') {\n\t\t\t$this->db->set('estadoprev', $estado);\n\t\t\t$this->db->where('prevId', $id_solicitud);\n\t\t\t$response = $this->db->update('preventivo');\n\t\t}\n\n\t\tif ($tipo == 'backlog') {\n\t\t\t$this->db->set('estado', $estado);\n\t\t\t$this->db->where('backId', $id_solicitud);\n\t\t\t$response = $this->db->update('tbl_back');\n\t\t}\t\t\t\n\n\t\tif ($tipo == 'predictivo') {\n\t\t\t$this->db->set('estado', $estado);\n\t\t\t$this->db->where('predId', $id_solicitud);\n\t\t\t$response = $this->db->update('predictivo');\n\t\t}\t\n\t\t\n\t\tif ($tipo == 'OT') {\n\t\t\t$this->db->set('estado',$estado);\n\t\t\t$this->db->where('id_orden',$id_solicitud);\n\t\t\treturn $this->db->update('orden_trabajo');\n\t\t}\n\n\t\tif ($tipo == 'informe servicios') {\t\t\t\n\t\t\t$this->db->set('estado',$estado);\n\t\t\t$this->db->where('id_ot',$id_solicitud);\n\t\t\treturn $this->db->update('orden_servicio');\n\t\t}\n\n\t\treturn $response;\n\t}", "static public function ctrActualizarEstadoCompras(){\r\n\r\n\t\tif(isset($_POST[\"idPedido\"])){\r\n\t\t\tif($_POST[\"idPedido\"] != \"\"){\r\n\r\n\t\t\t \r\n\t\t\t\t$tabla = \"compras\";\r\n\t\t\t\t$tabla2 = \"atencionaclientes\";\r\n\r\n\t\t\t\t$datos = array(\"idPedido\" => $_POST[\"idPedido\"]);\r\n\r\n\t\t\t\t$respuestaC = ModeloCompras::mdlActualizarEstadoCompras($tabla, $tabla2, $datos);\r\n\t\t\t\t return $respuestaC;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\r\n\r\n\t}", "function DetalleEstadoApertura(){\r\n $this->procedimiento='vef.ft_apertura_cierre_caja_sel';\r\n $this->transaccion='VF_DETA_SEL';\r\n $this->tipo_procedimiento='SEL';//tipo de transaccion\r\n\r\n $this->captura('id_apertura_cierre_caja','int4');\r\n $this->captura('fecha_apertura_cierre','date');\r\n $this->captura('estado','varchar');\r\n $this->captura('nombre','varchar');\r\n $this->captura('codigo','varchar');\r\n $this->captura('desc_persona','text');\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "static public function ctrActualizarEstadoComprasAdquisicion(){\r\n\r\n\t\tif(isset($_POST[\"idPedidoAdquisicion\"])){\r\n\t\t\tif($_POST[\"idPedidoAdquisicion\"] != \"\"){\r\n\r\n\t\t\t \r\n\t\t\t\t$tabla = \"compras\";\r\n\t\t\t\t$tabla2 = \"atencionaclientes\";\r\n\r\n\t\t\t\t$datos = array(\"idPedido\" => $_POST[\"idPedidoAdquisicion\"]);\r\n\r\n\t\t\t\t$respuestaC = ModeloCompras::mdlActualizarEstadoComprasAdquisicion($tabla, $tabla2, $datos);\r\n\t\t\t\t return $respuestaC;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\r\n\r\n\t}", "static public function ctrActualizarStatusPedido(){\r\n\r\n\t\tif(isset($_POST[\"editarIdPedido\"])){\r\n\t\t\tif($_POST[\"editarIdPedido\"] != \"\"){\r\n\r\n\t\t\t\t$tabla = \"compras\";\r\n\t\t\t\t$tabla2 = \"logistica\";\r\n\r\n\t\t\t\t$datos = array(\"idPedido\" => $_POST[\"editarIdPedido\"],\r\n\t\t\t\t\t\t\t\t\"serie\" => $_POST[\"editarSerie\"]);\r\n\r\n\t\t\t\t$respuestaC = ModeloCompras::mdlActualizarStatusPedido($tabla, $tabla2, $datos);\r\n\t\t\t\t return $respuestaC;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\r\n\r\n\t}", "public function pausar_orden_proceso(){\n if (isset($_POST['pausar_orden_pen']) && isset($_POST['pausar_finalizar_orden'])){\n $this->id = $_POST['pausar_finalizar_orden'];\n $sql = \"UPDATE tblorden SET tblestado_est_id = 22 WHERE ord_id = $this->id\";\n $resultado = mysqli_query($this->conection, $sql);\n if($resultado){\n return true;\n }else{\n return false;\n }\n }\n }", "function actualizarEstados(){\n\t\t$this->procedimiento='vef.ft_log_regularizaciones_ime';\n\t\t$this->transaccion='VEF_LOG_UPDT_ANUL';\n\t\t$this->tipo_procedimiento='IME';\n\n\t\t//Define los parametros para la funcion\n\t\t$this->setParametro('cuf','cuf','varchar');\n\t\t$this->setParametro('estado','estado','varchar');\n\t\t$this->setParametro('respuesta_servicio','respuesta_servicio','varchar');\n\t\t//Ejecuta la instruccion\n\t\t$this->armarConsulta();\n\n\t\t$this->ejecutarConsulta();\n\n\t\t//Devuelve la respuesta\n\t\treturn $this->respuesta;\n\t}", "public function actualizarEstadoAC($estado = 0) {\n $this->msgError = '';\n //$fechaHoraActual = $this->consultar_fecha_hora();\n //$fechaActual = substr($fechaHoraActual, 0, 10);\n\n $estadoActual = $this->session->userdata('estado');\n\n try {\n switch ($estado) {\n case 2:\n $sessionData['FECHA_INI_REGISTRO'] = 'SYSDATE';\n $sessionData['PAG_REGISTRO'] = $estado;\n if(!empty($sessionData)) {\n $this->session->set_userdata($sessionData);\n }\n break;\n case 10:\n $sessionData['FECHA_FIN_REGISTRO'] = 'SYSDATE';\n $sessionData['PAG_REGISTRO'] = $estado;\n $sessionData['fechaFinPers'] = $sessionData['FECHA_FIN_REGISTRO'];\n if(!empty($sessionData)) {\n $this->session->set_userdata($sessionData);\n }\n break;\n default:\n $sessionData['PAG_REGISTRO'] = $estado;\n if(!empty($sessionData)) {\n $this->session->set_userdata($sessionData);\n }\n break;\n }\n return true;\n } catch (Exception $e) {\n log_message('Error en la línea ' . $e->getLine() . ' en el archivo ' . $e->getFile() . ': error:' . $e->getMessage() . '.');\n $this->msgError = '<strong>Se presentarón inconvenientes en el servidor.</strong>';\n return false;\n }\n }", "static public function ctrActualizarStatusComprasEdicion(){\r\n\r\n\t\tif(isset($_POST[\"editarIdPedido\"])){\r\n\t\t\tif($_POST[\"editarIdPedido\"] != \"\"){\r\n\r\n\t\t\t \r\n\t\t\t\t$tabla = \"compras\";\r\n\t\t\t\t$tabla2 = \"atencionaclientes\";\r\n\r\n\t\t\t\t$datos = array(\"idPedido\" => $_POST[\"editarIdPedido\"],\r\n\t\t\t\t\t\t\t\t\"serie\" => $_POST[\"editarSerie\"]);\r\n\r\n\t\t\t\t$respuestaC = ModeloCompras::mdlActualizarStatusComprasEdicion($tabla, $tabla2, $datos);\r\n\t\t\t\t return $respuestaC;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\r\n\r\n\t}", "static public function ctrActualizarEstadoPedidoGenerales(){\r\n\r\n\t\tif(isset($_POST[\"idPedidoGeneral\"])){\r\n\t\t\tif($_POST[\"idPedidoGeneral\"] != \"\"){\r\n\r\n\t\t\t\t$tabla = \"compras\";\r\n\t\t\t\t$tabla2 = \"logistica\";\r\n\r\n\t\t\t\t$datos = array(\"idPedido\" => $_POST[\"idPedidoGeneral\"],\r\n\t\t\t\t\t\t\t\t\"serie\" => $_POST[\"serieGeneral\"]);\r\n\r\n\t\t\t\t$respuestaC = ModeloCompras::mdlActualizarEstadoPedidoGenerales($tabla, $tabla2, $datos);\r\n\t\t\t\t return $respuestaC;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\r\n\r\n\t}", "function EstadoApertura(){\r\n $this->procedimiento='vef.ft_apertura_cierre_caja_sel';\r\n $this->transaccion='VF_CONTR_SEL';\r\n $this->tipo_procedimiento='SEL';//tipo de transaccion\r\n $this->setCount(false);//tipo de transaccion\r\n $this->captura('fecha_apertura_cierre','date');\r\n $this->captura('abierto_co','int4');\r\n $this->captura('cerrado_co','int4');\r\n $this->captura('estado','varchar');\r\n\r\n //Ejecuta la instruccion\r\n $this->armarConsulta();\r\n $this->ejecutarConsulta();\r\n //Devuelve la respuesta\r\n return $this->respuesta;\r\n }", "static public function ctrActualizarStatusComprasAtencion(){\r\n\r\n\t\tif(isset($_POST[\"editarFolio\"])){\r\n\t\t\tif($_POST[\"editarFolio\"] != \"\"){\r\n\r\n\t\t\t \r\n\t\t\t\t$tabla = \"compras\";\r\n\t\t\t\t$tabla2 = \"atencionaclientes\";\r\n\r\n\t\t\t\t$datos = array(\"folio\" => $_POST[\"editarFolio\"],\r\n\t\t\t\t\t\t\t\t\"serie\" => $_POST[\"editarSerie\"]);\r\n\r\n\t\t\t\t$respuestaC = ModeloCompras::mdlActualizarStatusComprasAtencion($tabla, $tabla2, $datos);\r\n\t\t\t\t return $respuestaC;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\r\n\r\n\t}", "private function initPOST(){\n\tif (isset($_POST['tbUsuarioId'])){\n\t\t$this->tbUsuarioId = $_POST['tbUsuarioId'];\n\t}\n\tif (isset($_POST['tbUsuarioLogin'])){\n\t\t$this->tbUsuarioLogin = $_POST['tbUsuarioLogin'];\n\t}\n\tif (isset($_POST['tbUsuarioNome'])){\n\t\t$this->tbUsuarioNome = $_POST['tbUsuarioNome'];\n\t}\n\tif (isset($_POST['tbUsuarioSobrenome'])){\n\t\t$this->tbUsuarioSobrenome = $_POST['tbUsuarioSobrenome'];\n\t}\n\tif (isset($_POST['tbUsuarioDtnasc'])){\n\t\t$this->tbUsuarioDtnasc = $_POST['tbUsuarioDtnasc'];\n\t}\n\tif (isset($_POST['tbUsuarioDtregistro'])){\n\t\t$this->tbUsuarioDtregistro = $_POST['tbUsuarioDtregistro'];\n\t}\n\tif (isset($_POST['tbUsuarioPais'])){\n\t\t$this->tbUsuarioPais = $_POST['tbUsuarioPais'];\n\t}\n\tif (isset($_POST['tbUsuarioEstado'])){\n\t\t$this->tbUsuarioEstado = $_POST['tbUsuarioEstado'];\n\t}\n\tif (isset($_POST['tbUsuarioCidade'])){\n\t\t$this->tbUsuarioCidade = $_POST['tbUsuarioCidade'];\n\t}\n}", "static public function ctrActualizarEstadoComprasProveedores(){\r\n\r\n\t\tif(isset($_POST[\"editarIdPedido\"])){\r\n\t\t\tif($_POST[\"editarIdPedido\"] != \"\"){\r\n\r\n\t\t\t \r\n\t\t\t\t$tabla = \"compras\";\r\n\t\t\t\t$tabla2 = \"atencionaclientes\";\r\n\r\n\t\t\t\t$datos = array(\"idPedido\" => $_POST[\"editarIdPedido\"],\r\n\t\t\t\t\t\t\t\t\"serie\" => $_POST[\"editarSerie\"]);\r\n\r\n\t\t\t\t$respuestaC = ModeloCompras::mdlActualizarEstadoComprasProveedores($tabla, $tabla2, $datos);\r\n\t\t\t\t return $respuestaC;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\r\n\r\n\t}", "public function activar_orden_proceso(){\n if (isset($_POST['activar_orden_pen']) && isset($_POST['activar_finalizar_orden'])){\n $this->id = $_POST['activar_finalizar_orden'];\n $sql = \"UPDATE tblorden SET tblestado_est_id = 20 WHERE ord_id = $this->id\";\n $resultado = mysqli_query($this->conection, $sql);\n if($resultado){\n return true;\n }else{\n return false;\n }\n }\n }", "private function sql_anuncio_actualizar(){\n\n\t\t$id = $this->resolver_enigma($_POST['art']);\t\t//resolvemos,\n\t\t$art = '&art='.$_POST['art']; \t\t\t\t\t//montamos y\n\t\tunset($_POST['art']);\t\t\t\t\t\t\t//eliminamos\n\t\t\n\t\t$_POST['fecha_actualizacion'] = $this->now;\t\t//añadimos fecha de actualizacion\n\t\t$superficies = $this->superficies_varias();\t\t//prepara superficies\n\t\t$this->actualizar_db('anuncios', $id);\t\t\t//actualizo anuncio\n\t\t$this->introducir_superficies($superficies,$this->last_id);\t//introduce superficies en su tabla\n\t\t\n\t\t//nos llevara al siguiente formulario\n\t\theader('Location: '.ANUNCIO_PASO_2.$art);\n\t\texit;\n\t}", "public function updatestatus_post(){\n $_POST = json_decode(file_get_contents(\"php://input\"), true);\n $_POST = $this->security->xss_clean($_POST);\n $output=$this->Model_Paciente->update_status($_POST[\"IDPaciente\"],$_POST[\"status\"]);\n if ($output > 0 || !empty($output) || $output===NULL)\n {\n // Success 200 Code Send\n $message = [\n 'status' => true,\n 'message' => \"Actualizacion Correcta\",\n 'data'=>$_POST\n\n ];\n $this->response($message, REST_Controller::HTTP_OK);\n } else\n {\n // Error\n $message = [\n 'status' => FALSE,\n 'message' => \"Error al actualizar.\"\n ];\n $this->response($message, REST_Controller::HTTP_NOT_FOUND);\n }\n }", "function get_fila_actual()\n\t{\n\t\treturn $this->agregado_form;\n\t}", "public function actualizarDatos(){\n if(isset($_POST)){\n $id = $_SESSION['login']->id_cliente;\n $nombre = isset($_POST['name']) ? $_POST['name'] : false;\n $apellidos = isset($_POST['lastname']) ? $_POST['lastname'] : false;\n $email = isset($_POST['email']) ? $_POST['email'] : false;\n \n if ($nombre && $apellidos && $email) {\n $cliente = new Cliente();\n $cliente->setId($id);\n $cliente->setNombre($nombre);\n $cliente->setApellidos($apellidos);\n $cliente->setEmail($email);\n \n $datosActualizados = $cliente->actualizar();\n //Llenar la sesion con los nuevos datos\n $_SESSION['login'] = $cliente->recargaSesion();\n }\n }else{\n $_SESSION['fallo']=\"Fallo la actualización de los datos\";\n }\n header('location:'. root . 'cliente/datos');\n }", "function anteriorEstadoPlanilla(){\n $this->procedimiento='plani.ft_planilla_ime';\n $this->transaccion='PLA_ANTEPLA_IME';\n $this->tipo_procedimiento='IME';\n \n //Define los parametros para la funcion\n $this->setParametro('id_plan_pago','id_plan_pago','int4');\n $this->setParametro('id_proceso_wf','id_proceso_wf','int4');\n $this->setParametro('id_funcionario_usu','id_funcionario_usu','int4');\n $this->setParametro('operacion','operacion','varchar');\n \n $this->setParametro('id_funcionario','id_funcionario','int4');\n $this->setParametro('id_tipo_estado','id_tipo_estado','int4');\n $this->setParametro('id_estado_wf','id_estado_wf','int4');\n $this->setParametro('obs','obs','text');\n\t\t\n //Ejecuta la instruccion\n $this->armarConsulta();\n $this->ejecutarConsulta();\n\n //Devuelve la respuesta\n return $this->respuesta;\n }", "public function processar()\n {\n $this->setParametros(array(\n 'idConv' => $this->getIdConv(),\n 'refTran' => $this->getRefTran(),\n 'valor' => $this->getValor(),\n 'qtdPontos' => $this->getQtdPontos(),\n 'dtVenc' => $this->getDtVenc(),\n 'tpPagamento' => $this->getTpPagamento(),\n 'cpfCnpj' => $this->getCpfCnpj(),\n 'indicadorPessoa' => $this->getIndicadorPessoa(),\n 'valorDesconto' => $this->getValorDesconto(),\n 'dataLimiteDesconto' => $this->getDataLimiteDesconto(),\n 'tpDuplicata' => $this->getTpDuplicata(),\n 'urlRetorno' => $this->getUrlRetorno(),\n 'urlInforma' => $this->getUrlInforma(),\n 'nome' => $this->getNome(),\n 'endereco' => $this->getEndereco(),\n 'cidade' => $this->getCidade(),\n 'uf' => $this->getUf(),\n 'cep' => $this->getCep(),\n 'msgLoja' => $this->getMsgLoja()\n ));\n\n if ($this->getTipoEnvio() == 'html') {\n return $this->enviarFormularioViaHtml();\n } else if ($this->getTipoEnvio() == 'curl') {\n return $this->enviarFormularioViaCurl();\n } else if ($this->getTipoEnvio() == 'file_get_contents') {\n return $this->enviarFormularioViaFileGetContents();\n } else { //auto\n if (extension_loaded('curl')) {\n return $this->enviarFormularioViaCurl();\n } else if (ini_get('allow_url_fopen')) {\n return $this->enviarFormularioViaFileGetContents();\n } else {\n return $this->enviarFormularioViaHtml();\n }\n }\n }", "public function updateState() {\n $idLibro = MainModel::decryption($_POST['id-libro']);\n $idLibro = MainModel::clearString($idLibro);\n\n $idSolicitudLibro = MainModel::decryption($_POST['id-solicitud-libro']);\n $idSolicitudLibro = MainModel::clearString($idSolicitudLibro);\n\n if($idLibro == \"\" || $idSolicitudLibro == \"\") {\n echo json_encode(MainModel::alertContent(\"simple\", \"Algo salio mal\", \"Usted esta intentando hacer daño al sistema, no lo haga.\", \"error\"));\n\n exit();\n }\n\n $updateStateBook = BookModel::updateStateBookModel(['idLibro' => $idLibro, 'estado' => 'Entregado']);\n \n $updateStateSolicitud = LibraryModel::updateStateSolicitudModel(['idSolicitudLibro' => $idSolicitudLibro, 'estado' => 'Entregado']);\n\n if($updateStateBook->rowCount() == 1 && $updateStateSolicitud->rowCount() == 1) {\n $message = MainModel::alertContent(\"recargar\", \"Estado Actualizado\", \"Ud. ha marcado esta solicitud como ENTREGADO.\", \"success\");\n } else {\n $message = MainModel::alertContent(\"simple\", \"Algo salio mal.\", \"No hemos podido actualizar el estado del libro ni de la solicitud.\", \"error\");\n }\n\n echo json_encode($message);\n }", "static public function ctrMostrarTiempoProcesoEdicion(){\r\n\r\n\t\tif(isset($_POST[\"editarIdPedido\"])){\r\n\t\t\tif($_POST[\"editarIdPedido\"] != \"\"){\r\n\r\n\t\t\t \r\n\t\t\t\t$tabla = \"compras\";\r\n\t\t\t\t$tabla2 = \"atencionaclientes\";\r\n\r\n\t\t\t\t$datos = array(\"idPedido\" => $_POST[\"editarIdPedido\"],\r\n\t\t\t\t\t\t\t\t\"serie\" => $_POST[\"editarSerie\"]);\r\n\r\n\t\t\t\t$respuestaC = ModeloCompras::mdlMostrarTiempoProcesoEdicion($tabla, $tabla2, $datos);\r\n\t\t\t\t return $respuestaC;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\r\n\r\n\t}", "public function leeDatosTiporelacionVW(){\r\n\t\t$tiporelacion=new TiporelacionBSN();\r\n\t\t$this->tiporelacion=$tiporelacion->leeDatosForm($_POST);\r\n\t}", "public function getEstado(){\n\t\treturn $this->estado;\n\t}", "public function getEstado(){\n\t\treturn $this->estado;\n\t}", "static public function ctrActualizarStatusComprasAdquisicion(){\r\n\r\n\t\tif(isset($_POST[\"idPedidoAdquisicion\"])){\r\n\t\t\tif($_POST[\"idPedidoAdquisicion\"] != \"\"){\r\n\r\n\t\t\t \r\n\t\t\t\t$tabla = \"compras\";\r\n\t\t\t\t$tabla2 = \"atencionaclientes\";\r\n\r\n\t\t\t\t$datos = array(\"idPedido\" => $_POST[\"idPedidoAdquisicion\"]);\r\n\r\n\t\t\t\t$respuestaC = ModeloCompras::mdlActualizarStatusComprasAdquisicion($tabla, $tabla2, $datos);\r\n\t\t\t\t return $respuestaC;\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t\r\n\r\n\r\n\t}" ]
[ "0.6468132", "0.6246028", "0.60674876", "0.5939939", "0.59202576", "0.591793", "0.5888641", "0.5817306", "0.5706125", "0.5705199", "0.56985855", "0.56780595", "0.5666374", "0.5644835", "0.5638048", "0.5633993", "0.5611069", "0.5580739", "0.55805403", "0.5565756", "0.5505187", "0.54967487", "0.5491868", "0.54816216", "0.5453614", "0.54464513", "0.5439572", "0.543535", "0.543535", "0.54255867" ]
0.67329186
0
Retorna el js utilizado cuando el ef cambia de valor en el cliente
protected function get_cuando_cambia_valor() { //--- Se llama a $this->objeto_js para que los ML se posicionen en la fila correcta $js = $this->objeto_js().";".$this->cuando_cambia_valor; return $js; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function returnFieldJS()\n {\n // Nice to have: add javascript-code for evalution on blur\n return '\n return value;\n ';\n }", "public function getJavaScript();", "function get_consumo_javascript()\n\t{\n\t\treturn array(\"efs/ef\");\n\t}", "public function getJs(){ }", "public function getComponentValue()\n {\n if ($this->scope == self::SCOPE_ADD) {\n $valor = $this->CamposFormato->predeterminado;\n } else {\n $valor = \"<?= ComponentFormGeneratorController::callShowValue(\n {$this->Formato->getPK()},\n \\$_REQUEST['iddoc'],\n '{$this->CamposFormato->nombre}'\n ) ?>\";\n }\n\n return $valor;\n }", "public function getValor();", "protected function parametros_js()\n\t{\n\t\t$obligatorio = ( $this->obligatorio ) ? \"true\" : \"false\";\n\t\t$oculto_relaj = ($this->obligatorio_oculto_relaj) ? \"true\" : \"false\";\n\t\t$relajado = ( $this->cascada_relajada ) ? \"true\" : \"false\"; \n\t\t$colapsable = ( $this->expandido ) ? \"false\" : \"true\";\n\t\t$etiqueta = str_replace(\"/\", \"\\\\/\", $this->etiqueta ?? '');\n\t\t$etiqueta = str_replace(array('\"', \"'\"), '', $etiqueta);\n\t\treturn \"'{$this->id_form_orig}', '$etiqueta', [$obligatorio, $relajado, $oculto_relaj], $colapsable\";\n\t}", "protected function readjsOnChangeSelected()\n { return $this->_jsonchangeselected; }", "abstract public function getJs();", "public function getFieldJson() {\n return htmlspecialchars(json_encode(array(\n 'field_id' => $this->id\n )));\n }", "public function getJavascript()\n {\n if (!empty($this->columns)) {\n $this->setJsInitParam('columns', $this->getColumnsForJs());\n }\n\n $js = 'var '.$this->tableName.' = $(\"#'.$this->tableName.'\").dataTable('.\"\\n\"\n .(!empty($this->jsInitParameters) ? PHPToJS::render((object) $this->jsInitParameters) : '').\"\\n\"\n .');'.\"\\n\";\n\n $js .= $this->getJavascriptSearchPart();\n\n return $js;\n }", "private function json_completo() {\n $nodo = 1; //Este es el primer nodo del arbol de funcionalidades\n $seleccionados = array(); //Este arreglo de usa para seleccionar casillas por defecto\n $FacadeFuncionalidades = new Modules_Krauff_Model_FuncionalidadesFacade();\n $arreglo = $FacadeFuncionalidades->obtener_nodo($nodo, $seleccionados);\n echo json_encode($arreglo);\n }", "function set_cuando_cambia_valor($js)\n\t{\n\t\t$this->cuando_cambia_valor = $js;\n\t}", "protected function js() {\n // nothing\n }", "function get_input()\n\t{\n\t\tif (!isset($this->estado)) {\n\t\t\t$this->estado = null;\n\t\t}\n\t\tif ($this->es_solo_lectura()) {\n\t\t\t$html = bootstrap_form::hidden($this->id_form, $this->seleccionado() ? $this->valor : $this->valor_no_seteado);\n\t\t\tif ($this->seleccionado()) {\n\t\t\t\t$html .= \\toba_recurso::imagen_toba('nucleo/efcheck_on.gif',true,16,16);\n\t\t\t} else {\n\t\t\t\t$html .= \\toba_recurso::imagen_toba('nucleo/efcheck_off.gif',true,16,16);\n\t\t\t}\n\t\t} else {\n\t\t\t$js = '';\n\t\t\tif ($this->cuando_cambia_valor != '') {\n\t\t\t\t$js = \"onchange=\\\"{$this->get_cuando_cambia_valor()}\\\"\";\n\t\t\t}\n\t\t\t$tab = $this->padre->get_tab_index();\n\t\t\t$extra = \" tabindex='$tab'\";\n\t\t\t$html = bootstrap_form::checkbox($this->id_form, $this->estado, $this->valor, $this->clase_css, $extra.' '.$js);\n\t\t}\n\t\t$html .= $this->get_html_iconos_utilerias();\n\t\treturn $html;\n\t}", "public function returnFieldJS() {\n return '\nvalue = value.replace(/[^-0-9,.]/g,\\'\\');\n\nvar ret = 0;\ntry {\n if( isNaN(value) ) {\n value = 0;\n }\n\n ret = parseFloat(value);\n} catch(e) {}\n\nif( isNaN(ret) ) {\n ret = 0;\n}\n\nreturn ret;\n';\n }", "public function getJs(): string\n {\n $this->generateCodes();\n return $this->sJs;\n }", "function sqlajs($fechaSql)\n{\n\t$js=date(\"m/d/Y\",strtotime($fechaSql));\n\nreturn $js;\n}", "public function returnFieldJS()\n {\n return 'return value.charAt(0).toLowerCase() + value.slice(1);';\n }", "function getjsOnBlur () { return $this->readjsOnBlur(); }", "protected function produceJavascriptData()\n {\n return json_encode([\n 'name' => $this->widgetName,\n 'params' => serialize($this->widgetFullParams),\n '_token' => $this->wrapper->csrf_token(),\n ]);\n }", "public function obterValor(){\n return $this->valor;\n }", "function tipoVale(){\n\t\t$objResponse = new xajaxResponse();\n\t\t\n\t\t$query = \"SELECT id_tipo_vale, descripcion FROM sa_tipo_vale WHERE activo = 1\";\n\t\t$rs = mysql_query($query);\n\t\tif(!$rs){ return $objResponse->alert(mysql_error().\"\\n\\nLinea:\".__LINE__); }\n\t\t\n\t\t$html = \"<select name='id_tipo_vale'>\";\n\t\t$html .= \"<option value=''>SELECCIONE</option>\";\n\t\twhile($row = mysql_fetch_assoc($rs)){\n\t\t\t\t $html .= \"<option value='\".$row['id_tipo_vale'].\"'>\".utf8_encode($row['descripcion']).\"</option>\"; \n\t\t}\n\t\t$html .= \"</select>\";\n\t\t\n\t\t$objResponse->assign(\"field_id_tipo_vale\",\"innerHTML\",$html);\n\t\t\n\t\treturn $objResponse; \n\t}", "public function ajaxVisualizarOrdenCorteDetalle(){\n\n $item = \"ordencorte\";\n $valor = $this->codigoDOC;\n\n $respuestaDetalle = ControladorOrdenCorte::ctrVisualizarOrdenCorteDetalle($item, $valor);\n\n echo json_encode($respuestaDetalle);\n}", "public function ajaxListaGerentes(){\n\n ;\n $valor = $this->idJV;\n\n $respuesta=ControladorDelegados::ctrMostrarGA($valor);\n echo json_encode($respuesta);\n\n }", "function get_fila_actual()\n\t{\n\t\treturn $this->agregado_form;\n\t}", "public function __get_js() { return $this->_js; }", "public function getJs()\n\t{\n\t\t$abstractPlugins = $this->getAbstractPlugins();\n\t\t$plugins = $this->getPlugins();\n\t\t$item = $this->getItem();\n\t\t$pluginManager = JModel::getInstance('Pluginmanager', 'FabrikFEModel');\n\n\t\t$opts = new stdClass();\n\t\t$opts->plugin = $item->plugin;\n\t\t$opts->parentid = (int)$item->parent_id;\n\t\t$opts->jsevents = $this->getJsEvents();\n\t\t$opts->elements = $this->getElements();\n\t\t$opts->id = (int)$item->id;\n\t\t$opts = json_encode($opts);\n\n\t\tJText::script('COM_FABRIK_ACTION');\n\t\tJText::script('COM_FABRIK_CODE');\n\t\tJText::script('COM_FABRIK_OR');\n\t\tJText::script('COM_FABRIK_DELETE');\n\t\tJText::script('COM_FABRIK_SELECT_ON');\n\t\tJText::script('COM_FABRIK_SELECT_DO');\n\t\tJText::script('COM_FABRIK_WHERE_THIS');\n\t\tJText::script('COM_FABRIK_PLEASE_SELECT');\n\t\t$js =\n\t\"\n head.ready(function() {\n \tvar opts = $opts;\";\n\n\t\t$js .= \"\\t\\tvar aPlugins = [];\\n\";\n\t\tforeach ($abstractPlugins as $abstractPlugin) {\n\t\t\t$js .= \"\\t\\taPlugins.push(\".$abstractPlugin['js'].\");\\n\";\n\t\t}\n\t\t$js .= \"controller = new fabrikAdminElement(aPlugins, opts);\\n\";\n\t\tforeach ($plugins as $plugin) {\n\t\t\t$opts = new stdClass();\n\t\t\t$opts->location = @$plugin['location'];\n\t\t\t$opts->event = @$plugin['event'];\n\t\t\t$opts = json_encode($opts);\n\t\t\t$js .= \"controller.addAction('\".$plugin['html'].\"', '\".$plugin['plugin'].\"',\".$opts.\", false);\\n\";\n\t\t}\n\t\t$js .= \"\n});\";\n\t\treturn $js;\n\t}", "public function get_data_for_js() {\n\t\treturn AMVE_Item::get_data_for_js( $this->item );\n\t}", "private function _generate_js(){\n\t\t$this->_cl_convert();\n\t\t$JS = PHP_EOL.'/* -- S E A R C H -- */';\t\n\t\t$JS .= sprintf('%s%s?%s\";',PHP_EOL,host_url('/api3/finder.php'),$this->httpq);\n\n\t\treturn '<!-- J S S T A R T --><script>'.$JS.'</script><!-- J S E N D -->';\n\t}" ]
[ "0.64319175", "0.62933886", "0.6215439", "0.6209866", "0.6143778", "0.59514964", "0.59334826", "0.593203", "0.59022576", "0.58207345", "0.5723043", "0.5650916", "0.5649841", "0.5640916", "0.5637042", "0.56340426", "0.5625044", "0.5616012", "0.5607261", "0.5606547", "0.5583308", "0.55827236", "0.557064", "0.5568625", "0.55516833", "0.5550688", "0.5528895", "0.5502882", "0.54963756", "0.54465115" ]
0.6632072
0
Returns whether or not the dump server checker should be bound.
protected function shouldRegisterDumpServerChecker() { return ( class_exists('BeyondCode\\DumpServer\\RequestContextProvider') && class_exists('Symfony\\Component\\VarDumper\\Dumper\\ContextProvider\\SourceContextProvider') && class_exists('Symfony\\Component\\VarDumper\\Server\\Connection') ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function isBalancerServer();", "public function has_server()\n\t{\n\t\treturn count($_SERVER)>0 ? TRUE : FALSE;\n\t}", "public function isTpayServer()\n {\n return (new ServerValidator(\n $this->validateServerIP,\n $this->validateForwardedIP,\n $this->secureIP\n )\n )->isValid();\n }", "function isAnonBindAllowed()\n\t{\n\t\tglobal $servers;\n\n\t\t// If only_login_allowed_dns is set, then we cant have anonymous.\n\t\tif ( isset( $servers[$this->server_id]['only_login_allowed_dns'] )\n\t\t\t&& is_array( $servers[$this->server_id]['only_login_allowed_dns'] )\n\t\t\t&& count($servers[$this->server_id]['only_login_allowed_dns'] ) > 0 )\n\t\t\treturn false;\n\n\t\telse\n\t\t\treturn ( ! isset( $servers[$this->server_id]['disable_anon_bind'] )\n\t\t\t|| false == $servers[$this->server_id]['disable_anon_bind'] )\n\t\t\t? true\n\t\t\t: false;\n\t}", "private function canConnectToServer()\n {\n // Disable error handler for now\n set_error_handler(function () {\n return true;\n });\n\n // Try to open a connection\n $sp = fsockopen($this->serverHost, $this->serverPort);\n\n // Restore the handler\n restore_error_handler();\n\n if ($sp === false) {\n return false;\n }\n\n fclose($sp);\n\n return true;\n }", "public function useLocalServer() {\n return $this->getConfig(\"contactlab_commons/connection/type\") == 1;\n }", "public function isBlacklisted()\r\n {\r\n global $master_db_handle;\r\n\r\n $statement = get_slave_db_handle()->prepare('SELECT Server FROM ServerBlacklist WHERE Server = ?');\r\n $statement->execute(array($this->id));\r\n\r\n return $statement->fetch() != FALSE;\r\n }", "protected function isConfigured() {\n return !empty($this->host) && $this->port >= 0 && $this->port <= 65535;\n }", "public function hasPort(): bool\n {\n return !empty($this->port);\n }", "public static function has_server(string $var) { return isset(self::$server[$var]) ? true : false; }", "public function allowedToRun(Server $server)\n {\n return in_array($server->type, $this->serverTypes);\n }", "public static function checkReachability()\n {\n static::log(sprintf('%s', __METHOD__), 'debug');\n\n $host = Configure::read('Server.host');\n $port = Configure::read('Server.port');\n\n static::log(sprintf('Server - Trying to reach the server at %s:%s.', $host, $port), 'info');\n\n $ping = new Ping(Configure::read('Server.host'));\n $ping->setPort(Configure::read('Server.port'));\n $ping->setTimeout(1);\n\n $latency = $ping->ping('fsockopen');\n\n if ($latency !== false) {\n static::log(sprintf('Server - Server is reachable with a latency of %d.', $latency), 'info');\n } else {\n static::log('Server - Server is unreachable', 'warning');\n }\n\n static::$isReachable = ($latency !== false) ? true : false;\n return static::$isReachable;\n }", "public function isServerRunning()\n {\n $pid = $this->getServerPid();\n\n return !empty($pid);\n }", "public function isLoopback() {\n return $this->addr >> 8 === 0x7F0000;\n }", "public function isAttached(): bool\n {\n if (!$this->socket) {\n return false;\n }\n\n return true;\n }", "public abstract function isLoopback();", "public static function isActive()\n {\n return Director::isDev() && !!@fsockopen(\n Config::inst()->get(__CLASS__, 'HOSTNAME'),\n Config::inst()->get(__CLASS__, 'PORT')\n );\n }", "function df_is_localhost():bool {return in_array(dfa($_SERVER, 'REMOTE_ADDR', []), ['127.0.0.1', '::1']);}", "public function hasPort()\n {\n return isset($this->port);\n }", "function serverIs($server)\n{\n\treturn detectServer()->is($server);\n}", "public function isWebServer()\r\n\t{\r\n\t\treturn ( (!$this->isWebsocket()) &&\r\n\t\t (!$this->isCLI()) &&\r\n\t\t (!$this->isInstall()) );\r\n\t}", "public function isDatabaseServer();", "public function is_localhost() {\r\n\t\t$loopbacks = array( '127.0.0.1', '::1' );\r\n\t\tif ( in_array( $_SERVER['REMOTE_ADDR'], $loopbacks ) ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\tif ( ! filter_var( $_SERVER['REMOTE_ADDR'], FILTER_VALIDATE_IP, FILTER_FLAG_NO_PRIV_RANGE ) ) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\r\n\t\treturn false;\r\n\t}", "public function canServe(): bool;", "public function isLoopback()\n {\n return $this->isLocal;\n }", "protected function canTryAnotherPort()\n {\n return is_null($this->input->getOption('port')) &&\n ($this->input->getOption('tries') > $this->portOffset);\n }", "public function isWebServer();", "function isServerOk() {\n\tglobal $servers;\n\t$server_id = 1;\n\t$ldapserver = new LDAPServer($server_id);\n\t#$dn = $ldapserver->getSchemaDN();\n\t#if ($dn == \"\")\n\t#\terrorAndOut(\"Cant see the Schema DN (maybe wrong server credentials?).\");\n\n\treturn $ldapserver;\n}", "public function checkDispatcher() {\n return (count($this->apiDispatcher) > 0) ? true : false;\n }", "public function checkDispatcher() {\n return (count($this->apiDispatcher) > 0) ? true : false;\n }" ]
[ "0.6478639", "0.6428381", "0.64276457", "0.6426643", "0.6373473", "0.6300222", "0.62095886", "0.61552364", "0.61456025", "0.6069977", "0.60668886", "0.6059574", "0.60383135", "0.59909457", "0.59900844", "0.59885895", "0.5955453", "0.59275293", "0.59236705", "0.5897959", "0.5891086", "0.5890592", "0.58898795", "0.5871104", "0.58657306", "0.58598447", "0.58571833", "0.58425075", "0.5798772", "0.5798772" ]
0.7137717
0
Sets a new productionTimetableRequest
public function setProductionTimetableRequest(array $productionTimetableRequest) { $this->productionTimetableRequest = $productionTimetableRequest; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function GcApi_setRequestTime($val)\r\n {\r\n $this->m_gcOrder['RequestTime']['val'] = $this->GcApi_KeyStrReplace($val);\r\n }", "public function setRequestDateTime($val)\n {\n $this->_propDict[\"requestDateTime\"] = $val;\n return $this;\n }", "public function setStopTimetableRequest(array $stopTimetableRequest)\n {\n $this->stopTimetableRequest = $stopTimetableRequest;\n return $this;\n }", "public function setConnectionTimetableRequest(array $connectionTimetableRequest)\n {\n $this->connectionTimetableRequest = $connectionTimetableRequest;\n return $this;\n }", "public function setRequestTime(time $requestTime)\n {\n $this->RequestTime = $requestTime;\n return $this;\n }", "public function setRequestDateAttribute(string $value)\n {\n $this->attributes['requestDate'] = new Carbon($value);\n }", "final public function setPrendingRequestType($pendingRequestType)\n {\n $this->pendingRequestType = $pendingRequestType;\n }", "public function setRequest($request);", "public function setRequest($request);", "function NewRequest() {\n\t\t$this->PostString = \"\";\n\t\t$this->RawData = \"\";\n\t\t$this->Values = \"\";\n\t}", "public function set_request($request)\n\t{\n\t\t$this->request = $this->complete_request = trim($request);\n\t}", "public function setEstimatedTimetableRequest(array $estimatedTimetableRequest)\n {\n $this->estimatedTimetableRequest = $estimatedTimetableRequest;\n return $this;\n }", "function setStartTime($a_val)\n\t{\n\t\t$this->start_time = $a_val;\n\t}", "public function setRequest($request)\n {\n $this->_request = $request;\n }", "public function setRequest($request)\r\n {\r\n $this->request = $request;\r\n }", "public function set_request(Cpf_Core_Request $request)\r\r\n\t{\r\r\n\t\t$this->request = new App_Local_Form_Request($request);\r\r\n\t}", "private static function newUpdateRequest() {\n\t\t$kount = new Kount_Ris_Request_Update();\n\t\tself::configureRequest($kount);\n\t\treturn $kount;\n\t}", "public function setRequest($request)\n\t{\n\t\t$this->_request = $request;\n\t\treturn $this;\n\t}", "public function setRequest($request)\n {\n $this->request = $request;\n }", "public function setRequest($request)\n {\n $this->request = $request;\n }", "public function setRequest($request)\n {\n $this->request = $request;\n }", "public function setRequest($request) {\n $this->request += $request;\n }", "public function setRequest(Request $request) {\n $this->_request = $request;\n return;\n }", "public function setRequest(\\Dhl\\DataTypes\\RequestType $request)\n {\n $this->request = $request;\n return $this;\n }", "function addPropertyScheduling(Request $request) {\n \n }", "public function setRequest($request)\n {\n if (is_string($request))\n {\n $request = new $request();\n }\n\n $this->_request = $request;\n\n return $this;\n }", "public function setRequestDate($requestDate)\n {\n $this->RequestDate = $requestDate;\n return $this;\n }", "public function setActionRequiredByDateTime($val)\n {\n $this->_propDict[\"actionRequiredByDateTime\"] = $val;\n return $this;\n }", "protected function createRequest()\n {\n $this->request = new RequestBuilder(\n (string)$this->options['store_code'],\n (isset($this->options['timestamp']) ? (bool)$this->options['timestamp'] : true)\n );\n\n return $this;\n }", "public function setRequestedDateTimeUTC($val)\n {\n $this->_propDict[\"requestedDateTimeUTC\"] = $val;\n return $this;\n }" ]
[ "0.5704415", "0.5647449", "0.5500856", "0.52982116", "0.52954876", "0.5189577", "0.51194704", "0.50782377", "0.50782377", "0.49916714", "0.49399385", "0.4917541", "0.49165076", "0.49000463", "0.4896734", "0.48964456", "0.48755094", "0.4804873", "0.4789349", "0.4789349", "0.4789349", "0.47882658", "0.47756913", "0.476749", "0.47575778", "0.4749164", "0.47462636", "0.4732855", "0.47224426", "0.47189644" ]
0.7428827
0
Sets a new estimatedTimetableRequest
public function setEstimatedTimetableRequest(array $estimatedTimetableRequest) { $this->estimatedTimetableRequest = $estimatedTimetableRequest; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setConnectionTimetableRequest(array $connectionTimetableRequest)\n {\n $this->connectionTimetableRequest = $connectionTimetableRequest;\n return $this;\n }", "public function GcApi_setRequestTime($val)\r\n {\r\n $this->m_gcOrder['RequestTime']['val'] = $this->GcApi_KeyStrReplace($val);\r\n }", "public function setStopTimetableRequest(array $stopTimetableRequest)\n {\n $this->stopTimetableRequest = $stopTimetableRequest;\n return $this;\n }", "public function setRequestDateTime($val)\n {\n $this->_propDict[\"requestDateTime\"] = $val;\n return $this;\n }", "public function getXsiTypeName() {\n return \"EstimateRequest\";\n }", "public function setTimetable($timetable)\n {\n $this->timetable = $timetable;\n\n return $this;\n }", "public function setProductionTimetableRequest(array $productionTimetableRequest)\n {\n $this->productionTimetableRequest = $productionTimetableRequest;\n return $this;\n }", "public function update(Estimated $estimated, UpdateEstimatedRequest $request)\n\t\t{\n\t\t\tif($request->time_programmed == 0){\n\t\t\t\t$this->estimateds->destroy($estimated);\n \treturn redirect()->back()->withFlashSuccess(trans('alerts.crecursos.concept.deleted'));\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$this->estimateds->update($estimated, $request->all());\n\t\t\t\treturn redirect()->back()->withFlashSuccess(trans('alerts.crecursos.concept.updated'));\n\t\t\t}\n \n\t\t}", "public function setRequestTime(time $requestTime)\n {\n $this->RequestTime = $requestTime;\n return $this;\n }", "public function setCompletionTime(Request $request)\n {\n if (Gate::denies('edit_tasks_status')){\n return view('errors.403');\n }else{\n // Retrieving and editing the completion time\n $task = Task::find($request->id);\n $files = Storage::allFiles($request->id.\"/\");\n $task->expected_completion_time = $request->expected_completion_time;\n $task->save();\n return view('task',['task' => $task,'files'=>$files]);\n }\n }", "public function setRequestedDateTimeUTC($val)\n {\n $this->_propDict[\"requestedDateTimeUTC\"] = $val;\n return $this;\n }", "public function setRequestDateAttribute(string $value)\n {\n $this->attributes['requestDate'] = new Carbon($value);\n }", "public function estimateTransportRequest($request)\n {\n return EstimateTransportRequestResponse::fromXML($this->_invoke('EstimateTransportRequest'));\n }", "public function setStartTimeAttribute($input)\n {\n if ($input != null && $input != '') {\n // dd(self::convertToUTC($input, 'Europe/London', config('app.date_format') . 'Y-m-d H:i:s'));\n $this->attributes['start_time'] =\n self::convertToUTC($input, auth()->user()->timezone, config('app.date_format') . 'Y-m-d H:i:s');\n } else {\n $this->attributes['start_time'] = null;\n }\n }", "public function update(Request $request, Estimate $estimate)\n {\n //\n }", "public function setRequest(\\Dhl\\DataTypes\\RequestType $request)\n {\n $this->request = $request;\n return $this;\n }", "public function makeTableSpace($table)\n {\n if (! array_key_exists($table, $this->requests)) {\n $this->requests[$table] = [];\n }\n }", "public function setFromArray(array $request) :self\n\t{\n\t\tif (isset($request[static::KEY_START]) || isset($request[static::KEY_PER_PAGE])) {\n\t\t\tif (isset($request[static::KEY_START])) {\n\t\t\t\t$this->pagination()->start((int)$request[static::KEY_START]);\n\t\t\t\tunset($request[static::KEY_START]);\n\t\t\t}\n\t\t\tif (isset($request[static::KEY_PER_PAGE])) {\n\t\t\t\t$this->pagination()->perPage((int)$request[static::KEY_PER_PAGE]);\n\t\t\t\tunset($request[static::KEY_PER_PAGE]);\n\t\t\t}\n\t\t}\n\n\t\tif (isset($request[static::KEY_ORDER])) {\n\t\t\t$this->orders()->clear();\n\t\t\tif (is_array($request[static::KEY_ORDER])) {\n\t\t\t\t$this->orders()->setFromArray($request[static::KEY_ORDER]);\n\t\t\t} elseif ((string)$request[static::KEY_ORDER] !== '') {\n\t\t\t\t$this->orders()->append(Order::fromString((string)$request[static::KEY_ORDER]));\n\t\t\t}\n\t\t\tunset($request[static::KEY_ORDER]);\n\t\t}\n\n\t\tif (isset($request[static::KEY_FILTERS])) {\n\t\t\t$this->filters()->clear();\n\t\t\tif (is_array($request[static::KEY_FILTERS])) {\n\t\t\t\t$this->filters()->setFromArray($request[static::KEY_FILTERS]);\n\t\t\t}\n\t\t\tunset($request[static::KEY_FILTERS]);\n\t\t}\n\n\t\tif (isset($request[static::KEY_COLS])) {\n\t\t\t$this->columns()->clear();\n\t\t\tif (is_array($request[static::KEY_COLS])) {\n\t\t\t\t$this->columns()->setFromArray($request[static::KEY_COLS]);\n\t\t\t}\n\t\t}\n\n\t\t$this->setParams($request);\n\n\t\treturn $this;\n\t}", "public function setStartTimeAttribute($input)\n {\n if ($input != null && $input != '') {\n $this->attributes['start_time'] = Carbon::createFromFormat(config('app.date_format') . ' H:i:s', $input)->format('Y-m-d H:i:s');\n } else {\n $this->attributes['start_time'] = null;\n }\n }", "public function testSetLastRequest()\n {\n $this->client->setLastRequest(new Request);\n\n $this->assertTrue($this->client->getLastRequest() instanceof Request);\n }", "public function estimatedCost($estimatedCost)\n {\n return $this->setProperty('estimatedCost', $estimatedCost);\n }", "protected function setRequestParameters() {\n $amount = $this->parameters['amount'] ;\n\n $this->clearParameters() ;\n $this->setParameter('transaction_identifier', $this->identifier) ;\n $this->setParameter('amount', $amount) ;\n $this->setParameter('signature', $this->generateSignature($this->parameters)) ;\n $this->setParameter('vendor_token', $this->getLydiaVendorToken()) ;\n }", "protected function setRequest(RadacctRequest $request)\n {\n $this->request = $request;\n return $this;\n }", "public function setStartTimeAttribute($input)\n {\n if ($input != null && $input != '') {\n $this->attributes['start_time'] = Carbon::createFromFormat('H:i:s', $input)->format('H:i:s');\n } else {\n $this->attributes['start_time'] = null;\n }\n }", "public function getXsiTypeName() {\n return \"KeywordEstimateRequest\";\n }", "public function setRequest($request);", "public function setRequest($request);", "public function setHTTPRequest(Request $request) {\n\n $this->httpRequest = $request;\n\n }", "function setStartTime($a_val)\n\t{\n\t\t$this->start_time = $a_val;\n\t}", "public function setActionRequiredByDateTime($val)\n {\n $this->_propDict[\"actionRequiredByDateTime\"] = $val;\n return $this;\n }" ]
[ "0.5250389", "0.5229696", "0.5179308", "0.5081353", "0.49028838", "0.4874", "0.47824517", "0.47769302", "0.47586936", "0.46579993", "0.45392275", "0.44917116", "0.4481281", "0.44338235", "0.44292787", "0.4421836", "0.44042036", "0.440038", "0.43995053", "0.43945065", "0.43930656", "0.43727115", "0.4367745", "0.43672332", "0.43605697", "0.43540627", "0.43540627", "0.43482703", "0.4323709", "0.43022874" ]
0.7737046
0
Sets a new stopTimetableRequest
public function setStopTimetableRequest(array $stopTimetableRequest) { $this->stopTimetableRequest = $stopTimetableRequest; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setRequestStop($requestStop)\n {\n $this->requestStop = $requestStop;\n return $this;\n }", "function setStop($val){ return $this->setField('stop',$val); }", "public function setStopTime($var)\n {\n GPBUtil::checkInt64($var);\n $this->stopTime = $var;\n\n return $this;\n }", "public function setStopMonitoringRequest(array $stopMonitoringRequest)\n {\n $this->stopMonitoringRequest = $stopMonitoringRequest;\n return $this;\n }", "public function cancelSpotInstanceRequests($request);", "public function getRequestStop()\n {\n return $this->requestStop;\n }", "public function stop(): StopRequestBuilder {\n return new StopRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "protected function stop($sTestId = null){\r\n\t\t\t\r\n\t\t\t$sTestId = ($sTestId === null ? $this->sCurrentTestId : (string)$sTestId);\r\n\t\t\t\t\t\t\r\n\t\t\t$this->aTests[$sTestId][$this->getLastTestIndex($sTestId)][self::KEY_STOP] = microtime(true);\t\t\t\t\r\n\t\t\t\t\r\n\t\t\treturn $this;\r\n\t\t\r\n\t\t}", "public function setStop($stop) {\n $this->stop = $stop;\n return $this;\n }", "public function __construct($stopType, $commentedOut = false) {\n parent::__construct(\"Stop\", $commentedOut);\n\n $this->stopType = $stopType;\n }", "protected function stopTime()\n {\n $this->time = $this->getCurrentTime();\n }", "public function stop()\n {\n $this->mustStop = true;\n }", "protected function stop() {\n\t$this->_stop = true;\n}", "public function setStopwatch(Stopwatch $stopwatch)\n {\n $this->stopwatch = $stopwatch;\n }", "public function setStopwatch(Stopwatch $stopwatch = null)\n {\n $this->stopwatch = $stopwatch;\n }", "public function stopInstances($request);", "public function GcApi_setRequestTime($val)\r\n {\r\n $this->m_gcOrder['RequestTime']['val'] = $this->GcApi_KeyStrReplace($val);\r\n }", "public function stopRecording() {\n\t\t$stopRecording = new stopRecording();\n\t\t$this->stopRecording = sprintf($stopRecording);\n\t}", "function setFailureAndStop()\n {\n $this->failed = true;\n $this->stop();\n }", "function setFailureAndStop()\n {\n $this->failed = true;\n $this->stop();\n }", "public function setProductionTimetableRequest(array $productionTimetableRequest)\n {\n $this->productionTimetableRequest = $productionTimetableRequest;\n return $this;\n }", "public function setBusStop($value) {\n return $this->set(self::BUS_STOP, $value);\n }", "public function setBusStop($value) {\n return $this->set(self::BUS_STOP, $value);\n }", "public function record_stop($params = null, $options = null)\n {\n $url = $this->instanceUrl() . '/actions/record_stop';\n list($response, $opts) = $this->_request('post', $url, $params, $options);\n $this->refreshFrom($response, $opts);\n return $this;\n }", "function stop() {\r\n $this->_stop = TRUE;\r\n }", "public static function stop($query) {\r\n self::$queries[$query]['stop'] = microtime();\r\n }", "public function setExecutionStop()\n {\n $this->executionTime = microtime(true) - $this->executionStart;\n return $this;\n }", "public function stop()\n {\n $payload = '';\n\n $this->sendRequest(self::FUNCTION_STOP, $payload);\n }", "static public function stopTimeMarker($sId_) {\n\t\t$fTime = microtime(true);\n\t\tif (! isset(self::$_aTimeMarkers[$sId_])) return false;\n\t\t$aMarker = & self::$_aTimeMarkers[$sId_];\n\t\t$aMarker['end'] = $fTime;\n\t\t$aMarker['time'] = $aMarker['end'] - $aMarker['start'];\n\t\treturn $aMarker;\n\t}", "public function stopTimer()\n {\n }" ]
[ "0.6778919", "0.6227524", "0.5692111", "0.56615794", "0.5530969", "0.5479033", "0.54519886", "0.5283436", "0.527472", "0.52285963", "0.5208724", "0.5143562", "0.5142902", "0.50864476", "0.5045208", "0.50205624", "0.49949062", "0.4992029", "0.49519384", "0.49519384", "0.49308205", "0.4927161", "0.4927161", "0.49124894", "0.49099302", "0.48997164", "0.48766056", "0.487393", "0.48660752", "0.4810168" ]
0.7821716
0
Sets a new stopMonitoringMultipleRequest
public function setStopMonitoringMultipleRequest(array $stopMonitoringMultipleRequest) { $this->stopMonitoringMultipleRequest = $stopMonitoringMultipleRequest; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setStopMonitoringRequest(array $stopMonitoringRequest)\n {\n $this->stopMonitoringRequest = $stopMonitoringRequest;\n return $this;\n }", "public function setStopMonitorPermission(array $stopMonitorPermission)\n {\n $this->stopMonitorPermission = $stopMonitorPermission;\n return $this;\n }", "public function stopInstances($request);", "public function setStopTimetableRequest(array $stopTimetableRequest)\n {\n $this->stopTimetableRequest = $stopTimetableRequest;\n return $this;\n }", "public function cancelSpotInstanceRequests($request);", "public function setRequestStop($requestStop)\n {\n $this->requestStop = $requestStop;\n return $this;\n }", "public static function cancelMultipleShipment($data) \r\n {\r\n return self::requestHttp('POST', self::SHIPMENT . '/cancelbulk', $data);\r\n }", "public function unmonitorInstances($request);", "public function stopAllLogCollectors()\n {\n $url = self::makeUrl();\n\n $body = json_encode(array(\"patch\" =>\n array(array(\"field\" => \"status\", \"value\" => \"STOPPED\"))));\n\n $response = $this->service->prepAndSend($url, array(200), \"PATCH\", $body, true);\n $responseObj = json_decode($response);\n if (!empty($responseObj)) {\n\n $result = array();\n foreach ($responseObj->CollectorSettingsList as $lcs) {\n $result[] = LogCollectorSettings::createFromJSON($lcs);\n }\n return $result;\n } else {\n return array();\n }\n }", "function setStop($val){ return $this->setField('stop',$val); }", "public static function stop(){\n Worker::stopAll();\n }", "protected function stop() {\n\t$this->_stop = true;\n}", "public function setAllowMultiple($allow_multiple);", "public final function setMultiple($multiple){\n\t\tif(FW_Validate::isBool($multiple)){\n\t\t\t$this->multiple = $multiple;\n\t\t}\n\t}", "public function torrentStop($sessionId, TorrentIdList $ids);", "public function stop($event);", "function setFailureAndStop()\n {\n $this->failed = true;\n $this->stop();\n }", "function setFailureAndStop()\n {\n $this->failed = true;\n $this->stop();\n }", "public function setMultiple(bool $multiple): self\n {\n $this->multiple = $multiple;\n $this->clearCache();\n\n return $this;\n }", "public function setMultiple()\n {\n $this->type = 'multiple';\n\n return $this;\n }", "public function terminateInstances($request);", "public function stopRecording() {\n\t\t$stopRecording = new stopRecording();\n\t\t$this->stopRecording = sprintf($stopRecording);\n\t}", "public function unsetStopMonitorPermission($index)\n {\n unset($this->stopMonitorPermission[$index]);\n }", "function stop() {\r\n $this->_stop = TRUE;\r\n }", "public function setStop($stop) {\n $this->stop = $stop;\n return $this;\n }", "public function setMultiple(bool $multiple): self\n {\n $this->multiple = $multiple;\n\n return $this;\n }", "public function stop();", "public function stop();", "public function stop();", "public function stop();" ]
[ "0.6956042", "0.5940184", "0.5914593", "0.5521218", "0.53223276", "0.50677675", "0.5015637", "0.4974658", "0.4805354", "0.47959393", "0.4777048", "0.473112", "0.47100088", "0.46803367", "0.46342468", "0.46272495", "0.46263582", "0.46263582", "0.46254468", "0.45969516", "0.4538723", "0.45327273", "0.4516992", "0.45010746", "0.4497169", "0.44854236", "0.44837832", "0.44837832", "0.44837832", "0.44837832" ]
0.80303234
0
Sets a new stopMonitoringRequest
public function setStopMonitoringRequest(array $stopMonitoringRequest) { $this->stopMonitoringRequest = $stopMonitoringRequest; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setRequestStop($requestStop)\n {\n $this->requestStop = $requestStop;\n return $this;\n }", "public function setStopMonitoringMultipleRequest(array $stopMonitoringMultipleRequest)\n {\n $this->stopMonitoringMultipleRequest = $stopMonitoringMultipleRequest;\n return $this;\n }", "public function setStopTimetableRequest(array $stopTimetableRequest)\n {\n $this->stopTimetableRequest = $stopTimetableRequest;\n return $this;\n }", "public function stopInstances($request);", "public function cancelSpotInstanceRequests($request);", "function setStop($val){ return $this->setField('stop',$val); }", "public function stop(): StopRequestBuilder {\n return new StopRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "public function setStopMonitorPermission(array $stopMonitorPermission)\n {\n $this->stopMonitorPermission = $stopMonitorPermission;\n return $this;\n }", "public function setMonitoring($name, SetMonitoringServiceRequest $postBody, $optParams = [])\n {\n $params = ['name' => $name, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('setMonitoring', [$params], Operation::class);\n }", "public function stop($event);", "public function stopRecording() {\n\t\t$stopRecording = new stopRecording();\n\t\t$this->stopRecording = sprintf($stopRecording);\n\t}", "public function unmonitorInstances($request);", "protected function stop() {\n\t$this->_stop = true;\n}", "public function setStop($stop) {\n $this->stop = $stop;\n return $this;\n }", "public function getRequestStop()\n {\n return $this->requestStop;\n }", "public function setStopwatch(Stopwatch $stopwatch)\n {\n $this->stopwatch = $stopwatch;\n }", "function stop() {\r\n $this->_stop = TRUE;\r\n }", "public function stop()\n {\n $this->mustStop = true;\n }", "public function setStopwatch(Stopwatch $stopwatch = null)\n {\n $this->stopwatch = $stopwatch;\n }", "public function stop()\n {\n $payload = '';\n\n $this->sendRequest(self::FUNCTION_STOP, $payload);\n }", "public function __construct($stopType, $commentedOut = false) {\n parent::__construct(\"Stop\", $commentedOut);\n\n $this->stopType = $stopType;\n }", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function stop();", "public function addToStopMonitorPermission(\\Calcinai\\Siri\\Objects\\StopMonitorPermissionStructureType $stopMonitorPermission)\n {\n $this->stopMonitorPermission[] = $stopMonitorPermission;\n return $this;\n }", "function setFailureAndStop()\n {\n $this->failed = true;\n $this->stop();\n }", "function setFailureAndStop()\n {\n $this->failed = true;\n $this->stop();\n }" ]
[ "0.6564686", "0.61100614", "0.5810012", "0.5736837", "0.5587425", "0.5554781", "0.54765075", "0.5475324", "0.53529936", "0.52027315", "0.5191859", "0.51721483", "0.5155052", "0.5123166", "0.50789183", "0.49634218", "0.4888851", "0.48382533", "0.48225343", "0.48128906", "0.4673966", "0.46646762", "0.46646762", "0.46646762", "0.46646762", "0.46646762", "0.46646762", "0.46534783", "0.4646442", "0.4646442" ]
0.753735
0
Sets a new vehicleMonitoringRequest
public function setVehicleMonitoringRequest(array $vehicleMonitoringRequest) { $this->vehicleMonitoringRequest = $vehicleMonitoringRequest; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMonitoring($name, SetMonitoringServiceRequest $postBody, $optParams = [])\n {\n $params = ['name' => $name, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('setMonitoring', [$params], Operation::class);\n }", "public function setFacilityMonitoringRequest(array $facilityMonitoringRequest)\n {\n $this->facilityMonitoringRequest = $facilityMonitoringRequest;\n return $this;\n }", "public function setConnectionMonitoringRequest(array $connectionMonitoringRequest)\n {\n $this->connectionMonitoringRequest = $connectionMonitoringRequest;\n return $this;\n }", "public function setRequest($request)\n {\n $this->_request = $request;\n }", "protected function setRequestCondition($param) {\n\t\t$this->condition = $param;\n trace(\"Request condition set to '$param'\", $this);\n\t}", "public function setRequest($request)\r\n {\r\n $this->request = $request;\r\n }", "public function setRequest($request);", "public function setRequest($request);", "public function setRequest($request)\n {\n $this->request = $request;\n }", "public function setRequest($request)\n {\n $this->request = $request;\n }", "public function setRequest($request)\n {\n $this->request = $request;\n }", "public function setDriverCurrentVehicle($request){\n\t\t//dd($request); \n\t\t$validator = Validator::make($request, [ \n\t\t\t'driverid' => 'required|numeric',\n\t\t\t'vehicleid' => 'required|numeric',\n ]);\n if($validator->fails()) {\n\t\t\treturn [\n\t\t\t\t'status' => 0,\n\t\t\t\t'errormsg' => $validator->errors()\n\t\t\t];\n\t\t}\n\t\t\n\t\t$drivervehicledata = DriverVehicles::has('Driverdata')->with('Driverdata')->where('driver_id','=',$request['driverid'])->find($request['vehicleid']);\n\t\tif(empty($drivervehicledata) || count($drivervehicledata) == 0){\n\t\t\t$returnarray['errormsg'] = 'No vehicle is associated for given Driver ID.';\n\t\t\t$returnarray['status'] = 0;\n\t\t}\n\t\telse{\n\t\t\tif(Drivers::where('id', $request['driverid'])->update(['driver_current_car' => $request['vehicleid']])){\n\t\t\t\t$returnarray['msg'] = 'Current car set successfully for given driver';\n\t\t\t\t$returnarray['status'] = 1;\n\t\t\t}\n\t\t\telse{\n\t\t\t\t$returnarray['errormsg'] = 'Problem occured to set this vehicle as current vehicle. Please try after some time.';\n\t\t\t\t$returnarray['status'] = 0;\n\t\t\t}\n\t\t}\n\t\t\n\t\treturn $returnarray;\n }", "function setRequest(&$request)\r\n\t{\r\n\t\t$this->request =& $request;\r\n\t}", "public function setRequest(string $request) : self\n {\n\n // Define.\n curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, $request);\n\n return $this;\n }", "public function set_request($request)\n\t{\n\t\t$this->request = $this->complete_request = trim($request);\n\t}", "public function setStopMonitoringRequest(array $stopMonitoringRequest)\n {\n $this->stopMonitoringRequest = $stopMonitoringRequest;\n return $this;\n }", "public function setRequest(\n Request $request\n ) {\n $this->m_request = $request;\n }", "final public function setRequest(\\sb\\Request $request)\n {\n\n $this->request = $request;\n\n $request->setInputArgsDelimiter($this->input_args_delimiter);\n }", "public function __construct(RideRequest $rideRequest)\n {\n $this->rideRequest = $rideRequest;\n $this->vehicleType = VehicleType::where('code', $rideRequest->ride_vehicle_type)->first();\n }", "public function monitoring(): MonitoringRequestBuilder {\n return new MonitoringRequestBuilder($this->pathParameters, $this->requestAdapter);\n }", "public function setRequestId($v)\n\t{\n\t\tif ($v !== null) {\n\t\t\t$v = (int) $v;\n\t\t}\n\n\t\tif ($this->request_id !== $v) {\n\t\t\t$this->request_id = $v;\n\t\t\t$this->modifiedColumns[] = VpoRequestPassengerPeer::REQUEST_ID;\n\t\t}\n\n\t\tif ($this->aVpoRequest !== null && $this->aVpoRequest->getId() !== $v) {\n\t\t\t$this->aVpoRequest = null;\n\t\t}\n\n\t\treturn $this;\n\t}", "public function modifyVRouterAttribute($request)\n {\n $runtime = new RuntimeOptions([]);\n\n return $this->modifyVRouterAttributeWithOptions($request, $runtime);\n }", "public function setRequest($request)\n\t{\n\t\t$this->_request = $request;\n\t\treturn $this;\n\t}", "public function setVpoRequest(VpoRequest $v = null)\n\t{\n\t\tif ($v === null) {\n\t\t\t$this->setRequestId(NULL);\n\t\t} else {\n\t\t\t$this->setRequestId($v->getId());\n\t\t}\n\n\t\t$this->aVpoRequest = $v;\n\n\t\t// Add binding for other direction of this n:n relationship.\n\t\t// If this object has already been added to the VpoRequest object, it will not be re-added.\n\t\tif ($v !== null) {\n\t\t\t$v->addVpoRequestPassenger($this);\n\t\t}\n\n\t\treturn $this;\n\t}", "public function setRequest($request) {\n $this->request += $request;\n }", "public function set(Request $request)\n {\n $this->request = $request;\n }", "public function setRequest($request)\n {\n $this->request = $request;\n return $this;\n }", "public function setRequest($request)\n {\n if (is_string($request))\n {\n $request = new $request();\n }\n\n $this->_request = $request;\n\n return $this;\n }", "public function setRequest(Request $request){\n\t\t$this->request = $request;\n\t}", "public function __construct(Monitor $monitor, Response $response)\n {\n $this->monitor = $monitor;\n $this->response = $response;\n }" ]
[ "0.60729325", "0.58024466", "0.57286674", "0.52830535", "0.52815336", "0.5275767", "0.5243875", "0.5243875", "0.5211268", "0.5211268", "0.5211268", "0.51555616", "0.51453626", "0.51393", "0.5125005", "0.5097222", "0.5026185", "0.5019307", "0.49944034", "0.49858767", "0.49688172", "0.49646518", "0.49584705", "0.49504673", "0.49412218", "0.48604584", "0.48491183", "0.48473516", "0.48325908", "0.48292965" ]
0.7199881
0
Sets a new connectionTimetableRequest
public function setConnectionTimetableRequest(array $connectionTimetableRequest) { $this->connectionTimetableRequest = $connectionTimetableRequest; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setRequestTime(time $requestTime)\n {\n $this->RequestTime = $requestTime;\n return $this;\n }", "public function setRequest(string $request) : self\n {\n\n // Define.\n curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, $request);\n\n return $this;\n }", "public function setRequestDateTime($val)\n {\n $this->_propDict[\"requestDateTime\"] = $val;\n return $this;\n }", "public function setRequest($request)\n\t{\n\t\t$this->_request = $request;\n\t\treturn $this;\n\t}", "public function setRequest(\\phpbb\\request\\request $request);", "public function setRequest(\\Dhl\\DataTypes\\RequestType $request)\n {\n $this->request = $request;\n return $this;\n }", "public function setRequest($request)\n {\n if (is_string($request))\n {\n $request = new $request();\n }\n\n $this->_request = $request;\n\n return $this;\n }", "public function setRequest($request);", "public function setRequest($request);", "public function setRequest($request)\n {\n $this->request = $request;\n return $this;\n }", "public function __construct($array, $options=array()) {\n \n $this->table = 'requests';\n $this->fields = array(\n 'id' => array('type' => 'int', 'value'=> 0), \n 'from' => array('type' => 'string', 'value'=> ''), \n 'to' => array('type' => 'string', 'value'=> ''), \n 'user_id' => array('type' => 'int', 'value'=> 0),\n 'gig_id' => array('type' => 'int', 'value'=> 0),\n 'received' => array('type' => 'int', 'value'=> time()),//timestamp\n 'seen' => array('type' => 'int', 'value'=> 0),//timestamp \n 'status' => array('type' => 'int', 'value'=> REQUEST_UNINIT),\n 'response_msg' => array('type' => 'string','value'=> ''),\n 'response_time' => array('type' => 'int', 'value'=> 0), \n 'body' => array('type' => 'string','value'=> ''), \n 'song_id' => array('type' => 'int', 'value'=> 0)\n );\n $this->populate($array, $options);\n }", "function setRequest(&$request)\r\n\t{\r\n\t\t$this->request =& $request;\r\n\t}", "public function requests($request): Pool\n {\n $this->values['requests'] = $request;\n return $this;\n }", "public function setRequest($request)\n {\n $this->request = $request;\n\n return $this;\n }", "public function setRequest($request)\n {\n if (is_string($request) && class_exists($request)) {\n $request = new $request();\n if (!$request instanceof Zend_XmlRpc_Request) {\n require_once 'Zend/XmlRpc/Server/Exception.php';\n throw new Zend_XmlRpc_Server_Exception('Invalid request class');\n }\n $request->setEncoding($this->getEncoding());\n } elseif (!$request instanceof Zend_XmlRpc_Request) {\n require_once 'Zend/XmlRpc/Server/Exception.php';\n throw new Zend_XmlRpc_Server_Exception('Invalid request object');\n }\n\n $this->_request = $request;\n return $this;\n }", "public function setRequest($request)\n {\n $this->_request = $request;\n }", "public function request($request)\n {\n $this->request = $request;\n\n return $this;\n }", "public function setEstimatedTimetableRequest(array $estimatedTimetableRequest)\n {\n $this->estimatedTimetableRequest = $estimatedTimetableRequest;\n return $this;\n }", "function NewRequest() {\n\t\t$this->PostString = \"\";\n\t\t$this->RawData = \"\";\n\t\t$this->Values = \"\";\n\t}", "public function GcApi_setRequestTime($val)\r\n {\r\n $this->m_gcOrder['RequestTime']['val'] = $this->GcApi_KeyStrReplace($val);\r\n }", "public function setRequest($request)\r\n {\r\n $this->request = $request;\r\n }", "public function setRequest(\\Backend\\Interfaces\\RequestInterface $request)\n {\n $this->request = $request;\n\n return $this;\n }", "public function createRequest(BaseDateTime $createdAt, int $requestId): self\n {\n if ($this->activity === null) {\n $this->activity = $this->getActivityEntity();\n $this->entityManager->persist($this->activity);\n }\n\n $entity = $this->getRequestEntity(\n $this->activity,\n $createdAt,\n $requestId\n );\n\n $this->entityManager->persist($entity);\n $this->requests[$requestId] = $entity;\n\n return $this;\n }", "public function __construct(RequestInterface $request)\n {\n parent::__construct();\n // $this->db = db_connect();\n $this->request = $request;\n // $this->dt = $this->db->table($this->table);\n }", "public function set_request($request) {\n\n if (is_array($request)) {\n $this->request = $request;\n }\n\n return $this;\n }", "public function set_request(Cpf_Core_Request $request)\r\r\n\t{\r\r\n\t\t$this->request = new App_Local_Form_Request($request);\r\r\n\t}", "protected function setRequest(RadacctRequest $request)\n {\n $this->request = $request;\n return $this;\n }", "public function modifyPhysicalConnectionAttribute($request)\n {\n $runtime = new RuntimeOptions([]);\n\n return $this->modifyPhysicalConnectionAttributeWithOptions($request, $runtime);\n }", "public function setRequest(\\DragonJsonServer\\Request $request)\n {\n $this->setParam('request', $request);\n return $this;\n }", "public function __construct(ConselingRequest $request)\n {\n $this->request = $request;\n }" ]
[ "0.542499", "0.5345467", "0.51742357", "0.5155892", "0.50995535", "0.50957054", "0.50876606", "0.49896985", "0.49896985", "0.4986848", "0.49795496", "0.4974394", "0.49201438", "0.49114737", "0.48842606", "0.48835856", "0.48626485", "0.48507044", "0.4786417", "0.47789603", "0.4774623", "0.47642612", "0.4758769", "0.47586262", "0.472326", "0.4716648", "0.4708746", "0.47038904", "0.4699385", "0.46962696" ]
0.7412707
0
Sets a new connectionMonitoringRequest
public function setConnectionMonitoringRequest(array $connectionMonitoringRequest) { $this->connectionMonitoringRequest = $connectionMonitoringRequest; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMonitoring($name, SetMonitoringServiceRequest $postBody, $optParams = [])\n {\n $params = ['name' => $name, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('setMonitoring', [$params], Operation::class);\n }", "function setRequest(&$request)\r\n\t{\r\n\t\t$this->request =& $request;\r\n\t}", "public function setRequest(string $request) : self\n {\n\n // Define.\n curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, $request);\n\n return $this;\n }", "public function setRequest($request)\n {\n $this->_request = $request;\n }", "public function modifyVpnConnectionAttribute($request)\n {\n $runtime = new RuntimeOptions([]);\n\n return $this->modifyVpnConnectionAttributeWithOptions($request, $runtime);\n }", "public function modifyPhysicalConnectionAttribute($request)\n {\n $runtime = new RuntimeOptions([]);\n\n return $this->modifyPhysicalConnectionAttributeWithOptions($request, $runtime);\n }", "public function setRequest($request)\r\n {\r\n $this->request = $request;\r\n }", "public function setRequest($request)\n {\n $this->request = $request;\n }", "public function setRequest($request)\n {\n $this->request = $request;\n }", "public function setRequest($request)\n {\n $this->request = $request;\n }", "public function setRequest($request);", "public function setRequest($request);", "public function setRequest($request)\n\t{\n\t\t$this->_request = $request;\n\t\treturn $this;\n\t}", "public function setRequest($request) {\n $this->request += $request;\n }", "public function setVehicleMonitoringRequest(array $vehicleMonitoringRequest)\n {\n $this->vehicleMonitoringRequest = $vehicleMonitoringRequest;\n return $this;\n }", "public function setRequest($request)\n {\n $this->request = $request;\n return $this;\n }", "public function setRequest($request)\n {\n $this->request = $request;\n\n return $this;\n }", "public function setRequest(\n Request $request\n ) {\n $this->m_request = $request;\n }", "public function set_request($request)\n\t{\n\t\t$this->request = $this->complete_request = trim($request);\n\t}", "public function setRequest(HttpRequest $request)\n\t{\n\t\t$this->request = $request;\n\t}", "public function setFacilityMonitoringRequest(array $facilityMonitoringRequest)\n {\n $this->facilityMonitoringRequest = $facilityMonitoringRequest;\n return $this;\n }", "public function request($request)\n {\n $this->request = $request;\n\n return $this;\n }", "public function setRequest(Request $request) {\n $this->_request = $request;\n return;\n }", "public function setRequest($request)\n {\n if (is_string($request))\n {\n $request = new $request();\n }\n\n $this->_request = $request;\n\n return $this;\n }", "public function setRequest(\\phpbb\\request\\request $request);", "public function setRequest(\\DragonJsonServer\\Request $request)\n {\n $this->setParam('request', $request);\n return $this;\n }", "public function createVpnConnection($request);", "final public function setRequest(\\sb\\Request $request)\n {\n\n $this->request = $request;\n\n $request->setInputArgsDelimiter($this->input_args_delimiter);\n }", "public function setHTTPRequest(Request $request) {\n\n $this->httpRequest = $request;\n\n }", "public function setRequest(Request $request){\n\t\t$this->request = $request;\n\t}" ]
[ "0.5776088", "0.574821", "0.5727799", "0.56946945", "0.56479925", "0.5643975", "0.5589562", "0.55187047", "0.55187047", "0.55187047", "0.5502995", "0.5502995", "0.54891807", "0.5467289", "0.5427307", "0.5315078", "0.5273498", "0.5264439", "0.52343076", "0.5194892", "0.51859534", "0.5180357", "0.5177146", "0.5129763", "0.51278955", "0.5123097", "0.50876564", "0.50693744", "0.5055706", "0.50121623" ]
0.74209464
0
Sets a new generalMessageRequest
public function setGeneralMessageRequest(array $generalMessageRequest) { $this->generalMessageRequest = $generalMessageRequest; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "function NewRequest() {\n\t\t$this->PostString = \"\";\n\t\t$this->RawData = \"\";\n\t\t$this->Values = \"\";\n\t}", "public function set_request(Cpf_Core_Request $request)\r\r\n\t{\r\r\n\t\t$this->request = new App_Local_Form_Request($request);\r\r\n\t}", "public function newRequest() : MailjetRequest {\n return MailjetRequest::make([\n 'version' => $this->version === null ? Mailer::DEFAULT_VERSION : $this->version,\n 'sandbox' => $this->sandbox\n ]);\n }", "public function setRequest($array)\n {\n $_REQUEST = $array;\n }", "public function set_request($request)\n\t{\n\t\t$this->request = $this->complete_request = trim($request);\n\t}", "protected function fillMessageWithRequest(\n Message $message,\n Request $request\n ) {\n // get data from Request\n $displayName = $request->get('display_name');\n $msgBody = $request->get('body');\n $parentId = $request->get('parent_id');\n\n // set Message data\n $message->setDisplayName($displayName);\n $message->setBody($msgBody);\n\n // set parent if provided\n if (!is_null($parentId)) {\n $em = $this->getDoctrine()->getManager();\n $parent = $em->getRepository('AppBundle:Message')->find($parentId);\n\n $message->setParent($parent);\n }\n\n return $message;\n }", "public function setRequest(\\phpbb\\request\\request $request);", "public function setRequest($request)\n\t{\n\t\t$this->_request = $request;\n\t\treturn $this;\n\t}", "public function setRequest($request)\n {\n $this->_request = $request;\n }", "abstract public function buildRequest();", "public function setRequest(\n Request $request\n ) {\n $this->m_request = $request;\n }", "private function setRequestMailboxConfig() : void {\n $this->requestMailboxConfig = new MailboxConfig(env(\"REQUEST_MAILBOX_IMAP_INBOX\"),\n env(\"REQUEST_MAILBOX_IMAP_ARCHIVE\"));\n }", "abstract public function setMessage();", "final public function setRequest(\\sb\\Request $request)\n {\n\n $this->request = $request;\n\n $request->setInputArgsDelimiter($this->input_args_delimiter);\n }", "public function __construct($new_message)\n {\n $this->messaggio = $new_message;\n }", "public function setRequest(\\Dhl\\DataTypes\\RequestType $request)\n {\n $this->request = $request;\n return $this;\n }", "public function setRequest(string $request) : self\n {\n\n // Define.\n curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, $request);\n\n return $this;\n }", "private function createTextMessageRequest()\n {\n return TextMessageRequest::create()\n ->setRecipient(Recipient::create()->setId('USER_ID'))\n ->setMessage(TextMessage::create()->setText('hello, world !'));\n }", "public function setRequest(Request $request) {\n $this->_request = $request;\n return;\n }", "public function setRequest($request)\r\n {\r\n $this->request = $request;\r\n }", "private function getRequest()\n\t{\n\t\tforeach ( $_REQUEST as $k => $v ) {\n\t\t\tif( strstr( $k, 'field_' ) ) {\n\t\t\t\t$value = SPRequest::raw( $k );\n\t\t\t\t$this->attr[ str_replace( 'field_', null, $k ) ] = $value;\n\t\t\t}\n\t\t}\n\t}", "public function setRequest(IRequest $request) {\n\t\t$this->request = $request;\n\t}", "private function updateInternalMessage()\n {\n $from = trim($this->generalSettings->getFrom());\n $from_name = trim($this->generalSettings->getFromName());\n $reply_to = trim($this->generalSettings->getReplyTo());\n $categories = explode(',', $this->generalSettings->getCategories());\n $template = trim($this->generalSettings->getTemplateID());\n $asm_group_id = trim($this->generalSettings->getAsmGroupId());\n\n $xsmtpapi_header['category'] = [ 'magento2_sendgrid_plugin' ];\n foreach ($categories as $category) {\n $xsmtpapi_header['category'][] = trim($category);\n }\n\n if (! empty($template)) {\n $xsmtpapi_header['filters']['templates']['settings']['enable'] = 1;\n $xsmtpapi_header['filters']['templates']['settings']['template_id'] = $template;\n }\n\n // asm group id\n if ($asm_group_id != false and $asm_group_id != 0) {\n $xsmtpapi_header['asm_group_id'] = intval($asm_group_id);\n }\n\n $this->message->getHeaders()->addHeaderLine('x-smtpapi', json_encode($xsmtpapi_header));\n\n if (! empty($from)) {\n $this->message->setFrom($from);\n }\n\n if (! empty($from_name) and ! empty($from)) {\n $this->message->setFrom($from, $from_name);\n }\n\n if (! empty($from_name) and empty($from)) {\n $initial_from = $this->message->getFrom();\n $this->message->setFrom($initial_from, $from_name);\n }\n\n if (! empty($reply_to)) {\n $this->message->setReplyTo($reply_to);\n }\n }", "function setRequest(&$request)\r\n\t{\r\n\t\t$this->request =& $request;\r\n\t}", "public function setRequest($request)\n {\n $this->request = $request;\n }", "public function setRequest($request)\n {\n $this->request = $request;\n }", "public function setRequest($request)\n {\n $this->request = $request;\n }", "public function __construct($new_message)\n {\n $this->messaggio = $new_message; //Variabile di istanza per portare dati nel messaggio\n }", "protected function supplementRequestWithDefaults(): void\n {\n if (empty($this->request->getLocation())) {\n $this->request->setLocation(\n $this->defaults->getLocation()\n );\n }\n\n if (empty($this->request->getMethod())) {\n $this->request->setMethod(\n $this->defaults->getMethod()\n );\n }\n\n if (empty($this->request->getParameters())) {\n $this->request->setParameters(\n $this->defaults->getParameters()\n );\n }\n\n if (empty($this->request->getBody())) {\n $this->request->setBody(\n $this->defaults->getBody()\n );\n }\n\n if (\n $this->credentialsAreEmpty($this->request->getCredentials())\n && ! $this->credentialsAreEmpty($this->defaults->getCredentials())\n ) {\n $this->request->setCredentials(\n $this->defaults->getCredentials()['name'],\n $this->defaults->getCredentials()['password'],\n $this->defaults->getCredentials()['domain']\n );\n }\n\n\n if (! empty($this->defaults->getHeaders())) {\n $this->request->setHeaders(array_merge(\n $this->request->getHeaders(),\n $this->defaults->getHeaders()\n ));\n }\n }", "public function set_request($request) {\n\n if (is_array($request)) {\n $this->request = $request;\n }\n\n return $this;\n }" ]
[ "0.58173394", "0.5453379", "0.5362291", "0.52344203", "0.51748616", "0.514195", "0.51391", "0.49943218", "0.49905595", "0.49900976", "0.49880043", "0.4962258", "0.49481976", "0.49339044", "0.49273837", "0.4910722", "0.48956582", "0.4868963", "0.4844488", "0.48174152", "0.48161182", "0.48148918", "0.48113558", "0.4793391", "0.47751358", "0.47751358", "0.47751358", "0.47520015", "0.47413948", "0.47383714" ]
0.7626986
0
Sets a new facilityMonitoringRequest
public function setFacilityMonitoringRequest(array $facilityMonitoringRequest) { $this->facilityMonitoringRequest = $facilityMonitoringRequest; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setMonitoring($name, SetMonitoringServiceRequest $postBody, $optParams = [])\n {\n $params = ['name' => $name, 'postBody' => $postBody];\n $params = array_merge($params, $optParams);\n return $this->call('setMonitoring', [$params], Operation::class);\n }", "public function setRequest($request);", "public function setRequest($request);", "public function setRequest($request)\n {\n $this->_request = $request;\n }", "public function setRequest($request)\r\n {\r\n $this->request = $request;\r\n }", "public function set_request($request)\n\t{\n\t\t$this->request = $this->complete_request = trim($request);\n\t}", "public function set_request(Cpf_Core_Request $request)\r\r\n\t{\r\r\n\t\t$this->request = new App_Local_Form_Request($request);\r\r\n\t}", "public function setFacilityMonitoringPermission(array $facilityMonitoringPermission)\n {\n $this->facilityMonitoringPermission = $facilityMonitoringPermission;\n return $this;\n }", "function setRequest(&$request)\r\n\t{\r\n\t\t$this->request =& $request;\r\n\t}", "public function setRequest($request)\n {\n $this->request = $request;\n }", "public function setRequest($request)\n {\n $this->request = $request;\n }", "public function setRequest($request)\n {\n $this->request = $request;\n }", "public function setRequest(\\phpbb\\request\\request $request);", "public function setRequest($request) {\n $this->request += $request;\n }", "public function setRequest(\n Request $request\n ) {\n $this->m_request = $request;\n }", "public function setRequest(Request $request)\n {\n @trigger_error(\\sprintf('The %s() method is deprecated since version 2.3 and will be removed in 3.0. Pass a RequestStack in the constructor instead.', __METHOD__), E_USER_DEPRECATED);\n\n $this->request = $request;\n }", "public function setRequest(string $request) : self\n {\n\n // Define.\n curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, $request);\n\n return $this;\n }", "public function setRequest($request)\n\t{\n\t\t$this->_request = $request;\n\t\treturn $this;\n\t}", "public function setVehicleMonitoringRequest(array $vehicleMonitoringRequest)\n {\n $this->vehicleMonitoringRequest = $vehicleMonitoringRequest;\n return $this;\n }", "public static function setFactory(?callable $request): void\n\t{\n\t\tself::$requestURI = $request;\n\t}", "public function set(Request $request)\n {\n $this->request = $request;\n }", "public function setRequest(CornerDrop_Collect_Model_Api_Request $request)\n {\n $this->request = $request;\n\n return $this;\n }", "public function setRequest(\\Dhl\\DataTypes\\RequestType $request)\n {\n $this->request = $request;\n return $this;\n }", "public function setRequest( Request $request );", "public function setRequest($request)\n {\n if (is_string($request))\n {\n $request = new $request();\n }\n\n $this->_request = $request;\n\n return $this;\n }", "public function __construct($request, $fld)\n { \n $this->request = $request;\n $this->fld = $fld;\n \n $this->validateField();\n }", "function _setupRequest(&$request) {\n $request->headers= array_change_key_case($this->headers, CASE_LOWER);\n $request->method= $this->method;\n $request->setParams(array_change_key_case($this->params, CASE_LOWER));\n $request->setURI(new URL('unittest://'.$this->getClassName().'/'));\n }", "public function setRequest(Request $request){\n\t\t$this->request = $request;\n\t}", "public function setRequest($request)\n {\n $this->request = $request;\n return $this;\n }", "public function set_request($request) {\n\n if (is_array($request)) {\n $this->request = $request;\n }\n\n return $this;\n }" ]
[ "0.5716873", "0.53272116", "0.53272116", "0.52852905", "0.520331", "0.5189889", "0.51547706", "0.51395047", "0.5133594", "0.51319313", "0.51319313", "0.51319313", "0.5028444", "0.50277627", "0.50265145", "0.50106186", "0.50038517", "0.49947426", "0.49770132", "0.49465382", "0.4945867", "0.494055", "0.4896628", "0.48558283", "0.48270556", "0.48148662", "0.48075068", "0.4807316", "0.47987273", "0.47719556" ]
0.72128165
0
Sets a new situationExchangeRequest
public function setSituationExchangeRequest(array $situationExchangeRequest) { $this->situationExchangeRequest = $situationExchangeRequest; return $this; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function setRequest(\\Dhl\\DataTypes\\RequestType $request)\n {\n $this->request = $request;\n return $this;\n }", "public function setRequest($request);", "public function setRequest($request);", "public function setRequest($request)\n\t{\n\t\t$this->_request = $request;\n\t\treturn $this;\n\t}", "function setRequest(&$request)\r\n\t{\r\n\t\t$this->request =& $request;\r\n\t}", "public function set_request($request)\n\t{\n\t\t$this->request = $this->complete_request = trim($request);\n\t}", "public function setRequest(\\phpbb\\request\\request $request);", "public function setRequest(Request $request)\n {\n $this->issuer->setRequest($request);\n $this->checker->setRequest($request);\n }", "public function setRequest($request)\n {\n $this->_request = $request;\n }", "public function setRequest($request)\n {\n if (is_string($request) && class_exists($request)) {\n $request = new $request();\n if (!$request instanceof Zend_XmlRpc_Request) {\n require_once 'Zend/XmlRpc/Server/Exception.php';\n throw new Zend_XmlRpc_Server_Exception('Invalid request class');\n }\n $request->setEncoding($this->getEncoding());\n } elseif (!$request instanceof Zend_XmlRpc_Request) {\n require_once 'Zend/XmlRpc/Server/Exception.php';\n throw new Zend_XmlRpc_Server_Exception('Invalid request object');\n }\n\n $this->_request = $request;\n return $this;\n }", "public function setRequest($request)\r\n {\r\n $this->request = $request;\r\n }", "public function setRequest(string $request) : self\n {\n\n // Define.\n curl_setopt($this->ch, CURLOPT_CUSTOMREQUEST, $request);\n\n return $this;\n }", "public function setRequest($request)\n {\n $this->request = $request;\n return $this;\n }", "public function setRequest($request)\n {\n if (is_string($request))\n {\n $request = new $request();\n }\n\n $this->_request = $request;\n\n return $this;\n }", "public function setRequest($request)\n {\n $this->request = $request;\n }", "public function setRequest($request)\n {\n $this->request = $request;\n }", "public function setRequest($request)\n {\n $this->request = $request;\n }", "public function setIsExchange($isExchange) {\n $this->isExchange = $isExchange;\n return $this;\n }", "final public function setRequest(\\sb\\Request $request)\n {\n\n $this->request = $request;\n\n $request->setInputArgsDelimiter($this->input_args_delimiter);\n }", "public function setRequest($request) {\n $this->request += $request;\n }", "private function setRequestMailboxConfig() : void {\n $this->requestMailboxConfig = new MailboxConfig(env(\"REQUEST_MAILBOX_IMAP_INBOX\"),\n env(\"REQUEST_MAILBOX_IMAP_ARCHIVE\"));\n }", "public function setRequest(Request $request) {\n $this->_request = $request;\n return;\n }", "private function setScaExemptionData($request)\n {\n /** @var \\Genesis\\API\\Request\\WPF\\Create $request */\n\n $wpf_amount = (float)$request->getAmount();\n if ($wpf_amount <= $this->getSetting('SCA_EXEMPTION_AMOUNT')) {\n $request->setScaExemption($this->getSetting('SCA_EXEMPTION'));\n }\n }", "public function set(Request $request)\n {\n $this->request = $request;\n }", "public function setRequest($request)\n {\n $this->request = $request;\n\n return $this;\n }", "public function setRequest( Request $request );", "final public function setPrendingRequestType($pendingRequestType)\n {\n $this->pendingRequestType = $pendingRequestType;\n }", "public function setRequest(Request $request){\n\t\t$this->request = $request;\n\t}", "protected function setRequest(RadacctRequest $request)\n {\n $this->request = $request;\n return $this;\n }", "public function companyApproveRequest(Request $request){\n try{\n $companyUser = $request->user();\n if(!$companyUser || !$companyUser->hasRole('company'))\n throw new Exception(\"You need to logged in as company\");\n\n if( !$request->input('solder_request_id'))\n throw new Exception(\"Must be need request ID\");\n $currentRequest = SolderItemRequest::find( $request->input('solder_request_id'));\n if( !$currentRequest )\n throw new Exception(\"Sorry didn't find your request data\");\n $currentRequest->status = 2;\n $currentRequest->save();\n $currentRequest->soldier_device_id= User::find($currentRequest->user_id)->device_id;\n $actionItem = SolderKits::find( $currentRequest->solder_kit_id );\n $actionItem->status = 2; // cancel and re-usable\n $actionItem->save();\n\n return ['success'=>true ,'message'=>'Approve successful!','data'=>$currentRequest];\n }catch (Exception $e){\n return ['success'=>false, 'message'=>$e->getMessage()];\n }\n }" ]
[ "0.5389765", "0.52948976", "0.52948976", "0.5240154", "0.5232039", "0.5197336", "0.5180221", "0.517761", "0.5147139", "0.5080259", "0.50679076", "0.50464463", "0.5030468", "0.5007878", "0.500652", "0.500652", "0.500652", "0.49967325", "0.49966535", "0.499257", "0.49791428", "0.49625662", "0.4936599", "0.49355516", "0.49223918", "0.49200568", "0.48796505", "0.483462", "0.48211768", "0.4789011" ]
0.5894726
0
Returns the current data array element.
public function current() { return is_array($this->data) ? current($this->data) : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function current()\n {\n return current($this->aData);\n }", "public function current() : mixed {\n\t\treturn current($this->data);\n\t}", "#[\\ReturnTypeWillChange]\n public function current()\n {\n return current($this->_data);\n }", "#[\\ReturnTypeWillChange]\n public function current()\n {\n return current($this->_data);\n }", "public function &current() {\n\t\treturn $this->_data[$this->_data_position];\n\t}", "public function current(){\n return current($this->array);\n }", "public function current()\n {\n return current($this->_data);\n }", "public function current()\n {\n return current($this->_data);\n }", "public function current()\n {\n return current($this->array);\n }", "function current() {\n return current($this->array);\n }", "public function getSelf()\n {\n return $this->arrData;\n }", "public function current()\n {\n return $this->array[$this->position];\n }", "public function current()\n {\n return $this->_data[$this->_pointer];\n }", "public function current()\n {\n return $this->data[$this->position];\n }", "#[\\ReturnTypeWillChange]\n public function current()\n {\n $this->initInternArray();\n\n return $this->offsetGet($this->internArrayOffset);\n }", "public function current() {\n return current($this->data);\n }", "public function current()\n {\n return current($this->data);\n }", "public function current() {\n $this->keys = array_keys($this->data);\n return $this->data[$this->keys[$this->index]];\n }", "public function current()\n {\n return $this->_data[$this->_currentItem];\n }", "public function current()\n {\n return current($this->data);\n }", "public function current()\n {\n //var_dump(__METHOD__);\n return $this->data[$this->keys[$this->position]];\n }", "public function current() {\n return $this->data[$this->key()];\n }", "public function current()\n {\n return $this->elements[$this->position];\n }", "public function current()\n\t{\n\t\t$key = current($this->keys);\n\t\treturn $this->data[$key];\n\t}", "public function current()\n\t{\n\t\t$key = current($this->keys);\n\t\treturn $this->data[$key];\n\t}", "public function current()\n {\n // echo ' current = ' . current($this->data);\n return current($this->data);\n }", "public function getData()\n\t{\n\t\treturn $this->arrData;\n\t}", "public function getData()\n\t{\n\t\treturn $this->arrData;\n\t}", "public function current()\n {\n return $this->getAt($this->pointer);\n }", "public function current(){\n return current($this->elements);\n }" ]
[ "0.7606509", "0.7550629", "0.75035805", "0.75035805", "0.7500451", "0.7441092", "0.74377614", "0.74377614", "0.74285454", "0.74132466", "0.73520815", "0.73499155", "0.7331698", "0.7319911", "0.728437", "0.7251201", "0.7209307", "0.71990645", "0.71639097", "0.71611685", "0.7108736", "0.70985645", "0.7030467", "0.69931644", "0.69931644", "0.69046354", "0.6823406", "0.6823406", "0.6771146", "0.6746663" ]
0.7744354
0
Returns the key from data array index referenced by its internal cursor.
public function key() { return is_array($this->data) ? key($this->data) : null; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public function key() {\n $this->keys = array_keys($this->data);\n return $this->keys[$this->index];\n }", "public function key()\n {\n return $this->offsetExists($this->__iteratorCurrentIndex) ? $this->__iteratorCurrentIndex : null;\n }", "public function key(): mixed {\n return key($this->data);\n }", "#[\\ReturnTypeWillChange]\n public function key()\n {\n return key($this->_data);\n }", "#[\\ReturnTypeWillChange]\n public function key()\n {\n return key($this->_data);\n }", "public function key()\n {\n $keys = $this->getKeys();\n return $keys[ $this->databag_current_position ];\n }", "public function key()\n {\n return key($this->aData);\n }", "public function key()\r\n\t{\r\n\t\treturn $this->cursor->key();\r\n\t}", "public function key()\n\t{\n\t\treturn $this->cursor->key();\n\t}", "public function key() {\n return $this->cursor;\n }", "public function key()\n {\n return key($this->_data);\n }", "public function key() : mixed {\n\t\treturn key($this->data);\n\t}", "public function key()\n {\n return $this->cursor->key();\n }", "public function key()\n {\n return $this->cursor->key();\n }", "public function key()\n {\n return $this->cursor->key();\n }", "public function key()\n {\n return $this->idx;\n }", "public function key()\n {\n return $this->idx;\n }", "public function key() {\n return key($this->data);\n }", "public function key()\n {\n $pos = $this->_itpos;\n return (isset($this->_it[$pos])) ? $this->_it[$pos] : null;\n }", "public function key()\n\t{\n\t\treturn $this->_index;\n\t}", "public function key() {\n return $this->index;\n }", "public function key()\n {\n return key($this->data);\n }", "public function key()\n {\n //var_dump(__METHOD__);\n return $this->keys[$this->position];\n }", "public function key()\n {\n return $this->index;\n }", "public function key()\n {\n return $this->index;\n }", "public function key()\n {\n return $this->index;\n }", "public function key()\n {\n return $this->index;\n }", "public function key()\n {\n return $this->index;\n }", "public function key()\n {\n return $this->index;\n }", "public function key()\n {\n return $this->currIndex;\n }" ]
[ "0.77219635", "0.7408127", "0.7373333", "0.7304693", "0.7304693", "0.729271", "0.72881126", "0.72615004", "0.72345114", "0.72119087", "0.7198774", "0.7193326", "0.71765053", "0.71765053", "0.71765053", "0.7139678", "0.7139678", "0.7128336", "0.7119356", "0.7116434", "0.70891774", "0.7086573", "0.7081001", "0.70629376", "0.70629376", "0.70629376", "0.70629376", "0.70629376", "0.70629376", "0.7043089" ]
0.74097276
1
Render HTML error page
private function renderHtmlErrorMessage() { $title = 'DrMVC Application Error'; $html = '<p>A website error has occurred. Sorry for the temporary inconvenience.</p>'; $output = sprintf( "<html><head><meta http-equiv='Content-Type' content='text/html; charset=utf-8'>" . "<title>%s</title><style>body{margin:0;padding:30px;font:12px/1.5 Helvetica,Arial,Verdana," . "sans-serif;}h1{margin:0;font-size:48px;font-weight:normal;line-height:48px;}strong{" . "display:inline-block;width:65px;}</style></head><body><h1>%s</h1>%s</body></html>", $title, $title, $html ); return $output; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected function displayErrorPage()\n {\n $content = '';\n\n if ( $this->commandLine == null ) {\n $content .= \"<html>\\n\";\n $content .= \"<head><title>Unexpected Error</title></head>\\n\";\n $content .= \"<body>\\n\";\n $content .= \"<h1>Unexpected Error</h1>\\n\";\n $content .= \"<p>An unexpected error occured while processing the request.</p>\\n\";\n $content .= \"</body>\\n\";\n $content .= \"</html>\\n\";\n } else {\n $content .= \"An unexpected error occured while executing the command.\\n\";\n }\n\n $this->response->setContentType( 'text/html; charset=UTF-8' );\n $this->response->setContent( $content );\n\n $this->response->send();\n }", "public function errorAction() {\n $this->_helper->viewRenderer->setNoRender(true);\n \n $error = $this->_getParam('error_handler');\n $append_strace = False;\n \n $resp = $this->getResponse();\n $resp->setHeader('Content-Type', 'text/plain');\n\n switch(get_class($error->exception)) {\n case 'PageNotFoundException':\n $resp->setRawHeader('HTTP/1.1 404 Not Found');\n break;\n \n case 'MissingDataException':\n $resp->setRawHeader('HTTP/1.1 500 Internal Server Error');\n break;\n \n case 'TransformException':\n $resp->setRawHeader('HTTP/1.1 500 Internal Server Error');\n break;\n \n default:\n $resp->setRawHeader('HTTP/1.1 500 Internal Server Error');\n $append_strace = True;\n break;\n }\n $resp->sendHeaders();\n\n echo $error->exception->getMessage();\n if ($append_strace) {\n echo \"\\n\";\n echo $error->exception->getTraceAsString();\n } \n }", "public function error(): void\n {\n //Build and render view\n $this->data['title'] = 'Ошибка :: Доступ запрещён';\n $this->view->addPart('common' . DS . 'header');\n $this->view->addPart('deny');\n $this->view->addPart('common' . DS . 'footer');\n $this->view->render($this->data);\n }", "public static function errorPage() {\n\n $smarty = Utils::smartyInit();\n $smarty->display('error.html');\n exit;\n }", "function gen_main_error()\n{\n \n include_htm(\"main/error.htm\");\n\n}", "public function errorAction()\n {\n return $this->render('SurveyBundle:Survey:error.html.twig');\n }", "protected function buildHtmlResponse()\n {\n if (isset($this->view)) {\n $template = 'errors/' . $this->getStatusCode();\n\n if (!$this->view->exists($template)) {\n $template = 'errors/all';\n }\n\n if ($this->view->exists($template)) {\n return $this->view->render($template, [\n 'exception' => $this->getException()\n ]);\n }\n }\n\n return $this->getException()->getMessage();\n }", "function error($Err)\r\n{\r\n\t$pages = getPages();\r\n\trender(\"error\", array(\r\n\t\t\"Err\" => $Err,\r\n\t\t'pages' => $pages));\r\n}", "function errorHTML($error)\n\t{\n\t\treturn \"<html><body><h1>An error has occurred</h1><p>{$error}</p></body></html>\";\n\t}", "public function actionError()\n\t{\n\t\t$this->renderPartial('error');\n\t}", "public function actionError()\n {\n if($error=Yii::app()->errorHandler->error)\n $this->render('error', $error);\n }", "public static function showStaticErrorPage()\n\t{\n\t\tif(Enviroment::isWebEnviroment() && !self::$showingErrorPage)\n\t\t{\n\t\t\tself::$showingErrorPage = true;\n\t\t\t$charset = LocalConfiguration::get('page.charset');\n\n\t\t\t// if is an Ajax request we send an Ajax response\n\t\t\tif(class_exists('CurrentHttpRequest') && CurrentHttpRequest::getInstance()->isAjaxRequest())\n\t\t\t{\n\t\t\t\t$msg = Text::plain(Language::getInstance('Error')->getSentence('page.message'));\n\t\t\t\t$uid = Object::hasMethod(self::getFirst(), 'getUid') ? self::getFirst()->getUid() : null;\n\t\t\t\t$responseType = 'text/xml';\n\t\t\t\t$responseContent = \"<?xml version='1.0' encoding='{$charset}'?\" . \">\\n<serverResponse><error>{$msg} ({$uid})</error></serverResponse>\";\n\t\t\t}\n\t\t\t// otherwise we output the page\n\t\t\telse\n\t\t\t{\n\t\t\t\t$responseType = 'text/html';\n\t\t\t\t$responseContent = null;\n\t\t\t}\n\n\t\t\ttry{\n\t\t\t\t// we send the header inside a try/catch to avoid \"headers sent\"\n\t\t\t\t// errors\n\t\t\t\tif(!headers_sent())\n\t\t\t\t\theader(\"Content-Type: {$responseType}; charset={$charset}\", true, 500);\n\t\t\t}\n\t\t\tcatch(Exception $ex){\n\t\t\t}\n\n\t\t\tBuffer::clean(true);\n\n\t\t\tif(is_null($responseContent))\n\t\t\t\trequire Enviroment::getPath('apps') . 'system' . Enviroment::DIR_SEP . 'layers' . Enviroment::DIR_SEP . 'view' . Enviroment::DIR_SEP . 'page' . Enviroment::DIR_SEP . 'Error.php';\n\t\t\telse\n\t\t\t\techo $responseContent;\n\n\t\t\texit(0);\n\t\t}\n\t}", "function pageError($err,$text) {\n\theader(\"HTTP/1.0 \".$err.' '.$text);\n\theader(\"Status: \".$err.' '.$text);\n\techo \"<html xmlns=\\\"http://www.w3.org/1999/xhtml\\\"><head>\t<title>\".$err.\" - \".$text.\"</TITLE>\t<META NAME=\\\"ROBOTS\\\" CONTENT=\\\"NOINDEX, FOLLOW\\\"></head>\";\n\techo \"<BODY bgcolor=\\\"#ffffff\\\" text=\\\"#000000\\\" link=\\\"#0000ff\\\" vlink=\\\"#0000ff\\\" alink=\\\"#0000ff\\\">\";\n\techo \"<FONT face=\\\"Helvitica,Arial,Sans-serif\\\" size=\\\"2\\\">\";\n\techo \"<b>\".sprintf(gettext('Page error: %2$s (%1$s)'),$err, $text).\"</b><br /><br />\";\n\techo \"</body></html>\";\n}", "public function getErrorPage() {\n $this->template = $this->viewDirectory.Registry::get(\"ERROR_VIEW\").$this->viewExtension;\n $this->outputMode = self::OUTPUT_XSL;\n return $this->execute();\n }", "public static function html_error($msg) {\r\n\t echo \"<font color='red'>FEHLER: \".$msg.\"</font><br/>\\n\";\r\n\t}", "public function index()\n {\n header('HTTP/1.0 404 Not Found');\n $this->View->render('error/index');\n }", "public function outputError(): string\n {\n if ($this->error != null) {\n $errorClass = count($this->errorClasses) > 0 ? ' class=\"' . implode(' ', $this->errorClasses) . '\"' : '';\n return '<div' . $errorClass . ' id=\"' . $this->attributes['id'] . '-errortext\">' . $this->error . '</div>';\n }\n return '';\n }", "public function error()\n\t{\n\t?>\n\t\t<div class=\"row\">\n\t\t\t<div class=\"col-lg-12 text-center\">\n\t\t\t\t<h1 class=\"page-header\">Page Not Found <small class=\"text-danger\">Error 404</small></h1>\n\t\t\t\t<p>\n\t\t\t\t\tThe page you requested could not be found, either contact your webmaster or try again.<br />\n\t\t\t\t\tUse your browsers <b>Back</b> button to navigate to the page you have previously<br />\n\t\t\t\t\tcome from <b>or you could just press this neat little button :</b>\n\t\t\t\t</p>\n\t\t\t\t<a href=\"admin.php?mod=home\" class=\"btn btn-sm btn-primary\"><i class=\"fa fa-home\"></i> Take Me Home</a>\n\t\t\t</div>\n\t\t</div>\n\t<?php\n\t}", "public function error(){\r\n\t\t\trequire_once('view/pages/error.php');\r\n\t\t}", "public function outputFriendlyError()\n\t{\n\t\tob_end_clean();\n\t\t_view('errors/generic');\n\t\texit;\n\t}", "public function render($error)\n\t{\n\t\ttry\n\t\t{\n\t\t\tif (!$this->document)\n\t\t\t{\n\t\t\t\t// We're probably in an CLI environment\n\t\t\t\texit($error->getMessage());\n\t\t\t}\n\n\t\t\t$this->document->setType('error');\n\n\t\t\t// Push the error object into the document\n\t\t\t$this->document->setError($error);\n\n\t\t\tif (ob_get_contents())\n\t\t\t{\n\t\t\t\tob_end_clean();\n\t\t\t}\n\n\t\t\t$this->document->setTitle(\\Lang::txt('Error') . ': ' . $error->getCode());\n\n\t\t\t$template = $this->template->load();\n\n\t\t\t$data = $this->document->render(\n\t\t\t\tfalse,\n\t\t\t\tarray(\n\t\t\t\t\t'template' => $template->template,\n\t\t\t\t\t'directory' => dirname($template->path),\n\t\t\t\t\t'debug' => $this->debug\n\t\t\t\t)\n\t\t\t);\n\n\t\t\t// Failsafe to get the error displayed.\n\t\t\tif (empty($data))\n\t\t\t{\n\t\t\t\texit($error->getMessage() . ' in ' . $error->getFile() . ':' . $error->getLine());\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$status = $error->getCode() ? $error->getCode() : 500;\n\t\t\t\t$status = ($status < 100 || $status >= 600) ? 500 : $status;\n\n\t\t\t\t$response = new Response($data, $status);\n\t\t\t\t$response->send();\n\n\t\t\t\texit();\n\t\t\t}\n\t\t}\n\t\tcatch (Exception $e)\n\t\t{\n\t\t\t$plain = new Plain($this->debug);\n\t\t\t$plain->render($e);\n\t\t}\n\t}", "function send_error_to_browser($text) {\n\t\techo fillTemplate(Settings::get(\"error_to_browser\"), array('text' => $text));\n\t}", "protected function renderInternalServerErrorPage()\n {\n $response = new HttpResponse(\"\n <h1>Internal server error</h1>\n <p>The server encountered an internal error misconfiguration and was unable to complete your request.</p>\", 500);\n return $response;\n }", "protected function renderErrorPage($code)\n\t{\n\t\t\\spcms\\core\\Response::setHttpStatus($code);\n\t}", "function error404view()\r\n{\r\n\tstartOfPage();\r\n\tuserForm();\r\n\techo '<div align=center style=\"border:2px solid red\"><b><h3>' .PHP_EOL;\r\n\techo 'Error 404 : Page not found<br/>' .PHP_EOL;\r\n\techo 'Wrong view parameter' .PHP_EOL;\r\n\techo '</h3></b></div>' .PHP_EOL;\r\n\tendOfPage();\r\n}", "function renderErrors() {\n\t\treturn $this->dump( 'errors' );\n\t}", "public function displayError()\r\n\t{\r\n\t\theader($this->header);\r\n\t\techo \"Invalid access\";\t\r\n\t}", "public function generateErrorResponse() : void\n {\n @ob_clean();\n http_response_code($this->getHTTPStatusCode());\n header('Content-Type: text/plain');\n foreach ($this->getResponseHeaders() AS $header) {\n header($header);\n }\n echo $this->getMessage();\n exit;\n }", "public function getHtmlError()\n\t{\n\t\treturn \"<p><strong style='color:red'>{$this->code}: \" . str_replace('&lt;', '<', str_replace('&gt;', '>', htmlentities($this->message, ENT_COMPAT, Text::detectEncoding($this->message)))) . '</strong></p>';\n\t}", "public function actionError()\n {\n $this->layout = '/layouts/content_2';\n if ($this->isMobile) {\n $this->layout = '/layouts/main_mobile';\n }\n if ($error = Yii::app()->errorHandler->error) {\n if (Yii::app()->request->isAjaxRequest) {\n echo $error['message'];\n } else {\n $this->render('error', $error);\n }\n }\n }" ]
[ "0.77702636", "0.7500082", "0.7499265", "0.74292165", "0.7198282", "0.7127937", "0.7123111", "0.7084537", "0.70357984", "0.70031285", "0.69821775", "0.6976676", "0.6930748", "0.6925204", "0.6893577", "0.6858777", "0.68174046", "0.676877", "0.6744631", "0.6742054", "0.6716118", "0.6712606", "0.670884", "0.67071164", "0.6699001", "0.669499", "0.6659661", "0.6656288", "0.66364944", "0.663164" ]
0.79753804
0
Returns the currency for the given code
public final function getCurrency($code) { $currencies = $this->getCurrencies(); if (!isset($currencies[$code])) throw new InvalidArgumentException(sprintf( 'The currency "%s" does not exist. Valids: %s', $code, implode(', ', array_keys($currencies)))); return $currencies[$code]; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private function getCurrencyByCode($code)\n\t{\n\t\treturn $this->db->get_where($this->c_table, array( \"code\" => $code ))->row_array();\n\t}", "public function get_currency_rate_by_code($code = 'EUR')\n {\n $this->db->where('code', $code);\n $query = $this->db->get('currencies_rates');\n if ($query->num_rows()) {\n $record = $query->row_array();\n return $record['rate'];\n }\n return '1';\n }", "public function getCurrencyCode()\n {\n return $this->params['currency_code'];\n }", "public function getCurrencyCode()\n {\n return $this->currency_code;\n }", "public function getCurrencyCode()\n {\n return $this->currency_code;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "public function getCurrencyCode()\n {\n return $this->currencyCode;\n }", "private function getCurrencyByCode($isoCode)\n {\n $currency = null;\n if ($isoCode) {\n if (isset($this->currencyCode[$isoCode])) {\n return $this->currencyCode[$isoCode];\n }\n $currency = Currency::getCurrency(Currency::getIdByIsoCode($isoCode));\n if ($currency) {\n $this->currencyCode[$isoCode] = $currency;\n } else {\n $this->currencyCode[$isoCode] = $this->context->currency;\n }\n return $this->currencyCode[$isoCode];\n } else {\n return $this->context->currency;\n }\n }", "public function getCurrencyCode(): float|string\n {\n $_order = $this->getOrder();\n return $_order->getOrderCurrencyCode();\n }", "public function getCurrencyCode()\n {\n return isset($this->currency_code) ? $this->currency_code : '';\n }", "public function getCurrencyCode()\n {\n return isset($this->currencyCode) ? $this->currencyCode : null;\n }", "public function get_currency( $currency_code = '' ) {\n\t\tif ( empty( $currency_code ) ) {\n\t\t\t$currency_code = GFCommon::get_currency();\n\t\t}\n\n\t\treturn new RGCurrency( $currency_code );\n\t}", "public function getCurrencyCode()\n {\n if (is_null($this->currencyCode)) {\n /** @psalm-var ?string $data */\n $data = $this->raw(self::FIELD_CURRENCY_CODE);\n if (is_null($data)) {\n return null;\n }\n $this->currencyCode = (string) $data;\n }\n\n return $this->currencyCode;\n }", "public function getRate($currencyCode);", "public function getCurrency();", "public function getCurrency();", "public function getCurrency();", "public function getCurrency();", "public function getCurrency();", "public function getPricingCurrencyCode()\n {\n return $this->pricingCurrencyCode;\n }", "public function currency() {\n $rest_client = new RESTClient($this->api_key, 'currency', $this->account_type);\n return $rest_client->get(array());\n }", "protected function _getCurrencyCode()\n {\n return Mage::app()->getStore()->getCurrentCurrencyCode();\n }", "private static function getCurrencyCode() {\n if (!isset(self::$currencyCode)) {\n $localeconv = localeconv();\n\n self::$currencyCode = ($localeconv['currency_symbol'] != '') ? $localeconv['currency_symbol']\n : $localeconv['int_curr_symbol'];\n\n if (self::$currencyCode == '') {\n // Default to $\n self::$currencyCode = '$';\n }\n }\n\n return self::$currencyCode;\n }", "public static function currency($number, $currencyCode) {\n\t\t// if the currency doesn't have a function defined for itself, give us a default\n\t\t$function = (!is_callable('self::_to' . $currencyCode)) ? '_to' . self::CURRENCY : '_to' . $currencyCode;\n\t\t\n return self::$function($number);\n\t}", "public function currency(): string\n {\n return $this->data['currency'];\n }", "public function get_currency(){\n\t\t$options = Domainmap_Plugin::instance()->get_options();\n\t\treturn isset( $options[self::RESELLER_ID]['currency'] ) ? $options[self::RESELLER_ID]['currency'] : \"USD\";\n\t}", "public function getCurrencyCode() {\n\t\t// return $this -> ip_info($_SERVER[\"REMOTE_ADDR\"], \"Location\");\n\t\t$get_remote_ip_info = $this -> ip_info($_SERVER[\"REMOTE_ADDR\"], \"Location\");\n\n\t\t$country_currency = GetCurrency::where(array('country' => $get_remote_ip_info['country_code'])) -> first();\n\t\t// print_r($country_currency);\n\t\tif (!empty($country_currency)) {\n\t\t\t$currency_code = $country_currency -> currency;\n\t\t} else {\n\t\t\t$currency_code = 'INR';\n\t\t}\n\n\t\t$user_currency = $currency_code;\n\n\t\treturn $user_currency;\n\t}", "private function calculateCurrency($currencyCode , $amountToConvert){\n $endpoint = 'live';\n $access_key = 'e0be2dcc7789103833a32aa33c777ed6';\n\n $from = 'PLN';\n $to = $currencyCode;\n $amount = $amountToConvert;\n\n // initialize CURL:\n $ch = curl_init('http://apilayer.net/api/'.$endpoint.'?access_key='.$access_key.'&currencies='.$from.','.$to.'&format=1'); \n curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);\n\n // get the (still encoded) JSON data:\n $json = curl_exec($ch);\n curl_close($ch);\n\n // Decode JSON response:\n $conversionResult = json_decode($json, true);\n $keys = array_keys($conversionResult['quotes']);\n \n //Wartość 1 USD w PLN\n $valueOfPLN = $conversionResult['quotes'][$keys[0]];\n //Wartość 1 USD w jednostkach wybranej waluty\n $valueOfForeign = $value = $conversionResult['quotes'][$keys[1]];\n //Suma posiadanych USD razy wartość wybranej waluty\n $result = ($amount / $valueOfPLN) * $valueOfForeign;\n \n return number_format($result, 2, '.','');\n }" ]
[ "0.7923358", "0.7504046", "0.74451685", "0.73513836", "0.73513836", "0.7285849", "0.7285849", "0.7285849", "0.7285849", "0.725508", "0.7152776", "0.7094052", "0.7092623", "0.70706445", "0.6991691", "0.69844365", "0.697391", "0.697391", "0.697391", "0.697391", "0.697391", "0.6943763", "0.6903322", "0.68744814", "0.68698794", "0.68647355", "0.68112713", "0.67922145", "0.671261", "0.67048794" ]
0.772475
1